From 3408f0647d687dbca8aa7463660d99082cba55cd Mon Sep 17 00:00:00 2001 From: Pham Tu Date: Thu, 1 Feb 2024 18:48:54 +0700 Subject: [PATCH] add secret network --- chains/mainnet/secret.json | 4 +- package.json | 1 + src/components/WasmVerification.vue | 2 - src/components/dynamic/UInt8Array.vue | 1 - src/components/dynamic/index.ts | 13 +- src/libs/client.ts | 41 +++- src/modules/[chain]/cosmwasm/WasmClient.ts | 16 +- .../[chain]/cosmwasm/[code_id]/contracts.vue | 6 +- .../cosmwasm/[code_id]/transactions.vue | 4 +- src/modules/[chain]/gov/[proposal_id].vue | 2 - src/modules/[chain]/ibc/connStore.ts | 1 - src/modules/[chain]/staking/index.vue | 1 - src/stores/useBaseStore.ts | 4 +- src/stores/useFormatter.ts | 2 - src/stores/useTxDialog.ts | 1 - update_chain.js | 1 - yarn.lock | 193 +++++++++++++++++- 17 files changed, 258 insertions(+), 35 deletions(-) diff --git a/chains/mainnet/secret.json b/chains/mainnet/secret.json index ab70360f..981d357a 100644 --- a/chains/mainnet/secret.json +++ b/chains/mainnet/secret.json @@ -26,5 +26,5 @@ "logo": "/logos/secret.png" } ], - "cosmwasm_enabled": false -} \ No newline at end of file + "cosmwasm_enabled": true +} diff --git a/package.json b/package.json index f6943601..104600f2 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "pinia": "^2.0.28", "postcss": "^8.4.23", "qrcode": "^1.5.3", + "secretjs": "^1.12.4", "tailwindcss": "^3.3.1", "theme-change": "^2.5.0", "vite-plugin-vue-layouts": "^0.7.0", diff --git a/src/components/WasmVerification.vue b/src/components/WasmVerification.vue index e111e313..097eab08 100644 --- a/src/components/WasmVerification.vue +++ b/src/components/WasmVerification.vue @@ -27,10 +27,8 @@ onMounted(() => { const chainId = base.latest?.block?.header?.chainId || 'Oraichain'; // console.log("mounted", `${baseurl}/deploy-histories/neutron?contract=${props.contract}`, chainId.value) const url = `${baseurl}/deploy-histories/${chainId}?contract=${props.contract}`; - console.log('url:', url); get(url) .then((x) => { - console.log('verification:', x); verification.value = x; }) .catch((e) => { diff --git a/src/components/dynamic/UInt8Array.vue b/src/components/dynamic/UInt8Array.vue index 36d2ce8a..de332d67 100644 --- a/src/components/dynamic/UInt8Array.vue +++ b/src/components/dynamic/UInt8Array.vue @@ -20,7 +20,6 @@ const text = computed(() => { default: try { const jsonValue = fromBinary(toBase64(props.value)); - console.log('computed', jsonValue); return parseJSONRecursive(jsonValue); } catch (ex) { return 'Invalid Utf8'; diff --git a/src/components/dynamic/index.ts b/src/components/dynamic/index.ts index f4f80fda..919e4983 100644 --- a/src/components/dynamic/index.ts +++ b/src/components/dynamic/index.ts @@ -11,7 +11,8 @@ import TokenElement from './TokenElement.vue'; import TimestampElement from './TimestampElement.vue'; import ObjectHorizontalElement from './ObjectHorizontalElement.vue'; import Long from 'long'; -import { toBase64 } from '@cosmjs/encoding'; +import { MsgRegistry } from 'secretjs'; +import { toBech32 } from '@cosmjs/encoding'; export function select(v: any, direct?: string) { // if(k === 'txs' && v) { @@ -97,6 +98,8 @@ export const decodeProto = (msg: { ) { // fallback with evmos type = lookupType(evmosProto, typeUrl); + } else if (typeUrl.startsWith('/secret.')) { + type = MsgRegistry.get(typeUrl); } else { type = findType(injProto, typeMap[typeUrl] ?? typeUrl.split('.').pop()); } @@ -110,6 +113,14 @@ export const decodeProto = (msg: { instance.data = decodeProto(instance.data); } + // fix for secret + if (typeUrl.startsWith('/secret.')) { + if (instance.sender) + instance.sender = toBech32('secret', instance.sender); + if (instance.contract) + instance.contract = toBech32('secret', instance.contract); + } + return instance; } }; diff --git a/src/libs/client.ts b/src/libs/client.ts index 7625546d..f1144a99 100644 --- a/src/libs/client.ts +++ b/src/libs/client.ts @@ -91,6 +91,8 @@ import { QueryContractsByCreatorResponse, QueryParamsResponse as QueryWasmParamsResponse, } from 'cosmjs-types/cosmwasm/wasm/v1/query'; +import { QueryClientImpl as SecretWasmQueryClientImpl } from 'secretjs/src/protobuf/secret/compute/v1beta1/query'; + import { toTimestamp } from 'cosmjs-types/helpers'; import type { Event, EventAttribute } from 'cosmjs-types/tendermint/abci/types'; import semver from 'semver'; @@ -106,6 +108,7 @@ import { } from './registry'; import { decodeProto } from '@/components/dynamic'; import { convertStr } from './utils'; +import { AccessType } from 'cosmjs-types/cosmwasm/wasm/v1/types'; export const DEFAULT_SDK_VERSION = '0.45.16'; export const LCD_FALLBACK_CHAINS = ['OraiBtcMainnet']; @@ -152,7 +155,10 @@ export interface ExtraExtension { readonly totalSupply: ( page?: PageRequest ) => Promise; - readonly listCode: (page?: PageRequest) => Promise; + readonly listCode: ( + page?: PageRequest, + secret?: boolean + ) => Promise; readonly wasmParams: () => Promise; readonly bankParams: () => Promise; readonly contractsByCreator: ( @@ -179,6 +185,7 @@ function setupExtraExtension(base: QueryClient) { const govQueryServiceV1 = new GovQueryClientImplV1(rpc); const bankQueryService = new BankQueryClientImpl(rpc); const wasmQueryService = new WasmQueryClientImpl(rpc); + const secretWasmQueryClientImpl = new SecretWasmQueryClientImpl(rpc); const stakingQueryService = new StakingQueryClientImpl(rpc); const tmQueryClientImpl = new TmQueryClientImpl(rpc); return { @@ -218,7 +225,30 @@ function setupExtraExtension(base: QueryClient) { pagination: page?.toPagination(), }); }, - listCode: async (page?: PageRequest) => { + listCode: async ( + page?: PageRequest, + secret = false + ): Promise => { + if (secret) { + const res = await secretWasmQueryClientImpl.Codes({ + pagination: page?.toPagination(), + }); + + return { + codeInfos: res.code_infos.map((codeInfo) => { + return { + codeId: BigInt(codeInfo.code_id), + creator: codeInfo.creator, + dataHash: fromHex(codeInfo.code_hash), + instantiatePermission: { + permission: AccessType.ACCESS_TYPE_EVERYBODY, + address: '', + addresses: [], + }, + }; + }), + }; + } return await wasmQueryService.Codes({ pagination: page?.toPagination(), }); @@ -620,7 +650,6 @@ export class CosmosRestClient extends BaseRestClient { // const paginationKey = page?.key ? fromBase64(page.key) : undefined; const res = await this.queryClient.extra.votes(proposal_id, page); - console.log('vote', proposal_id, res); return res; } async getGovProposalVotesVoter(proposal_id: string, voter: string) { @@ -983,7 +1012,7 @@ export class CosmosRestClient extends BaseRestClient { tx.txRaw = txRaw; }); } - // console.log('getTxs', res); + // @ts-ignore return res; } @@ -1055,10 +1084,10 @@ export class CosmosRestClient extends BaseRestClient { // return this.request(this.registry.mint_inflation, {}); try { const res = await this.queryClient.mint.inflation(); - console.log('getMintInflation', res); + return res; } catch (ex) { - console.log('getMintInflation', ex); + console.log(ex); } } async getMintAnnualProvisions() { diff --git a/src/modules/[chain]/cosmwasm/WasmClient.ts b/src/modules/[chain]/cosmwasm/WasmClient.ts index 9b292856..472ea6ab 100644 --- a/src/modules/[chain]/cosmwasm/WasmClient.ts +++ b/src/modules/[chain]/cosmwasm/WasmClient.ts @@ -122,7 +122,11 @@ export class WasmRestClient extends BaseRestClient { page?.setCountTotal(false); - const res = await this.queryClient.extra.listCode(page); + const res = await this.queryClient.extra.listCode( + page, + blockchain.chainName === 'secret' + ); + return res; } async getWasmCodeById(code_id: string) { @@ -144,10 +148,14 @@ export class WasmRestClient extends BaseRestClient { const res = await this.queryClient.extra.wasmParams(); return res; } - async getWasmContracts(address: string) { + async getWasmContractInfo(address: string) { // return this.request(this.registry.cosmwasm_contract_address, { address }); - const res = await this.queryClient.wasm.getContractInfo(address); - return res; + try { + const res = await this.queryClient.wasm.getContractInfo(address); + return res.contractInfo; + } catch (ex) { + console.log(ex); + } } async getWasmContractsByCreator(creator_address: string, page?: PageRequest) { // if(!page) page = new PageRequest() diff --git a/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue b/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue index 883e00bf..aa18975a 100644 --- a/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue +++ b/src/modules/[chain]/cosmwasm/[code_id]/contracts.vue @@ -13,7 +13,7 @@ const props = defineProps(['code_id', 'chain']); const pageRequest = ref(new PageRequest()); const response = ref({} as QueryContractsByCodeResponse); -const info = ref({} as ContractInfo); +const info = ref({} as ContractInfo | undefined); const dialog = useTxDialog(); const infoDialog = ref(false); const wasmStore = useWasmStore(); @@ -40,8 +40,8 @@ function loadContract(pageNum: number) { loadContract(1); function showInfo(address: string) { - wasmStore.wasmClient.getWasmContracts(address).then((x) => { - info.value = x.contractInfo; + wasmStore.wasmClient.getWasmContractInfo(address).then((x) => { + info.value = x; }); } diff --git a/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue b/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue index 74d3ec8c..355afd8b 100644 --- a/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue +++ b/src/modules/[chain]/cosmwasm/[code_id]/transactions.vue @@ -45,8 +45,8 @@ const contractAddress = String(route.query.contract); onMounted(() => { const address = contractAddress; - wasmStore.wasmClient.getWasmContracts(address).then((x) => { - info.value = x.contractInfo; + wasmStore.wasmClient.getWasmContractInfo(address).then((x) => { + info.value = x; }); chainStore.rpc .getTxs( diff --git a/src/modules/[chain]/gov/[proposal_id].vue b/src/modules/[chain]/gov/[proposal_id].vue index 8b5e5326..06e043ed 100644 --- a/src/modules/[chain]/gov/[proposal_id].vue +++ b/src/modules/[chain]/gov/[proposal_id].vue @@ -63,7 +63,6 @@ store.fetchProposal(props.proposal_id).then((res) => { } // @ts-ignore proposal.value = proposalDetail; - console.log('fetchProposal', proposal.value); // load origin params if the proposal is param change if (changeProposal?.changes) { @@ -220,7 +219,6 @@ function pageload(p: number) { pageRequest.value.setPage(p); store.fetchProposalVotes(props.proposal_id, pageRequest.value).then((x) => { votes.value = x.votes; - console.log('vote', votes.value); pageResponse.value = x.pagination; }); } diff --git a/src/modules/[chain]/ibc/connStore.ts b/src/modules/[chain]/ibc/connStore.ts index d35800d5..f6929ab3 100644 --- a/src/modules/[chain]/ibc/connStore.ts +++ b/src/modules/[chain]/ibc/connStore.ts @@ -42,7 +42,6 @@ export const useIBCModule = defineStore('module-ibc', { : 'chain_1'; }, registryChannels(): any { - console.log('registryChannels', this.registryConf); return this.registryConf.channels; }, }, diff --git a/src/modules/[chain]/staking/index.vue b/src/modules/[chain]/staking/index.vue index 5d48e387..18bbef2c 100644 --- a/src/modules/[chain]/staking/index.vue +++ b/src/modules/[chain]/staking/index.vue @@ -42,7 +42,6 @@ onMounted(() => { }); chainStore.rpc.getSlashingParams().then((res) => { slashing.value = res.params; - console.log('slashing', slashing.value); }); }); diff --git a/src/stores/useBaseStore.ts b/src/stores/useBaseStore.ts index 5a6ff08f..7d6c3e40 100644 --- a/src/stores/useBaseStore.ts +++ b/src/stores/useBaseStore.ts @@ -96,6 +96,7 @@ export const useBaseStore = defineStore('baseStore', { } catch (e) { this.connected = false; } + if ( !this.earlest || this.earlest?.block?.header?.chainId != @@ -105,10 +106,11 @@ export const useBaseStore = defineStore('baseStore', { this.earlest = this.latest; this.recents = []; } + //check if the block exists in recents if ( this.latest?.blockId?.hash && - this.recents.some( + !this.recents.some( (x) => toBase64(x.blockId.hash) === toBase64(this.latest.blockId.hash) ) ) { diff --git a/src/stores/useFormatter.ts b/src/stores/useFormatter.ts index 3ddbf62a..95c83075 100644 --- a/src/stores/useFormatter.ts +++ b/src/stores/useFormatter.ts @@ -180,8 +180,6 @@ export const useFormatter = defineStore('formatter', { if (!asset) { // update ibc metadata if not exits in local cache this.fetchDenomMetadata(ibcDenom); - } else { - console.log('ibc metadata', asset); } } else { asset = this.findGlobalAssetConfig(denom); diff --git a/src/stores/useTxDialog.ts b/src/stores/useTxDialog.ts index dcfd84c4..647d8ddb 100644 --- a/src/stores/useTxDialog.ts +++ b/src/stores/useTxDialog.ts @@ -67,7 +67,6 @@ export const useTxDialog = defineStore('txDialogStore', { }); }, confirmed(tx: any) { - console.log('confirmed:', tx); if (CALLBACK) { CALLBACK(); } diff --git a/update_chain.js b/update_chain.js index 34ed0c67..afc9497a 100644 --- a/update_chain.js +++ b/update_chain.js @@ -43,7 +43,6 @@ const updateChain = async (chainFile) => { } else { const chainFiles = fs.readdirSync(chainsPath); for (const chainFile of chainFiles) { - console.log('Updating', chainFile); await updateChain(chainFile); } } diff --git a/yarn.lock b/yarn.lock index c25f5d97..2d5b70b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1408,6 +1408,15 @@ elliptic "^6.5.4" libsodium-wrappers-sumo "^0.7.11" +"@cosmjs/encoding@0.27.1": + version "0.27.1" + resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.27.1.tgz#3cd5bc0af743485eb2578cdb08cfa84c86d610e1" + integrity sha512-rayLsA0ojHeniaRfWWcqSsrE/T1rl1gl0OXVNtXlPwLJifKBeLEefGbOUiAQaT0wgJ8VNGBazVtAZBpJidfDhw== + dependencies: + base64-js "^1.3.0" + bech32 "^1.1.4" + readonly-date "^1.0.0" + "@cosmjs/encoding@^0.29.3", "@cosmjs/encoding@^0.29.5": version "0.29.5" resolved "https://registry.yarnpkg.com/@cosmjs/encoding/-/encoding-0.29.5.tgz#009a4b1c596cdfd326f30ccfa79f5e56daa264f2" @@ -1498,6 +1507,13 @@ ledger-cosmos-js "^2.1.8" semver "^7.5.2" +"@cosmjs/math@0.27.1": + version "0.27.1" + resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.27.1.tgz#be78857b008ffc6b1ed6fecaa1c4cd5bc38c07d7" + integrity sha512-cHWVjmfIjtRc7f80n7x+J5k8pe+vTVTQ0lA82tIxUgqUvgS6rogPP/TmGtTiZ4+NxWxd11DUISY6gVpr18/VNQ== + dependencies: + bn.js "^5.2.0" + "@cosmjs/math@^0.29.3", "@cosmjs/math@^0.29.5": version "0.29.5" resolved "https://registry.yarnpkg.com/@cosmjs/math/-/math-0.29.5.tgz#722c96e080d6c2b62215ce9f4c70da7625b241b6" @@ -2856,6 +2872,11 @@ dependencies: "@noble/hashes" "1.3.1" +"@noble/hashes@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.0.0.tgz#d5e38bfbdaba174805a4e649f13be9a9ed3351ae" + integrity sha512-DZVbtY62kc3kkBtMHqwCOfXrT/hnoORy5BJ4+HU1IR59X0KWAOqsfzQPcUl/lQLlG7qXbe/fZ3r/emxtAl+sqg== + "@noble/hashes@1.3.1": version "1.3.1" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" @@ -2871,6 +2892,11 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699" integrity sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA== +"@noble/secp256k1@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.0.tgz#d15357f7c227e751d90aa06b05a0e5cf993ba8c1" + integrity sha512-kbacwGSsH/CTout0ZnZWxnW1B+jH/7r/WAAKLBtrRJ/+CUH7lgmQzl3GTrQua3SGKWNSDsS6lmjnDpIJ5Dxyaw== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -3422,6 +3448,16 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.6.0.tgz#9d7daa855d33d4efec8aea88cd66db1c2f0ebe16" integrity sha512-najjVq5KN2vsH2U/xyh2opaSEz6cZMR2SetLIlxlj08nOcmPOemJmUK2o4kUzfLqfrWE0PIrNeE16XhYDd3nqg== +"@types/node@10.12.18": + version "10.12.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" + integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== + +"@types/node@11.11.6": + version "11.11.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a" + integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ== + "@types/node@^17.0.21": version "17.0.45" resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.45.tgz#2c0fafd78705e7a18b7906b5201a522719dc5190" @@ -4134,21 +4170,61 @@ bech32@1.1.4, bech32@^1.1.4: resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== -bech32@^2.0.0: +bech32@2.0.0, 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.51: + version "1.6.51" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" + integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== + bignumber.js@*, bignumber.js@^9.0.1, bignumber.js@^9.1.2: version "9.1.2" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== +bignumber.js@9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.2.tgz#71c6c6bed38de64e24a65ebe16cfcf23ae693673" + integrity sha512-GAcQvbpsM0pUb0zw1EI0KhQEZ+lRwR5fYaAp3vPOYuP7aDvGy6cVN6XHLauvF8SOga2y0dcLcjt3iQDTSEliyw== + binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== +bindings@^1.3.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df" + integrity sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== + dependencies: + file-uri-to-path "1.0.0" + +bip32@2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/bip32/-/bip32-2.0.6.tgz#6a81d9f98c4cd57d05150c60d8f9e75121635134" + integrity sha512-HpV5OMLLGTjSVblmrtYRfFFKuQB+GArM0+XP8HGWfJ5vxYBqo+DesvJwOdC2WJ3bCkZShGf0QIfoIpeomVzVdA== + dependencies: + "@types/node" "10.12.18" + bs58check "^2.1.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + tiny-secp256k1 "^1.1.3" + typeforce "^1.11.5" + wif "^2.0.6" + +bip39@3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.0.4.tgz#5b11fed966840b5e1b8539f0f54ab6392969b2a0" + integrity sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw== + dependencies: + "@types/node" "11.11.6" + create-hash "^1.1.0" + pbkdf2 "^3.0.9" + randombytes "^2.0.1" + bip39@^3.0.4: version "3.1.0" resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.1.0.tgz#c55a418deaf48826a6ceb34ac55b3ee1577e18a3" @@ -4237,7 +4313,7 @@ bs58@^4.0.0: dependencies: base-x "^3.0.2" -bs58check@^2.1.2: +bs58check@<3.0.0, bs58check@^2.1.1, bs58check@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== @@ -4630,6 +4706,13 @@ create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +cross-fetch@3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.5.tgz#e1389f44d9e7ba767907f7af8454787952ab534f" + integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== + dependencies: + node-fetch "2.6.7" + cross-fetch@^3.1.5: version "3.1.8" resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-3.1.8.tgz#0327eba65fd68a7d119f8fb2bf9334a1a7956f82" @@ -4761,6 +4844,11 @@ csstype@^3.1.3: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== +curve25519-js@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/curve25519-js/-/curve25519-js-0.0.4.tgz#e6ad967e8cd284590d657bbfc90d8b50e49ba060" + integrity sha512-axn2UMEnkhyDUPWOwVKBMVIzSQy2ejH2xRGy1wq81dqRwApXfIzfbE3hIX0ZRFBIihf/KDqK158DLwESu4AK1w== + d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" @@ -4953,7 +5041,7 @@ electron-to-chromium@^1.4.477: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.513.tgz#41a50bf749aa7d8058ffbf7a131fc3327a7b1675" integrity sha512-cOB0xcInjm+E5qIssHeXJ29BaUyWpMyFKT5RB3bsLENDheCja0wMkHJyiPl0NBE/VzDI7JDuNEQWhe6RitEUcw== -elliptic@6.5.4, elliptic@^6.5.2, elliptic@^6.5.4: +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.4: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== @@ -5446,6 +5534,11 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" +file-uri-to-path@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd" + integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== + fill-range@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" @@ -6743,6 +6836,11 @@ minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" +miscreant@0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/miscreant/-/miscreant-0.3.2.tgz#a91c046566cca70bd6b5e9fbdd3f67617fa85034" + integrity sha512-fL9KxsQz9BJB2KGPMHFrReioywkiomBiuaLk6EuChijK0BsJsIKJXdVomR+/bPj5mvbFD6wM0CM3bZio9g7OHA== + mkdirp@1.0.4, mkdirp@^1.0.3, mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" @@ -6797,6 +6895,11 @@ mz@^2.7.0: object-assign "^4.0.1" thenify-all "^1.0.0" +nan@^2.13.2: + version "2.18.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" + integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== + nanoid@^3.3.6: version "3.3.6" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" @@ -6835,6 +6938,13 @@ node-fetch-native@^1.0.2: resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.4.0.tgz#fbe8ac033cb6aa44bd106b5e4fd2b6277ba70fa1" integrity sha512-F5kfEj95kX8tkDhUCYdV8dg3/8Olx/94zB8+ZNthFs6Bz31UpUi8Xh40TN3thLwXgrwXry1pEg9lJ++tLWTcqA== +node-fetch@2.6.7: + version "2.6.7" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" + integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== + dependencies: + whatwg-url "^5.0.0" + node-fetch@^2.6.12: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" @@ -7040,6 +7150,11 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +pako@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pako/-/pako-2.0.4.tgz#6cebc4bbb0b6c73b0d5b8d7e8476e2b2fbea576d" + integrity sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg== + pako@^2.0.2: version "2.1.0" resolved "https://registry.yarnpkg.com/pako/-/pako-2.1.0.tgz#266cc37f98c7d883545d11335c00fbd4062c9a86" @@ -7105,7 +7220,7 @@ pathe@^1.0.0, pathe@^1.1.0, pathe@^1.1.1: resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.1.tgz#1dd31d382b974ba69809adc9a7a347e65d84829a" integrity sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q== -pbkdf2@^3.0.17: +pbkdf2@^3.0.17, pbkdf2@^3.0.9: version "3.1.2" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== @@ -7496,6 +7611,24 @@ prop-types@^15.7.2: object-assign "^4.1.1" react-is "^16.13.1" +protobufjs@7.2.5: + version "7.2.5" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-7.2.5.tgz#45d5c57387a6d29a17aab6846dcc283f9b8e7f2d" + integrity sha512-gGXRSXvxQ7UiPgfw8gevrfRWcTlSbOFg+p/N+JVJEK5VhueL2miT6qTymqAmjr1Q5WbOCyJbyrk6JfWKwlFn6A== + dependencies: + "@protobufjs/aspromise" "^1.1.2" + "@protobufjs/base64" "^1.1.2" + "@protobufjs/codegen" "^2.0.4" + "@protobufjs/eventemitter" "^1.1.0" + "@protobufjs/fetch" "^1.1.0" + "@protobufjs/float" "^1.0.2" + "@protobufjs/inquire" "^1.1.0" + "@protobufjs/path" "^1.1.2" + "@protobufjs/pool" "^1.1.0" + "@protobufjs/utf8" "^1.1.0" + "@types/node" ">=13.7.0" + long "^5.0.0" + protobufjs@^6.11.3, protobufjs@^6.8.8, protobufjs@~6.11.3: version "6.11.4" resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.4.tgz#29a412c38bf70d89e537b6d02d904a6f448173aa" @@ -7558,7 +7691,7 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -randombytes@^2.1.0: +randombytes@^2.0.1, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== @@ -7898,6 +8031,33 @@ secp256k1@^4.0.1, secp256k1@^4.0.3: node-addon-api "^2.0.0" node-gyp-build "^4.2.0" +secretjs@^1.12.4: + version "1.12.4" + resolved "https://registry.yarnpkg.com/secretjs/-/secretjs-1.12.4.tgz#0bc1930137a936246e976481808b129d12d7af9d" + integrity sha512-DH16hYTPa4NNxo1T/tY2GyJRte7rgp5kRy8k1pwaPK59WtbQdTBdPQQsEI2L5T7NDVEUXbdbTqyQkt5usN4KcQ== + dependencies: + "@cosmjs/encoding" "0.27.1" + "@cosmjs/math" "0.27.1" + "@noble/hashes" "1.0.0" + "@noble/secp256k1" "1.7.0" + bech32 "2.0.0" + big-integer "1.6.51" + bignumber.js "9.0.2" + bip32 "2.0.6" + bip39 "3.0.4" + cross-fetch "3.1.5" + curve25519-js "0.0.4" + google-protobuf "^3.14.0" + miscreant "0.3.2" + pako "2.0.4" + protobufjs "7.2.5" + secure-random "1.1.2" + +secure-random@1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/secure-random/-/secure-random-1.1.2.tgz#ed103b460a851632d420d46448b2a900a41e7f7c" + integrity sha512-H2bdSKERKdBV1SwoqYm6C0y+9EA94v6SUBOWO8kDndc4NoUih7Dv6Tsgma7zO1lv27wIvjlD0ZpMQk7um5dheQ== + select@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" @@ -8478,6 +8638,17 @@ tiny-emitter@^2.0.0: resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz#1d1a56edfc51c43e863cbb5382a72330e3555423" integrity sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q== +tiny-secp256k1@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/tiny-secp256k1/-/tiny-secp256k1-1.1.6.tgz#7e224d2bee8ab8283f284e40e6b4acb74ffe047c" + integrity sha512-FmqJZGduTyvsr2cF3375fqGHUovSwDi/QytexX1Se4BPuPZpTE5Ftp5fg+EFSuEf3lhZqgCRjEG3ydUQ/aNiwA== + dependencies: + bindings "^1.3.0" + bn.js "^4.11.8" + create-hmac "^1.1.7" + elliptic "^6.4.0" + nan "^2.13.2" + tmp@^0.0.33: version "0.0.33" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" @@ -8598,6 +8769,11 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" +typeforce@^1.11.5: + version "1.18.0" + resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc" + integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g== + typescript@^5.3.3: version "5.3.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" @@ -9016,6 +9192,13 @@ which@^1.2.9: dependencies: isexe "^2.0.0" +wif@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/wif/-/wif-2.0.6.tgz#08d3f52056c66679299726fade0d432ae74b4704" + integrity sha512-HIanZn1zmduSF+BQhkE+YXIbEiH0xPr1012QbFEGB0xsKqJii0/SqJjyn8dFv6y36kOznMgMB+LGcbZTJ1xACQ== + dependencies: + bs58check "<3.0.0" + winston-transport@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.5.0.tgz#6e7b0dd04d393171ed5e4e4905db265f7ab384fa"