diff --git a/package.json b/package.json index b8d64a4d..9011c144 100644 --- a/package.json +++ b/package.json @@ -21,12 +21,15 @@ "type-check": "tsc" }, "dependencies": { + "@cosmjs/amino": "^0.32.2", "@cosmjs/encoding": "^0.32.2", "@cosmjs/proto-signing": "^0.32.2", "@cosmjs/stargate": "^0.32.2", "@emotion/react": "^11.11.4", "@emotion/server": "^11.11.0", "@emotion/styled": "^11.11.0", + "@keplr-wallet/cosmos": "^0.12.76", + "@keplr-wallet/proto-types": "^0.12.76", "@keplr-wallet/types": "^0.12.70", "@mui/icons-material": "^5.15.11", "@mui/lab": "^5.0.0-alpha.166", diff --git a/src/screens/staking/lib/staking_sdk/wallet_operations/cosmos.ts b/src/screens/staking/lib/staking_sdk/wallet_operations/cosmos.ts index 692571c4..2e2ce5c8 100644 --- a/src/screens/staking/lib/staking_sdk/wallet_operations/cosmos.ts +++ b/src/screens/staking/lib/staking_sdk/wallet_operations/cosmos.ts @@ -1,10 +1,13 @@ import { fromBase64 } from "@cosmjs/encoding"; import type { EncodeObject, OfflineDirectSigner } from "@cosmjs/proto-signing"; -import { makeAuthInfoBytes, makeSignDoc } from "@cosmjs/proto-signing"; +import { makeAuthInfoBytes, Registry } from "@cosmjs/proto-signing"; import { + AminoTypes, QueryClient, SigningStargateClient, + createDefaultAminoConverters, setupTxExtension, + defaultRegistryTypes, } from "@cosmjs/stargate"; import type { MsgDelegateEncodeObject, @@ -14,20 +17,19 @@ import type { Event as TxEvent, } from "@cosmjs/stargate"; import { connectComet } from "@cosmjs/tendermint-rpc"; -import type { AccountData, BroadcastMode } from "@keplr-wallet/types"; +import type { AccountData, BroadcastMode, StdSignDoc, StdSignature } from "@keplr-wallet/types"; +import { EthermintChainIdHelper } from "@keplr-wallet/cosmos"; import { PubKey } from "cosmjs-types/cosmos/crypto/secp256k1/keys"; import { MsgWithdrawDelegatorReward } from "cosmjs-types/cosmos/distribution/v1beta1/tx"; import { MsgDelegate, MsgUndelegate, } from "cosmjs-types/cosmos/staking/v1beta1/tx"; -import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx"; -import { Any } from "cosmjs-types/google/protobuf/any"; +import { SignMode } from "cosmjs-types/cosmos/tx/signing/v1beta1/signing"; +import { TxRaw, TxBody } from "cosmjs-types/cosmos/tx/v1beta1/tx"; import useTranslation from "next-translate/useTranslation"; import { useEffect } from "react"; - import { toastError, toastSuccess } from "@src/components/notification"; - import type { TStakingContext } from "../context"; import { fetchAccountData, setUserWallet } from "../context/actions"; import { getHasConnectedWallet } from "../context/selectors"; @@ -51,6 +53,8 @@ import type { WalletOperationResult, } from "./base"; import { ClaimRewardsError, StakeError, UnstakeError } from "./base"; +import { makeSignDoc } from "@cosmjs/amino"; +import { ExtensionOptionsWeb3Tx } from "@keplr-wallet/proto-types/ethermint/types/v1/web3"; type TxEventType = "delegate" | "unbond" | "withdraw_rewards"; @@ -81,11 +85,11 @@ const getCosmosFee = async ({ const gasEstimate = ethermintNetworks.has(account.networkId) ? 0 : await client.simulate(account.address, msgs, memo).catch((err) => { - // eslint-disable-next-line no-console - console.log("debug: wallet_operations.ts: Estimate error", err); + // eslint-disable-next-line no-console + console.log("debug: wallet_operations.ts: Estimate error", err); - return 0; - }); + return 0; + }); // This is a factor to increase the gas fee, since the estimate can be a // bit short in some cases (especially for the last events) @@ -181,8 +185,10 @@ const signAndBroadcastEthermint = async ( const signer = (account.wallet === WalletId.Leap ? window.leap!.getOfflineSigner(account.networkId) : window.keplr!.getOfflineSigner( - account.networkId, - )) as unknown as OfflineDirectSigner; + account.networkId, + )) as unknown as OfflineDirectSigner; + + const currentHeight = await client.getHeight(); const { account_number: accountNumber, sequence } = latestAccountInfo; @@ -208,53 +214,210 @@ const signAndBroadcastEthermint = async ( return "/ethermint.crypto.v1.ethsecp256k1.PubKey"; })(); - const pubkey = Any.fromPartial({ - typeUrl: pubkeyTypeUrl, - value: PubKey.encode({ - key: accountFromSigner.pubkey, - }).finish(), - }); - - const txBodyEncodeObject = { - typeUrl: "/cosmos.tx.v1beta1.TxBody", - value: { - memo, - messages, - }, - }; - const txBodyBytes = client.registry.encode(txBodyEncodeObject); - - const authInfoBytes = makeAuthInfoBytes( - [{ pubkey, sequence }], - fee.amount, - Number(fee.gas), - undefined, - undefined, - ); + // Create the instance that will take care of converting an EncodeObject + // into an amino encoded message. + const aminoTypes = new AminoTypes(createDefaultAminoConverters()); + /// Create the instance that will take care of converting an EncodeObject + // into an direct encoded message. + const directRegistry = new Registry(defaultRegistryTypes); + // Convert the EncodeObjects into amino encoded messages + const aminoMessages = messages.map((m) => aminoTypes.toAmino(m)); + // Create the amino signDoc. const signDoc = makeSignDoc( - txBodyBytes, - authInfoBytes, + aminoMessages, + fee, account.networkId, - Number(accountNumber), + memo, + accountNumber, + sequence, + BigInt(currentHeight) + BigInt(500), ); - const { signature, signed } = await signer.signDirect( - account.address, - signDoc, - ); - const tx = TxRaw.encode({ - authInfoBytes: signed.authInfoBytes, - bodyBytes: signed.bodyBytes, + let signed: StdSignDoc; + let signature: StdSignature; + + if (account.wallet === WalletId.Keplr) { + const signResponse = await window.keplr!.experimentalSignEIP712CosmosTx_v0( + account.networkId, + account.address, + { + domain: { + chainId: "0x1", + name: "Injective Web3", + salt: "0", + verifyingContract: "cosmos", + version: "1.0.0" + }, + primaryType: "Tx", + types: { + Coin: [ + { + name: "denom", + type: "string" + }, + { + name: "amount", + type: "string" + } + ], + EIP712Domain: [ + { + name: "name", + type: "string" + }, + { + name: "version", + type: "string" + }, + { + name: "chainId", + type: "uint256" + }, + { + name: "verifyingContract", + type: "string" + }, + { + name: "salt", + type: "string" + } + ], + Fee: [ + { + name: "amount", + type: "Coin[]" + }, + { + name: "gas", + type: "string" + } + ], + Msg: [ + { + name: "type", + type: "string" + }, + { + name: "value", + type: "MsgValue" + } + ], + MsgValue: [ + { + name: "delegator_address", + type: "string" + }, + { + name: "validator_address", + type: "string" + }, + { + name: "amount", + type: "TypeAmount" + } + ], + Tx: [ + { + name: "account_number", + type: "string" + }, + { + name: "chain_id", + type: "string" + }, + { + name: "fee", + type: "Fee" + }, + { + name: "memo", + type: "string" + }, + { + name: "msgs", + type: "Msg[]" + }, + { + name: "sequence", + type: "string" + }, + { + name: "timeout_height", + type: "string" + } + ], + TypeAmount: [ + { + name: "denom", + type: "string" + }, + { + name: "amount", + type: "string" + } + ] + } + }, + signDoc, + ); + + signed = signResponse.signed; + signature = signResponse.signature; + } else if (account.wallet === WalletId.Leap) { + // TODO: Implement EIP712CosmosTx sign for Leap. + throw new Error("Not implemented"); + } + else { + throw new Error(`Unsupported account wallet: ${account.wallet}`); + } + + const extensionOption = (() => { + const typeUrl = account.networkId === StakingNetworkId.Injective ? + "/injective.types.v1beta1.ExtensionOptionsWeb3Tx" : + "/ethermint.types.v1.ExtensionOptionsWeb3Tx"; + + return { + typeUrl, + value: ExtensionOptionsWeb3Tx.encode( + ExtensionOptionsWeb3Tx.fromPartial({ + feePayerSig: fromBase64(signature.signature), + typedDataChainId: EthermintChainIdHelper.parse(signed.chain_id).ethChainId.toString(), + }) + ).finish(), + } + })(); + + // Convert the EncodeObjects into direct encoded messages. + const directMessages = messages.map(m => directRegistry.encodeAsAny(m)); + + const txRaw = TxRaw.fromPartial({ + authInfoBytes: makeAuthInfoBytes([{ + pubkey: { + typeUrl: pubkeyTypeUrl, + value: PubKey.encode({ + key: fromBase64(signature.pub_key.value), + }).finish(), + }, + sequence, + }], signed.fee.amount, Number(signed.fee.gas), undefined, undefined, SignMode.SIGN_MODE_LEGACY_AMINO_JSON), + bodyBytes: TxBody.encode(TxBody.fromPartial({ + extensionOptions: [extensionOption], + memo: signed.memo, + messages: directMessages, + timeoutHeight: signed.timeout_height ? BigInt(signed.timeout_height) : undefined, + })).finish(), signatures: [fromBase64(signature.signature)], - }).finish(); + }) + + const tx = TxRaw.encode(txRaw).finish(); return (account.wallet === WalletId.Leap ? window.leap! : window.keplr!) ?.sendTx(account.networkId, tx, "async" as BroadcastMode.Block) .then(async (res) => { - const txHash = Buffer.from(res).toString("hex"); + const txHash = Buffer.from(res).toString("hex").toUpperCase(); if (!txHash) { throw new Error("Failed to broadcast transaction"); @@ -529,9 +692,9 @@ export const unstakeCosmos = async ( return hasUnbonded ? ({ success: true } as const) : { - error: UnstakeError.NotEnoughGas, - success: false, - }; + error: UnstakeError.NotEnoughGas, + success: false, + }; }; const handleError = (err: Error) => @@ -612,27 +775,27 @@ export const tryToConnectKeplr = async ( const parseAccounts = (networkId: StakingNetworkId) => - (accounts: readonly AccountData[]): Promise => - Promise.all( - accounts.map((account) => - Promise.all([ - fetchAccountData(context, account.address, networkId, true), - window.keplr!.getKey(networkId), - ]).then(([{ info, rewards }, key]) => { - if (key?.name) { - walletName = key.name; - } - - return { - address: account.address, - info, - networkId, - rewards, - wallet: WalletId.Keplr, - }; - }), - ), - ); + (accounts: readonly AccountData[]): Promise => + Promise.all( + accounts.map((account) => + Promise.all([ + fetchAccountData(context, account.address, networkId, true), + window.keplr!.getKey(networkId), + ]).then(([{ info, rewards }, key]) => { + if (key?.name) { + walletName = key.name; + } + + return { + address: account.address, + info, + networkId, + rewards, + wallet: WalletId.Keplr, + }; + }), + ), + ); const keplrAccounts = await Promise.all( Array.from(keplrNetworks).map(async (network) => { @@ -716,27 +879,27 @@ export const tryToConnectLeap = async ( const parseAccounts = (networkId: StakingNetworkId) => - (accounts: readonly AccountData[]): Promise => - Promise.all( - accounts.map((account) => - Promise.all([ - fetchAccountData(context, account.address, networkId, true), - window.leap!.getKey(networkId), - ]).then(([{ info, rewards }, key]) => { - if (key?.name) { - walletName = key.name; - } - - return { - address: account.address, - info, - networkId, - rewards, - wallet: WalletId.Leap, - }; - }), - ), - ); + (accounts: readonly AccountData[]): Promise => + Promise.all( + accounts.map((account) => + Promise.all([ + fetchAccountData(context, account.address, networkId, true), + window.leap!.getKey(networkId), + ]).then(([{ info, rewards }, key]) => { + if (key?.name) { + walletName = key.name; + } + + return { + address: account.address, + info, + networkId, + rewards, + wallet: WalletId.Leap, + }; + }), + ), + ); const leapAccounts = await Promise.all( Array.from(leapNetworks).map(async (network) => { diff --git a/yarn.lock b/yarn.lock index 8a0a4db9..e9fb89c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2575,6 +2575,66 @@ __metadata: languageName: node linkType: hard +"@ethersproject/address@npm:^5.6.0": + version: 5.7.0 + resolution: "@ethersproject/address@npm:5.7.0" + dependencies: + "@ethersproject/bignumber": "npm:^5.7.0" + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/keccak256": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + "@ethersproject/rlp": "npm:^5.7.0" + checksum: db5da50abeaae8f6cf17678323e8d01cad697f9a184b0593c62b71b0faa8d7e5c2ba14da78a998d691773ed6a8eb06701f65757218e0eaaeb134e5c5f3e5a908 + languageName: node + linkType: hard + +"@ethersproject/bignumber@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/bignumber@npm:5.7.0" + dependencies: + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + bn.js: "npm:^5.2.1" + checksum: 14263cdc91a7884b141d9300f018f76f69839c47e95718ef7161b11d2c7563163096fee69724c5fa8ef6f536d3e60f1c605819edbc478383a2b98abcde3d37b2 + languageName: node + linkType: hard + +"@ethersproject/bytes@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/bytes@npm:5.7.0" + dependencies: + "@ethersproject/logger": "npm:^5.7.0" + checksum: 07dd1f0341b3de584ef26c8696674ff2bb032f4e99073856fc9cd7b4c54d1d846cabe149e864be267934658c3ce799e5ea26babe01f83af0e1f06c51e5ac791f + languageName: node + linkType: hard + +"@ethersproject/keccak256@npm:^5.5.0, @ethersproject/keccak256@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/keccak256@npm:5.7.0" + dependencies: + "@ethersproject/bytes": "npm:^5.7.0" + js-sha3: "npm:0.8.0" + checksum: 3b1a91706ff11f5ab5496840b9c36cedca27db443186d28b94847149fd16baecdc13f6fc5efb8359506392f2aba559d07e7f9c1e17a63f9d5de9f8053cfcb033 + languageName: node + linkType: hard + +"@ethersproject/logger@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/logger@npm:5.7.0" + checksum: d03d460fb2d4a5e71c627b7986fb9e50e1b59a6f55e8b42a545b8b92398b961e7fd294bd9c3d8f92b35d0f6ff9d15aa14c95eab378f8ea194e943c8ace343501 + languageName: node + linkType: hard + +"@ethersproject/rlp@npm:^5.7.0": + version: 5.7.0 + resolution: "@ethersproject/rlp@npm:5.7.0" + dependencies: + "@ethersproject/bytes": "npm:^5.7.0" + "@ethersproject/logger": "npm:^5.7.0" + checksum: bc863d21dcf7adf6a99ae75c41c4a3fb99698cfdcfc6d5d82021530f3d3551c6305bc7b6f0475ad6de6f69e91802b7e872bee48c0596d98969aefcf121c2a044 + languageName: node + linkType: hard + "@fastify/busboy@npm:^2.0.0": version: 2.1.0 resolution: "@fastify/busboy@npm:2.1.0" @@ -3145,6 +3205,80 @@ __metadata: languageName: node linkType: hard +"@keplr-wallet/common@npm:0.12.76": + version: 0.12.76 + resolution: "@keplr-wallet/common@npm:0.12.76" + dependencies: + "@keplr-wallet/crypto": "npm:0.12.76" + "@keplr-wallet/types": "npm:0.12.76" + buffer: "npm:^6.0.3" + delay: "npm:^4.4.0" + mobx: "npm:^6.1.7" + checksum: 1d7857a522a5fba4020b53beee0061dbcae0a03b42dcc35f552505d22c48e7f7417b85e02f8b76d15a7bec272fc72f035f9eb12ef45ec37af2a97c7b4f00e9b8 + languageName: node + linkType: hard + +"@keplr-wallet/cosmos@npm:^0.12.76": + version: 0.12.76 + resolution: "@keplr-wallet/cosmos@npm:0.12.76" + dependencies: + "@ethersproject/address": "npm:^5.6.0" + "@keplr-wallet/common": "npm:0.12.76" + "@keplr-wallet/crypto": "npm:0.12.76" + "@keplr-wallet/proto-types": "npm:0.12.76" + "@keplr-wallet/simple-fetch": "npm:0.12.76" + "@keplr-wallet/types": "npm:0.12.76" + "@keplr-wallet/unit": "npm:0.12.76" + bech32: "npm:^1.1.4" + buffer: "npm:^6.0.3" + long: "npm:^4.0.0" + protobufjs: "npm:^6.11.2" + checksum: 507c3ed83491968cddcfee6e3100ed276dea280fd71fc6d3ad22c9441a79fb462140a9815f300281b445d40e5ed9cc9da188fd90d10a0e0cba6c0947454ea4af + languageName: node + linkType: hard + +"@keplr-wallet/crypto@npm:0.12.76": + version: 0.12.76 + resolution: "@keplr-wallet/crypto@npm:0.12.76" + dependencies: + "@ethersproject/keccak256": "npm:^5.5.0" + bip32: "npm:^2.0.6" + bip39: "npm:^3.0.3" + bs58check: "npm:^2.1.2" + buffer: "npm:^6.0.3" + crypto-js: "npm:^4.0.0" + elliptic: "npm:^6.5.3" + sha.js: "npm:^2.4.11" + checksum: 2c2c199d22683b0b2b8e71fecb606c3df4d371f49fc566f12281cd99932bec884a9beb41d3226f57c41eedabb36881e81535be49fc5e01e684912e88cb029e87 + languageName: node + linkType: hard + +"@keplr-wallet/proto-types@npm:0.12.76, @keplr-wallet/proto-types@npm:^0.12.76": + version: 0.12.76 + resolution: "@keplr-wallet/proto-types@npm:0.12.76" + dependencies: + long: "npm:^4.0.0" + protobufjs: "npm:^6.11.2" + checksum: 45033d37f24c0a421cb3bc31f6d591359f111a1a59766c38cb17b7c5bb9fb2545322630ce7d14a43690266f75d83dfc49b34ccf84647982e1e6794bfbe27409c + languageName: node + linkType: hard + +"@keplr-wallet/simple-fetch@npm:0.12.76": + version: 0.12.76 + resolution: "@keplr-wallet/simple-fetch@npm:0.12.76" + checksum: 27b8981990b0006aac9b0de7ef196845d03a42e9e58893a82b08a262bd85d46b471d18cefb0f59c1f53c295eff5c67d9a45094816f73c0094e1fdba63301072d + languageName: node + linkType: hard + +"@keplr-wallet/types@npm:0.12.76": + version: 0.12.76 + resolution: "@keplr-wallet/types@npm:0.12.76" + dependencies: + long: "npm:^4.0.0" + checksum: bc211ec113d1f1dbb4ed75f932aefe917321452f20b19456a26b9daaca1d8f28c5e4d715b79fd63fff0ee7d376a11e91a4e1344e01e534d05eea968df776c374 + languageName: node + linkType: hard + "@keplr-wallet/types@npm:^0.12.70": version: 0.12.70 resolution: "@keplr-wallet/types@npm:0.12.70" @@ -3154,6 +3288,17 @@ __metadata: languageName: node linkType: hard +"@keplr-wallet/unit@npm:0.12.76": + version: 0.12.76 + resolution: "@keplr-wallet/unit@npm:0.12.76" + dependencies: + "@keplr-wallet/types": "npm:0.12.76" + big-integer: "npm:^1.6.48" + utility-types: "npm:^3.10.0" + checksum: ad2fef50922ca19e84cafb5786c4eb5bde9504124eb48c257fc8a7cc51ace592ffd89235c98befc3585e3188005abcc0f9b1ef2803fea788d7c8119b9ef48149 + languageName: node + linkType: hard + "@mui/base@npm:5.0.0-beta.37": version: 5.0.0-beta.37 resolution: "@mui/base@npm:5.0.0-beta.37" @@ -3469,6 +3614,13 @@ __metadata: languageName: node linkType: hard +"@noble/hashes@npm:^1.2.0": + version: 1.4.0 + resolution: "@noble/hashes@npm:1.4.0" + checksum: 8c3f005ee72e7b8f9cff756dfae1241485187254e3f743873e22073d63906863df5d4f13d441b7530ea614b7a093f0d889309f28b59850f33b66cb26a779a4a5 + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -4116,6 +4268,13 @@ __metadata: languageName: node linkType: hard +"@types/node@npm:10.12.18": + version: 10.12.18 + resolution: "@types/node@npm:10.12.18" + checksum: 7c2f966f59bff476ea9bf6bbe2d4b03d583899cb4fd7eb4d4daf49bab3475a9c68601ed8e40f57f89a860f46ab4e6c0216ad428506abac17182e888675b265f8 + languageName: node + linkType: hard + "@types/node@npm:>=13.7.0": version: 20.11.16 resolution: "@types/node@npm:20.11.16" @@ -5132,6 +5291,15 @@ __metadata: languageName: node linkType: hard +"base-x@npm:^3.0.2": + version: 3.0.9 + resolution: "base-x@npm:3.0.9" + dependencies: + safe-buffer: "npm:^5.0.1" + checksum: e6bbeae30b24f748b546005affb710c5fbc8b11a83f6cd0ca999bd1ab7ad3a22e42888addc40cd145adc4edfe62fcfab4ebc91da22e4259aae441f95a77aee1a + languageName: node + linkType: hard + "base64-js@npm:^1.3.0, base64-js@npm:^1.3.1": version: 1.5.1 resolution: "base64-js@npm:1.5.1" @@ -5146,6 +5314,13 @@ __metadata: languageName: node linkType: hard +"big-integer@npm:^1.6.48": + version: 1.6.52 + resolution: "big-integer@npm:1.6.52" + checksum: 9604224b4c2ab3c43c075d92da15863077a9f59e5d4205f4e7e76acd0cd47e8d469ec5e5dba8d9b32aa233951893b29329ca56ac80c20ce094b4a647a66abae0 + languageName: node + linkType: hard + "bignumber.js@npm:^9.1.2": version: 9.1.2 resolution: "bignumber.js@npm:9.1.2" @@ -5160,6 +5335,39 @@ __metadata: languageName: node linkType: hard +"bindings@npm:^1.3.0": + version: 1.5.0 + resolution: "bindings@npm:1.5.0" + dependencies: + file-uri-to-path: "npm:1.0.0" + checksum: 3dab2491b4bb24124252a91e656803eac24292473e56554e35bbfe3cc1875332cfa77600c3bac7564049dc95075bf6fcc63a4609920ff2d64d0fe405fcf0d4ba + languageName: node + linkType: hard + +"bip32@npm:^2.0.6": + version: 2.0.6 + resolution: "bip32@npm:2.0.6" + dependencies: + "@types/node": "npm:10.12.18" + bs58check: "npm:^2.1.1" + create-hash: "npm:^1.2.0" + create-hmac: "npm:^1.1.7" + tiny-secp256k1: "npm:^1.1.3" + typeforce: "npm:^1.11.5" + wif: "npm:^2.0.6" + checksum: 65005eec40786767842665d68ba37e9be789570516256b7419dad9cc1160a7bb0a5db51cc441ff57d10461506ae150c2dfcfb22e83076a3d566fbbd7420006c6 + languageName: node + linkType: hard + +"bip39@npm:^3.0.3": + version: 3.1.0 + resolution: "bip39@npm:3.1.0" + dependencies: + "@noble/hashes": "npm:^1.2.0" + checksum: 68f9673a0d6a851e9635f3af8a85f2a1ecef9066c76d77e6f0d58d274b5bf22a67f429da3997e07c0d2cf153a4d7321f9273e656cac0526f667575ddee28ef71 + languageName: node + linkType: hard + "bl@npm:^5.0.0": version: 5.1.0 resolution: "bl@npm:5.1.0" @@ -5171,14 +5379,14 @@ __metadata: languageName: node linkType: hard -"bn.js@npm:^4.11.9": +"bn.js@npm:^4.11.8, bn.js@npm:^4.11.9": version: 4.12.0 resolution: "bn.js@npm:4.12.0" checksum: 9736aaa317421b6b3ed038ff3d4491935a01419ac2d83ddcfebc5717385295fcfcf0c57311d90fe49926d0abbd7a9dbefdd8861e6129939177f7e67ebc645b21 languageName: node linkType: hard -"bn.js@npm:^5.2.0": +"bn.js@npm:^5.2.0, bn.js@npm:^5.2.1": version: 5.2.1 resolution: "bn.js@npm:5.2.1" checksum: bed3d8bd34ec89dbcf9f20f88bd7d4a49c160fda3b561c7bb227501f974d3e435a48fb9b61bc3de304acab9215a3bda0803f7017ffb4d0016a0c3a740a283caa @@ -5290,6 +5498,26 @@ __metadata: languageName: node linkType: hard +"bs58@npm:^4.0.0": + version: 4.0.1 + resolution: "bs58@npm:4.0.1" + dependencies: + base-x: "npm:^3.0.2" + checksum: 613a1b1441e754279a0e3f44d1faeb8c8e838feef81e550efe174ff021dd2e08a4c9ae5805b52dfdde79f97b5c0918c78dd24a0eb726c4a94365f0984a0ffc65 + languageName: node + linkType: hard + +"bs58check@npm:<3.0.0, bs58check@npm:^2.1.1, bs58check@npm:^2.1.2": + version: 2.1.2 + resolution: "bs58check@npm:2.1.2" + dependencies: + bs58: "npm:^4.0.0" + create-hash: "npm:^1.1.0" + safe-buffer: "npm:^5.1.2" + checksum: 5d33f319f0d7abbe1db786f13f4256c62a076bc8d184965444cb62ca4206b2c92bee58c93bce57150ffbbbe00c48838ac02e6f384e0da8215cac219c0556baa9 + languageName: node + linkType: hard + "bser@npm:2.1.1": version: 2.1.1 resolution: "bser@npm:2.1.1" @@ -5558,6 +5786,16 @@ __metadata: languageName: node linkType: hard +"cipher-base@npm:^1.0.1, cipher-base@npm:^1.0.3": + version: 1.0.4 + resolution: "cipher-base@npm:1.0.4" + dependencies: + inherits: "npm:^2.0.1" + safe-buffer: "npm:^5.0.1" + checksum: d8d005f8b64d8a77b3d3ce531301ae7b45902c9cab4ec8b66bdbd2bf2a1d9fceb9a2133c293eb3c060b2d964da0f14c47fb740366081338aa3795dd1faa8984b + languageName: node + linkType: hard + "cjs-module-lexer@npm:^1.0.0": version: 1.2.3 resolution: "cjs-module-lexer@npm:1.2.3" @@ -5878,6 +6116,33 @@ __metadata: languageName: node linkType: hard +"create-hash@npm:^1.1.0, create-hash@npm:^1.2.0": + version: 1.2.0 + resolution: "create-hash@npm:1.2.0" + dependencies: + cipher-base: "npm:^1.0.1" + inherits: "npm:^2.0.1" + md5.js: "npm:^1.3.4" + ripemd160: "npm:^2.0.1" + sha.js: "npm:^2.4.0" + checksum: d402e60e65e70e5083cb57af96d89567954d0669e90550d7cec58b56d49c4b193d35c43cec8338bc72358198b8cbf2f0cac14775b651e99238e1cf411490f915 + languageName: node + linkType: hard + +"create-hmac@npm:^1.1.7": + version: 1.1.7 + resolution: "create-hmac@npm:1.1.7" + dependencies: + cipher-base: "npm:^1.0.3" + create-hash: "npm:^1.1.0" + inherits: "npm:^2.0.1" + ripemd160: "npm:^2.0.0" + safe-buffer: "npm:^5.0.1" + sha.js: "npm:^2.4.8" + checksum: 24332bab51011652a9a0a6d160eed1e8caa091b802335324ae056b0dcb5acbc9fcf173cf10d128eba8548c3ce98dfa4eadaa01bd02f44a34414baee26b651835 + languageName: node + linkType: hard + "create-jest@npm:^29.7.0": version: 29.7.0 resolution: "create-jest@npm:29.7.0" @@ -5906,6 +6171,13 @@ __metadata: languageName: node linkType: hard +"crypto-js@npm:^4.0.0": + version: 4.2.0 + resolution: "crypto-js@npm:4.2.0" + checksum: 8fbdf9d56f47aea0794ab87b0eb9833baf80b01a7c5c1b0edc7faf25f662fb69ab18dc2199e2afcac54670ff0cd9607a9045a3f7a80336cccd18d77a55b9fdf0 + languageName: node + linkType: hard + "css-functions-list@npm:^3.2.1": version: 3.2.1 resolution: "css-functions-list@npm:3.2.1" @@ -6127,6 +6399,13 @@ __metadata: languageName: node linkType: hard +"delay@npm:^4.4.0": + version: 4.4.1 + resolution: "delay@npm:4.4.1" + checksum: 9b3aa8c4cc88ee5e18a92c2e53f3912ed2930d4279c7d16d913813de6c2214eaf8bc5704b7357c72bf0f2f28f4507f9ab37599c3f84dc7d99ac178ae91dea3f9 + languageName: node + linkType: hard + "delayed-stream@npm:~1.0.0": version: 1.0.0 resolution: "delayed-stream@npm:1.0.0" @@ -6334,6 +6613,21 @@ __metadata: languageName: node linkType: hard +"elliptic@npm:^6.4.0, elliptic@npm:^6.5.3": + version: 6.5.5 + resolution: "elliptic@npm:6.5.5" + dependencies: + bn.js: "npm:^4.11.9" + brorand: "npm:^1.1.0" + hash.js: "npm:^1.0.0" + hmac-drbg: "npm:^1.0.1" + inherits: "npm:^2.0.4" + minimalistic-assert: "npm:^1.0.1" + minimalistic-crypto-utils: "npm:^1.0.1" + checksum: 3e591e93783a1b66f234ebf5bd3a8a9a8e063a75073a35a671e03e3b25253b6e33ac121f7efe9b8808890fffb17b40596cc19d01e6e8d1fa13b9a56ff65597c8 + languageName: node + linkType: hard + "elliptic@npm:^6.5.4": version: 6.5.4 resolution: "elliptic@npm:6.5.4" @@ -7381,6 +7675,13 @@ __metadata: languageName: node linkType: hard +"file-uri-to-path@npm:1.0.0": + version: 1.0.0 + resolution: "file-uri-to-path@npm:1.0.0" + checksum: 3b545e3a341d322d368e880e1c204ef55f1d45cdea65f7efc6c6ce9e0c4d22d802d5629320eb779d006fe59624ac17b0e848d83cc5af7cd101f206cb704f5519 + languageName: node + linkType: hard + "fill-range@npm:^7.0.1": version: 7.0.1 resolution: "fill-range@npm:7.0.1" @@ -7481,12 +7782,15 @@ __metadata: dependencies: "@commitlint/cli": "npm:^18.6.1" "@commitlint/config-conventional": "npm:^18.6.2" + "@cosmjs/amino": "npm:^0.32.2" "@cosmjs/encoding": "npm:^0.32.2" "@cosmjs/proto-signing": "npm:^0.32.2" "@cosmjs/stargate": "npm:^0.32.2" "@emotion/react": "npm:^11.11.4" "@emotion/server": "npm:^11.11.0" "@emotion/styled": "npm:^11.11.0" + "@keplr-wallet/cosmos": "npm:^0.12.76" + "@keplr-wallet/proto-types": "npm:^0.12.76" "@keplr-wallet/types": "npm:^0.12.70" "@mui/icons-material": "npm:^5.15.11" "@mui/lab": "npm:^5.0.0-alpha.166" @@ -8084,6 +8388,17 @@ __metadata: languageName: node linkType: hard +"hash-base@npm:^3.0.0": + version: 3.1.0 + resolution: "hash-base@npm:3.1.0" + dependencies: + inherits: "npm:^2.0.4" + readable-stream: "npm:^3.6.0" + safe-buffer: "npm:^5.2.0" + checksum: 663eabcf4173326fbb65a1918a509045590a26cc7e0964b754eef248d281305c6ec9f6b31cb508d02ffca383ab50028180ce5aefe013e942b44a903ac8dc80d0 + languageName: node + linkType: hard + "hash.js@npm:^1.0.0, hash.js@npm:^1.0.3": version: 1.1.7 resolution: "hash.js@npm:1.1.7" @@ -8392,7 +8707,7 @@ __metadata: languageName: node linkType: hard -"inherits@npm:2, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.1, inherits@npm:~2.0.3": +"inherits@npm:2, inherits@npm:^2.0.1, inherits@npm:^2.0.3, inherits@npm:^2.0.4, inherits@npm:~2.0.1, inherits@npm:~2.0.3": version: 2.0.4 resolution: "inherits@npm:2.0.4" checksum: 4e531f648b29039fb7426fb94075e6545faa1eb9fe83c29f0b6d9e7263aceb4289d2d4557db0d428188eeb449cc7c5e77b0a0b2c4e248ff2a65933a0dee49ef2 @@ -9355,6 +9670,13 @@ __metadata: languageName: node linkType: hard +"js-sha3@npm:0.8.0": + version: 0.8.0 + resolution: "js-sha3@npm:0.8.0" + checksum: 43a21dc7967c871bd2c46cb1c2ae97441a97169f324e509f382d43330d8f75cf2c96dba7c806ab08a425765a9c847efdd4bffbac2d99c3a4f3de6c0218f40533 + languageName: node + linkType: hard + "js-tokens@npm:^3.0.0 || ^4.0.0, js-tokens@npm:^4.0.0": version: 4.0.0 resolution: "js-tokens@npm:4.0.0" @@ -9990,6 +10312,17 @@ __metadata: languageName: node linkType: hard +"md5.js@npm:^1.3.4": + version: 1.3.5 + resolution: "md5.js@npm:1.3.5" + dependencies: + hash-base: "npm:^3.0.0" + inherits: "npm:^2.0.1" + safe-buffer: "npm:^5.1.2" + checksum: b7bd75077f419c8e013fc4d4dada48be71882e37d69a44af65a2f2804b91e253441eb43a0614423a1c91bb830b8140b0dc906bc797245e2e275759584f4efcc5 + languageName: node + linkType: hard + "mdn-data@npm:2.0.28": version: 2.0.28 resolution: "mdn-data@npm:2.0.28" @@ -10273,6 +10606,13 @@ __metadata: languageName: node linkType: hard +"mobx@npm:^6.1.7": + version: 6.12.3 + resolution: "mobx@npm:6.12.3" + checksum: 33e1d27d33adea0ceb4de32eb66b4384e81a249be5e01baa6bf556f458fd62a83d23bfa0cf8ba9e87c28f0d810ae301ee0e7322fd48a3bf47db33ffb08d5826c + languageName: node + linkType: hard + "mrmime@npm:^2.0.0": version: 2.0.0 resolution: "mrmime@npm:2.0.0" @@ -10311,6 +10651,15 @@ __metadata: languageName: node linkType: hard +"nan@npm:^2.13.2": + version: 2.19.0 + resolution: "nan@npm:2.19.0" + dependencies: + node-gyp: "npm:latest" + checksum: b8d05d75f92ee9d94affa50d0aa41b6c698254c848529452d7ab67c2e0d160a83f563bfe2cbd53e077944eceb48c757f83c93634c7c9ff404c9ec1ed4e5ced1a + languageName: node + linkType: hard + "nanoid@npm:^3.3.6, nanoid@npm:^3.3.7": version: 3.3.7 resolution: "nanoid@npm:3.3.7" @@ -11192,7 +11541,7 @@ __metadata: languageName: node linkType: hard -"protobufjs@npm:^6.8.8": +"protobufjs@npm:^6.11.2, protobufjs@npm:^6.8.8": version: 6.11.4 resolution: "protobufjs@npm:6.11.4" dependencies: @@ -11388,7 +11737,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.4.0": +"readable-stream@npm:3, readable-stream@npm:^3.0.0, readable-stream@npm:^3.4.0, readable-stream@npm:^3.6.0": version: 3.6.2 resolution: "readable-stream@npm:3.6.2" dependencies: @@ -11730,6 +12079,16 @@ __metadata: languageName: node linkType: hard +"ripemd160@npm:^2.0.0, ripemd160@npm:^2.0.1": + version: 2.0.2 + resolution: "ripemd160@npm:2.0.2" + dependencies: + hash-base: "npm:^3.0.0" + inherits: "npm:^2.0.1" + checksum: f6f0df78817e78287c766687aed4d5accbebc308a8e7e673fb085b9977473c1f139f0c5335d353f172a915bb288098430755d2ad3c4f30612f4dd0c901cd2c3a + languageName: node + linkType: hard + "rrweb-cssom@npm:^0.6.0": version: 0.6.0 resolution: "rrweb-cssom@npm:0.6.0" @@ -11782,7 +12141,7 @@ __metadata: languageName: node linkType: hard -"safe-buffer@npm:^5.0.1, safe-buffer@npm:~5.2.0": +"safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.0, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" checksum: 6501914237c0a86e9675d4e51d89ca3c21ffd6a31642efeba25ad65720bce6921c9e7e974e5be91a786b25aa058b5303285d3c15dbabf983a919f5f630d349f3 @@ -11919,6 +12278,18 @@ __metadata: languageName: node linkType: hard +"sha.js@npm:^2.4.0, sha.js@npm:^2.4.11, sha.js@npm:^2.4.8": + version: 2.4.11 + resolution: "sha.js@npm:2.4.11" + dependencies: + inherits: "npm:^2.0.1" + safe-buffer: "npm:^5.0.1" + bin: + sha.js: ./bin.js + checksum: b7a371bca8821c9cc98a0aeff67444a03d48d745cb103f17228b96793f455f0eb0a691941b89ea1e60f6359207e36081d9be193252b0f128e0daf9cfea2815a5 + languageName: node + linkType: hard + "sharp@npm:^0.33.2": version: 0.33.2 resolution: "sharp@npm:0.33.2" @@ -12812,6 +13183,20 @@ __metadata: languageName: node linkType: hard +"tiny-secp256k1@npm:^1.1.3": + version: 1.1.6 + resolution: "tiny-secp256k1@npm:1.1.6" + dependencies: + bindings: "npm:^1.3.0" + bn.js: "npm:^4.11.8" + create-hmac: "npm:^1.1.7" + elliptic: "npm:^6.4.0" + nan: "npm:^2.13.2" + node-gyp: "npm:latest" + checksum: b47ceada38f6fa65190906e8a98b58d1584b0640383f04db8196a7098c726e926cfba6271a53e97d98d4c67e2b364618d7b3d7e402f63e44f0e07a4aca82ac8b + languageName: node + linkType: hard + "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -13108,6 +13493,13 @@ __metadata: languageName: node linkType: hard +"typeforce@npm:^1.11.5": + version: 1.18.0 + resolution: "typeforce@npm:1.18.0" + checksum: 011f57effd9ae6d3dd8bb249e09b4ecadb2c2a3f803b27f977ac8b7782834855930bff971ba549bcd5a8cedc8136d8a977c0b7e050cc67deded948181b7ba3e8 + languageName: node + linkType: hard + "types-ramda@npm:^0.29.7": version: 0.29.7 resolution: "types-ramda@npm:0.29.7" @@ -13347,6 +13739,13 @@ __metadata: languageName: node linkType: hard +"utility-types@npm:^3.10.0": + version: 3.11.0 + resolution: "utility-types@npm:3.11.0" + checksum: 2f1580137b0c3e6cf5405f37aaa8f5249961a76d26f1ca8efc0ff49a2fc0e0b2db56de8e521a174d075758e0c7eb3e590edec0832eb44478b958f09914920f19 + languageName: node + linkType: hard + "v8-to-istanbul@npm:^9.0.1": version: 9.2.0 resolution: "v8-to-istanbul@npm:9.2.0" @@ -13642,6 +14041,15 @@ __metadata: languageName: node linkType: hard +"wif@npm:^2.0.6": + version: 2.0.6 + resolution: "wif@npm:2.0.6" + dependencies: + bs58check: "npm:<3.0.0" + checksum: 9ff55fdde73226bbae6a08b68298b6d14bbc22fa4cefac11edaacb2317c217700f715b95dc4432917f73511ec983f1bc032d22c467703b136f4e6ca7dfa9f10b + languageName: node + linkType: hard + "wonka@npm:^6.3.2": version: 6.3.4 resolution: "wonka@npm:6.3.4"