From 531b14577096ddf1371b1db38e6a8edd2f9f696a Mon Sep 17 00:00:00 2001 From: Eason Smith Date: Fri, 14 Feb 2025 12:59:32 +0800 Subject: [PATCH 1/5] remove osmo-query and interchain-query --- .../asset-list/DropdownTransferModal.tsx | 27 ++-- .../asset-list/RowTransferModal.tsx | 51 ++++---- examples/ibc-asset-list/hooks/useTx.ts | 5 +- examples/ibc-asset-list/package.json | 1 + examples/ibc-asset-list/utils/pool.ts | 2 +- examples/ibc-asset-list/utils/types.ts | 4 +- examples/ibc-asset-list/yarn.lock | 122 +++++++++++++----- examples/stake-tokens/hooks/useTx.ts | 4 +- examples/vote-proposal/hooks/useTx.ts | 4 +- 9 files changed, 140 insertions(+), 80 deletions(-) diff --git a/examples/ibc-asset-list/components/asset-list/DropdownTransferModal.tsx b/examples/ibc-asset-list/components/asset-list/DropdownTransferModal.tsx index da713e99..5cea5f0e 100644 --- a/examples/ibc-asset-list/components/asset-list/DropdownTransferModal.tsx +++ b/examples/ibc-asset-list/components/asset-list/DropdownTransferModal.tsx @@ -7,11 +7,11 @@ import { import { useChainWallet } from '@interchain-kit/react'; import { chains } from '@chain-registry/v2' import BigNumber from 'bignumber.js'; -import { ibc } from 'osmo-query'; import { StdFee } from '@interchainjs/cosmos-types/types'; import { KeplrWalletName } from '@/config'; import { useDisclosure, useChainUtils, useTx, useBalance } from '@/hooks'; import { truncDecimals } from '@/utils'; +import { MsgTransfer } from 'interchainjs/ibc/applications/transfer/v1/tx'; import { PrettyAsset, @@ -21,8 +21,6 @@ import { Unpacked, } from './types'; -const { transfer } = ibc.applications.transfer.v1.MessageComposer.withTypeUrl; - const ZERO_AMOUNT = '0'; interface OverviewTransferWrapperProps { @@ -156,16 +154,19 @@ const OverviewTransferWrapper = ( const stamp = Date.now(); const timeoutInNanos = (stamp + 1.2e6) * 1e6; - const msg = transfer({ - sourcePort, - sourceChannel, - sender: sourceAddress, - receiver: destAddress, - token, - // @ts-ignore - timeoutHeight: undefined, - timeoutTimestamp: BigInt(timeoutInNanos), - }); + const msg = { + typeUrl: MsgTransfer.typeUrl, + value: MsgTransfer.fromPartial({ + sourcePort, + sourceChannel, + token, + sender: sourceAddress, + receiver: destAddress, + timeoutHeight: undefined, + timeoutTimestamp: BigInt(timeoutInNanos), + memo: '', + }), + } await tx([msg], { fee, diff --git a/examples/ibc-asset-list/components/asset-list/RowTransferModal.tsx b/examples/ibc-asset-list/components/asset-list/RowTransferModal.tsx index f2d87cd6..9c46d740 100644 --- a/examples/ibc-asset-list/components/asset-list/RowTransferModal.tsx +++ b/examples/ibc-asset-list/components/asset-list/RowTransferModal.tsx @@ -5,12 +5,9 @@ import BigNumber from 'bignumber.js'; import { StdFee } from '@interchainjs/cosmos-types/types'; import { useDisclosure, useChainUtils, useBalance, useTx } from '@/hooks'; import { KeplrWalletName } from '@/config'; -import { ibc } from 'osmo-query'; import { chains } from '@chain-registry/v2' - import { PriceHash, TransferInfo, Transfer } from './types'; - -const { transfer } = ibc.applications.transfer.v1.MessageComposer.withTypeUrl; +import { MsgTransfer } from 'interchainjs/ibc/applications/transfer/v1/tx'; interface IProps { prices: PriceHash; @@ -128,16 +125,19 @@ const TransferModalBody = ( const stamp = Date.now(); const timeoutInNanos = (stamp + 1.2e6) * 1e6; - const msg = transfer({ - sourcePort, - sourceChannel, - sender: sourceAddress, - receiver: destAddress, - token, - // @ts-ignore - timeoutHeight: undefined, - timeoutTimestamp: BigInt(timeoutInNanos), - }); + const msg = { + typeUrl: MsgTransfer.typeUrl, + value: MsgTransfer.fromPartial({ + sourcePort, + sourceChannel, + token, + sender: sourceAddress, + receiver: destAddress, + timeoutHeight: undefined, + timeoutTimestamp: BigInt(timeoutInNanos), + memo: '', + }), + } await tx([msg], { fee, @@ -196,16 +196,19 @@ const TransferModalBody = ( const stamp = Date.now(); const timeoutInNanos = (stamp + 1.2e6) * 1e6; - const msg = transfer({ - sourcePort, - sourceChannel, - sender: sourceAddress, - receiver: destAddress, - token, - // @ts-ignore - timeoutHeight: undefined, - timeoutTimestamp: BigInt(timeoutInNanos), - }); + const msg = { + typeUrl: MsgTransfer.typeUrl, + value: MsgTransfer.fromPartial({ + sourcePort, + sourceChannel, + token, + sender: sourceAddress, + receiver: destAddress, + timeoutHeight: undefined, + timeoutTimestamp: BigInt(timeoutInNanos), + memo: '', + }), + } await tx([msg], { fee, diff --git a/examples/ibc-asset-list/hooks/useTx.ts b/examples/ibc-asset-list/hooks/useTx.ts index 5e7506db..ff756803 100644 --- a/examples/ibc-asset-list/hooks/useTx.ts +++ b/examples/ibc-asset-list/hooks/useTx.ts @@ -1,15 +1,14 @@ -import { cosmos } from 'osmo-query'; import { StdFee } from '@interchainjs/cosmos-types/types'; import { isDeliverTxSuccess } from '@interchainjs/cosmos/utils/asserts'; import { toast, ToastShape } from '@interchain-ui/react'; import { useChain } from '@interchain-kit/react'; -import { TxRaw } from 'osmo-query/dist/codegen/cosmos/tx/v1beta1/tx'; import { assetLists } from '@chain-registry/v2'; import { toConverters, toEncoders, } from '@interchainjs/cosmos/utils'; import { MsgTransfer } from 'interchainjs/ibc/applications/transfer/v1/tx'; +import { TxRaw } from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx' interface Msg { typeUrl: string; @@ -28,7 +27,7 @@ export enum TxStatus { Broadcasting = 'Transaction Broadcasting', } -const txRaw = cosmos.tx.v1beta1.TxRaw; +const txRaw = TxRaw; export const useTx = (chainName: string) => { const { address, getSigningClient } = diff --git a/examples/ibc-asset-list/package.json b/examples/ibc-asset-list/package.json index 8404574e..ddd5c94e 100644 --- a/examples/ibc-asset-list/package.json +++ b/examples/ibc-asset-list/package.json @@ -37,6 +37,7 @@ "chain-registry": "^1.69.32", "fast-fuzzy": "1.12.0", "framer-motion": "9.0.7", + "interchain-react": "1.7.3", "match-sorter": "^6.3.3", "next": "^13", "osmo-query": "16.5.1", diff --git a/examples/ibc-asset-list/utils/pool.ts b/examples/ibc-asset-list/utils/pool.ts index 0d511440..d9dde547 100644 --- a/examples/ibc-asset-list/utils/pool.ts +++ b/examples/ibc-asset-list/utils/pool.ts @@ -1,5 +1,5 @@ import { Pool } from 'osmo-query/dist/codegen/osmosis/gamm/pool-models/balancer/balancerPool'; -import { Coin } from 'osmo-query/dist/codegen/cosmos/base/v1beta1/coin'; +import { Coin } from 'interchainjs/types'; import { PriceHash, CoinValue, diff --git a/examples/ibc-asset-list/utils/types.ts b/examples/ibc-asset-list/utils/types.ts index 8717eb53..5a3bc98e 100644 --- a/examples/ibc-asset-list/utils/types.ts +++ b/examples/ibc-asset-list/utils/types.ts @@ -1,8 +1,8 @@ import { DenomUnit } from '@chain-registry/v2-types'; -import { Duration } from 'osmo-query/dist/codegen/google/protobuf/duration'; +import { Duration } from '@interchainjs/cosmos-types/google/protobuf/duration'; import { Gauge } from 'osmo-query/dist/codegen/osmosis/incentives/gauge'; import { SuperfluidAsset } from 'osmo-query/dist/codegen/osmosis/superfluid/superfluid'; -import { Coin } from 'osmo-query/dist/codegen/cosmos/base/v1beta1/coin'; +import { Coin } from 'interchainjs/types'; import { Pool } from 'osmo-query/dist/codegen/osmosis/gamm/pool-models/balancer/balancerPool'; export type CoinDenom = DenomUnit['denom']; diff --git a/examples/ibc-asset-list/yarn.lock b/examples/ibc-asset-list/yarn.lock index 84df925b..4242ae7f 100644 --- a/examples/ibc-asset-list/yarn.lock +++ b/examples/ibc-asset-list/yarn.lock @@ -1059,8 +1059,8 @@ __metadata: "@interchain-kit/react": "npm:0.0.1-beta.62" "@interchain-ui/react": "npm:1.26.0" "@interchain-ui/react-no-ssr": "npm:^0.1.6" - "@interchainjs/cosmos": "npm:1.7.6" - "@interchainjs/cosmos-types": "npm:1.7.6" + "@interchainjs/cosmos": "npm:1.8.2" + "@interchainjs/cosmos-types": "npm:1.8.1" "@tanstack/react-query": "npm:4.32.0" "@tanstack/react-query-devtools": "npm:4.32.0" "@types/node": "npm:^20.14.6" @@ -1074,6 +1074,7 @@ __metadata: fast-fuzzy: "npm:1.12.0" framer-motion: "npm:9.0.7" generate-lockfile: "npm:0.0.12" + interchain-react: "npm:1.7.3" match-sorter: "npm:^6.3.3" next: "npm:^13" osmo-query: "npm:16.5.1" @@ -1245,16 +1246,17 @@ __metadata: languageName: node linkType: hard -"@interchainjs/auth@npm:1.7.6": - version: 1.7.6 - resolution: "@interchainjs/auth@npm:1.7.6" +"@interchainjs/auth@npm:^1.7.10": + version: 1.9.4 + resolution: "@interchainjs/auth@npm:1.9.4" dependencies: - "@interchainjs/types": "npm:1.7.6" - "@interchainjs/utils": "npm:1.7.6" + "@interchainjs/types": "npm:1.9.4" + "@interchainjs/utils": "npm:1.9.4" "@noble/curves": "npm:^1.1.0" "@noble/hashes": "npm:^1.3.1" + "@scure/bip32": "npm:^1.0.10" ethers: "npm:^6.5.1" - checksum: 10c0/4944317698cf8453188030992dce91410871a7a27f2e2a2412d73bd26b80ce965991b3e33c936c199c933b3a952bbf9fec47c42bc89425c2f7668c2223595082 + checksum: 10c0/a79ef47fd5a619607d03e972cd66636b1087a22dae97821d3210d95d79eca7ed2e7522da8de935d0dc2b9dc2f26e2aafecf50998d3b5961654c733657edd929c languageName: node linkType: hard @@ -1268,13 +1270,23 @@ __metadata: languageName: node linkType: hard -"@interchainjs/cosmos-types@npm:1.7.6": - version: 1.7.6 - resolution: "@interchainjs/cosmos-types@npm:1.7.6" +"@interchainjs/cosmos-types@npm:1.8.1": + version: 1.8.1 + resolution: "@interchainjs/cosmos-types@npm:1.8.1" + dependencies: + "@interchainjs/types": "npm:1.7.8" + "@interchainjs/utils": "npm:^1.7.9" + checksum: 10c0/7143a9cb5bca5247b278a8f4f5fb238e3fe37ff84df18fc14fc59fb8af10711768cb141e1fb97825c58f9628b143e9de4e3311a2a0b20d9e5e2a57a04a0ace31 + languageName: node + linkType: hard + +"@interchainjs/cosmos-types@npm:^1.8.1": + version: 1.9.4 + resolution: "@interchainjs/cosmos-types@npm:1.9.4" dependencies: - "@interchainjs/types": "npm:1.7.6" - "@interchainjs/utils": "npm:1.7.6" - checksum: 10c0/ccd59ae2ec5fba6422d37894b1a8e2cada8f972adbf7236b373d5078f10627a43b3b19a1c22434b26b096c8379abd82be280f633d978da41defa7dc379bc8932 + "@interchainjs/types": "npm:1.9.4" + "@interchainjs/utils": "npm:1.9.4" + checksum: 10c0/0b28d2b7347d1e055f743e4f989bfe56ce86c25a377cf3b9acbd41147e7ba44b117c5e6bb5e1c68ad733ec8a0d18952948d390905090fbb26bb059dfd8fd00f5 languageName: node linkType: hard @@ -1295,20 +1307,20 @@ __metadata: languageName: node linkType: hard -"@interchainjs/cosmos@npm:1.7.6": - version: 1.7.6 - resolution: "@interchainjs/cosmos@npm:1.7.6" +"@interchainjs/cosmos@npm:1.8.2": + version: 1.8.2 + resolution: "@interchainjs/cosmos@npm:1.8.2" dependencies: "@chain-registry/v2": "npm:^1.65.6" "@chain-registry/v2-types": "npm:^0.49.6" - "@interchainjs/auth": "npm:1.7.6" - "@interchainjs/cosmos-types": "npm:1.7.6" - "@interchainjs/types": "npm:1.7.6" - "@interchainjs/utils": "npm:1.7.6" + "@interchainjs/auth": "npm:^1.7.10" + "@interchainjs/cosmos-types": "npm:^1.8.1" + "@interchainjs/types": "npm:1.7.8" + "@interchainjs/utils": "npm:^1.7.9" "@noble/curves": "npm:^1.1.0" "@noble/hashes": "npm:^1.3.1" decimal.js: "npm:^10.4.3" - checksum: 10c0/e502cc4c953860c53625dccd953d851e1639b14da2e8de0f9061eb940ca511e59b444f613b22a118aaa25a8f480d3654657d10bd35d2b24bef86b7228b831aec + checksum: 10c0/661df4627a8752ef481302bc7535720359fd2732456f8ac0ab5da987435f13e4ec5dc57faae9c683beddac415b762a354c7f458bd64a69a8496e24f56bdbb29f languageName: node linkType: hard @@ -1321,12 +1333,21 @@ __metadata: languageName: node linkType: hard -"@interchainjs/types@npm:1.7.6": - version: 1.7.6 - resolution: "@interchainjs/types@npm:1.7.6" +"@interchainjs/types@npm:1.7.8": + version: 1.7.8 + resolution: "@interchainjs/types@npm:1.7.8" + dependencies: + decimal.js: "npm:^10.4.3" + checksum: 10c0/5c601ca672cdc37f57c8319ef42ed6415433286cba8075ca7e514d8057f9057299d8c8227e6110aa17e3be550e1a362bebb8845a57ef7b3dbfa6097deeeb7899 + languageName: node + linkType: hard + +"@interchainjs/types@npm:1.9.4": + version: 1.9.4 + resolution: "@interchainjs/types@npm:1.9.4" dependencies: decimal.js: "npm:^10.4.3" - checksum: 10c0/6206d61f8bf75199a6d0348b41fba866773ba376d04148a7fa5538a3419fbfeb6e4e741f1836e2dfa20b1693d0824c4a673ca2c086686993c6fc5191f4e19e61 + checksum: 10c0/bd82ba9e74316a9012f866326aba5c3bb37521986861f0c08ccef5b34afc738f73a4d2e436bc90e0b447f3dfe05f1edfaa38e08eebaa202fa1a5629a93d209d8 languageName: node linkType: hard @@ -1340,13 +1361,14 @@ __metadata: languageName: node linkType: hard -"@interchainjs/utils@npm:1.7.6": - version: 1.7.6 - resolution: "@interchainjs/utils@npm:1.7.6" +"@interchainjs/utils@npm:1.9.4, @interchainjs/utils@npm:^1.7.9": + version: 1.9.4 + resolution: "@interchainjs/utils@npm:1.9.4" dependencies: - "@interchainjs/types": "npm:1.7.6" + "@interchainjs/types": "npm:1.9.4" bech32: "npm:^2.0.0" - checksum: 10c0/6c8e2f8bd833c2c2c73cdaa248e6a21d7820f247d5a84b0d4cd95d9240cb4860de957ed67fae53519e0e474f5b142718ac795a91313155360f37ba22f98ab5d7 + decimal.js: "npm:^10.4.3" + checksum: 10c0/93c530c292ad16a24683fe4765eae28e3631535dcf6d745174c9287acb162678ad25f8a8f21e379ab2b287c6ea4bd04ed4d38306346fe5c8d1be1200afa56410 languageName: node linkType: hard @@ -1736,7 +1758,7 @@ __metadata: languageName: node linkType: hard -"@noble/curves@npm:^1.1.0": +"@noble/curves@npm:^1.1.0, @noble/curves@npm:~1.8.1": version: 1.8.1 resolution: "@noble/curves@npm:1.8.1" dependencies: @@ -1752,7 +1774,7 @@ __metadata: languageName: node linkType: hard -"@noble/hashes@npm:1.7.1, @noble/hashes@npm:^1.3.1": +"@noble/hashes@npm:1.7.1, @noble/hashes@npm:^1.3.1, @noble/hashes@npm:~1.7.1": version: 1.7.1 resolution: "@noble/hashes@npm:1.7.1" checksum: 10c0/2f8ec0338ccc92b576a0f5c16ab9c017a3a494062f1fbb569ae641c5e7eab32072f9081acaa96b5048c0898f972916c818ea63cbedda707886a4b5ffcfbf94e3 @@ -3551,6 +3573,24 @@ __metadata: languageName: node linkType: hard +"@scure/base@npm:~1.2.2": + version: 1.2.4 + resolution: "@scure/base@npm:1.2.4" + checksum: 10c0/469c8aee80d6d6973e1aac6184befa04568f1b4016e40c889025f4a721575db9c1ca0c2ead80613896cce929392740322a18da585a427f157157e797dc0a42a9 + languageName: node + linkType: hard + +"@scure/bip32@npm:^1.0.10": + version: 1.6.2 + resolution: "@scure/bip32@npm:1.6.2" + dependencies: + "@noble/curves": "npm:~1.8.1" + "@noble/hashes": "npm:~1.7.1" + "@scure/base": "npm:~1.2.2" + checksum: 10c0/a0abd62d1fe34b4d90b84feb25fa064ad452fd51be9fd7ea3dcd376059c0e8d08d4fe454099030f43fb91a1bee85cd955f093f221bbc522178919f779fbe565c + languageName: node + linkType: hard + "@stablelib/aead@npm:^1.0.1": version: 1.0.1 resolution: "@stablelib/aead@npm:1.0.1" @@ -6686,6 +6726,22 @@ __metadata: languageName: node linkType: hard +"interchain-react@npm:1.7.3": + version: 1.7.3 + resolution: "interchain-react@npm:1.7.3" + dependencies: + "@interchainjs/cosmos": "npm:1.6.3" + "@interchainjs/cosmos-types": "npm:1.6.3" + "@interchainjs/types": "npm:1.6.3" + "@interchainjs/utils": "npm:1.6.3" + "@noble/hashes": "npm:^1.3.1" + decimal.js: "npm:^10.4.3" + peerDependencies: + "@tanstack/react-query": 4.29.1 + checksum: 10c0/3a5884b763df2524ccec647ed3afd2901cec19fe64f78d0e9f6a051aaf0d56855a7524b2bd37cab793bfe58a5a854181071babc75604b05554ab7a9af202c22d + languageName: node + linkType: hard + "interchainjs@npm:1.6.3": version: 1.6.3 resolution: "interchainjs@npm:1.6.3" diff --git a/examples/stake-tokens/hooks/useTx.ts b/examples/stake-tokens/hooks/useTx.ts index 78e16dda..2ef2e5f4 100644 --- a/examples/stake-tokens/hooks/useTx.ts +++ b/examples/stake-tokens/hooks/useTx.ts @@ -1,4 +1,3 @@ -import { cosmos } from 'interchain-query'; import { useChain } from '@interchain-kit/react'; import { StdFee } from '@interchainjs/cosmos-types/types'; import { isDeliverTxSuccess } from '@interchainjs/cosmos/utils/asserts' @@ -7,8 +6,9 @@ import { assetLists } from '@chain-registry/v2'; import { toEncoders, toConverters } from '@interchainjs/cosmos/utils' import { MsgDelegate, MsgUndelegate, MsgBeginRedelegate } from 'interchainjs/cosmos/staking/v1beta1/tx' import { MsgWithdrawDelegatorReward } from 'interchainjs/cosmos/distribution/v1beta1/tx' +import { TxRaw } from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx' -const txRaw = cosmos.tx.v1beta1.TxRaw; +const txRaw = TxRaw; interface Msg { typeUrl: string; diff --git a/examples/vote-proposal/hooks/useTx.ts b/examples/vote-proposal/hooks/useTx.ts index d810d649..bff2a92a 100644 --- a/examples/vote-proposal/hooks/useTx.ts +++ b/examples/vote-proposal/hooks/useTx.ts @@ -1,10 +1,10 @@ -import { cosmos } from 'interchain-query'; import { useChain } from '@interchain-kit/react'; import { assetLists } from '@chain-registry/v2' import { DeliverTxResponse, StdFee } from '@interchainjs/cosmos-types/types' import { isDeliverTxSuccess } from '@interchainjs/cosmos/utils/asserts' import { toEncoders, toConverters } from '@interchainjs/cosmos/utils' import { MsgVote } from 'interchainjs/cosmos/gov/v1beta1/tx' +import { TxRaw } from '@interchainjs/cosmos-types/cosmos/tx/v1beta1/tx' export type Msg = { typeUrl: string; @@ -63,7 +63,7 @@ export function useTx(chainName: string) { } try { - const txRaw = cosmos.tx.v1beta1.TxRaw; + const txRaw = TxRaw; const fee = { amount: [ { From 74d4679550f6ab8d8bf0646f72dce0701e9f43d7 Mon Sep 17 00:00:00 2001 From: Eason Smith Date: Fri, 14 Feb 2025 13:00:15 +0800 Subject: [PATCH 2/5] use useRpcEndpoint from interchain-react --- examples/ibc-asset-list/hooks/queries/useQueryHooks.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts b/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts index d15e9296..e582747f 100644 --- a/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts +++ b/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts @@ -1,5 +1,6 @@ import { useChain } from '@interchain-kit/react'; -import { useRpcEndpoint, useRpcClient, createRpcQueryHooks } from 'osmo-query'; +import { createRpcQueryHooks, useRpcClient } from 'osmo-query'; +import { useRpcEndpoint } from 'interchain-react/react-query' export const useQueryHooks = (chainName: string, extraKey?: string) => { const { address, getRpcEndpoint } = useChain(chainName); From 42c7bed06535a2eef45f7b6a6d3e65d0d83fbc0b Mon Sep 17 00:00:00 2001 From: Eason Smith Date: Mon, 17 Feb 2025 16:20:43 +0800 Subject: [PATCH 3/5] remove osmo-query --- examples/ibc-asset-list/config/defaults.ts | 32 +------ .../hooks/queries/useQueryHooks.ts | 7 +- .../hooks/queries/useTotalAssets.ts | 2 +- examples/ibc-asset-list/types/pool-models.ts | 94 +++++++++++++++++++ examples/ibc-asset-list/utils/pool.ts | 2 +- examples/ibc-asset-list/utils/types.ts | 18 +--- 6 files changed, 104 insertions(+), 51 deletions(-) create mode 100644 examples/ibc-asset-list/types/pool-models.ts diff --git a/examples/ibc-asset-list/config/defaults.ts b/examples/ibc-asset-list/config/defaults.ts index d7a89ce0..f4bfe7e1 100644 --- a/examples/ibc-asset-list/config/defaults.ts +++ b/examples/ibc-asset-list/config/defaults.ts @@ -1,18 +1,5 @@ import { assetLists as assets } from '@chain-registry/v2'; import { AssetList, Asset } from '@chain-registry/v2-types'; -import { GeneratedType } from '@interchainjs/cosmos-types/types'; -import { Registry } from '@cosmjs/proto-signing'; -import { AminoTypes } from '@cosmjs/stargate'; -import { - cosmosAminoConverters, - cosmosProtoRegistry, - cosmwasmAminoConverters, - cosmwasmProtoRegistry, - ibcProtoRegistry, - ibcAminoConverters, - osmosisAminoConverters, - osmosisProtoRegistry, -} from 'osmo-query'; export const defaultChainName = 'osmosis'; export const KeplrWalletName = 'keplr-extension'; @@ -23,21 +10,4 @@ export const chainassets: AssetList = assets.find( export const coin: Asset = chainassets.assets.find( (asset) => asset.base === 'uosmo' -) as Asset; - -const protoRegistry: ReadonlyArray<[string, GeneratedType]> = [ - ...cosmosProtoRegistry, - ...cosmwasmProtoRegistry, - ...ibcProtoRegistry, - ...osmosisProtoRegistry, -]; - -const aminoConverters = { - ...cosmosAminoConverters, - ...cosmwasmAminoConverters, - ...ibcAminoConverters, - ...osmosisAminoConverters, -}; - -export const registry = new Registry(protoRegistry); -export const aminoTypes = new AminoTypes(aminoConverters); +) as Asset; \ No newline at end of file diff --git a/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts b/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts index e582747f..51cb7456 100644 --- a/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts +++ b/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts @@ -1,6 +1,10 @@ import { useChain } from '@interchain-kit/react'; -import { createRpcQueryHooks, useRpcClient } from 'osmo-query'; +import { + createRpcQueryHooks, useRpcClient, + // useRpcEndpoint +} from 'osmo-query'; import { useRpcEndpoint } from 'interchain-react/react-query' +import { defaultContext } from '@tanstack/react-query'; export const useQueryHooks = (chainName: string, extraKey?: string) => { const { address, getRpcEndpoint } = useChain(chainName); @@ -8,6 +12,7 @@ export const useQueryHooks = (chainName: string, extraKey?: string) => { const rpcEndpointQuery = useRpcEndpoint({ getter: getRpcEndpoint, options: { + context: defaultContext, enabled: !!address, staleTime: Infinity, queryKeyHashFn: (queryKey) => { diff --git a/examples/ibc-asset-list/hooks/queries/useTotalAssets.ts b/examples/ibc-asset-list/hooks/queries/useTotalAssets.ts index 237ca497..d60f001b 100644 --- a/examples/ibc-asset-list/hooks/queries/useTotalAssets.ts +++ b/examples/ibc-asset-list/hooks/queries/useTotalAssets.ts @@ -6,7 +6,7 @@ import { useEffect, useMemo } from 'react'; import { useChainUtils } from '../useChainUtils'; import { usePrices } from './usePrices'; import { defaultChainName as osmoChainName } from '@/config'; -import { Pool } from 'osmo-query/dist/codegen/osmosis/gamm/pool-models/balancer/balancerPool'; +import { Pool } from '@/types/pool-models'; import { convertGammTokenToDollarValue } from '@/utils'; import { useQueryHooks } from './useQueryHooks'; diff --git a/examples/ibc-asset-list/types/pool-models.ts b/examples/ibc-asset-list/types/pool-models.ts new file mode 100644 index 00000000..f003c56d --- /dev/null +++ b/examples/ibc-asset-list/types/pool-models.ts @@ -0,0 +1,94 @@ +import { Coin } from '@interchainjs/cosmos-types/types'; + +export interface Pool { + $typeUrl?: string; + address: string; + id: bigint; + poolParams: PoolParams; + /** + * This string specifies who will govern the pool in the future. + * Valid forms of this are: + * {token name},{duration} + * {duration} + * where {token name} if specified is the token which determines the + * governor, and if not specified is the LP token for this pool.duration is + * a time specified as 0w,1w,2w, etc. which specifies how long the token + * would need to be locked up to count in governance. 0w means no lockup. + * TODO: Further improve these docs + */ + futurePoolGovernor: string; + /** sum of all LP tokens sent out */ + totalShares: Coin; + /** + * These are assumed to be sorted by denomiation. + * They contain the pool asset and the information about the weight + */ + poolAssets: PoolAsset[]; + /** sum of all non-normalized pool weights */ + totalWeight: string; +} + +interface PoolParams { + swapFee: string; + /** + * N.B.: exit fee is disabled during pool creation in x/poolmanager. While old + * pools can maintain a non-zero fee. No new pool can be created with non-zero + * fee anymore + */ + exitFee: string; + smoothWeightChangeParams?: SmoothWeightChangeParams; +} + +interface SmoothWeightChangeParams { + /** + * The start time for beginning the weight change. + * If a parameter change / pool instantiation leaves this blank, + * it should be generated by the state_machine as the current time. + */ + startTime: Date; + /** Duration for the weights to change over */ + duration: Duration; + /** + * The initial pool weights. These are copied from the pool's settings + * at the time of weight change instantiation. + * The amount PoolAsset.token.amount field is ignored if present, + * future type refactorings should just have a type with the denom & weight + * here. + */ + initialPoolWeights: PoolAsset[]; + /** + * The target pool weights. The pool weights will change linearly with respect + * to time between start_time, and start_time + duration. The amount + * PoolAsset.token.amount field is ignored if present, future type + * refactorings should just have a type with the denom & weight here. + */ + targetPoolWeights: PoolAsset[]; +} + +interface Duration { + /** + * Signed seconds of the span of time. Must be from -315,576,000,000 + * to +315,576,000,000 inclusive. Note: these bounds are computed from: + * 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years + */ + seconds: bigint; + /** + * Signed fractions of a second at nanosecond resolution of the span + * of time. Durations less than one second are represented with a 0 + * `seconds` field and a positive or negative `nanos` field. For durations + * of one second or more, a non-zero value for the `nanos` field must be + * of the same sign as the `seconds` field. Must be from -999,999,999 + * to +999,999,999 inclusive. + */ + nanos: number; +} + +interface PoolAsset { + /** + * Coins we are talking about, + * the denomination must be unique amongst all PoolAssets for this pool. + */ + token: Coin; + /** Weight that is not normalized. This weight must be less than 2^50 */ + weight: string; +} \ No newline at end of file diff --git a/examples/ibc-asset-list/utils/pool.ts b/examples/ibc-asset-list/utils/pool.ts index d9dde547..f01c0f8c 100644 --- a/examples/ibc-asset-list/utils/pool.ts +++ b/examples/ibc-asset-list/utils/pool.ts @@ -1,4 +1,4 @@ -import { Pool } from 'osmo-query/dist/codegen/osmosis/gamm/pool-models/balancer/balancerPool'; +import { Pool } from '@/types/pool-models'; import { Coin } from 'interchainjs/types'; import { PriceHash, diff --git a/examples/ibc-asset-list/utils/types.ts b/examples/ibc-asset-list/utils/types.ts index 5a3bc98e..94b7de22 100644 --- a/examples/ibc-asset-list/utils/types.ts +++ b/examples/ibc-asset-list/utils/types.ts @@ -1,9 +1,6 @@ import { DenomUnit } from '@chain-registry/v2-types'; -import { Duration } from '@interchainjs/cosmos-types/google/protobuf/duration'; -import { Gauge } from 'osmo-query/dist/codegen/osmosis/incentives/gauge'; -import { SuperfluidAsset } from 'osmo-query/dist/codegen/osmosis/superfluid/superfluid'; import { Coin } from 'interchainjs/types'; -import { Pool } from 'osmo-query/dist/codegen/osmosis/gamm/pool-models/balancer/balancerPool'; +import { Pool } from '@/types/pool-models'; export type CoinDenom = DenomUnit['denom']; @@ -55,19 +52,6 @@ export interface PoolPretty extends Pool { poolAssetsPretty: PoolAssetPretty[]; } -export interface CalcPoolAprsParams { - activeGauges: Gauge[]; - pool: Pool; - prices: PriceHash; - superfluidPools: SuperfluidAsset[]; - aprSuperfluid: string | number; - lockupDurations: Duration[]; - volume7d: string | number; - swapFee: string | number; - lockup?: string; - includeNonPerpetual?: boolean; -} - export interface Trade { sell: Coin; buy: Coin; From 9b30da9237001fc783bf6f08c59f7453c0010c0f Mon Sep 17 00:00:00 2001 From: Eason Smith Date: Mon, 17 Feb 2025 22:39:38 +0800 Subject: [PATCH 4/5] refactoried some classes from osmo-query to use interchainjs --- .../ibc-asset-list/hooks/queries/useQueryHooks.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts b/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts index 51cb7456..b838088e 100644 --- a/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts +++ b/examples/ibc-asset-list/hooks/queries/useQueryHooks.ts @@ -1,8 +1,6 @@ import { useChain } from '@interchain-kit/react'; -import { - createRpcQueryHooks, useRpcClient, - // useRpcEndpoint -} from 'osmo-query'; +import { createRpcQueryHooks } from 'osmo-query'; +import { useRpcClient } from 'interchain-react/react-query'; import { useRpcEndpoint } from 'interchain-react/react-query' import { defaultContext } from '@tanstack/react-query'; @@ -23,8 +21,12 @@ export const useQueryHooks = (chainName: string, extraKey?: string) => { }); const rpcClientQuery = useRpcClient({ - rpcEndpoint: rpcEndpointQuery.data || '', + // rpcEndpoint: rpcEndpointQuery.data || '', + clientResolver: { + rpcEndpoint: rpcEndpointQuery.data, + }, options: { + context: defaultContext, enabled: !!address && !!rpcEndpointQuery.data, staleTime: Infinity, queryKeyHashFn: (queryKey) => { From 7f22844f1a6d430af09e5014484c4b3a5c3a3505 Mon Sep 17 00:00:00 2001 From: Eason Smith Date: Mon, 17 Feb 2025 23:05:33 +0800 Subject: [PATCH 5/5] ibc transaction success --- examples/ibc-asset-list/package.json | 8 +- examples/ibc-asset-list/yarn.lock | 226 ++++++++++++++++++++++----- 2 files changed, 191 insertions(+), 43 deletions(-) diff --git a/examples/ibc-asset-list/package.json b/examples/ibc-asset-list/package.json index ddd5c94e..18bc3df5 100644 --- a/examples/ibc-asset-list/package.json +++ b/examples/ibc-asset-list/package.json @@ -23,10 +23,10 @@ "@cosmjs/stargate": "^0.32.3", "@emotion/react": "11.10.6", "@emotion/styled": "11.10.6", - "@interchain-kit/core": "0.0.1-beta.62", - "@interchain-kit/keplr-extension": "0.0.1-beta.62", - "@interchain-kit/leap-extension": "0.0.1-beta.62", - "@interchain-kit/react": "0.0.1-beta.62", + "@interchain-kit/core": "0.2.203", + "@interchain-kit/keplr-extension": "0.2.203", + "@interchain-kit/leap-extension": "0.2.203", + "@interchain-kit/react": "0.2.203", "@interchain-ui/react": "1.26.0", "@interchain-ui/react-no-ssr": "^0.1.6", "@interchainjs/cosmos": "1.8.2", diff --git a/examples/ibc-asset-list/yarn.lock b/examples/ibc-asset-list/yarn.lock index 4242ae7f..8e575816 100644 --- a/examples/ibc-asset-list/yarn.lock +++ b/examples/ibc-asset-list/yarn.lock @@ -114,6 +114,20 @@ __metadata: languageName: node linkType: hard +"@chain-registry/v2-types@npm:0.53.68": + version: 0.53.68 + resolution: "@chain-registry/v2-types@npm:0.53.68" + checksum: 10c0/5b4d1d039bce3bc595f83e6950f6c1a5594984ae141461f2225b9a45a3c2dddc243ccb0d1af433dae6d9477a724170d471a365d6905ede854c0fb478f343b918 + languageName: node + linkType: hard + +"@chain-registry/v2-types@npm:0.53.72": + version: 0.53.72 + resolution: "@chain-registry/v2-types@npm:0.53.72" + checksum: 10c0/a86ae13acfc13ec0f954c5c9b2211d1d9e50cc006b02a4113f33f9eaa2be350c01a5838869f4520d574b24019fd1f1b9bfc44781fa1331a2b0569cceba86a40a + languageName: node + linkType: hard + "@chain-registry/v2-types@npm:^0.49.6": version: 0.49.86 resolution: "@chain-registry/v2-types@npm:0.49.86" @@ -128,6 +142,15 @@ __metadata: languageName: node linkType: hard +"@chain-registry/v2@npm:1.71.71": + version: 1.71.71 + resolution: "@chain-registry/v2@npm:1.71.71" + dependencies: + "@chain-registry/v2-types": "npm:^0.53.40" + checksum: 10c0/b498b77509b3750d2533186ca3a4ae49776a1fcf59d4b9be9a43e9287b805a48a300f1ba375e108ac9565f738a4c0089009e186bf27be42edffb7355b5dfc962 + languageName: node + linkType: hard + "@chain-registry/v2@npm:^1.65.6, @chain-registry/v2@npm:^1.71.71": version: 1.71.100 resolution: "@chain-registry/v2@npm:1.71.100" @@ -1053,10 +1076,10 @@ __metadata: "@cosmjs/stargate": "npm:^0.32.3" "@emotion/react": "npm:11.10.6" "@emotion/styled": "npm:11.10.6" - "@interchain-kit/core": "npm:0.0.1-beta.62" - "@interchain-kit/keplr-extension": "npm:0.0.1-beta.62" - "@interchain-kit/leap-extension": "npm:0.0.1-beta.62" - "@interchain-kit/react": "npm:0.0.1-beta.62" + "@interchain-kit/core": "npm:0.2.203" + "@interchain-kit/keplr-extension": "npm:0.2.203" + "@interchain-kit/leap-extension": "npm:0.2.203" + "@interchain-kit/react": "npm:0.2.203" "@interchain-ui/react": "npm:1.26.0" "@interchain-ui/react-no-ssr": "npm:^0.1.6" "@interchainjs/cosmos": "npm:1.8.2" @@ -1085,15 +1108,15 @@ __metadata: languageName: unknown linkType: soft -"@interchain-kit/core@npm:0.0.1-beta.62": - version: 0.0.1-beta.62 - resolution: "@interchain-kit/core@npm:0.0.1-beta.62" +"@interchain-kit/core@npm:0.2.203": + version: 0.2.203 + resolution: "@interchain-kit/core@npm:0.2.203" dependencies: "@chain-registry/v2": "npm:^1.71.71" "@chain-registry/v2-keplr": "npm:^0.0.72" "@chain-registry/v2-types": "npm:^0.53.40" - "@interchainjs/cosmos": "npm:1.6.3" - "@interchainjs/cosmos-types": "npm:1.6.3" + "@interchainjs/cosmos": "npm:1.9.12" + "@interchainjs/cosmos-types": "npm:1.9.12" "@ledgerhq/hw-app-cosmos": "npm:^6.30.4" "@ledgerhq/hw-transport": "npm:^6.31.4" "@ledgerhq/hw-transport-webhid": "npm:^6.30.0" @@ -1103,49 +1126,50 @@ __metadata: axios: "npm:^1.7.9" bowser: "npm:^2.11.0" buffer: "npm:^6.0.3" - interchainjs: "npm:1.6.3" + interchainjs: "npm:1.9.12" long: "npm:^5.2.3" - checksum: 10c0/c39e6ef5d608ef3987cfd49ae7b022527567b61d49748b9fc5570657deac86ae958334cc218734c21b1259b4f13a0f86bae6d495857c17a082919d1156672bef + zustand: "npm:^5.0.3" + checksum: 10c0/c036251f8938885af2db10e57a86f7b6bd1958d9f3bbf347ac278ac1c299bebf8b2eaf794a0a0300bcd44c790a64388772fda021523e3a2c3303280a6b2bd0e5 languageName: node linkType: hard -"@interchain-kit/keplr-extension@npm:0.0.1-beta.62": - version: 0.0.1-beta.62 - resolution: "@interchain-kit/keplr-extension@npm:0.0.1-beta.62" +"@interchain-kit/keplr-extension@npm:0.2.203": + version: 0.2.203 + resolution: "@interchain-kit/keplr-extension@npm:0.2.203" dependencies: - "@interchain-kit/core": "npm:0.0.1-beta.62" + "@interchain-kit/core": "npm:0.2.203" "@keplr-wallet/provider-extension": "npm:^0.12.102" - checksum: 10c0/d046e4456241c8aabeefb233263b9d254584192b4bc41bdc1b7ad7eb76347603099f2445434718f516d63cbb659f20ce4f559894d0cd24a25bb370343a58b3a8 + checksum: 10c0/d5d2dc70e1792ac30c07b0352356c22af90dab3adf2d340632005367ac3966071c9d6ddac2d23f3fdebbacc459a24cd76f523f5a035eb4d3556e7aec26e041da languageName: node linkType: hard -"@interchain-kit/leap-extension@npm:0.0.1-beta.62": - version: 0.0.1-beta.62 - resolution: "@interchain-kit/leap-extension@npm:0.0.1-beta.62" +"@interchain-kit/leap-extension@npm:0.2.203": + version: 0.2.203 + resolution: "@interchain-kit/leap-extension@npm:0.2.203" dependencies: - "@interchain-kit/core": "npm:0.0.1-beta.62" - checksum: 10c0/a7a95c90cb863f77262d14a1124bee020701f0379f893127ddb393a37094573c002abad42ed20ca0a9fca83e05d2ac2d452731470b2cc74eb29f8b7712d8fb3e + "@interchain-kit/core": "npm:0.2.203" + checksum: 10c0/11c3f448716d79b006d3f28ec5e12d32b988a14d136e48f4d902508570d39a025bf4403a145cc5d23fc2ab63040e79561f210ca08547cf6c10bc3edd06e79f31 languageName: node linkType: hard -"@interchain-kit/react@npm:0.0.1-beta.62": - version: 0.0.1-beta.62 - resolution: "@interchain-kit/react@npm:0.0.1-beta.62" +"@interchain-kit/react@npm:0.2.203": + version: 0.2.203 + resolution: "@interchain-kit/react@npm:0.2.203" dependencies: "@chain-registry/v2-types": "npm:^0.53.40" - "@interchain-kit/core": "npm:0.0.1-beta.62" + "@interchain-kit/core": "npm:0.2.203" "@interchain-ui/react": "npm:1.26.1" - "@interchainjs/cosmos": "npm:1.6.3" - "@interchainjs/cosmos-types": "npm:1.6.3" + "@interchainjs/cosmos": "npm:1.9.12" + "@interchainjs/cosmos-types": "npm:1.9.12" "@react-icons/all-files": "npm:^4.1.0" "@types/react": "npm:^18.3.3" "@types/react-dom": "npm:^18.3.0" "@walletconnect/types": "npm:^2.17.3" - interchainjs: "npm:1.6.3" + interchainjs: "npm:1.9.12" react: "npm:^18.3.1" react-dom: "npm:^18.3.1" zustand: "npm:^5.0.3" - checksum: 10c0/ca8bf406531b07ac75431b4a9db388ace79e82f1354e4b38b6d6fe6784a8661bd7820ea3d0c9c75826a239f3e4cb96212df6b9b0445e70d815bc8a08cd11c00f + checksum: 10c0/5036ddfde0db0216212729dd96b4a6d0df2e6713716c94c050e3e10874e757d59771ba156a8e6516e002cf1abc6068ef78616dfb813a5947176be1cbc9df684c languageName: node linkType: hard @@ -1233,6 +1257,18 @@ __metadata: languageName: node linkType: hard +"@interchainjs/amino@npm:1.9.12": + version: 1.9.12 + resolution: "@interchainjs/amino@npm:1.9.12" + dependencies: + "@interchainjs/crypto": "npm:1.9.12" + "@interchainjs/encoding": "npm:1.9.12" + "@interchainjs/math": "npm:1.9.12" + "@interchainjs/utils": "npm:1.9.12" + checksum: 10c0/e845903aa5b41190ddc5662a1113131e44ce64feee3588f7e95f85173f6f8855204ed0f3243f4406520399f770b73411721c9cd5bbdbd5a28acda70ba442b862 + languageName: node + linkType: hard + "@interchainjs/auth@npm:1.6.3": version: 1.6.3 resolution: "@interchainjs/auth@npm:1.6.3" @@ -1246,6 +1282,20 @@ __metadata: languageName: node linkType: hard +"@interchainjs/auth@npm:1.9.12": + version: 1.9.12 + resolution: "@interchainjs/auth@npm:1.9.12" + dependencies: + "@interchainjs/types": "npm:1.9.12" + "@interchainjs/utils": "npm:1.9.12" + "@noble/curves": "npm:^1.1.0" + "@noble/hashes": "npm:^1.3.1" + "@scure/bip32": "npm:^1.0.10" + ethers: "npm:^6.5.1" + checksum: 10c0/125c0f1a6f60d32ff851e15a1afb4c96cb0fb74823d8251bc83e1c07f99e1bece4879b97f72b43103c903ed1d1ab2550d8c999235302bf26695230f35b9d5bb1 + languageName: node + linkType: hard + "@interchainjs/auth@npm:^1.7.10": version: 1.9.4 resolution: "@interchainjs/auth@npm:1.9.4" @@ -1280,6 +1330,16 @@ __metadata: languageName: node linkType: hard +"@interchainjs/cosmos-types@npm:1.9.12": + version: 1.9.12 + resolution: "@interchainjs/cosmos-types@npm:1.9.12" + dependencies: + "@interchainjs/types": "npm:1.9.12" + "@interchainjs/utils": "npm:1.9.12" + checksum: 10c0/6e6e8ccd733b6d94cb35c1a84cff26cc7dacc8259166114128c804a42a48002174fa03d91020585ff7b569c81804e572c05af76f89dee1373357df8d49aa77a2 + languageName: node + linkType: hard + "@interchainjs/cosmos-types@npm:^1.8.1": version: 1.9.4 resolution: "@interchainjs/cosmos-types@npm:1.9.4" @@ -1324,6 +1384,72 @@ __metadata: languageName: node linkType: hard +"@interchainjs/cosmos@npm:1.9.12": + version: 1.9.12 + resolution: "@interchainjs/cosmos@npm:1.9.12" + dependencies: + "@chain-registry/v2": "npm:^1.65.6" + "@chain-registry/v2-types": "npm:0.53.68" + "@interchainjs/auth": "npm:1.9.12" + "@interchainjs/cosmos-types": "npm:1.9.12" + "@interchainjs/types": "npm:1.9.12" + "@interchainjs/utils": "npm:1.9.12" + "@noble/curves": "npm:^1.1.0" + "@noble/hashes": "npm:^1.3.1" + decimal.js: "npm:^10.4.3" + checksum: 10c0/4446d4d4a43cbc1dab2d6ddf9f3a327186b73ce4406c6d45d1ddc371471b37e74998441fc64a509dbc1e8578d0dc46bfbf3130a6c8e9090c955d5c9782807c9c + languageName: node + linkType: hard + +"@interchainjs/crypto@npm:1.9.12": + version: 1.9.12 + resolution: "@interchainjs/crypto@npm:1.9.12" + dependencies: + "@interchainjs/encoding": "npm:1.9.12" + "@interchainjs/math": "npm:1.9.12" + "@interchainjs/utils": "npm:1.9.12" + "@noble/hashes": "npm:^1" + bn.js: "npm:^5.2.0" + elliptic: "npm:^6.5.4" + libsodium-wrappers-sumo: "npm:^0.7.11" + checksum: 10c0/4f9821aa442f585ca47785cda77209004e4cc0ee147a3abfb0324a03a88afce50869b053589690a8b67b3a54d3197177d255109dc67d46297affc23c944240a3 + languageName: node + linkType: hard + +"@interchainjs/encoding@npm:1.9.12": + version: 1.9.12 + resolution: "@interchainjs/encoding@npm:1.9.12" + dependencies: + "@interchainjs/math": "npm:1.9.12" + base64-js: "npm:^1.3.0" + bech32: "npm:^1.1.4" + readonly-date: "npm:^1.0.0" + checksum: 10c0/1caddaaf1afbebdd0829c95fd10d45541b41dbf12c4d35cde50a09705881f3e55a7f8d8e4c007d813ae89243603762efd359a1c66648aa70f35f5d658a7f1794 + languageName: node + linkType: hard + +"@interchainjs/math@npm:1.9.12": + version: 1.9.12 + resolution: "@interchainjs/math@npm:1.9.12" + dependencies: + bn.js: "npm:^5.2.0" + checksum: 10c0/771d3b6056941b4c16f950eb977886035f8a7d891f541cce739357b571209c869110f361f3c19a9d4f3470fa75be3cd0d699e366b3917eac3e8433e6936b18ca + languageName: node + linkType: hard + +"@interchainjs/pubkey@npm:1.9.12": + version: 1.9.12 + resolution: "@interchainjs/pubkey@npm:1.9.12" + dependencies: + "@interchainjs/amino": "npm:1.9.12" + "@interchainjs/cosmos-types": "npm:1.9.12" + "@interchainjs/encoding": "npm:1.9.12" + "@interchainjs/math": "npm:1.9.12" + "@interchainjs/types": "npm:1.9.12" + checksum: 10c0/59d1ee9e4b1bb77ed4565f76e09ec3f930bcb4ff59c581e80616401313d89080a09b98dcd28c2c046c08e818d922dd8459fd4101a2aab39b69330715b9abc4cd + languageName: node + linkType: hard + "@interchainjs/types@npm:1.6.3": version: 1.6.3 resolution: "@interchainjs/types@npm:1.6.3" @@ -1342,6 +1468,15 @@ __metadata: languageName: node linkType: hard +"@interchainjs/types@npm:1.9.12": + version: 1.9.12 + resolution: "@interchainjs/types@npm:1.9.12" + dependencies: + decimal.js: "npm:^10.4.3" + checksum: 10c0/30607621c2c4f187a66a420bcee8fbf38884b880bf2dbbdb250eab5bf490bde86ddea0f19d94b06a136199671aff287d7be0bae9bbc2359d797006d5029815c8 + languageName: node + linkType: hard + "@interchainjs/types@npm:1.9.4": version: 1.9.4 resolution: "@interchainjs/types@npm:1.9.4" @@ -1361,6 +1496,19 @@ __metadata: languageName: node linkType: hard +"@interchainjs/utils@npm:1.9.12": + version: 1.9.12 + resolution: "@interchainjs/utils@npm:1.9.12" + dependencies: + "@chain-registry/v2": "npm:1.71.71" + "@chain-registry/v2-types": "npm:0.53.72" + "@interchainjs/types": "npm:1.9.12" + bech32: "npm:^2.0.0" + decimal.js: "npm:^10.4.3" + checksum: 10c0/62e0c147a7f04c574c50702fc10ee9e9d207bbb0fe438593afcf67748ff57112ad7bee8f39954c178b39231bc24811263efd81ee72adbe29746c46fcf229c4da + languageName: node + linkType: hard + "@interchainjs/utils@npm:1.9.4, @interchainjs/utils@npm:^1.7.9": version: 1.9.4 resolution: "@interchainjs/utils@npm:1.9.4" @@ -6742,19 +6890,19 @@ __metadata: languageName: node linkType: hard -"interchainjs@npm:1.6.3": - version: 1.6.3 - resolution: "interchainjs@npm:1.6.3" +"interchainjs@npm:1.9.12": + version: 1.9.12 + resolution: "interchainjs@npm:1.9.12" dependencies: - "@interchainjs/cosmos": "npm:1.6.3" - "@interchainjs/cosmos-types": "npm:1.6.3" - "@interchainjs/types": "npm:1.6.3" - "@interchainjs/utils": "npm:1.6.3" + "@interchainjs/cosmos": "npm:1.9.12" + "@interchainjs/cosmos-types": "npm:1.9.12" + "@interchainjs/encoding": "npm:1.9.12" + "@interchainjs/pubkey": "npm:1.9.12" + "@interchainjs/types": "npm:1.9.12" + "@interchainjs/utils": "npm:1.9.12" "@noble/hashes": "npm:^1.3.1" decimal.js: "npm:^10.4.3" - peerDependencies: - "@tanstack/react-query": 4.29.1 - checksum: 10c0/c13387c7115d8bbddfff20db0c843c54eea1bd92f7142bd13b8f9094be0008c08665e6e6b15d6dd21c532f71cec02d2bbd9a6c0bd4eb65005fe094e40645c073 + checksum: 10c0/28da34ff6d5936a0c8c56852865a8041d191050e80824b8d42407a156f9d8a153758aad6c02dc96133888692830be402fcc03fb950f2874d4f91b55a22e38d59 languageName: node linkType: hard