forked from cerc-io/cosmos-explorer
add importing evmos address from ledger
This commit is contained in:
parent
858ca2920c
commit
37d4ff511c
10
.eslintrc.js
10
.eslintrc.js
@ -3,7 +3,14 @@ module.exports = {
|
|||||||
env: {
|
env: {
|
||||||
node: true,
|
node: true,
|
||||||
},
|
},
|
||||||
extends: ['plugin:vue/recommended', '@vue/airbnb'],
|
extends: [
|
||||||
|
'@vue/airbnb',
|
||||||
|
'plugin:vue/recommended',
|
||||||
|
// "plugin:@typescript-eslint/recommended",
|
||||||
|
"plugin:import/typescript",
|
||||||
|
// "plugin:prettier/recommended",
|
||||||
|
// "prettier/@typescript-eslint"
|
||||||
|
],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
parser: '@babel/eslint-parser',
|
parser: '@babel/eslint-parser',
|
||||||
},
|
},
|
||||||
@ -26,5 +33,6 @@ module.exports = {
|
|||||||
'vuejs-accessibility/anchor-has-content': 'off',
|
'vuejs-accessibility/anchor-has-content': 'off',
|
||||||
'no-unsafe-optional-chaining': 1,
|
'no-unsafe-optional-chaining': 1,
|
||||||
'vuejs-accessibility/label-has-for': 1,
|
'vuejs-accessibility/label-has-for': 1,
|
||||||
|
'import/extensions': 'off'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
"analyz": "vue-cli-service build --report"
|
"analyz": "vue-cli-service build --report"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@tharsis/address-converter": "^0.1.7",
|
||||||
|
"@tharsis/transactions": "^0.2.2",
|
||||||
"@casl/ability": "4.1.6",
|
"@casl/ability": "4.1.6",
|
||||||
"@casl/vue": "1.1.1",
|
"@casl/vue": "1.1.1",
|
||||||
"@cosmjs/amino": "^0.28.4",
|
"@cosmjs/amino": "^0.28.4",
|
||||||
|
86
src/libs/client/AminoTypes.ts
Normal file
86
src/libs/client/AminoTypes.ts
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/naming-convention */
|
||||||
|
import { AminoMsg } from "@cosmjs/amino";
|
||||||
|
import { EncodeObject } from "@cosmjs/proto-signing";
|
||||||
|
|
||||||
|
export interface AminoConverter {
|
||||||
|
readonly aminoType: string;
|
||||||
|
readonly toAmino: (value: any) => any;
|
||||||
|
readonly fromAmino: (value: any) => any;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** A map from protobuf type URL to the AminoConverter implementation if supported on chain */
|
||||||
|
export type AminoConverters = Record<string, AminoConverter | "not_supported_by_chain">;
|
||||||
|
|
||||||
|
function isAminoConverter(
|
||||||
|
converter: [string, AminoConverter | "not_supported_by_chain"],
|
||||||
|
): converter is [string, AminoConverter] {
|
||||||
|
return typeof converter[1] !== "string";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A map from Stargate message types as used in the messages's `Any` type
|
||||||
|
* to Amino types.
|
||||||
|
*/
|
||||||
|
export class AminoTypes {
|
||||||
|
// The map type here ensures uniqueness of the protobuf type URL in the key.
|
||||||
|
// There is no uniqueness guarantee of the Amino type identifier in the type
|
||||||
|
// system or constructor. Instead it's the user's responsibility to ensure
|
||||||
|
// there is no overlap when fromAmino is called.
|
||||||
|
private readonly register: Record<string, AminoConverter | "not_supported_by_chain">;
|
||||||
|
|
||||||
|
public constructor(types: AminoConverters) {
|
||||||
|
this.register = types;
|
||||||
|
}
|
||||||
|
|
||||||
|
public toAmino({ typeUrl, value }: EncodeObject): AminoMsg {
|
||||||
|
const converter = this.register[typeUrl];
|
||||||
|
if (converter === "not_supported_by_chain") {
|
||||||
|
throw new Error(
|
||||||
|
`The message type '${typeUrl}' cannot be signed using the Amino JSON sign mode because this is not supported by chain.`,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (!converter) {
|
||||||
|
throw new Error(
|
||||||
|
`Type URL '${typeUrl}' does not exist in the Amino message type register. ` +
|
||||||
|
"If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. " +
|
||||||
|
"If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
type: converter.aminoType,
|
||||||
|
value: converter.toAmino(value),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public fromAmino({ type, value }: AminoMsg): EncodeObject {
|
||||||
|
const matches = Object.entries(this.register)
|
||||||
|
.filter(isAminoConverter)
|
||||||
|
.filter(([_typeUrl, { aminoType }]) => aminoType === type);
|
||||||
|
|
||||||
|
switch (matches.length) {
|
||||||
|
case 0: {
|
||||||
|
throw new Error(
|
||||||
|
`Amino type identifier '${type}' does not exist in the Amino message type register. ` +
|
||||||
|
"If you need support for this message type, you can pass in additional entries to the AminoTypes constructor. " +
|
||||||
|
"If you think this message type should be included by default, please open an issue at https://github.com/cosmos/cosmjs/issues.",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
case 1: {
|
||||||
|
const [typeUrl, converter] = matches[0];
|
||||||
|
return {
|
||||||
|
typeUrl: typeUrl,
|
||||||
|
value: converter.fromAmino(value),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
throw new Error(
|
||||||
|
`Multiple types are registered with Amino type identifier '${type}': '` +
|
||||||
|
matches
|
||||||
|
.map(([key, _value]) => key)
|
||||||
|
.sort()
|
||||||
|
.join("', '") +
|
||||||
|
"'. Thus fromAmino cannot be performed.",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,40 +1,85 @@
|
|||||||
|
|
||||||
import { AccountData, AminoSignResponse, encodeSecp256k1Signature, OfflineAminoSigner, StdSignature, StdSignDoc } from "@cosmjs/amino";
|
import { AminoSignResponse, OfflineAminoSigner, Pubkey, StdSignature, StdSignDoc } from "@cosmjs/amino";
|
||||||
|
import { AddressAndPubkey } from "@cosmjs/ledger-amino";
|
||||||
import Transport from "@ledgerhq/hw-transport";
|
import Transport from "@ledgerhq/hw-transport";
|
||||||
|
|
||||||
import Eth from "@ledgerhq/hw-app-eth";
|
import Eth from "@ledgerhq/hw-app-eth";
|
||||||
import { LedgerEthTransactionResolution, LoadConfig } from "@ledgerhq/hw-app-eth/lib/services/types";
|
import { LedgerEthTransactionResolution, LoadConfig } from "@ledgerhq/hw-app-eth/lib/services/types";
|
||||||
import { toHex } from "@cosmjs/encoding";
|
import { fromBech32, toHex } from "@cosmjs/encoding";
|
||||||
|
import TransportWebBLE from '@ledgerhq/hw-transport-web-ble'
|
||||||
|
import TransportWebUSB from '@ledgerhq/hw-transport-webusb'
|
||||||
|
import { HdPath } from "@cosmjs/crypto";
|
||||||
|
import { ethToCosmos } from '@tharsis/address-converter'
|
||||||
|
import eth from "@tharsis/proto/dist/proto/ethermint/crypto/v1/ethsecp256k1/keys";
|
||||||
|
|
||||||
class EthereumLedgerSigner implements OfflineAminoSigner {
|
export type Algo = "secp256k1" | "ed25519" | "sr25519" | "ethsecp256k1";
|
||||||
|
export interface AccountData {
|
||||||
|
/** A printable address (typically bech32 encoded) */
|
||||||
|
readonly address: string;
|
||||||
|
readonly algo: Algo;
|
||||||
|
readonly pubkey: Uint8Array;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class EthereumLedgerSigner {
|
||||||
app: Eth
|
app: Eth
|
||||||
hdpath: string
|
hdpath: string
|
||||||
constructor(trasport: Transport, hdpath: string, scrambleKey?: string, loadConfig?: LoadConfig) {
|
|
||||||
this.app = new Eth(trasport, scrambleKey, loadConfig)
|
static async create(protocol: string, hdpath: string, scrambleKey = "w0w", loadConfig?: LoadConfig): Promise<EthereumLedgerSigner> {
|
||||||
|
let transport: Promise<Transport> = protocol === 'ledgerBle' ? TransportWebBLE.create() : TransportWebUSB.create()
|
||||||
|
return transport.then(t => {
|
||||||
|
let instance = new EthereumLedgerSigner()
|
||||||
|
instance.hdpath = hdpath
|
||||||
|
instance.app = new Eth(t, scrambleKey, loadConfig)
|
||||||
|
return instance
|
||||||
|
})
|
||||||
}
|
}
|
||||||
async getAccounts(): Promise<readonly AccountData[]> {
|
async getAccounts(): Promise<readonly AccountData[]> {
|
||||||
return this.app.getAddress(this.hdpath).then(x => {
|
console.log('eth:', this.app, this.hdpath)
|
||||||
const x2: AccountData = {
|
|
||||||
|
return this.app.getAddress("44'/60'/0'/0/0").then(x => {
|
||||||
|
const x1: AccountData = {
|
||||||
pubkey: new TextEncoder().encode(x.publicKey),
|
pubkey: new TextEncoder().encode(x.publicKey),
|
||||||
address: x.address,
|
address: x.address,
|
||||||
algo: "secp256k1"
|
algo: "ethsecp256k1" // should be 'ethsecp256k1'
|
||||||
}
|
}
|
||||||
return [x2]
|
const x2: AccountData = {
|
||||||
|
pubkey: new TextEncoder().encode(x.publicKey),
|
||||||
|
address: ethToCosmos(x.address),
|
||||||
|
algo: "ethsecp256k1" // // should be 'ethsecp256k1'
|
||||||
|
}
|
||||||
|
return [x1, x2]
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
goEthAddress(address) {
|
||||||
|
return `0x${toHex(fromBech32(address).data)}`
|
||||||
|
}
|
||||||
|
|
||||||
|
toPubkey(keyBytes: Uint8Array): Pubkey {
|
||||||
|
return {
|
||||||
|
"type": "ethermint.crypto.v1.ethsecp256k1.PubKey",
|
||||||
|
value: new eth.ethermint.crypto.v1.ethsecp256k1.PubKey({
|
||||||
|
key: keyBytes,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async signAmino(signerAddress: string, signDoc: StdSignDoc): Promise<AminoSignResponse> {
|
async signAmino(signerAddress: string, signDoc: StdSignDoc): Promise<AminoSignResponse> {
|
||||||
|
const ethAddr = this.goEthAddress(signerAddress)
|
||||||
return this.getAccounts().then(list => {
|
return this.getAccounts().then(list => {
|
||||||
const acc = list.find(x => x.address === signerAddress)
|
const acc = list.find(x => x.address === ethAddr)
|
||||||
if (acc) {
|
if (acc) {
|
||||||
const messageHex: string = toHex(new TextEncoder().encode(JSON.stringify(signDoc)))
|
const messageHex: string = toHex(new TextEncoder().encode(JSON.stringify(signDoc)))
|
||||||
this.app.signPersonalMessage(this.hdpath, messageHex).then(r => {
|
this.app.signPersonalMessage(this.hdpath, messageHex).then(result => {
|
||||||
const signature: StdSignature = encodeSecp256k1Signature(acc.pubkey, new TextEncoder().encode(r['s']))
|
const signature: StdSignature = {
|
||||||
|
pub_key: this.toPubkey(acc.pubkey),
|
||||||
|
signature: result['s']
|
||||||
|
}
|
||||||
const output: AminoSignResponse = {
|
const output: AminoSignResponse = {
|
||||||
signed: signDoc,
|
signed: signDoc,
|
||||||
signature
|
signature
|
||||||
}
|
}
|
||||||
console.log(r)
|
console.log(result, output)
|
||||||
return output
|
return output
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -42,7 +87,11 @@ class EthereumLedgerSigner implements OfflineAminoSigner {
|
|||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
signTransaction(rawTxHex: string, resolution: LedgerEthTransactionResolution) {
|
async showAddress(path?: HdPath): Promise<AddressAndPubkey> {
|
||||||
|
return new Promise((r, j) => { })
|
||||||
|
}
|
||||||
|
|
||||||
|
async signTransaction(rawTxHex: string, resolution: LedgerEthTransactionResolution) {
|
||||||
return this.app.signTransaction(this.hdpath, rawTxHex, resolution)
|
return this.app.signTransaction(this.hdpath, rawTxHex, resolution)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
28
src/libs/client/WalletClient.ts
Normal file
28
src/libs/client/WalletClient.ts
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import { AccountData, encodeSecp256k1Pubkey, makeSignDoc as makeSignDocAmino, StdFee } from "@cosmjs/amino"
|
||||||
|
import { EncodeObject, encodePubkey, GeneratedType, isOfflineDirectSigner, makeAuthInfoBytes, OfflineSigner, Registry, TxBodyEncodeObject } from "@cosmjs/proto-signing";
|
||||||
|
import { TxRaw } from 'cosmjs-types/cosmos/tx/v1beta1/tx'
|
||||||
|
import Eth from "@ledgerhq/hw-app-eth";
|
||||||
|
import Transport from '@ledgerhq/hw-transport'
|
||||||
|
import { Int53 } from "@cosmjs/math";
|
||||||
|
import { SignMode } from "cosmjs-types/cosmos/tx/signing/v1beta1/signing";
|
||||||
|
import { fromBase64 } from "@cosmjs/encoding";
|
||||||
|
|
||||||
|
import { SigningStargateClient } from '@cosmjs/stargate'
|
||||||
|
import { assert } from "@cosmjs/utils";
|
||||||
|
import { AminoTypes } from "./aminotypes";
|
||||||
|
|
||||||
|
export interface SignerData {
|
||||||
|
readonly accountNumber: number;
|
||||||
|
readonly sequence: number;
|
||||||
|
readonly chainId: string;
|
||||||
|
}
|
||||||
|
export interface ClientOptions {
|
||||||
|
readonly registry?: Registry;
|
||||||
|
readonly aminoTypes?: AminoTypes;
|
||||||
|
readonly prefix?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class PingWalletClient extends SigningStargateClient {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { SigningStargateClient } from '@cosmjs/stargate'
|
import { SigningStargateClient } from '@cosmjs/stargate'
|
||||||
// import { MsgTransfer } from './msg-transfer'
|
// import { MsgTransfer } from './msg-transfer'
|
||||||
|
// import { createMessageSend } from '@tharsis/transactions'
|
||||||
import { AminoTypes } from './aminotypes'
|
import { AminoTypes } from './aminotypes'
|
||||||
import { MsgSwapExactAmountIn } from '../msg'
|
import { MsgSwapExactAmountIn } from '../msg'
|
||||||
|
|
||||||
@ -25,6 +26,30 @@ export default class PingWalletClient extends SigningStargateClient {
|
|||||||
return instance
|
return instance
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// async signEthermintTransaction(signerAddress, messages, fee, memo, { accountNumber, sequence, chainId }) {
|
||||||
|
// // const msgs = messages.map(msg => this.aminoTypes.toAmino(msg))
|
||||||
|
// const tosign = createMessageSend(chainId, signerAddress, fee, memo, null)
|
||||||
|
// const { signature, signed } = await this.signer.signAmino(tosign.legacyAmino)
|
||||||
|
// // const { signature, signed } = await this.signer.signAmino(signerAddress, signDoc)
|
||||||
|
// const signedTxBody = {
|
||||||
|
// messages,
|
||||||
|
// memo: signed.memo,
|
||||||
|
// }
|
||||||
|
// const signedTxBodyEncodeObject = {
|
||||||
|
// typeUrl: '/cosmos.tx.v1beta1.TxBody',
|
||||||
|
// value: signedTxBody,
|
||||||
|
// }
|
||||||
|
// const signedTxBodyBytes = this.registry.encode(signedTxBodyEncodeObject)
|
||||||
|
// const signedGasLimit = math_1.Int53.fromString(signed.fee.gas).toNumber()
|
||||||
|
// const signedSequence = math_1.Int53.fromString(signed.sequence).toNumber()
|
||||||
|
// const signedAuthInfoBytes = proto_signing_1.makeAuthInfoBytes([{ pubkey: signature.pub_key, sequence: signedSequence }], signed.fee.amount, signedGasLimit, signMode)
|
||||||
|
// return tx_5.TxRaw.fromPartial({
|
||||||
|
// bodyBytes: signedTxBodyBytes,
|
||||||
|
// authInfoBytes: signedAuthInfoBytes,
|
||||||
|
// signatures: [encoding_1.fromBase64(signature.signature)],
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
async signAmino2(signerAddress, messages, fee, memo, { accountNumber, sequence, chainId }) {
|
async signAmino2(signerAddress, messages, fee, memo, { accountNumber, sequence, chainId }) {
|
||||||
const accountFromSigner = (await this.signer.getAccounts()).find(account => account.address === signerAddress)
|
const accountFromSigner = (await this.signer.getAccounts()).find(account => account.address === signerAddress)
|
||||||
if (!accountFromSigner) {
|
if (!accountFromSigner) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
Bech32, fromBase64, fromBech32, fromHex, toHex,
|
Bech32, fromBase64, fromBech32, fromHex, toBech32, toHex,
|
||||||
} from '@cosmjs/encoding'
|
} from '@cosmjs/encoding'
|
||||||
import { sha256, stringToPath } from '@cosmjs/crypto'
|
import { sha256, stringToPath } from '@cosmjs/crypto'
|
||||||
// ledger
|
// ledger
|
||||||
@ -7,6 +7,7 @@ import TransportWebBLE from '@ledgerhq/hw-transport-web-ble'
|
|||||||
import TransportWebUSB from '@ledgerhq/hw-transport-webusb'
|
import TransportWebUSB from '@ledgerhq/hw-transport-webusb'
|
||||||
import CosmosApp from 'ledger-cosmos-js'
|
import CosmosApp from 'ledger-cosmos-js'
|
||||||
import { LedgerSigner } from '@cosmjs/ledger-amino'
|
import { LedgerSigner } from '@cosmjs/ledger-amino'
|
||||||
|
import { ethToEvmos } from '@tharsis/address-converter'
|
||||||
|
|
||||||
import dayjs from 'dayjs'
|
import dayjs from 'dayjs'
|
||||||
import duration from 'dayjs/plugin/duration'
|
import duration from 'dayjs/plugin/duration'
|
||||||
@ -17,6 +18,7 @@ import localeData from 'dayjs/plugin/localeData'
|
|||||||
import { $themeColors } from '@themeConfig'
|
import { $themeColors } from '@themeConfig'
|
||||||
// import { SigningStargateClient } from '@cosmjs/stargate'
|
// import { SigningStargateClient } from '@cosmjs/stargate'
|
||||||
import PingWalletClient from './data/signing'
|
import PingWalletClient from './data/signing'
|
||||||
|
import { EthereumLedgerSigner } from './client/EthereumLedgerSigner.ts'
|
||||||
|
|
||||||
dayjs.extend(localeData)
|
dayjs.extend(localeData)
|
||||||
dayjs.extend(duration)
|
dayjs.extend(duration)
|
||||||
@ -74,12 +76,19 @@ export function pubkeyToAccountAddress(pubkey, prefix) {
|
|||||||
return Bech32.encode(prefix, pubkey, 40)
|
return Bech32.encode(prefix, pubkey, 40)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function toETHAddress(cosmosAddress) {
|
||||||
|
return `0x${toHex(fromBech32(cosmosAddress).data)}`
|
||||||
|
}
|
||||||
|
|
||||||
export function addressDecode(address) {
|
export function addressDecode(address) {
|
||||||
return Bech32.decode(address)
|
if (address.startsWith('0x')) {
|
||||||
|
return fromBech32(ethToEvmos(address))
|
||||||
|
}
|
||||||
|
return fromBech32(address)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function addressEnCode(prefix, pubkey) {
|
export function addressEnCode(prefix, pubkey) {
|
||||||
return Bech32.encode(prefix, pubkey)
|
return toBech32(prefix, pubkey)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getUserCurrency() {
|
export function getUserCurrency() {
|
||||||
@ -175,10 +184,6 @@ export function consensusPubkeyToHexAddress(consensusPubkey) {
|
|||||||
return address
|
return address
|
||||||
}
|
}
|
||||||
|
|
||||||
export function toETHAddress(cosmosAddress) {
|
|
||||||
return `0x${toHex(fromBech32(cosmosAddress).data)}`
|
|
||||||
}
|
|
||||||
|
|
||||||
function toSignAddress(addr) {
|
function toSignAddress(addr) {
|
||||||
const { data } = addressDecode(addr)
|
const { data } = addressDecode(addr)
|
||||||
return addressEnCode('cosmos', data)
|
return addressEnCode('cosmos', data)
|
||||||
@ -192,39 +197,44 @@ function getHdPath(address) {
|
|||||||
hdPath = curr.hdpath
|
hdPath = curr.hdpath
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// return [44, 118, 0, 0, 0]
|
|
||||||
// m/0'/1/2'/2/1000000000
|
// m/0'/1/2'/2/1000000000
|
||||||
return stringToPath(hdPath)
|
return stringToPath(hdPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getLedgerAppName(coinType) {
|
async function getLedgerAppName(coinType, device, hdpath) {
|
||||||
|
let ledgerAppName = 'Cosmos'
|
||||||
switch (coinType) {
|
switch (coinType) {
|
||||||
case 60:
|
case 60:
|
||||||
return 'Ethereum'
|
return EthereumLedgerSigner.create(device, hdpath) // 'Ethereum'
|
||||||
case 529:
|
case 529:
|
||||||
return 'Secret'
|
ledgerAppName = 'Secret' // 'Secret'
|
||||||
|
break
|
||||||
case 852:
|
case 852:
|
||||||
return 'Desmos'
|
ledgerAppName = 'Desmos' // 'Desmos'
|
||||||
|
break
|
||||||
case 118:
|
case 118:
|
||||||
default:
|
default:
|
||||||
return 'Cosmos'
|
|
||||||
}
|
}
|
||||||
|
const transport = await (device === 'ledgerBle' ? TransportWebBLE.create() : TransportWebUSB.create())
|
||||||
|
return new LedgerSigner(transport, { hdPaths: [hdpath], ledgerAppName })
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function sign(device, chainId, signerAddress, messages, fee, memo, signerData) {
|
export async function sign(device, chainId, signerAddress, messages, fee, memo, signerData) {
|
||||||
let transport
|
// let transport
|
||||||
let signer
|
let signer
|
||||||
const hdpath = getHdPath(signerAddress)
|
const hdpath = getHdPath(signerAddress)
|
||||||
const coinType = Number(hdpath[1])
|
const coinType = Number(hdpath[1])
|
||||||
const ledgerName = getLedgerAppName(coinType)
|
// const ledgerName = getLedgerAppName(coinType)
|
||||||
switch (device) {
|
switch (device) {
|
||||||
case 'ledgerBle':
|
case 'ledgerBle':
|
||||||
transport = await TransportWebBLE.create()
|
// transport = await TransportWebBLE.create()
|
||||||
signer = new LedgerSigner(transport, { hdPaths: [hdpath], ledgerAppName: ledgerName })
|
// signer = new LedgerSigner(transport, { hdPaths: [hdpath], ledgerAppName: ledgerName })
|
||||||
|
signer = await getLedgerAppName(coinType, device, hdpath)
|
||||||
break
|
break
|
||||||
case 'ledgerUSB':
|
case 'ledgerUSB':
|
||||||
transport = await TransportWebUSB.create()
|
// transport = await TransportWebUSB.create()
|
||||||
signer = new LedgerSigner(transport, { hdPaths: [hdpath], ledgerAppName: ledgerName })
|
// signer = new LedgerSigner(transport, { hdPaths: [hdpath], ledgerAppName: ledgerName })
|
||||||
|
signer = await getLedgerAppName(coinType, device, hdpath)
|
||||||
break
|
break
|
||||||
case 'keplr':
|
case 'keplr':
|
||||||
default:
|
default:
|
||||||
@ -236,8 +246,6 @@ export async function sign(device, chainId, signerAddress, messages, fee, memo,
|
|||||||
signer = window.getOfflineSignerOnlyAmino(chainId)
|
signer = window.getOfflineSignerOnlyAmino(chainId)
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (signer) return signAmino(signer, signerAddress, messages, fee, memo, signerData)
|
|
||||||
|
|
||||||
// Ensure the address has some tokens to spend
|
// Ensure the address has some tokens to spend
|
||||||
const client = await PingWalletClient.offline(signer)
|
const client = await PingWalletClient.offline(signer)
|
||||||
// const client = await SigningStargateClient.offline(signer)
|
// const client = await SigningStargateClient.offline(signer)
|
||||||
@ -246,11 +254,12 @@ export async function sign(device, chainId, signerAddress, messages, fee, memo,
|
|||||||
}
|
}
|
||||||
|
|
||||||
export async function getLedgerAddress(transport = 'blu', hdPath = "m/44'/118/0'/0/0") {
|
export async function getLedgerAddress(transport = 'blu', hdPath = "m/44'/118/0'/0/0") {
|
||||||
const trans = transport === 'usb' ? await TransportWebUSB.create() : await TransportWebBLE.create()
|
const protocol = transport === 'usb' ? await TransportWebUSB.create() : await TransportWebBLE.create()
|
||||||
// extract Cointype from from HDPath
|
// extract Cointype from from HDPath
|
||||||
const coinType = Number(stringToPath(hdPath)[1])
|
const coinType = Number(stringToPath(hdPath)[1])
|
||||||
const ledgerName = getLedgerAppName(coinType)
|
// const ledgerName = getLedgerAppName(coinType)
|
||||||
const signer = new LedgerSigner(trans, { hdPaths: [stringToPath(hdPath)], ledgerAppName: ledgerName })
|
// const signer = new LedgerSigner(trans, { hdPaths: [stringToPath(hdPath)], ledgerAppName: ledgerName })
|
||||||
|
const signer = await getLedgerAppName(coinType, protocol, hdPath)
|
||||||
return signer.getAccounts()
|
return signer.getAccounts()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,7 +286,7 @@
|
|||||||
|
|
||||||
<b-alert
|
<b-alert
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
:show="!accounts"
|
:show="!accounts && device === 'keplr'"
|
||||||
>
|
>
|
||||||
<h4 class="alert-heading">
|
<h4 class="alert-heading">
|
||||||
Enable Keplr For {{ chainId }}
|
Enable Keplr For {{ chainId }}
|
||||||
@ -390,12 +390,6 @@ export default {
|
|||||||
chains() {
|
chains() {
|
||||||
const config = JSON.parse(localStorage.getItem('chains'))
|
const config = JSON.parse(localStorage.getItem('chains'))
|
||||||
|
|
||||||
Object.values(config).forEach(x => {
|
|
||||||
if (x.coin_type === '60' && x.chain_name !== 'gravity-bridge') {
|
|
||||||
this.exludes.push(x.chain_name)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
this.exludes.forEach(x => {
|
this.exludes.forEach(x => {
|
||||||
delete config[x]
|
delete config[x]
|
||||||
})
|
})
|
||||||
@ -406,8 +400,8 @@ export default {
|
|||||||
const { data } = addressDecode(this.accounts.address)
|
const { data } = addressDecode(this.accounts.address)
|
||||||
return this.selected.map(x => {
|
return this.selected.map(x => {
|
||||||
if (this.chains[x]) {
|
if (this.chains[x]) {
|
||||||
const { logo, addr_prefix } = this.chains[x]
|
const { logo, addr_prefix, coin_type } = this.chains[x]
|
||||||
const addr = addressEnCode(addr_prefix, data)
|
const addr = addressEnCode(addr_prefix, data, coin_type)
|
||||||
return {
|
return {
|
||||||
chain: x, addr, logo, hdpath: this.hdpath,
|
chain: x, addr, logo, hdpath: this.hdpath,
|
||||||
}
|
}
|
||||||
@ -586,6 +580,7 @@ export default {
|
|||||||
case 'ledger':
|
case 'ledger':
|
||||||
case 'ledger2':
|
case 'ledger2':
|
||||||
await this.connect().then(accounts => {
|
await this.connect().then(accounts => {
|
||||||
|
console.log('connect:', accounts)
|
||||||
if (accounts) {
|
if (accounts) {
|
||||||
// eslint-disable-next-line prefer-destructuring
|
// eslint-disable-next-line prefer-destructuring
|
||||||
this.accounts = accounts[0]
|
this.accounts = accounts[0]
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
"es6",
|
"es6",
|
||||||
"es2016"
|
"es2016"
|
||||||
],
|
],
|
||||||
"jsx": "preserve",
|
|
||||||
"allowJs": true,
|
|
||||||
"target": "es6",
|
"target": "es6",
|
||||||
"module": "es2015",
|
"module": "es2015",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
@ -14,7 +12,7 @@
|
|||||||
"allowSyntheticDefaultImports": true
|
"allowSyntheticDefaultImports": true
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*",
|
"src/**/*.ts",
|
||||||
],
|
],
|
||||||
"exclude": ["node_modules"]
|
"exclude": ["node_modules"]
|
||||||
}
|
}
|
165
yarn.lock
165
yarn.lock
@ -1754,6 +1754,47 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@soda/get-current-script/-/get-current-script-1.0.2.tgz#a53515db25d8038374381b73af20bb4f2e508d87"
|
resolved "https://registry.yarnpkg.com/@soda/get-current-script/-/get-current-script-1.0.2.tgz#a53515db25d8038374381b73af20bb4f2e508d87"
|
||||||
integrity sha512-T7VNNlYVM1SgQ+VsMYhnDkcGmWhQdL0bDyGm5TlQ3GBXnJscEClUUOKduWTmm2zCnvNLC1hc3JpuXjs/nFOc5w==
|
integrity sha512-T7VNNlYVM1SgQ+VsMYhnDkcGmWhQdL0bDyGm5TlQ3GBXnJscEClUUOKduWTmm2zCnvNLC1hc3JpuXjs/nFOc5w==
|
||||||
|
|
||||||
|
"@tharsis/address-converter@^0.1.7":
|
||||||
|
version "0.1.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/@tharsis/address-converter/-/address-converter-0.1.7.tgz#c13c4d09f30a5b908e795626a5c4c92f8120d954"
|
||||||
|
integrity sha512-MZvu4mDH52Id7KejrpGEJ0heP9gmPbeG3dn1UrZuNqUwUPlB0/k8Sh2AENJFbRyFY11Nk104QHEFHU+x8KAqyQ==
|
||||||
|
dependencies:
|
||||||
|
bech32 "^2.0.0"
|
||||||
|
crypto-addr-codec "^0.1.7"
|
||||||
|
link-module-alias "^1.2.0"
|
||||||
|
shx "^0.3.4"
|
||||||
|
|
||||||
|
"@tharsis/eip712@^0.2.1":
|
||||||
|
version "0.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@tharsis/eip712/-/eip712-0.2.1.tgz#99ea63830bcdc666e5251d523ea68fe90fd452d8"
|
||||||
|
integrity sha512-j/dGxTsWCCsd6Z6tilohgr4UN6r8q2gvH1anwShzQ5f8+qYcc57aWRQ1YNxe1FjKHQPuLn+Jgd3KEkkD72rqZA==
|
||||||
|
dependencies:
|
||||||
|
link-module-alias "^1.2.0"
|
||||||
|
shx "^0.3.4"
|
||||||
|
|
||||||
|
"@tharsis/proto@^0.1.16":
|
||||||
|
version "0.1.16"
|
||||||
|
resolved "https://registry.yarnpkg.com/@tharsis/proto/-/proto-0.1.16.tgz#f60b0d9ee76894757e90989d97b2372b086cdc2a"
|
||||||
|
integrity sha512-DzjTC0QJBdC9+yUhy78DCPYpZNq68M/ZzNR37AdepnkXe8txc90ht1nYlYaD/Kgs52OT+ORooTPoDdlVQZpZgw==
|
||||||
|
dependencies:
|
||||||
|
"@types/google-protobuf" "^3.15.5"
|
||||||
|
"@types/node" "^17.0.21"
|
||||||
|
google-protobuf "^3.19.4"
|
||||||
|
link-module-alias "^1.2.0"
|
||||||
|
sha3 "^2.1.4"
|
||||||
|
shx "^0.3.4"
|
||||||
|
|
||||||
|
"@tharsis/transactions@^0.2.2":
|
||||||
|
version "0.2.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@tharsis/transactions/-/transactions-0.2.2.tgz#f025c6f6db92c924adc7d6d3ceb7ea3f6918298a"
|
||||||
|
integrity sha512-7grm0BSm9Tc0V2EU0CdCc5pKvZewdm43PwIG4kFjU01tPlirGVsVfx+IPm1+Vdxuo9MmlYrTAwY7KVn0N1wBTg==
|
||||||
|
dependencies:
|
||||||
|
"@tharsis/eip712" "^0.2.1"
|
||||||
|
"@tharsis/proto" "^0.1.16"
|
||||||
|
"@types/node" "^17.0.21"
|
||||||
|
link-module-alias "^1.2.0"
|
||||||
|
shx "^0.3.4"
|
||||||
|
|
||||||
"@trysound/sax@0.2.0":
|
"@trysound/sax@0.2.0":
|
||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad"
|
resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad"
|
||||||
@ -1837,6 +1878,11 @@
|
|||||||
"@types/qs" "*"
|
"@types/qs" "*"
|
||||||
"@types/serve-static" "*"
|
"@types/serve-static" "*"
|
||||||
|
|
||||||
|
"@types/google-protobuf@^3.15.5":
|
||||||
|
version "3.15.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/google-protobuf/-/google-protobuf-3.15.6.tgz#674a69493ef2c849b95eafe69167ea59079eb504"
|
||||||
|
integrity sha512-pYVNNJ+winC4aek+lZp93sIKxnXt5qMkuKmaqS3WGuTq0Bw1ZDYNBgzG5kkdtwcv+GmYJGo3yEg6z2cKKAiEdw==
|
||||||
|
|
||||||
"@types/highlight.js@^9.7.0":
|
"@types/highlight.js@^9.7.0":
|
||||||
version "9.12.4"
|
version "9.12.4"
|
||||||
resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.4.tgz#8c3496bd1b50cc04aeefd691140aa571d4dbfa34"
|
resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.4.tgz#8c3496bd1b50cc04aeefd691140aa571d4dbfa34"
|
||||||
@ -1927,6 +1973,11 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.52.tgz#03c13be70b9031baaed79481c0c0cfb0045e53f7"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.52.tgz#03c13be70b9031baaed79481c0c0cfb0045e53f7"
|
||||||
integrity sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==
|
integrity sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==
|
||||||
|
|
||||||
|
"@types/node@^17.0.21":
|
||||||
|
version "17.0.35"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.35.tgz#635b7586086d51fb40de0a2ec9d1014a5283ba4a"
|
||||||
|
integrity sha512-vu1SrqBjbbZ3J6vwY17jBs8Sr/BKA+/a/WtjRG+whKg1iuLFOosq872EXS0eXWILdO36DHQQeku/ZcL6hz2fpg==
|
||||||
|
|
||||||
"@types/normalize-package-data@^2.4.0":
|
"@types/normalize-package-data@^2.4.0":
|
||||||
version "2.4.1"
|
version "2.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301"
|
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301"
|
||||||
@ -2941,6 +2992,13 @@ balanced-match@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||||
|
|
||||||
|
base-x@^3.0.2, base-x@^3.0.8:
|
||||||
|
version "3.0.9"
|
||||||
|
resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.9.tgz#6349aaabb58526332de9f60995e548a53fe21320"
|
||||||
|
integrity sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==
|
||||||
|
dependencies:
|
||||||
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
base64-js@^1.3.0, base64-js@^1.3.1:
|
base64-js@^1.3.0, base64-js@^1.3.1:
|
||||||
version "1.5.1"
|
version "1.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
||||||
@ -2956,6 +3014,16 @@ bech32@^1.1.4:
|
|||||||
resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9"
|
resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9"
|
||||||
integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==
|
integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==
|
||||||
|
|
||||||
|
bech32@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355"
|
||||||
|
integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==
|
||||||
|
|
||||||
|
big-integer@1.6.36:
|
||||||
|
version "1.6.36"
|
||||||
|
resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.36.tgz#78631076265d4ae3555c04f85e7d9d2f3a071a36"
|
||||||
|
integrity sha512-t70bfa7HYEA1D9idDbmuv7YbsbVkQ+Hp+8KFSul4aE5e/i1bjCNIRYJZlA8Q8p0r9T8cF/RVvwUgRA//FydEyg==
|
||||||
|
|
||||||
big.js@^5.2.2:
|
big.js@^5.2.2:
|
||||||
version "5.2.2"
|
version "5.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
|
resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328"
|
||||||
@ -2990,6 +3058,11 @@ bl@^4.1.0:
|
|||||||
inherits "^2.0.4"
|
inherits "^2.0.4"
|
||||||
readable-stream "^3.4.0"
|
readable-stream "^3.4.0"
|
||||||
|
|
||||||
|
blakejs@^1.1.0:
|
||||||
|
version "1.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814"
|
||||||
|
integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==
|
||||||
|
|
||||||
bluebird@^3.1.1, bluebird@^3.7.2:
|
bluebird@^3.1.1, bluebird@^3.7.2:
|
||||||
version "3.7.2"
|
version "3.7.2"
|
||||||
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
|
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
|
||||||
@ -3151,6 +3224,13 @@ browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.16.3, browserslist@^4
|
|||||||
node-releases "^2.0.3"
|
node-releases "^2.0.3"
|
||||||
picocolors "^1.0.0"
|
picocolors "^1.0.0"
|
||||||
|
|
||||||
|
bs58@^4.0.1:
|
||||||
|
version "4.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a"
|
||||||
|
integrity sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==
|
||||||
|
dependencies:
|
||||||
|
base-x "^3.0.2"
|
||||||
|
|
||||||
buffer-from@^1.0.0:
|
buffer-from@^1.0.0:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
|
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
|
||||||
@ -3161,6 +3241,14 @@ buffer-xor@^1.0.3:
|
|||||||
resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
|
resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
|
||||||
integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==
|
integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==
|
||||||
|
|
||||||
|
buffer@6.0.3, buffer@^6.0.3:
|
||||||
|
version "6.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
|
||||||
|
integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
|
||||||
|
dependencies:
|
||||||
|
base64-js "^1.3.1"
|
||||||
|
ieee754 "^1.2.1"
|
||||||
|
|
||||||
buffer@^5.5.0:
|
buffer@^5.5.0:
|
||||||
version "5.7.1"
|
version "5.7.1"
|
||||||
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
|
resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0"
|
||||||
@ -3169,14 +3257,6 @@ buffer@^5.5.0:
|
|||||||
base64-js "^1.3.1"
|
base64-js "^1.3.1"
|
||||||
ieee754 "^1.1.13"
|
ieee754 "^1.1.13"
|
||||||
|
|
||||||
buffer@^6.0.3:
|
|
||||||
version "6.0.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6"
|
|
||||||
integrity sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==
|
|
||||||
dependencies:
|
|
||||||
base64-js "^1.3.1"
|
|
||||||
ieee754 "^1.2.1"
|
|
||||||
|
|
||||||
builtin-status-codes@^3.0.0:
|
builtin-status-codes@^3.0.0:
|
||||||
version "3.0.0"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
|
resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8"
|
||||||
@ -3737,6 +3817,19 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3:
|
|||||||
shebang-command "^2.0.0"
|
shebang-command "^2.0.0"
|
||||||
which "^2.0.1"
|
which "^2.0.1"
|
||||||
|
|
||||||
|
crypto-addr-codec@^0.1.7:
|
||||||
|
version "0.1.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/crypto-addr-codec/-/crypto-addr-codec-0.1.7.tgz#e16cea892730178fe25a38f6d15b680cab3124ae"
|
||||||
|
integrity sha512-X4hzfBzNhy4mAc3UpiXEC/L0jo5E8wAa9unsnA8nNXYzXjCcGk83hfC5avJWCSGT8V91xMnAS9AKMHmjw5+XCg==
|
||||||
|
dependencies:
|
||||||
|
base-x "^3.0.8"
|
||||||
|
big-integer "1.6.36"
|
||||||
|
blakejs "^1.1.0"
|
||||||
|
bs58 "^4.0.1"
|
||||||
|
ripemd160-min "0.0.6"
|
||||||
|
safe-buffer "^5.2.0"
|
||||||
|
sha3 "^2.1.1"
|
||||||
|
|
||||||
crypto-browserify@^3.12.0:
|
crypto-browserify@^3.12.0:
|
||||||
version "3.12.0"
|
version "3.12.0"
|
||||||
resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
|
resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec"
|
||||||
@ -4927,7 +5020,7 @@ glob-to-regexp@^0.4.1:
|
|||||||
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
|
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
|
||||||
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
|
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
|
||||||
|
|
||||||
glob@^7.1.2, glob@^7.1.3, glob@^7.1.4:
|
glob@^7.0.0, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4:
|
||||||
version "7.2.3"
|
version "7.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
|
||||||
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
|
||||||
@ -4977,6 +5070,11 @@ good-listener@^1.2.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
delegate "^3.1.2"
|
delegate "^3.1.2"
|
||||||
|
|
||||||
|
google-protobuf@^3.19.4:
|
||||||
|
version "3.20.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/google-protobuf/-/google-protobuf-3.20.1.tgz#1b255c2b59bcda7c399df46c65206aa3c7a0ce8b"
|
||||||
|
integrity sha512-XMf1+O32FjYIV3CYu6Tuh5PNbfNEU5Xu22X+Xkdb/DUexFlCzhvv7d5Iirm4AOwn8lv4al1YvIhzGrg2j9Zfzw==
|
||||||
|
|
||||||
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
|
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
|
||||||
version "4.2.10"
|
version "4.2.10"
|
||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c"
|
||||||
@ -5304,7 +5402,7 @@ internal-slot@^1.0.3:
|
|||||||
has "^1.0.3"
|
has "^1.0.3"
|
||||||
side-channel "^1.0.4"
|
side-channel "^1.0.4"
|
||||||
|
|
||||||
interpret@^1.4.0:
|
interpret@^1.0.0, interpret@^1.4.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
|
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
|
||||||
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
|
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
|
||||||
@ -5801,6 +5899,13 @@ lines-and-columns@^1.1.6:
|
|||||||
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
|
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
|
||||||
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
|
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
|
||||||
|
|
||||||
|
link-module-alias@^1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/link-module-alias/-/link-module-alias-1.2.0.tgz#6a3b7b014cfe18b2759a1222fffce6a40fc120e4"
|
||||||
|
integrity sha512-ahPjXepbSVKbahTB6LxR//VHm8HPfI+QQygCH+E82spBY4HR5VPJTvlhKBc9F7muVxnS6C1rRfoPOXAbWO/fyw==
|
||||||
|
dependencies:
|
||||||
|
chalk "^2.4.1"
|
||||||
|
|
||||||
linkify-it@^3.0.1:
|
linkify-it@^3.0.1:
|
||||||
version "3.0.3"
|
version "3.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e"
|
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-3.0.3.tgz#a98baf44ce45a550efb4d49c769d07524cc2fa2e"
|
||||||
@ -6206,7 +6311,7 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^1.1.7"
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6:
|
minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5, minimist@^1.2.6:
|
||||||
version "1.2.6"
|
version "1.2.6"
|
||||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
|
||||||
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
|
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
|
||||||
@ -7357,6 +7462,13 @@ readonly-date@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/readonly-date/-/readonly-date-1.0.0.tgz#5af785464d8c7d7c40b9d738cbde8c646f97dcd9"
|
resolved "https://registry.yarnpkg.com/readonly-date/-/readonly-date-1.0.0.tgz#5af785464d8c7d7c40b9d738cbde8c646f97dcd9"
|
||||||
integrity sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==
|
integrity sha512-tMKIV7hlk0h4mO3JTmmVuIlJVXjKk3Sep9Bf5OH0O+758ruuVkUy2J9SttDLm91IEX/WHlXPSpxMGjPj4beMIQ==
|
||||||
|
|
||||||
|
rechoir@^0.6.2:
|
||||||
|
version "0.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
||||||
|
integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=
|
||||||
|
dependencies:
|
||||||
|
resolve "^1.1.6"
|
||||||
|
|
||||||
regenerate-unicode-properties@^10.0.1:
|
regenerate-unicode-properties@^10.0.1:
|
||||||
version "10.0.1"
|
version "10.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz#7f442732aa7934a3740c779bb9b3340dccc1fb56"
|
resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz#7f442732aa7934a3740c779bb9b3340dccc1fb56"
|
||||||
@ -7472,7 +7584,7 @@ resolve-from@^4.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
|
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
|
||||||
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
|
integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
|
||||||
|
|
||||||
resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.0:
|
resolve@^1.1.6, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.0:
|
||||||
version "1.22.0"
|
version "1.22.0"
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198"
|
||||||
integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==
|
integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==
|
||||||
@ -7514,6 +7626,11 @@ rimraf@^3.0.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.1.3"
|
glob "^7.1.3"
|
||||||
|
|
||||||
|
ripemd160-min@0.0.6:
|
||||||
|
version "0.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/ripemd160-min/-/ripemd160-min-0.0.6.tgz#a904b77658114474d02503e819dcc55853b67e62"
|
||||||
|
integrity sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==
|
||||||
|
|
||||||
ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2:
|
ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c"
|
resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c"
|
||||||
@ -7715,6 +7832,13 @@ sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8:
|
|||||||
inherits "^2.0.1"
|
inherits "^2.0.1"
|
||||||
safe-buffer "^5.0.1"
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
|
sha3@^2.1.1, sha3@^2.1.4:
|
||||||
|
version "2.1.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/sha3/-/sha3-2.1.4.tgz#000fac0fe7c2feac1f48a25e7a31b52a6492cc8f"
|
||||||
|
integrity sha512-S8cNxbyb0UGUM2VhRD4Poe5N58gJnJsLJ5vC7FYWGUmGhcsj4++WaIOBFVDxlG0W3To6xBuiRh+i0Qp2oNCOtg==
|
||||||
|
dependencies:
|
||||||
|
buffer "6.0.3"
|
||||||
|
|
||||||
shallow-clone@^3.0.0:
|
shallow-clone@^3.0.0:
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3"
|
resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3"
|
||||||
@ -7751,6 +7875,23 @@ shell-quote@^1.6.1:
|
|||||||
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123"
|
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123"
|
||||||
integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==
|
integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw==
|
||||||
|
|
||||||
|
shelljs@^0.8.5:
|
||||||
|
version "0.8.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c"
|
||||||
|
integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==
|
||||||
|
dependencies:
|
||||||
|
glob "^7.0.0"
|
||||||
|
interpret "^1.0.0"
|
||||||
|
rechoir "^0.6.2"
|
||||||
|
|
||||||
|
shx@^0.3.4:
|
||||||
|
version "0.3.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/shx/-/shx-0.3.4.tgz#74289230b4b663979167f94e1935901406e40f02"
|
||||||
|
integrity sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==
|
||||||
|
dependencies:
|
||||||
|
minimist "^1.2.3"
|
||||||
|
shelljs "^0.8.5"
|
||||||
|
|
||||||
side-channel@^1.0.4:
|
side-channel@^1.0.4:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
|
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf"
|
||||||
|
Loading…
Reference in New Issue
Block a user