From 0314355ba4e75770173da860f9b1cef19567d6dd Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Thu, 5 Jun 2025 11:04:53 -0500 Subject: [PATCH 1/7] sdk: Added NttExecutorRoute --- evm/ts/package.json | 14 +- evm/ts/src/index.ts | 3 + evm/ts/src/ntt.ts | 95 +- evm/ts/src/nttWithExecutor.ts | 199 +++ package-lock.json | 1310 ++++++++++------- package.json | 6 +- sdk/definitions/package.json | 6 +- sdk/definitions/src/index.ts | 1 + sdk/definitions/src/ntt.ts | 2 - sdk/definitions/src/nttWithExecutor.ts | 49 + sdk/examples/package.json | 12 +- sdk/route/__tests__/route.test.ts | 1 - sdk/route/package.json | 11 +- sdk/route/src/automatic.ts | 15 +- sdk/route/src/executor/consts.ts | 20 + sdk/route/src/executor/executor.ts | 734 +++++++++ sdk/route/src/executor/utils.ts | 156 ++ sdk/route/src/index.ts | 1 + sdk/route/src/manual.ts | 13 +- sdk/route/src/types.ts | 2 - solana/package.json | 14 +- solana/tests/anchor.test.ts | 2 +- solana/ts/idl/executor/example_ntt_svm_lut.ts | 151 ++ .../idl/executor/example_ntt_with_executor.ts | 161 ++ solana/ts/sdk/index.ts | 3 + solana/ts/sdk/ntt.ts | 11 +- solana/ts/sdk/nttWithExecutor.ts | 327 ++++ 27 files changed, 2694 insertions(+), 625 deletions(-) create mode 100644 evm/ts/src/nttWithExecutor.ts create mode 100644 sdk/definitions/src/nttWithExecutor.ts create mode 100644 sdk/route/src/executor/consts.ts create mode 100644 sdk/route/src/executor/executor.ts create mode 100644 sdk/route/src/executor/utils.ts create mode 100644 solana/ts/idl/executor/example_ntt_svm_lut.ts create mode 100644 solana/ts/idl/executor/example_ntt_with_executor.ts create mode 100644 solana/ts/sdk/nttWithExecutor.ts diff --git a/evm/ts/package.json b/evm/ts/package.json index 877ab8012..1cf710ae6 100644 --- a/evm/ts/package.json +++ b/evm/ts/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/sdk-evm-ntt", - "version": "0.5.0", + "version": "1.0.0", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/example-native-token-transfers.git" @@ -44,14 +44,14 @@ "test": "jest --config ./jest.config.ts" }, "dependencies": { - "@wormhole-foundation/sdk-definitions-ntt": "0.5.0", + "@wormhole-foundation/sdk-definitions-ntt": "1.0.0", "ethers": "^6.5.1" }, "peerDependencies": { - "@wormhole-foundation/sdk-base": "^1.0.0", - "@wormhole-foundation/sdk-definitions": "^1.0.0", - "@wormhole-foundation/sdk-evm": "^1.0.0", - "@wormhole-foundation/sdk-evm-core": "^1.0.0" + "@wormhole-foundation/sdk-base": "^2.1.0", + "@wormhole-foundation/sdk-definitions": "^2.1.0", + "@wormhole-foundation/sdk-evm": "^2.1.0", + "@wormhole-foundation/sdk-evm-core": "^2.1.0" }, "devDependencies": { "@typechain/ethers-v6": "^0.5.1", @@ -71,4 +71,4 @@ } } } -} +} \ No newline at end of file diff --git a/evm/ts/src/index.ts b/evm/ts/src/index.ts index 8a4752f4d..b9920fde8 100644 --- a/evm/ts/src/index.ts +++ b/evm/ts/src/index.ts @@ -1,9 +1,12 @@ import { registerProtocol } from "@wormhole-foundation/sdk-definitions"; import { _platform } from "@wormhole-foundation/sdk-evm"; import { EvmNtt } from "./ntt.js"; +import { EvmNttWithExecutor } from "./nttWithExecutor.js"; import "@wormhole-foundation/sdk-definitions-ntt"; registerProtocol(_platform, "Ntt", EvmNtt); +registerProtocol(_platform, "NttWithExecutor", EvmNttWithExecutor); export * as ethers_contracts from "./ethers-contracts/index.js"; export * from "./ntt.js"; +export * from "./nttWithExecutor.js"; diff --git a/evm/ts/src/ntt.ts b/evm/ts/src/ntt.ts index c3dac11d3..f95cc39ce 100644 --- a/evm/ts/src/ntt.ts +++ b/evm/ts/src/ntt.ts @@ -80,20 +80,23 @@ export class EvmNttWormholeTranceiver async *setPeer

( peer: ChainAddress

): AsyncGenerator> { - const coreBridge = new Contract(this.manager.contracts.coreBridge!, [ - "function messageFee() public view returns (uint256)", - ], + const coreBridge = new Contract( + this.manager.contracts.coreBridge!, + ["function messageFee() public view returns (uint256)"], this.manager.provider - ) - const messageFee = await coreBridge.getFunction("messageFee").staticCall() + ); + const messageFee = await coreBridge.getFunction("messageFee").staticCall(); const tx = await this.transceiver.setWormholePeer.populateTransaction( toChainId(peer.chain), universalAddress(peer) ); - yield this.manager.createUnsignedTx({ - ...tx, - value: messageFee - }, "WormholeTransceiver.registerPeer"); + yield this.manager.createUnsignedTx( + { + ...tx, + value: messageFee, + }, + "WormholeTransceiver.registerPeer" + ); } async getPauser(): Promise | null> { @@ -357,6 +360,7 @@ export class EvmNtt async getTokenDecimals(): Promise { return await EvmPlatform.getDecimals( + this.network, this.chain, this.provider, this.tokenAddress @@ -396,7 +400,9 @@ export class EvmNtt ixs.push({ index: 0, - payload: this.xcvrs[0]!.encodeFlags({ skipRelay: !options.automatic }), + payload: this.xcvrs[0]!.encodeFlags({ + skipRelay: !options.automatic, + }), }); return ixs; @@ -482,19 +488,48 @@ export class EvmNtt ); if (options.wrapNative) { - // TODO: the contract should handle this for us - const wrappedNative = new Contract(this.tokenAddress, [ - "function deposit() public payable", - ]); - - const txReq = await wrappedNative - .getFunction("deposit") - .populateTransaction({ value: amount }); + yield this.wrapNative(sender, amount); + } - yield this.createUnsignedTx(addFrom(txReq, senderAddress), "Ntt.Deposit"); + const approveTx = await this.approve(sender, amount); + if (approveTx) { + yield approveTx; } - //TODO check for ERC-2612 (permit) support on token? + const receiver = universalAddress(destination); + const txReq = await this.manager + .getFunction("transfer(uint256,uint16,bytes32,bytes32,bool,bytes)") + .populateTransaction( + amount, + toChainId(destination.chain), + receiver, + receiver, + options.queue, + Ntt.encodeTransceiverInstructions(this.encodeOptions(options)), + { value: totalPrice } + ); + + yield this.createUnsignedTx(addFrom(txReq, senderAddress), "Ntt.transfer"); + } + + async wrapNative(sender: AccountAddress, amount: bigint) { + const senderAddress = new EvmAddress(sender).toString(); + + // TODO: the contract should handle this for us + const wrappedNative = new Contract(this.tokenAddress, [ + "function deposit() public payable", + ]); + + const txReq = await wrappedNative + .getFunction("deposit") + .populateTransaction({ value: amount }); + + return this.createUnsignedTx(addFrom(txReq, senderAddress), "Ntt.Deposit"); + } + + async approve(sender: AccountAddress, amount: bigint) { + const senderAddress = new EvmAddress(sender).toString(); + const tokenContract = EvmPlatform.getTokenImplementation( this.provider, this.tokenAddress @@ -510,23 +545,11 @@ export class EvmNtt amount ); - yield this.createUnsignedTx(addFrom(txReq, senderAddress), "Ntt.Approve"); - } - - const receiver = universalAddress(destination); - const txReq = await this.manager - .getFunction("transfer(uint256,uint16,bytes32,bytes32,bool,bytes)") - .populateTransaction( - amount, - toChainId(destination.chain), - receiver, - receiver, - options.queue, - Ntt.encodeTransceiverInstructions(this.encodeOptions(options)), - { value: totalPrice } + return this.createUnsignedTx( + addFrom(txReq, senderAddress), + "Ntt.Approve" ); - - yield this.createUnsignedTx(addFrom(txReq, senderAddress), "Ntt.transfer"); + } } // TODO: should this be some map of idx to transceiver? diff --git a/evm/ts/src/nttWithExecutor.ts b/evm/ts/src/nttWithExecutor.ts new file mode 100644 index 000000000..70df5e232 --- /dev/null +++ b/evm/ts/src/nttWithExecutor.ts @@ -0,0 +1,199 @@ +import { + nativeChainIds, + toChainId, + type Network, +} from "@wormhole-foundation/sdk-base"; +import { + type AccountAddress, + type ChainAddress, + type ChainsConfig, + Contracts, + UnsignedTransaction, +} from "@wormhole-foundation/sdk-definitions"; +import { Ntt, NttWithExecutor } from "@wormhole-foundation/sdk-definitions-ntt"; +import { + EvmPlatform, + type EvmPlatformType, + type EvmChains, + EvmAddress, +} from "@wormhole-foundation/sdk-evm"; +import { Provider, Interface } from "ethers"; +import { EvmNtt } from "./ntt.js"; + +const nttManagerWithExecutorAddresses: Partial< + Record>> +> = { + Mainnet: { + Arbitrum: "0x0Af42A597b0C201D4dcf450DcD0c06d55ddC1C77", + Avalanche: "0x4e9Af03fbf1aa2b79A2D4babD3e22e09f18Bb8EE", + Base: "0x83216747fC21b86173D800E2960c0D5395de0F30", + Berachain: "0x0a2AF374Cc9CCCbB0Acc4E34B20b9d02a0f08c30", + Bsc: "0x39B57Dd9908F8be02CfeE283b67eA1303Bc29fe1", + Celo: "0x3d69869fcB9e1CD1F4020b637fb8256030BAc8fC", + Ethereum: "0xD2D9c936165a85F27a5a7e07aFb974D022B89463", + HyperEVM: "0x431017B1718b86898C7590fFcCC380DEf0456393", + Linea: "0xEAa5AddB5b8939Eb73F7faF46e193EefECaF13E9", + Moonbeam: "0x1365593C8bae71a55e48E105a2Bb76d5928c7DE3", + Optimism: "0x85C0129bE5226C9F0Cf4e419D2fefc1c3FCa25cF", + Polygon: "0x6762157b73941e36cEd0AEf54614DdE545d0F990", + Scroll: "0x055625d48968f99409244E8c3e03FbE73B235a62", + Sonic: "0xaCa00703bb87F31D6F9fCcc963548b48FA46DfeB", + Unichain: "0x607723D6353Dae3ef62B7B277Cfabd0F4bc6CB4C", + Worldchain: "0x66b1644400D51e104272337226De3EF1A820eC79", + }, + Testnet: { + Avalanche: "0x4e9Af03fbf1aa2b79A2D4babD3e22e09f18Bb8EE", + BaseSepolia: "0x5845E08d890E21687F7Ebf7CbAbD360cD91c6245", + Sepolia: "0x54DD7080aE169DD923fE56d0C4f814a0a17B8f41", + }, +}; + +// Gas limits must be high enough to cover the worst-case scenario for each chain +// to avoid relay failures. However, they should not be too high to reduce the +// `estimatedCost` returned by the quote endpoint. +const gasLimitOverrides: Partial< + Record>> +> = { + Mainnet: { + Arbitrum: 800_000n, + }, + Testnet: {}, +}; + +export class EvmNttWithExecutor + implements NttWithExecutor +{ + readonly chainId: bigint; + readonly executorAddress: string; + + constructor( + readonly network: N, + readonly chain: C, + readonly provider: Provider, + readonly contracts: Contracts & { ntt?: Ntt.Contracts } + ) { + this.chainId = nativeChainIds.networkChainToNativeChainId.get( + network, + chain + ) as bigint; + + const executorAddress = + nttManagerWithExecutorAddresses[this.network]?.[this.chain]; + if (!executorAddress) + throw new Error(`Executor address not found for chain ${this.chain}`); + this.executorAddress = executorAddress; + } + + static async fromRpc( + provider: Provider, + config: ChainsConfig + ): Promise> { + const [network, chain] = await EvmPlatform.chainFromRpc(provider); + const conf = config[chain]!; + if (conf.network !== network) + throw new Error(`Network mismatch: ${conf.network} != ${network}`); + + return new EvmNttWithExecutor( + network as N, + chain, + provider, + conf.contracts + ); + } + + async *transfer( + sender: AccountAddress, + destination: ChainAddress, + amount: bigint, + quote: NttWithExecutor.Quote, + ntt: EvmNtt, + wrapNative: boolean = false + ): AsyncGenerator> { + const senderAddress = new EvmAddress(sender).toString(); + + const options = { queue: false, automatic: false }; + + // This will include any transceiver fees + const deliveryPrice = await ntt.quoteDeliveryPrice( + destination.chain, + options + ); + + if (wrapNative) { + yield ntt.wrapNative(sender, amount); + } + + const tokenContract = EvmPlatform.getTokenImplementation( + this.provider, + ntt.tokenAddress + ); + + const allowance = await tokenContract.allowance( + senderAddress, + this.executorAddress + ); + + if (allowance < amount) { + const txReq = await tokenContract.approve.populateTransaction( + this.executorAddress, + amount + ); + + yield ntt.createUnsignedTx(txReq, "Ntt.Approve"); + } + + // ABI for the INttManagerWithExecutor transfer function + // TODO: type safety. typechain brings in so much boilerplate code and is soft deprecated. Use Viem instead? + const abi = [ + "function transfer(address nttManager, uint256 amount, uint16 recipientChain, bytes32 recipientAddress, bytes32 refundAddress, bytes encodedInstructions, (uint256 value, address refundAddress, bytes signedQuote, bytes instructions) executorArgs, (uint16 dbps, address payee) feeArgs) external payable returns (uint64 msgId)", + ]; + + const iface = new Interface(abi); + + const nttManager = ntt.managerAddress; + const recipientChain = toChainId(destination.chain); + const recipientAddress = destination.address + .toUniversalAddress() + .toUint8Array(); + const refundAddress = sender.toUniversalAddress().toUint8Array(); + const encodedInstructions = Ntt.encodeTransceiverInstructions( + ntt.encodeOptions({ queue: false, automatic: false }) + ); + const executorArgs = { + value: quote.estimatedCost, + refundAddress: senderAddress, + signedQuote: quote.signedQuote, + instructions: quote.relayInstructions, + }; + const feeArgs = { + dbps: quote.referrerFeeDbps, + payee: quote.referrer.address.toString(), + }; + + const data = iface.encodeFunctionData("transfer", [ + nttManager, + amount, + recipientChain, + recipientAddress, + refundAddress, + encodedInstructions, + executorArgs, + feeArgs, + ]); + + const txReq = { + to: this.executorAddress, + data, + value: quote.estimatedCost + deliveryPrice, + }; + + yield ntt.createUnsignedTx(txReq, "NttWithExecutor.transfer"); + } + + async estimateMsgValueAndGasLimit( + recipient: ChainAddress | undefined + ): Promise<{ msgValue: bigint; gasLimit: bigint }> { + const gasLimit = gasLimitOverrides[this.network]?.[this.chain] ?? 500_000n; + return { msgValue: 0n, gasLimit }; + } +} diff --git a/package-lock.json b/package-lock.json index 74a0bd92b..c07ce9cfe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ntt", - "version": "0.5.0", + "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ntt", - "version": "0.5.0", + "version": "1.0.0", "license": "Apache-2.0", "workspaces": [ "sdk/definitions", @@ -21,7 +21,7 @@ "@solana/web3.js": "^1.95.8", "@types/jest": "^29.5.12", "@types/node": "^20.12.2", - "@wormhole-foundation/sdk": "^1.14.2", + "@wormhole-foundation/sdk": "^2.1.0", "@wormhole-foundation/wormchain-sdk": "^0.0.1", "ethers": "^6.5.1", "ts-jest": "^29.1.2", @@ -31,7 +31,7 @@ }, "cli": { "name": "@wormhole-foundation/ntt-cli", - "version": "1.1.0", + "version": "1.2.0", "dependencies": { "chalk": "^5.3.0", "yargs": "^17.7.2" @@ -89,10 +89,10 @@ }, "evm/ts": { "name": "@wormhole-foundation/sdk-evm-ntt", - "version": "0.5.0", + "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-definitions-ntt": "0.5.0", + "@wormhole-foundation/sdk-definitions-ntt": "1.0.0", "ethers": "^6.5.1" }, "devDependencies": { @@ -104,16 +104,17 @@ "node": ">=16" }, "peerDependencies": { - "@wormhole-foundation/sdk-base": "^1.0.0", - "@wormhole-foundation/sdk-definitions": "^1.0.0", - "@wormhole-foundation/sdk-evm": "^1.0.0", - "@wormhole-foundation/sdk-evm-core": "^1.0.0" + "@wormhole-foundation/sdk-base": "^2.1.0", + "@wormhole-foundation/sdk-definitions": "^2.1.0", + "@wormhole-foundation/sdk-evm": "^2.1.0", + "@wormhole-foundation/sdk-evm-core": "^2.1.0" } }, "node_modules/@0no-co/graphql.web": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@0no-co/graphql.web/-/graphql.web-1.1.2.tgz", "integrity": "sha512-N2NGsU5FLBhT8NZ+3l2YrzZSHITjNXNuDhC4iDiikv0IujaJ0Xc6xIxQZ/Ek3Cb+rgPjnLHYyJm11tInuJn+cw==", + "license": "MIT", "peerDependencies": { "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0" }, @@ -127,6 +128,7 @@ "version": "1.12.16", "resolved": "https://registry.npmjs.org/@0no-co/graphqlsp/-/graphqlsp-1.12.16.tgz", "integrity": "sha512-B5pyYVH93Etv7xjT6IfB7QtMBdaaC07yjbhN6v8H7KgFStMkPvi+oWYBTibMFRMY89qwc9H8YixXg8SXDVgYWw==", + "license": "MIT", "dependencies": { "@gql.tada/internal": "^1.0.0", "graphql": "^15.5.0 || ^16.0.0 || ^17.0.0" @@ -159,6 +161,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/@aptos-labs/aptos-cli/-/aptos-cli-1.0.2.tgz", "integrity": "sha512-PYPsd0Kk3ynkxNfe3S4fanI3DiUICCoh4ibQderbvjPFL5A0oK6F4lPEO2t0MDsQySTk2t4vh99Xjy6Bd9y+aQ==", + "license": "Apache-2.0", "dependencies": { "commander": "^12.1.0" }, @@ -170,43 +173,31 @@ "version": "12.1.0", "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "license": "MIT", "engines": { "node": ">=18" } }, "node_modules/@aptos-labs/aptos-client": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@aptos-labs/aptos-client/-/aptos-client-1.2.0.tgz", - "integrity": "sha512-pBlIAT/W+Qa0TOr/318U8r0Gxw/jfyRLcvDGMEXgcVrPqO9Qhwsmozw6LPPIZ963FB7smwIaMeexWFDs3zijcg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@aptos-labs/aptos-client/-/aptos-client-2.0.0.tgz", + "integrity": "sha512-A23T3zTCRXEKURodp00dkadVtIrhWjC9uo08dRDBkh69OhCnBAxkENmUy/rcBarfLoFr60nRWt7cBkc8wxr1mg==", + "license": "Apache-2.0", "engines": { - "node": ">=15.10.0" + "node": ">=20.0.0" }, "peerDependencies": { - "axios": "^1.8.4", "got": "^11.8.6" } }, - "node_modules/@aptos-labs/aptos-dynamic-transaction-composer": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@aptos-labs/aptos-dynamic-transaction-composer/-/aptos-dynamic-transaction-composer-0.1.3.tgz", - "integrity": "sha512-bJl+Zq5QbhpcPIJakAkl9tnT3T02mxCYhZThQDhUmjsOZ5wMRlKJ0P7aaq1dmlybSHkVj7vRgOy2t86/NDKKng==" - }, - "node_modules/@aptos-labs/script-composer-pack": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/@aptos-labs/script-composer-pack/-/script-composer-pack-0.0.9.tgz", - "integrity": "sha512-Y3kA1rgF65HETgoTn2omDymsgO+fnZouPLrKJZ9sbxTGdOekIIHtGee3A2gk84eCqa02ZKBumZmP+IDCXRtU/g==", - "dependencies": { - "@aptos-labs/aptos-dynamic-transaction-composer": "^0.1.3" - } - }, "node_modules/@aptos-labs/ts-sdk": { - "version": "1.38.0", - "resolved": "https://registry.npmjs.org/@aptos-labs/ts-sdk/-/ts-sdk-1.38.0.tgz", - "integrity": "sha512-cflGyknECg11wTkQ1o1OK759v1m+mpz0S0/ZXsHbPMO0dO6eQGLjH/Uk5/YWMe1Nat8/szcgIipKk8Xr6Unvzg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@aptos-labs/ts-sdk/-/ts-sdk-2.0.1.tgz", + "integrity": "sha512-k39Ks+qNcWxWujQrixMaV3ZIO8G9/qzIpDuV7+Td12GWNxXxKze5BqD6pFI3Q1iwI4mw65v1yxTi/jt5ted39Q==", + "license": "Apache-2.0", "dependencies": { "@aptos-labs/aptos-cli": "^1.0.2", - "@aptos-labs/aptos-client": "^1.1.0", - "@aptos-labs/script-composer-pack": "^0.0.9", + "@aptos-labs/aptos-client": "^2.0.0", "@noble/curves": "^1.6.0", "@noble/hashes": "^1.5.0", "@scure/bip32": "^1.4.0", @@ -224,7 +215,8 @@ "node_modules/@aptos-labs/ts-sdk/node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "license": "MIT" }, "node_modules/@babel/code-frame": { "version": "7.24.2", @@ -819,7 +811,8 @@ "node_modules/@bangjelkoski/store2": { "version": "2.14.3", "resolved": "https://registry.npmjs.org/@bangjelkoski/store2/-/store2-2.14.3.tgz", - "integrity": "sha512-ZG6ZDOHU5MZ4yxA3yY3gcZYnkcPtPaOwGOJrWD4Drar/u1TTBy1tWnP70atBa6LGm1+Ll1nb2GwS+HyWuFOWkw==" + "integrity": "sha512-ZG6ZDOHU5MZ4yxA3yY3gcZYnkcPtPaOwGOJrWD4Drar/u1TTBy1tWnP70atBa6LGm1+Ll1nb2GwS+HyWuFOWkw==", + "license": "MIT" }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", @@ -968,6 +961,7 @@ "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.32.4.tgz", "integrity": "sha512-zKYOt6hPy8obIFtLie/xtygCkH9ZROiQ12UHfKsOkWaZfPQUvVbtgmu6R4Kn1tFLI/SRkw7eqhaogmW/3NYu/Q==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/crypto": "^0.32.4", "@cosmjs/encoding": "^0.32.4", @@ -979,6 +973,7 @@ "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/cosmwasm-stargate/-/cosmwasm-stargate-0.32.4.tgz", "integrity": "sha512-Fuo9BGEiB+POJ5WeRyBGuhyKR1ordvxZGLPuPosFJOH9U0gKMgcjwKMCgAlWFkMlHaTB+tNdA8AifWiHrI7VgA==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/amino": "^0.32.4", "@cosmjs/crypto": "^0.32.4", @@ -996,6 +991,7 @@ "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.32.4.tgz", "integrity": "sha512-zicjGU051LF1V9v7bp8p7ovq+VyC91xlaHdsFOTo2oVry3KQikp8L/81RkXmUIT8FxMwdx1T7DmFwVQikcSDIw==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/encoding": "^0.32.4", "@cosmjs/math": "^0.32.4", @@ -1010,6 +1006,7 @@ "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.32.4.tgz", "integrity": "sha512-tjvaEy6ZGxJchiizzTn7HVRiyTg1i4CObRRaTRPknm5EalE13SV+TCHq38gIDfyUeden4fCuaBVEdBR5+ti7Hw==", + "license": "Apache-2.0", "dependencies": { "base64-js": "^1.3.0", "bech32": "^1.1.4", @@ -1020,6 +1017,7 @@ "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.32.4.tgz", "integrity": "sha512-/jt4mBl7nYzfJ2J/VJ+r19c92mUKF0Lt0JxM3MXEJl7wlwW5haHAWtzRujHkyYMXOwIR+gBqT2S0vntXVBRyhQ==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/stream": "^0.32.4", "xstream": "^11.14.0" @@ -1109,6 +1107,7 @@ "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.32.4.tgz", "integrity": "sha512-++dqq2TJkoB8zsPVYCvrt88oJWsy1vMOuSOKcdlnXuOA/ASheTJuYy4+oZlTQ3Fr8eALDLGGPhJI02W2HyAQaw==", + "license": "Apache-2.0", "dependencies": { "bn.js": "^5.2.0" } @@ -1117,6 +1116,7 @@ "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.32.4.tgz", "integrity": "sha512-QdyQDbezvdRI4xxSlyM1rSVBO2st5sqtbEIl3IX03uJ7YiZIQHyv6vaHVf1V4mapusCqguiHJzm4N4gsFdLBbQ==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/amino": "^0.32.4", "@cosmjs/crypto": "^0.32.4", @@ -1130,6 +1130,7 @@ "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.32.4.tgz", "integrity": "sha512-davcyYziBhkzfXQTu1l5NrpDYv0K9GekZCC9apBRvL1dvMc9F/ygM7iemHjUA+z8tJkxKxrt/YPjJ6XNHzLrkw==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/stream": "^0.32.4", "isomorphic-ws": "^4.0.1", @@ -1141,6 +1142,7 @@ "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.32.4.tgz", "integrity": "sha512-usj08LxBSsPRq9sbpCeVdyLx2guEcOHfJS9mHGCLCXpdAPEIEQEtWLDpEUc0LEhWOx6+k/ChXTc5NpFkdrtGUQ==", + "license": "Apache-2.0", "dependencies": { "@confio/ics23": "^0.6.8", "@cosmjs/amino": "^0.32.4", @@ -1158,6 +1160,7 @@ "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.32.4.tgz", "integrity": "sha512-Gih++NYHEiP+oyD4jNEUxU9antoC0pFSg+33Hpp0JlHwH0wXhtD3OOKnzSfDB7OIoEbrzLJUpEjOgpCp5Z+W3A==", + "license": "Apache-2.0", "dependencies": { "xstream": "^11.14.0" } @@ -1166,6 +1169,7 @@ "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.32.4.tgz", "integrity": "sha512-MWvUUno+4bCb/LmlMIErLypXxy7ckUuzEmpufYYYd9wgbdCXaTaO08SZzyFM5PI8UJ/0S2AmUrgWhldlbxO8mw==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/crypto": "^0.32.4", "@cosmjs/encoding": "^0.32.4", @@ -1182,7 +1186,8 @@ "node_modules/@cosmjs/utils": { "version": "0.32.4", "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.32.4.tgz", - "integrity": "sha512-D1Yc+Zy8oL/hkUkFUL/bwxvuDBzRGpc4cF7/SkdhxX4iHpSLgdOuTt1mhCh9+kl6NQREy9t7SYZ6xeW5gFe60w==" + "integrity": "sha512-D1Yc+Zy8oL/hkUkFUL/bwxvuDBzRGpc4cF7/SkdhxX4iHpSLgdOuTt1mhCh9+kl6NQREy9t7SYZ6xeW5gFe60w==", + "license": "Apache-2.0" }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", @@ -1574,6 +1579,57 @@ "node": ">=12" } }, + "node_modules/@ethereumjs/common": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.2.0.tgz", + "integrity": "sha512-pksvzI0VyLgmuEF2FA/JR/4/y6hcPq8OUail3/AvycBaW1d5VSauOZzqGvJ3RTmR4MU35lWE8KseKOsEhrFRBA==", + "license": "MIT", + "dependencies": { + "@ethereumjs/util": "^8.1.0", + "crc-32": "^1.2.0" + } + }, + "node_modules/@ethereumjs/rlp": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", + "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", + "license": "MPL-2.0", + "bin": { + "rlp": "bin/rlp" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@ethereumjs/tx": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.2.0.tgz", + "integrity": "sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw==", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/common": "^3.2.0", + "@ethereumjs/rlp": "^4.0.1", + "@ethereumjs/util": "^8.1.0", + "ethereum-cryptography": "^2.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@ethereumjs/util": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", + "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", + "license": "MPL-2.0", + "dependencies": { + "@ethereumjs/rlp": "^4.0.1", + "ethereum-cryptography": "^2.0.0", + "micro-ftch": "^0.3.1" + }, + "engines": { + "node": ">=14" + } + }, "node_modules/@ethersproject/abi": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/@ethersproject/abi/-/abi-5.7.0.tgz", @@ -2327,6 +2383,7 @@ "version": "1.6.3", "resolved": "https://registry.npmjs.org/@gql.tada/cli-utils/-/cli-utils-1.6.3.tgz", "integrity": "sha512-jFFSY8OxYeBxdKi58UzeMXG1tdm4FVjXa8WHIi66Gzu9JWtCE6mqom3a8xkmSw+mVaybFW5EN2WXf1WztJVNyQ==", + "license": "MIT", "dependencies": { "@0no-co/graphqlsp": "^1.12.13", "@gql.tada/internal": "1.0.8", @@ -2352,6 +2409,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/@gql.tada/internal/-/internal-1.0.8.tgz", "integrity": "sha512-XYdxJhtHC5WtZfdDqtKjcQ4d7R1s0d1rnlSs3OcBEUbYiPoJJfZU7tWsVXuv047Z6msvmr4ompJ7eLSK5Km57g==", + "license": "MIT", "dependencies": { "@0no-co/graphql.web": "^1.0.5" }, @@ -2364,6 +2422,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/@graphql-typed-document-node/core/-/core-3.2.0.tgz", "integrity": "sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ==", + "license": "MIT", "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" } @@ -2384,6 +2443,7 @@ "version": "1.14.0", "resolved": "https://registry.npmjs.org/@injectivelabs/abacus-proto-ts/-/abacus-proto-ts-1.14.0.tgz", "integrity": "sha512-YAKBYGVwqm/OHtHAMGfJaUfANJ1d6Rec19KKUBeJmGB7xqkhybBjSq50OudMNl0oTqUH6NeupqSNQwrU7JvceA==", + "license": "MIT", "dependencies": { "@injectivelabs/grpc-web": "^0.0.1", "google-protobuf": "^3.14.0", @@ -2392,15 +2452,17 @@ } }, "node_modules/@injectivelabs/abacus-proto-ts/node_modules/long": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", - "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" }, "node_modules/@injectivelabs/abacus-proto-ts/node_modules/protobufjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", - "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.3.tgz", + "integrity": "sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==", "hasInstallScript": true, + "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -2423,6 +2485,7 @@ "version": "1.14.3", "resolved": "https://registry.npmjs.org/@injectivelabs/core-proto-ts/-/core-proto-ts-1.14.3.tgz", "integrity": "sha512-V45Pr3hFD09Rlkai2bWKjntfvgDFvGEBWh5Wy1iRpjnYzeiwnizvaJtyLrAEfZ87d5AD5qtPCNJN5fd27iFa5w==", + "license": "MIT", "dependencies": { "@injectivelabs/grpc-web": "^0.0.1", "google-protobuf": "^3.14.0", @@ -2431,15 +2494,17 @@ } }, "node_modules/@injectivelabs/core-proto-ts/node_modules/long": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", - "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" }, "node_modules/@injectivelabs/core-proto-ts/node_modules/protobufjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", - "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.3.tgz", + "integrity": "sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==", "hasInstallScript": true, + "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -2459,9 +2524,10 @@ } }, "node_modules/@injectivelabs/exceptions": { - "version": "1.14.47", - "resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.14.47.tgz", - "integrity": "sha512-ULYeE4oBnR57GIsN7+fX097IlW4Ck94bUv3RwgTlkHazVfBxSN56f1eEXnHcBNYG1A96shPMeLmgh3U8XLH/mg==", + "version": "1.15.26", + "resolved": "https://registry.npmjs.org/@injectivelabs/exceptions/-/exceptions-1.15.26.tgz", + "integrity": "sha512-g7V7nubf2fhluPOweAXXszNPYzWW4ddQmy0WhBFV8tBIbG8XhUS2wXR6iOjHvR3/m7is5sIJpbFd8NM3/M1XJw==", + "license": "Apache-2.0", "dependencies": { "http-status-codes": "^2.3.0" } @@ -2470,6 +2536,7 @@ "version": "0.0.1", "resolved": "https://registry.npmjs.org/@injectivelabs/grpc-web/-/grpc-web-0.0.1.tgz", "integrity": "sha512-Pu5YgaZp+OvR5UWfqbrPdHer3+gDf+b5fQoY+t2VZx1IAVHX8bzbN9EreYTvTYtFeDpYRWM8P7app2u4EX5wTw==", + "license": "Apache-2.0", "dependencies": { "browser-headers": "^0.4.1" }, @@ -2481,6 +2548,7 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/@injectivelabs/grpc-web-node-http-transport/-/grpc-web-node-http-transport-0.0.2.tgz", "integrity": "sha512-rpyhXLiGY/UMs6v6YmgWHJHiO9l0AgDyVNv+jcutNVt4tQrmNvnpvz2wCAGOFtq5LuX/E9ChtTVpk3gWGqXcGA==", + "license": "Apache-2.0", "peerDependencies": { "@injectivelabs/grpc-web": ">=0.0.1" } @@ -2489,14 +2557,16 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/@injectivelabs/grpc-web-react-native-transport/-/grpc-web-react-native-transport-0.0.2.tgz", "integrity": "sha512-mk+aukQXnYNgPsPnu3KBi+FD0ZHQpazIlaBZ2jNZG7QAVmxTWtv3R66Zoq99Wx2dnE946NsZBYAoa0K5oSjnow==", + "license": "Apache-2.0", "peerDependencies": { "@injectivelabs/grpc-web": ">=0.0.1" } }, "node_modules/@injectivelabs/indexer-proto-ts": { - "version": "1.13.9", - "resolved": "https://registry.npmjs.org/@injectivelabs/indexer-proto-ts/-/indexer-proto-ts-1.13.9.tgz", - "integrity": "sha512-05goWVmXpwiHDVPK/p2fr9xUrslHrKSUdsu5N2AYbQoXMs0Txnke8vFrLtIbKV0BMOxteqlOunAClJ75Wt6hTA==", + "version": "1.13.13", + "resolved": "https://registry.npmjs.org/@injectivelabs/indexer-proto-ts/-/indexer-proto-ts-1.13.13.tgz", + "integrity": "sha512-jRp9Oq3iW5x9wnH70It8EiPU5UFV2stTT1LOSa5Nu0v3B//xKwAwIacjjRiWUkZJV0QLzUCUDMiij6bKx/iK1g==", + "license": "MIT", "dependencies": { "@injectivelabs/grpc-web": "^0.0.1", "google-protobuf": "^3.14.0", @@ -2505,15 +2575,17 @@ } }, "node_modules/@injectivelabs/indexer-proto-ts/node_modules/long": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", - "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" }, "node_modules/@injectivelabs/indexer-proto-ts/node_modules/protobufjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", - "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.3.tgz", + "integrity": "sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==", "hasInstallScript": true, + "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -2536,6 +2608,7 @@ "version": "1.13.2", "resolved": "https://registry.npmjs.org/@injectivelabs/mito-proto-ts/-/mito-proto-ts-1.13.2.tgz", "integrity": "sha512-D4qEDB4OgaV1LoYNg6FB+weVcLMu5ea0x/W/p+euIVly3qia44GmAicIbQhrkqTs2o2c+1mbK1c4eOzFxQcwhg==", + "license": "MIT", "dependencies": { "@injectivelabs/grpc-web": "^0.0.1", "google-protobuf": "^3.14.0", @@ -2544,15 +2617,17 @@ } }, "node_modules/@injectivelabs/mito-proto-ts/node_modules/long": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", - "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" }, "node_modules/@injectivelabs/mito-proto-ts/node_modules/protobufjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", - "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.3.tgz", + "integrity": "sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==", "hasInstallScript": true, + "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -2572,17 +2647,19 @@ } }, "node_modules/@injectivelabs/networks": { - "version": "1.14.47", - "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.14.47.tgz", - "integrity": "sha512-th0QIf3Av4fV8zVmyYEsd1UG8UHVDVkZ9yFpHvnqJq4hF27Ev0M8V7KJWtk391GV1u1HaaaD8BlnSQlXdZmf1Q==", + "version": "1.15.27", + "resolved": "https://registry.npmjs.org/@injectivelabs/networks/-/networks-1.15.27.tgz", + "integrity": "sha512-IzRf+SLicuvtnQZI9jkzJJowRKUz2DU7nfhc7i9NHlgcjrbWZgPN+FAxnPXLDSdff2UmScenA1LKznb+Nhk8ww==", + "license": "Apache-2.0", "dependencies": { - "@injectivelabs/ts-types": "^1.14.47" + "@injectivelabs/ts-types": "^1.15.27" } }, "node_modules/@injectivelabs/olp-proto-ts": { "version": "1.13.4", "resolved": "https://registry.npmjs.org/@injectivelabs/olp-proto-ts/-/olp-proto-ts-1.13.4.tgz", "integrity": "sha512-MTltuDrPJ+mu8IonkfwBp11ZJzTw2x+nA3wzrK+T4ZzEs+fBW8SgaCoXKc5COU7IBzg3wB316QwaR1l6MrffXg==", + "license": "MIT", "dependencies": { "@injectivelabs/grpc-web": "^0.0.1", "google-protobuf": "^3.14.0", @@ -2591,15 +2668,17 @@ } }, "node_modules/@injectivelabs/olp-proto-ts/node_modules/long": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/long/-/long-5.3.1.tgz", - "integrity": "sha512-ka87Jz3gcx/I7Hal94xaN2tZEOPoUOEVftkQqZx2EeQRN7LGdfLlI3FvZ+7WDplm+vK2Urx9ULrvSowtdCieng==" + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz", + "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==", + "license": "Apache-2.0" }, "node_modules/@injectivelabs/olp-proto-ts/node_modules/protobufjs": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", - "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.5.3.tgz", + "integrity": "sha512-sildjKwVqOI2kmFDiXQ6aEB0fjYTafpEvIBs8tOR8qI4spuL9OPROLVu2qZqi/xgCfsHIwVqlaF8JBjWFHnKbw==", "hasInstallScript": true, + "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -2619,32 +2698,32 @@ } }, "node_modules/@injectivelabs/sdk-ts": { - "version": "1.14.51", - "resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.14.51.tgz", - "integrity": "sha512-UYy+tOHu7XuZggcQJqGk6DjZzPn5hbn3siKJuCBSZEzmzOxegehcqz8CIL+gLbPRW5jooW/nHnqTI4BHL8K1UQ==", + "version": "1.15.29", + "resolved": "https://registry.npmjs.org/@injectivelabs/sdk-ts/-/sdk-ts-1.15.29.tgz", + "integrity": "sha512-ld7+uGFlzmRoBtnaWs6150CikEzqFeyVjZMi5Kiam/rglpFke/JDbpcImF6lroRK/yzpoaydULtNQuC4MQWQrQ==", + "license": "Apache-2.0", "dependencies": { "@apollo/client": "^3.13.1", "@cosmjs/amino": "^0.33.0", "@cosmjs/proto-signing": "^0.33.0", "@cosmjs/stargate": "^0.33.0", - "@ethersproject/bytes": "^5.8.0", "@injectivelabs/abacus-proto-ts": "1.14.0", "@injectivelabs/core-proto-ts": "1.14.3", - "@injectivelabs/exceptions": "^1.14.47", + "@injectivelabs/exceptions": "^1.15.26", "@injectivelabs/grpc-web": "^0.0.1", "@injectivelabs/grpc-web-node-http-transport": "^0.0.2", "@injectivelabs/grpc-web-react-native-transport": "^0.0.2", - "@injectivelabs/indexer-proto-ts": "1.13.9", + "@injectivelabs/indexer-proto-ts": "1.13.13", "@injectivelabs/mito-proto-ts": "1.13.2", - "@injectivelabs/networks": "^1.14.47", + "@injectivelabs/networks": "^1.15.27", "@injectivelabs/olp-proto-ts": "1.13.4", - "@injectivelabs/ts-types": "^1.14.47", - "@injectivelabs/utils": "^1.14.48", - "@metamask/eth-sig-util": "^4.0.0", + "@injectivelabs/ts-types": "^1.15.27", + "@injectivelabs/utils": "^1.15.27", + "@metamask/eth-sig-util": "^8.2.0", "@noble/curves": "^1.8.1", "@noble/hashes": "^1.7.1", + "@scure/base": "^1.2.6", "axios": "^1.8.1", - "bech32": "^2.0.0", "bip39": "^3.1.0", "cosmjs-types": "^0.9.0", "crypto-js": "^4.2.0", @@ -2660,9 +2739,10 @@ } }, "node_modules/@injectivelabs/sdk-ts/node_modules/@apollo/client": { - "version": "3.13.6", - "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.13.6.tgz", - "integrity": "sha512-G6A8uNb13V/Tv4TJQOs5PnxuE5Rf5D2dMnBQcg9mng1Eo4YBecwFEJ0L022mraq/dLB0jD5tiAESOD2bTyJ6gg==", + "version": "3.13.8", + "resolved": "https://registry.npmjs.org/@apollo/client/-/client-3.13.8.tgz", + "integrity": "sha512-YM9lQpm0VfVco4DSyKooHS/fDTiKQcCHfxr7i3iL6a0kP/jNO5+4NFK6vtRDxaYisd5BrwOZHLJpPBnvRVpKPg==", + "license": "MIT", "dependencies": { "@graphql-typed-document-node/core": "^3.1.1", "@wry/caches": "^1.0.0", @@ -2704,6 +2784,7 @@ "version": "0.33.1", "resolved": "https://registry.npmjs.org/@cosmjs/amino/-/amino-0.33.1.tgz", "integrity": "sha512-WfWiBf2EbIWpwKG9AOcsIIkR717SY+JdlXM/SL/bI66BdrhniAF+/ZNis9Vo9HF6lP2UU5XrSmFA4snAvEgdrg==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/crypto": "^0.33.1", "@cosmjs/encoding": "^0.33.1", @@ -2715,6 +2796,7 @@ "version": "0.33.1", "resolved": "https://registry.npmjs.org/@cosmjs/crypto/-/crypto-0.33.1.tgz", "integrity": "sha512-U4kGIj/SNBzlb2FGgA0sMR0MapVgJUg8N+oIAiN5+vl4GZ3aefmoL1RDyTrFS/7HrB+M+MtHsxC0tvEu4ic/zA==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/encoding": "^0.33.1", "@cosmjs/math": "^0.33.1", @@ -2729,21 +2811,18 @@ "version": "0.33.1", "resolved": "https://registry.npmjs.org/@cosmjs/encoding/-/encoding-0.33.1.tgz", "integrity": "sha512-nuNxf29fUcQE14+1p//VVQDwd1iau5lhaW/7uMz7V2AH3GJbFJoJVaKvVyZvdFk+Cnu+s3wCqgq4gJkhRCJfKw==", + "license": "Apache-2.0", "dependencies": { "base64-js": "^1.3.0", "bech32": "^1.1.4", "readonly-date": "^1.0.0" } }, - "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/encoding/node_modules/bech32": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-1.1.4.tgz", - "integrity": "sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==" - }, "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/json-rpc": { "version": "0.33.1", "resolved": "https://registry.npmjs.org/@cosmjs/json-rpc/-/json-rpc-0.33.1.tgz", "integrity": "sha512-T6VtWzecpmuTuMRGZWuBYHsMF/aznWCYUt/cGMWNSz7DBPipVd0w774PKpxXzpEbyt5sr61NiuLXc+Az15S/Cw==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/stream": "^0.33.1", "xstream": "^11.14.0" @@ -2753,6 +2832,7 @@ "version": "0.33.1", "resolved": "https://registry.npmjs.org/@cosmjs/math/-/math-0.33.1.tgz", "integrity": "sha512-ytGkWdKFCPiiBU5eqjHNd59djPpIsOjbr2CkNjlnI1Zmdj+HDkSoD9MUGpz9/RJvRir5IvsXqdE05x8EtoQkJA==", + "license": "Apache-2.0", "dependencies": { "bn.js": "^5.2.0" } @@ -2761,6 +2841,7 @@ "version": "0.33.1", "resolved": "https://registry.npmjs.org/@cosmjs/proto-signing/-/proto-signing-0.33.1.tgz", "integrity": "sha512-Sv4W+MxX+0LVnd+2rU4Fw1HRsmMwSVSYULj7pRkij3wnPwUlTVoJjmKFgKz13ooIlfzPrz/dnNjGp/xnmXChFQ==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/amino": "^0.33.1", "@cosmjs/crypto": "^0.33.1", @@ -2774,6 +2855,7 @@ "version": "0.33.1", "resolved": "https://registry.npmjs.org/@cosmjs/socket/-/socket-0.33.1.tgz", "integrity": "sha512-KzAeorten6Vn20sMiM6NNWfgc7jbyVo4Zmxev1FXa5EaoLCZy48cmT3hJxUJQvJP/lAy8wPGEjZ/u4rmF11x9A==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/stream": "^0.33.1", "isomorphic-ws": "^4.0.1", @@ -2785,6 +2867,7 @@ "version": "0.33.1", "resolved": "https://registry.npmjs.org/@cosmjs/stargate/-/stargate-0.33.1.tgz", "integrity": "sha512-CnJ1zpSiaZgkvhk+9aTp5IPmgWn2uo+cNEBN8VuD9sD6BA0V4DMjqe251cNFLiMhkGtiE5I/WXFERbLPww3k8g==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/amino": "^0.33.1", "@cosmjs/encoding": "^0.33.1", @@ -2800,6 +2883,7 @@ "version": "0.33.1", "resolved": "https://registry.npmjs.org/@cosmjs/stream/-/stream-0.33.1.tgz", "integrity": "sha512-bMUvEENjeQPSTx+YRzVsWT1uFIdHRcf4brsc14SOoRQ/j5rOJM/aHfsf/BmdSAnYbdOQ3CMKj/8nGAQ7xUdn7w==", + "license": "Apache-2.0", "dependencies": { "xstream": "^11.14.0" } @@ -2808,6 +2892,7 @@ "version": "0.33.1", "resolved": "https://registry.npmjs.org/@cosmjs/tendermint-rpc/-/tendermint-rpc-0.33.1.tgz", "integrity": "sha512-22klDFq2MWnf//C8+rZ5/dYatr6jeGT+BmVbutXYfAK9fmODbtFcumyvB6uWaEORWfNukl8YK1OLuaWezoQvxA==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/crypto": "^0.33.1", "@cosmjs/encoding": "^0.33.1", @@ -2824,60 +2909,25 @@ "node_modules/@injectivelabs/sdk-ts/node_modules/@cosmjs/utils": { "version": "0.33.1", "resolved": "https://registry.npmjs.org/@cosmjs/utils/-/utils-0.33.1.tgz", - "integrity": "sha512-UnLHDY6KMmC+UXf3Ufyh+onE19xzEXjT4VZ504Acmk4PXxqyvG4cCPprlKUFnGUX7f0z8Or9MAOHXBx41uHBcg==" - }, - "node_modules/@injectivelabs/sdk-ts/node_modules/@ethersproject/bytes": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/bytes/-/bytes-5.8.0.tgz", - "integrity": "sha512-vTkeohgJVCPVHu5c25XWaWQOZ4v+DkGoC42/TS2ond+PARCxTJvgTFUNDZovyQ/uAQ4EcpqqowKydcdmRKjg7A==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ], - "dependencies": { - "@ethersproject/logger": "^5.8.0" - } - }, - "node_modules/@injectivelabs/sdk-ts/node_modules/@ethersproject/logger": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@ethersproject/logger/-/logger-5.8.0.tgz", - "integrity": "sha512-Qe6knGmY+zPPWTC+wQrpitodgBfH7XoceCGL5bJVejmH+yCS3R8jJm8iiWuvWbG76RUmyEG53oqv6GMVWqunjA==", - "funding": [ - { - "type": "individual", - "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2" - }, - { - "type": "individual", - "url": "https://www.buymeacoffee.com/ricmoo" - } - ] - }, - "node_modules/@injectivelabs/sdk-ts/node_modules/bech32": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", - "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" + "integrity": "sha512-UnLHDY6KMmC+UXf3Ufyh+onE19xzEXjT4VZ504Acmk4PXxqyvG4cCPprlKUFnGUX7f0z8Or9MAOHXBx41uHBcg==", + "license": "Apache-2.0" }, "node_modules/@injectivelabs/ts-types": { - "version": "1.14.47", - "resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.14.47.tgz", - "integrity": "sha512-c1BQg72eDGaNd2JizJw34wFoiDtHX3Xgc9BJ7zEVRP14xQGdmE3ddCDV8Yc5hKYrpiOZtPevCRgeF5OsFXTeVA==" + "version": "1.15.27", + "resolved": "https://registry.npmjs.org/@injectivelabs/ts-types/-/ts-types-1.15.27.tgz", + "integrity": "sha512-PYR5NFzLT+JuEK0UY4Hb5j3SyLjxlB4LB+vDgKuBeXPN0vvYCjHn90lEW/1qB4e/qco7JQQIO+0Gq/R0qTdR4Q==", + "license": "Apache-2.0" }, "node_modules/@injectivelabs/utils": { - "version": "1.14.48", - "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.14.48.tgz", - "integrity": "sha512-ypqSVpEWrBKp2GB7UBbymhwShPT5x94NsvA7XZl7EW/5uQ9qyFevrd7vsOo81yiHsYscup3F7aTDQ7/C0+W0aQ==", + "version": "1.15.27", + "resolved": "https://registry.npmjs.org/@injectivelabs/utils/-/utils-1.15.27.tgz", + "integrity": "sha512-izzGdT8LLojCnLe90nJWHIYDo49sN0oQhVQ1oyZ7r6vrkFCN3CPPbYrT7DR5rESCkpXG2hXnLfFifKvqVhc5qQ==", + "license": "Apache-2.0", "dependencies": { "@bangjelkoski/store2": "^2.14.3", - "@injectivelabs/exceptions": "^1.14.47", - "@injectivelabs/networks": "^1.14.47", - "@injectivelabs/ts-types": "^1.14.47", + "@injectivelabs/exceptions": "^1.15.26", + "@injectivelabs/networks": "^1.15.27", + "@injectivelabs/ts-types": "^1.15.27", "axios": "^1.8.1", "bignumber.js": "^9.1.2", "http-status-codes": "^2.3.0" @@ -3260,70 +3310,126 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@metamask/eth-sig-util": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-4.0.1.tgz", - "integrity": "sha512-tghyZKLHZjcdlDqCA3gNZmLeR0XvOE9U1qoQO9ohyAZT6Pya+H9vkBPcsyXytmYLNgVoin7CKCmweo/R43V+tQ==", + "node_modules/@metamask/abi-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@metamask/abi-utils/-/abi-utils-3.0.0.tgz", + "integrity": "sha512-a/l0DiSIr7+CBYVpHygUa3ztSlYLFCQMsklLna+t6qmNY9+eIO5TedNxhyIyvaJ+4cN7TLy0NQFbp9FV3X2ktg==", + "license": "(Apache-2.0 AND MIT)", "dependencies": { - "ethereumjs-abi": "^0.6.8", - "ethereumjs-util": "^6.2.1", - "ethjs-util": "^0.1.6", - "tweetnacl": "^1.0.3", - "tweetnacl-util": "^0.15.1" + "@metamask/superstruct": "^3.1.0", + "@metamask/utils": "^11.0.1" }, "engines": { - "node": ">=12.0.0" + "node": "^18.18 || ^20.14 || >=22" } }, - "node_modules/@metamask/eth-sig-util/node_modules/@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", + "node_modules/@metamask/eth-sig-util": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@metamask/eth-sig-util/-/eth-sig-util-8.2.0.tgz", + "integrity": "sha512-LZDglIh4gYGw9Myp+2aIwKrj6lIJpMC4e0m7wKJU+BxLLBFcrTgKrjdjstXGVWvuYG3kutlh9J+uNBRPJqffWQ==", + "license": "ISC", "dependencies": { - "@types/node": "*" + "@ethereumjs/rlp": "^4.0.1", + "@ethereumjs/util": "^8.1.0", + "@metamask/abi-utils": "^3.0.0", + "@metamask/utils": "^11.0.1", + "@scure/base": "~1.1.3", + "ethereum-cryptography": "^2.1.2", + "tweetnacl": "^1.0.3" + }, + "engines": { + "node": "^18.18 || ^20.14 || >=22" } }, - "node_modules/@metamask/eth-sig-util/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" + "node_modules/@metamask/eth-sig-util/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } }, - "node_modules/@metamask/eth-sig-util/node_modules/ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "node_modules/@metamask/superstruct": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/@metamask/superstruct/-/superstruct-3.2.1.tgz", + "integrity": "sha512-fLgJnDOXFmuVlB38rUN5SmU7hAFQcCjrg3Vrxz67KTY7YHFnSNEKvX4avmEBdOI0yTCxZjwMCFEqsC8k2+Wd3g==", + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@metamask/utils": { + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-11.4.0.tgz", + "integrity": "sha512-dqsi65DAyprs91wo/D0yTST2Sry9h2krf1NADBJb9L3NTJn1py0w+C8K4jVVSh0XTrrj0/MF/t6XldGsidfypA==", + "license": "ISC", "dependencies": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" + "@ethereumjs/tx": "^4.2.0", + "@metamask/superstruct": "^3.1.0", + "@noble/hashes": "^1.3.1", + "@scure/base": "^1.1.3", + "@types/debug": "^4.1.7", + "debug": "^4.3.4", + "pony-cause": "^2.1.10", + "semver": "^7.5.4", + "uuid": "^9.0.1" + }, + "engines": { + "node": "^18.18 || ^20.14 || >=22" + } + }, + "node_modules/@metamask/utils/node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@metamask/utils/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" } }, "node_modules/@mysten/bcs": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@mysten/bcs/-/bcs-1.6.0.tgz", - "integrity": "sha512-ydDRYdIkIFCpHCcPvAkMC91fVwumjzbTgjqds0KsphDQI3jUlH3jFG5lfYNTmV6V3pkhOiRk1fupLBcsQsiszg==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/@mysten/bcs/-/bcs-1.6.2.tgz", + "integrity": "sha512-po3tjm3Ue7UM1cuveDvrIckR6y22LKXr7KAQf12ZOMasZ0rRjBOdq3zDCVBJC+m536hNLq5uG5U2SQPUGN5+JA==", + "license": "Apache-2.0", "dependencies": { - "@scure/base": "^1.2.4" + "@mysten/utils": "0.0.1", + "@scure/base": "^1.2.6" } }, "node_modules/@mysten/sui": { - "version": "1.26.1", - "resolved": "https://registry.npmjs.org/@mysten/sui/-/sui-1.26.1.tgz", - "integrity": "sha512-bBVvn2wZKipAvuUkKzHwGhs1JiIM33+b97d0uIWg3T6dJH/n1nfnGrzkBQsMGpoBAFOIUnKQAZmDwT4qvJbKkg==", + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/@mysten/sui/-/sui-1.32.0.tgz", + "integrity": "sha512-rGKAWvlpIvURdu/OU/CjYp0gEwdWilD+3u73SCSdBSC5sUpz6VCJWXqi1l92IZQB44fdmboxYUUMQXuGSYwNhg==", + "license": "Apache-2.0", "dependencies": { "@graphql-typed-document-node/core": "^3.2.0", - "@mysten/bcs": "1.6.0", - "@noble/curves": "^1.8.1", - "@noble/hashes": "^1.7.1", - "@scure/base": "^1.2.4", - "@scure/bip32": "^1.6.2", - "@scure/bip39": "^1.5.4", + "@mysten/bcs": "1.6.2", + "@mysten/utils": "0.0.1", + "@noble/curves": "^1.9.1", + "@noble/hashes": "^1.8.0", + "@scure/base": "^1.2.6", + "@scure/bip32": "^1.7.0", + "@scure/bip39": "^1.6.0", "gql.tada": "^1.8.2", - "graphql": "^16.9.0", + "graphql": "^16.11.0", "poseidon-lite": "^0.2.0", "valibot": "^0.36.0" }, @@ -3331,12 +3437,22 @@ "node": ">=18" } }, + "node_modules/@mysten/utils": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@mysten/utils/-/utils-0.0.1.tgz", + "integrity": "sha512-KrrGE1N0KFIKkQoQW5/StA6kxRZqUkZlw/Txa7rbj+MVYbnKpdWeH1Xxm7w5rWd8PZ4Sc7v6uVoPz179BAoNZA==", + "license": "Apache-2.0", + "dependencies": { + "@scure/base": "^1.2.6" + } + }, "node_modules/@noble/curves": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz", - "integrity": "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.1.tgz", + "integrity": "sha512-k11yZxZg+t+gWvBbIswW0yoJlu8cHOC7dhunwOzoWH/mXGBiYyR4YY6hAEK/3EUs4UpB8la1RfdRpeGsFHkWsA==", + "license": "MIT", "dependencies": { - "@noble/hashes": "1.7.1" + "@noble/hashes": "1.8.0" }, "engines": { "node": "^14.21.3 || >=16" @@ -3346,9 +3462,10 @@ } }, "node_modules/@noble/hashes": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz", - "integrity": "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", "engines": { "node": "^14.21.3 || >=16" }, @@ -3411,33 +3528,36 @@ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "node_modules/@scure/base": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz", - "integrity": "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.6.tgz", + "integrity": "sha512-g/nm5FgUa//MCj1gV09zTJTaM6KBAHqLN907YVQqf7zC49+DcO4B1so4ZX07Ef10Twr6nuqYEH9GEggFXA4Fmg==", + "license": "MIT", "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@scure/bip32": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz", - "integrity": "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.7.0.tgz", + "integrity": "sha512-E4FFX/N3f4B80AKWp5dP6ow+flD1LQZo/w8UnLGYZO674jS6YnYeepycOOksv+vLPSpgN35wgKgy+ybfTb2SMw==", + "license": "MIT", "dependencies": { - "@noble/curves": "~1.8.1", - "@noble/hashes": "~1.7.1", - "@scure/base": "~1.2.2" + "@noble/curves": "~1.9.0", + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@scure/bip39": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.4.tgz", - "integrity": "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.6.0.tgz", + "integrity": "sha512-+lF0BbLiJNwVlev4eKelw1WWLaiKXw7sSl8T6FvBlWkdX+94aGJ4o8XjUdlyhTCjd8c+B3KT3JfS8P0bLRNU6A==", + "license": "MIT", "dependencies": { - "@noble/hashes": "~1.7.1", - "@scure/base": "~1.2.4" + "@noble/hashes": "~1.8.0", + "@scure/base": "~1.2.5" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -3453,6 +3573,7 @@ "version": "4.6.0", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", + "license": "MIT", "peer": true, "engines": { "node": ">=10" @@ -3612,6 +3733,7 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", + "license": "MIT", "peer": true, "dependencies": { "defer-to-connect": "^2.0.0" @@ -3788,6 +3910,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", + "license": "MIT", "peer": true, "dependencies": { "@types/http-cache-semantics": "*", @@ -3804,6 +3927,15 @@ "@types/node": "*" } }, + "node_modules/@types/debug": { + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", + "license": "MIT", + "dependencies": { + "@types/ms": "*" + } + }, "node_modules/@types/graceful-fs": { "version": "4.1.9", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", @@ -3818,6 +3950,7 @@ "version": "4.0.4", "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", + "license": "MIT", "peer": true }, "node_modules/@types/istanbul-lib-coverage": { @@ -3858,6 +3991,7 @@ "version": "3.1.4", "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", + "license": "MIT", "peer": true, "dependencies": { "@types/node": "*" @@ -3868,6 +4002,12 @@ "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", "integrity": "sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA==" }, + "node_modules/@types/ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", + "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", + "license": "MIT" + }, "node_modules/@types/node": { "version": "20.12.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz", @@ -3880,6 +4020,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -3894,6 +4035,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", + "license": "MIT", "peer": true, "dependencies": { "@types/node": "*" @@ -3903,6 +4045,7 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/@types/secp256k1/-/secp256k1-4.0.6.tgz", "integrity": "sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==", + "license": "MIT", "dependencies": { "@types/node": "*" } @@ -3946,50 +4089,52 @@ "link": true }, "node_modules/@wormhole-foundation/sdk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk/-/sdk-1.14.2.tgz", - "integrity": "sha512-Ztq9Gj/k/9tgiYwydDMi2uCIvblALf/5yyXMZvTbKLed6CKThuJrma9d2Wp0ZULrPbwQYPXUeOeJ090JFnAD3A==", - "dependencies": { - "@wormhole-foundation/sdk-algorand": "1.14.2", - "@wormhole-foundation/sdk-algorand-core": "1.14.2", - "@wormhole-foundation/sdk-algorand-tokenbridge": "1.14.2", - "@wormhole-foundation/sdk-aptos": "1.14.2", - "@wormhole-foundation/sdk-aptos-cctp": "1.14.2", - "@wormhole-foundation/sdk-aptos-core": "1.14.2", - "@wormhole-foundation/sdk-aptos-tokenbridge": "1.14.2", - "@wormhole-foundation/sdk-base": "1.14.2", - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-cosmwasm": "1.14.2", - "@wormhole-foundation/sdk-cosmwasm-core": "1.14.2", - "@wormhole-foundation/sdk-cosmwasm-ibc": "1.14.2", - "@wormhole-foundation/sdk-cosmwasm-tokenbridge": "1.14.2", - "@wormhole-foundation/sdk-definitions": "1.14.2", - "@wormhole-foundation/sdk-evm": "1.14.2", - "@wormhole-foundation/sdk-evm-cctp": "1.14.2", - "@wormhole-foundation/sdk-evm-core": "1.14.2", - "@wormhole-foundation/sdk-evm-portico": "1.14.2", - "@wormhole-foundation/sdk-evm-tbtc": "1.14.2", - "@wormhole-foundation/sdk-evm-tokenbridge": "1.14.2", - "@wormhole-foundation/sdk-solana": "1.14.2", - "@wormhole-foundation/sdk-solana-cctp": "1.14.2", - "@wormhole-foundation/sdk-solana-core": "1.14.2", - "@wormhole-foundation/sdk-solana-tbtc": "1.14.2", - "@wormhole-foundation/sdk-solana-tokenbridge": "1.14.2", - "@wormhole-foundation/sdk-sui": "1.14.2", - "@wormhole-foundation/sdk-sui-cctp": "1.14.2", - "@wormhole-foundation/sdk-sui-core": "1.14.2", - "@wormhole-foundation/sdk-sui-tokenbridge": "1.14.2" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk/-/sdk-2.1.0.tgz", + "integrity": "sha512-x+hciC/tfwH0pGghXVKcxl3y59KOhj/1UUAepVOFQAYcv+ocdZIA1NW+DsadPy8RjaTnVRy/EOhWfKLmNWBEyQ==", + "license": "Apache-2.0", + "dependencies": { + "@wormhole-foundation/sdk-algorand": "2.1.0", + "@wormhole-foundation/sdk-algorand-core": "2.1.0", + "@wormhole-foundation/sdk-algorand-tokenbridge": "2.1.0", + "@wormhole-foundation/sdk-aptos": "2.1.0", + "@wormhole-foundation/sdk-aptos-cctp": "2.1.0", + "@wormhole-foundation/sdk-aptos-core": "2.1.0", + "@wormhole-foundation/sdk-aptos-tokenbridge": "2.1.0", + "@wormhole-foundation/sdk-base": "2.1.0", + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-cosmwasm": "2.1.0", + "@wormhole-foundation/sdk-cosmwasm-core": "2.1.0", + "@wormhole-foundation/sdk-cosmwasm-ibc": "2.1.0", + "@wormhole-foundation/sdk-cosmwasm-tokenbridge": "2.1.0", + "@wormhole-foundation/sdk-definitions": "2.1.0", + "@wormhole-foundation/sdk-evm": "2.1.0", + "@wormhole-foundation/sdk-evm-cctp": "2.1.0", + "@wormhole-foundation/sdk-evm-core": "2.1.0", + "@wormhole-foundation/sdk-evm-portico": "2.1.0", + "@wormhole-foundation/sdk-evm-tbtc": "2.1.0", + "@wormhole-foundation/sdk-evm-tokenbridge": "2.1.0", + "@wormhole-foundation/sdk-solana": "2.1.0", + "@wormhole-foundation/sdk-solana-cctp": "2.1.0", + "@wormhole-foundation/sdk-solana-core": "2.1.0", + "@wormhole-foundation/sdk-solana-tbtc": "2.1.0", + "@wormhole-foundation/sdk-solana-tokenbridge": "2.1.0", + "@wormhole-foundation/sdk-sui": "2.1.0", + "@wormhole-foundation/sdk-sui-cctp": "2.1.0", + "@wormhole-foundation/sdk-sui-core": "2.1.0", + "@wormhole-foundation/sdk-sui-tokenbridge": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-algorand": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand/-/sdk-algorand-1.14.2.tgz", - "integrity": "sha512-0jZhfMEnxPyUBSxVWpDcmhUaVNRdbkIoWUNfB3S55kja+u6+Nh7IKY6Oj4Pxv3uNHNJybTDp1AgBctNJ4IMoUA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand/-/sdk-algorand-2.1.0.tgz", + "integrity": "sha512-xSDbuhpU/EgjyAEPILhWMTQC8Eff2c+447vWXjcP0+DdpKUAj1BUZnoJRDdV1/fJHl6eJiTdpFflbBlEXWBihw==", + "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-connect": "1.14.2", + "@wormhole-foundation/sdk-connect": "2.1.0", "algosdk": "2.7.0" }, "engines": { @@ -3997,95 +4142,103 @@ } }, "node_modules/@wormhole-foundation/sdk-algorand-core": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand-core/-/sdk-algorand-core-1.14.2.tgz", - "integrity": "sha512-4oGq54U3gDl80oTOrtGFfBUIP8zNaFRCDHusSe/h7Lr6Kexm/7heniR2B+5kabxJbP/01gt4Mc3OTNjD27zv6w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand-core/-/sdk-algorand-core-2.1.0.tgz", + "integrity": "sha512-Y0yU3ZdLI3Hzatqocq4f4TdA7oWR2Qk6b0lGlVXD/ln0X564cKpnNyTHG0hNDkdDMulYxWt4lPEAQi+J8dMoWA==", + "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-algorand": "1.14.2", - "@wormhole-foundation/sdk-connect": "1.14.2" + "@wormhole-foundation/sdk-algorand": "2.1.0", + "@wormhole-foundation/sdk-connect": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-algorand-tokenbridge": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand-tokenbridge/-/sdk-algorand-tokenbridge-1.14.2.tgz", - "integrity": "sha512-559+u0wo0guC0tIX5Fn6OYnYuXQcfAjAMduq4XhTd/FdJtto+OsqAQOmCvlTb8Kg4WcPzPxtX3U+p5s+HH/16Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-algorand-tokenbridge/-/sdk-algorand-tokenbridge-2.1.0.tgz", + "integrity": "sha512-TxEAs4zOxzvKC21Iw0OlR/A4omO4y2GA7mPUuu4cYeU/ttK2VKdW7o3d91wqwUZpUE92JZBuNz/B2TTxrgZKUA==", + "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-algorand": "1.14.2", - "@wormhole-foundation/sdk-algorand-core": "1.14.2", - "@wormhole-foundation/sdk-connect": "1.14.2" + "@wormhole-foundation/sdk-algorand": "2.1.0", + "@wormhole-foundation/sdk-algorand-core": "2.1.0", + "@wormhole-foundation/sdk-connect": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-aptos": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos/-/sdk-aptos-1.14.2.tgz", - "integrity": "sha512-Yu8cR4Idj+GhF9IgzSQ6nuda8IDLOVO8G+qfJ0OvIJVMsjS7v5z8Q6fFDHdSJFZahQkbjPm0Om1LMOJo6muoJw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos/-/sdk-aptos-2.1.0.tgz", + "integrity": "sha512-9L6F25ynwJ1Y5iArTjaZKuCUqXEYp5H6BHG8J9JMKiKKOt+/4bFJv1XY6S8N/rJd70ruT9HL3oxT3oU7/sdwVw==", + "license": "Apache-2.0", "dependencies": { - "@aptos-labs/ts-sdk": "^1.33.1", - "@wormhole-foundation/sdk-connect": "1.14.2" + "@aptos-labs/ts-sdk": "^2.0.0", + "@wormhole-foundation/sdk-connect": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-aptos-cctp": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos-cctp/-/sdk-aptos-cctp-1.14.2.tgz", - "integrity": "sha512-Y4RhBuFglZRnxHAdJqGz2Hj1YWkdh5faeUpvgWLeAF2OFTbMlLdslHhd5qFqcPyOQygSTjYNQ4Xp70L7JOxlNA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos-cctp/-/sdk-aptos-cctp-2.1.0.tgz", + "integrity": "sha512-zGR/3EScNOL4sxSuG58lojTZePZpQWasui2rm30ld0XN8U61PWKu1aTHF3zlRl1RDbjCYflXa51fTSrofUKJUw==", + "license": "Apache-2.0", "dependencies": { - "@aptos-labs/ts-sdk": "^1.33.1", - "@wormhole-foundation/sdk-aptos": "1.14.2", - "@wormhole-foundation/sdk-connect": "1.14.2" + "@aptos-labs/ts-sdk": "^2.0.0", + "@wormhole-foundation/sdk-aptos": "2.1.0", + "@wormhole-foundation/sdk-connect": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-aptos-core": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos-core/-/sdk-aptos-core-1.14.2.tgz", - "integrity": "sha512-n3ATe8rUTyvaIIiErd1ol75mIgxjSeSkQ6kjq/ukqXuZ2jbSpir85zOIVJsT+hIHfkw3H9E3k2Tbl3F/wy4Wyg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos-core/-/sdk-aptos-core-2.1.0.tgz", + "integrity": "sha512-XLBebiG8YwuF+RugcfZqGyX6d9HZxjpB3jKI22Qnl2+flGk6S91tRSsFJ9tAYGoSiqFmh3OORZWXUavzSBydHw==", + "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-aptos": "1.14.2", - "@wormhole-foundation/sdk-connect": "1.14.2" + "@wormhole-foundation/sdk-aptos": "2.1.0", + "@wormhole-foundation/sdk-connect": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-aptos-tokenbridge": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos-tokenbridge/-/sdk-aptos-tokenbridge-1.14.2.tgz", - "integrity": "sha512-UqGE1xIK+F6vnwSQrm7FRS2zGRiIhra14s5f6bHLcT8KGoiq10eELl5N+j3/CAY7MOkpRj7M09t7iULKSrEjYQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-aptos-tokenbridge/-/sdk-aptos-tokenbridge-2.1.0.tgz", + "integrity": "sha512-BgU/HFX3ojXzuCqZW4jS55FoBRT5/bfDFvUoZXmh5wGxq8eQcaKtMUQQovVinuOww5NLFUQrnzaN3lsMaL4i9g==", + "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-aptos": "1.14.2", - "@wormhole-foundation/sdk-connect": "1.14.2" + "@wormhole-foundation/sdk-aptos": "2.1.0", + "@wormhole-foundation/sdk-connect": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-base": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-base/-/sdk-base-1.14.2.tgz", - "integrity": "sha512-LsLb6YpZ/ucpf23YzXcwVMDITXiI/q96wCx+ZWipFyg6VNmszaT3xo1h04VUxKdgpQrqfYumkoE2PhgV8wDRWA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-base/-/sdk-base-2.1.0.tgz", + "integrity": "sha512-O44ZEXTKVKfXMpTJ69hm2U2XqARIx0mfUNo8DNCRa2mmVn++MTv6XV8mhSQfpEKbgpxHL+7e2Tp3jQL0evwSTw==", + "license": "Apache-2.0", "dependencies": { "@scure/base": "^1.1.3", "binary-layout": "^1.0.3" } }, "node_modules/@wormhole-foundation/sdk-connect": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-connect/-/sdk-connect-1.14.2.tgz", - "integrity": "sha512-8tQFVIp5U/dPR+xAyCkGw8q2xALo9UoNcfavcefNXcrUs1RmQRv0fzdHSwfLR+Jy5LS/CALoGTZJvRWmJpfr6Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-connect/-/sdk-connect-2.1.0.tgz", + "integrity": "sha512-cjfPONLrIuQN4qL1/FzzHUBwzWHno/LAAtwQK1vfC1YNtW8J6XtJ/ok4KdsZV//+/yj9keT2ASj4RR87CNQvYg==", + "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-base": "1.14.2", - "@wormhole-foundation/sdk-definitions": "1.14.2", + "@wormhole-foundation/sdk-base": "2.1.0", + "@wormhole-foundation/sdk-definitions": "2.1.0", "axios": "^1.4.0" }, "engines": { @@ -4093,15 +4246,16 @@ } }, "node_modules/@wormhole-foundation/sdk-cosmwasm": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm/-/sdk-cosmwasm-1.14.2.tgz", - "integrity": "sha512-nPJWeis/+BZ867GEj/idKoUPxljkOX4UCt8wJSzccKUQEQxfLzsZ0c2T3laNpbawU8YV05fHHjiz54hRZAJXzQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm/-/sdk-cosmwasm-2.1.0.tgz", + "integrity": "sha512-7EpfTaBFiY1cymzxKlnmznGybuRKJgO56rFFdFjCrCvj80JoKvmIb2tbMEBjXrPganw3rRl6qPyxFEueTC/Sag==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/proto-signing": "^0.32.0", "@cosmjs/stargate": "^0.32.0", "@injectivelabs/sdk-ts": "^1.14.13-beta.2", - "@wormhole-foundation/sdk-connect": "1.14.2", + "@wormhole-foundation/sdk-connect": "2.1.0", "cosmjs-types": "^0.9.0" }, "engines": { @@ -4109,31 +4263,33 @@ } }, "node_modules/@wormhole-foundation/sdk-cosmwasm-core": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-core/-/sdk-cosmwasm-core-1.14.2.tgz", - "integrity": "sha512-sV44ZTtq0xKBzUcbqipRhp+MiE62zHq6nRcm8EG/0uIaFOKo1Qc3wXLw/UU8mdIMW09J5IgiG7h1tUEMaUIn0Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-core/-/sdk-cosmwasm-core-2.1.0.tgz", + "integrity": "sha512-9LHnn80pk9BgL0mPHsGcfIiJlO9hip4J1cFnsL0RVr7a6Yt9RnfcTx/m3iZd+/3k0gr+PD4HRAT0nB20gy1feA==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/stargate": "^0.32.0", "@injectivelabs/sdk-ts": "^1.14.13-beta.2", - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-cosmwasm": "1.14.2" + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-cosmwasm": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-cosmwasm-ibc": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-ibc/-/sdk-cosmwasm-ibc-1.14.2.tgz", - "integrity": "sha512-1MK5yJDvBEVM5vtF6lUCGXLQXy4V101ebFtjAdieC1gfmmZu74M6tDdRFKN91NFhbVVAQ7eLLgOcGj5ALEJ+Gg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-ibc/-/sdk-cosmwasm-ibc-2.1.0.tgz", + "integrity": "sha512-l0DMUagHPa9N/UgM+3agvk/1vRr+W98bjdmGGGGSj3p8jwlvVyasjOnfCQe5hrV16zkrXyj91lBuvbYFhdb+pg==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/stargate": "^0.32.0", "@injectivelabs/sdk-ts": "^1.14.13-beta.2", - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-cosmwasm": "1.14.2", - "@wormhole-foundation/sdk-cosmwasm-core": "1.14.2", + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-cosmwasm": "2.1.0", + "@wormhole-foundation/sdk-cosmwasm-core": "2.1.0", "cosmjs-types": "^0.9.0" }, "engines": { @@ -4141,27 +4297,28 @@ } }, "node_modules/@wormhole-foundation/sdk-cosmwasm-tokenbridge": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-tokenbridge/-/sdk-cosmwasm-tokenbridge-1.14.2.tgz", - "integrity": "sha512-q6sdpdYY+5TQfmiCWDE9+IZesXxMgK8CB/Xbpgg/JR+LjchpoH4dRGHk6GJ0kXXD9vxjijGvtb/f0f+bItFV8Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-cosmwasm-tokenbridge/-/sdk-cosmwasm-tokenbridge-2.1.0.tgz", + "integrity": "sha512-mvGAymvMilsCaLwgGpqkpKpGOXEg4VEA+T51hn72dQ05cK8sZzgKgGxYtqjRnS9NeRpUz5/I1iBPhTCCaxrlZg==", + "license": "Apache-2.0", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", "@injectivelabs/sdk-ts": "^1.14.13-beta.2", - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-cosmwasm": "1.14.2" + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-cosmwasm": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-definitions": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-definitions/-/sdk-definitions-1.14.2.tgz", - "integrity": "sha512-2UHHRr/3KgZW9aAa4f53QNIZMMg4RgCWdL2r0WS9gu6RXR+5WiKJ7JMhQ8p3Oye3kp6rNy66CP3kvFVtcbZdGA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-definitions/-/sdk-definitions-2.1.0.tgz", + "integrity": "sha512-z0wwJZMfwK94uNsSqAQQ9GPScLAho+f/o1UnYYMmxKXOcnh0ajrIFRBVXchzob8C1ivJQViQrNuCFSsgqoW4uw==", "dependencies": { "@noble/curves": "^1.4.0", "@noble/hashes": "^1.3.1", - "@wormhole-foundation/sdk-base": "1.14.2" + "@wormhole-foundation/sdk-base": "2.1.0" } }, "node_modules/@wormhole-foundation/sdk-definitions-ntt": { @@ -4169,11 +4326,12 @@ "link": true }, "node_modules/@wormhole-foundation/sdk-evm": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm/-/sdk-evm-1.14.2.tgz", - "integrity": "sha512-3gBJxkWe6LOK5VpbNueA18KqrgH1P7iF/6hpD6wct9HGbrSdt/EFVlM9ZkPq+MCGTawHz59XUyvb300ZWuuzNA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm/-/sdk-evm-2.1.0.tgz", + "integrity": "sha512-F/jxq96fm3IRTf+gpuCzEMiUTpEclKthpSv+nejWdygH7171r+FFObPcXw3p1c0xbDduxGMyPUT04il8O4cnCA==", + "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-connect": "1.14.2", + "@wormhole-foundation/sdk-connect": "2.1.0", "ethers": "^6.5.1" }, "engines": { @@ -4181,13 +4339,14 @@ } }, "node_modules/@wormhole-foundation/sdk-evm-cctp": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-cctp/-/sdk-evm-cctp-1.14.2.tgz", - "integrity": "sha512-Vd5eaIgy9xbku8x4AYxkB9ytltHMp/gWh2wEyU7iaIpVomHN6XEuIu3ertFvZjgD19RlkqaUgHVnwlvKvPkepQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-cctp/-/sdk-evm-cctp-2.1.0.tgz", + "integrity": "sha512-FRDtrqRIreb+dFcHviBiIA2L+S6fLKa8PwqGvENhbwkaGGxNDNcToCh/8/otDY59oRoSR2L2vv1VfsFSj5zdZg==", + "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-evm": "1.14.2", - "@wormhole-foundation/sdk-evm-core": "1.14.2", + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-evm": "2.1.0", + "@wormhole-foundation/sdk-evm-core": "2.1.0", "ethers": "^6.5.1" }, "engines": { @@ -4195,12 +4354,13 @@ } }, "node_modules/@wormhole-foundation/sdk-evm-core": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-core/-/sdk-evm-core-1.14.2.tgz", - "integrity": "sha512-zfJTUZw1HcEV6P456rSm0URdYi0VaSUJewYeyFQfna43FYLpEXK1tTytMM+Lgtm4vPB4AwxCvuCsUaj1dOR9xw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-core/-/sdk-evm-core-2.1.0.tgz", + "integrity": "sha512-18rz/LHmjsgBU/we5uzJT1NTKCazD+lfXlvRLLdQyNmcYd/2niKp/wclxmwrrEahbHQ5fdPP4ULX8u98HXMQIA==", + "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-evm": "1.14.2", + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-evm": "2.1.0", "ethers": "^6.5.1" }, "engines": { @@ -4212,14 +4372,15 @@ "link": true }, "node_modules/@wormhole-foundation/sdk-evm-portico": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-portico/-/sdk-evm-portico-1.14.2.tgz", - "integrity": "sha512-jw/5x/9UTDMIJmMnINogSjMzcngjOzIr6o0Q5e4zf0aHM0jkxb36mvm5jCWhYg7G3EEGy1TotagPco+j9IwMQw==", - "dependencies": { - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-evm": "1.14.2", - "@wormhole-foundation/sdk-evm-core": "1.14.2", - "@wormhole-foundation/sdk-evm-tokenbridge": "1.14.2", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-portico/-/sdk-evm-portico-2.1.0.tgz", + "integrity": "sha512-hNEJkofKkVNnSHbmy3LLz+glCYVie3xPesAnRg2N0S9Czo1IvyXALnSVktaY98g4FfiRDU0RlKtnDDlKDEMpQA==", + "license": "Apache-2.0", + "dependencies": { + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-evm": "2.1.0", + "@wormhole-foundation/sdk-evm-core": "2.1.0", + "@wormhole-foundation/sdk-evm-tokenbridge": "2.1.0", "ethers": "^6.5.1" }, "engines": { @@ -4227,13 +4388,14 @@ } }, "node_modules/@wormhole-foundation/sdk-evm-tbtc": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-tbtc/-/sdk-evm-tbtc-1.14.2.tgz", - "integrity": "sha512-AMLRvklUifZ7QOxAURUyWwo7P6f7y9H8hhGv5dDjyQmO0mjA5vPvpI0tqdpJUfMVceGLhly7dpjOgDNKEM+2Cw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-tbtc/-/sdk-evm-tbtc-2.1.0.tgz", + "integrity": "sha512-7jHW2jp35oe1EVSdwnLqhrCH2EdN50Z63TaFMslSNOEk8ThV5JOzEKMIhMM3NXiZqIJC6BHBCQRaQaAP0ADxjQ==", + "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-evm": "1.14.2", - "@wormhole-foundation/sdk-evm-core": "1.14.2", + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-evm": "2.1.0", + "@wormhole-foundation/sdk-evm-core": "2.1.0", "ethers": "^6.5.1" }, "engines": { @@ -4241,13 +4403,14 @@ } }, "node_modules/@wormhole-foundation/sdk-evm-tokenbridge": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-tokenbridge/-/sdk-evm-tokenbridge-1.14.2.tgz", - "integrity": "sha512-4t8HMsnoK6F07mkgfU/ofABw38FMHEJWTXoGreRsbQxQ3MI8Q42V1niyDQvzCmMV/94IvElIrg24vAL4M0Bomg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-evm-tokenbridge/-/sdk-evm-tokenbridge-2.1.0.tgz", + "integrity": "sha512-ESOL+WlMFtaZGd9riaG7r7ldb7IsBR9HepdKByQz4vF04wZAv6km457C5M2ptP5PcGT4XLPa9GnIVWEipNJuEg==", + "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-evm": "1.14.2", - "@wormhole-foundation/sdk-evm-core": "1.14.2", + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-evm": "2.1.0", + "@wormhole-foundation/sdk-evm-core": "2.1.0", "ethers": "^6.5.1" }, "engines": { @@ -4263,15 +4426,16 @@ "link": true }, "node_modules/@wormhole-foundation/sdk-solana": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana/-/sdk-solana-1.14.2.tgz", - "integrity": "sha512-PC0i3aih3vE+twtAyxz5OTv2JZT4F7pScd0CxhtoJkJ2EpElCPdLuMsCGOIe8aAJTrHcY5J7hI9B5JPmpYzY2Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana/-/sdk-solana-2.1.0.tgz", + "integrity": "sha512-eszjj70qNjk2BKUepfAYd8cM78JmkcZdjjzcLTpnKAiHE3iLNhgnIPvvz6yfC2nmHV92GfyenqjfzBsbkHWQtg==", + "license": "Apache-2.0", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@coral-xyz/borsh": "0.29.0", "@solana/spl-token": "0.3.9", "@solana/web3.js": "^1.95.8", - "@wormhole-foundation/sdk-connect": "1.14.2", + "@wormhole-foundation/sdk-connect": "2.1.0", "rpc-websockets": "^7.10.0" }, "engines": { @@ -4279,30 +4443,32 @@ } }, "node_modules/@wormhole-foundation/sdk-solana-cctp": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-cctp/-/sdk-solana-cctp-1.14.2.tgz", - "integrity": "sha512-s3ujgLus/lNFIDl4re3WpI/Eqf+rtkXLIDaV5p8/PCkKrdTGoMTOOM8FPhbb+iTjTRz8kSoSWvxp8mtsr3/bxg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-cctp/-/sdk-solana-cctp-2.1.0.tgz", + "integrity": "sha512-u7u+coMa9OBFFHxeZ8ZlYPX1b7+zGEU+XBq/z1utuVfne5xoLAB2VqVWZltCiDbra2B6SXLmEzQm/KDylWAP/w==", + "license": "Apache-2.0", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@solana/spl-token": "0.3.9", "@solana/web3.js": "^1.95.8", - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-solana": "1.14.2" + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-solana": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-solana-core": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-core/-/sdk-solana-core-1.14.2.tgz", - "integrity": "sha512-u9SNmESaMzKpanze7hKNehEkN8pXo8f9PghkNNy/5+B5+Crc1s+kmOr1CZairP5GQprS4MW4kOdfTj92xaEe3w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-core/-/sdk-solana-core-2.1.0.tgz", + "integrity": "sha512-oe6pFQ2g8xZjACulylVo6nTMa8E+5AEX+rx3AAQ3lOmWEIDClNUCKQVX4Ld+yUWsrQl0Skgu0cggWo4/mZqtkA==", + "license": "Apache-2.0", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@coral-xyz/borsh": "0.29.0", "@solana/web3.js": "^1.95.8", - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-solana": "1.14.2" + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-solana": "2.1.0" }, "engines": { "node": ">=16" @@ -4313,85 +4479,91 @@ "link": true }, "node_modules/@wormhole-foundation/sdk-solana-tbtc": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-tbtc/-/sdk-solana-tbtc-1.14.2.tgz", - "integrity": "sha512-XaYXsW9yHmhdK0WXP3pDOeKsl7IzqRGTpnXXlBfjPPrHhbUTdktQcGd2o+9k+nIIi7WcmowGwDhRF6wdsmZ5Dg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-tbtc/-/sdk-solana-tbtc-2.1.0.tgz", + "integrity": "sha512-rzbeIGdU+qkmrR7Wm4YILGziCJC/bnpiEfH3trhL6Nj2eK2/Ps7+xPswpkzfk9txJrHxzpEQQbRWw5arH2Vgxg==", + "license": "Apache-2.0", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@solana/spl-token": "0.3.9", "@solana/web3.js": "^1.95.8", - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-solana": "1.14.2", - "@wormhole-foundation/sdk-solana-core": "1.14.2", - "@wormhole-foundation/sdk-solana-tokenbridge": "1.14.2" + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-solana": "2.1.0", + "@wormhole-foundation/sdk-solana-core": "2.1.0", + "@wormhole-foundation/sdk-solana-tokenbridge": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-solana-tokenbridge": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-tokenbridge/-/sdk-solana-tokenbridge-1.14.2.tgz", - "integrity": "sha512-sYdrMPL/PnpsBzNebOXzbIPSYMiTaVdzpwclzfkqTFBoYgEHlaii+DEpmTndIAEPiXgcWjtpB+CiN7/YqNspHw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-solana-tokenbridge/-/sdk-solana-tokenbridge-2.1.0.tgz", + "integrity": "sha512-OLuzvGsIvl+dwJHJW8LTQ9Gt0tNjLEcNnkqjbKZqcele1yfBj8YSjmnDKJ3RQJCqIJL+p/4mW3LW4cVM+FCWDg==", + "license": "Apache-2.0", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@solana/spl-token": "0.3.9", "@solana/web3.js": "^1.95.8", - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-solana": "1.14.2", - "@wormhole-foundation/sdk-solana-core": "1.14.2" + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-solana": "2.1.0", + "@wormhole-foundation/sdk-solana-core": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-sui": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui/-/sdk-sui-1.14.2.tgz", - "integrity": "sha512-rTnd1jFZz1mXII1iaz13KA9CSihS1iDsgYx4IQ+/l5woGa8Nz8zrhE3zS6TYof0qJTQLghhjhssa5SwkYP3Ubw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui/-/sdk-sui-2.1.0.tgz", + "integrity": "sha512-PBShGUVmu05kChBu63WRY5TPZNHmZiJjQBONjXq1fOb2k00SXxv3sVXmVQJTHCLEb6BWQ2Y8gyRbaIJDWuNz/Q==", + "license": "Apache-2.0", "dependencies": { "@mysten/sui": "^1.21.2", - "@wormhole-foundation/sdk-connect": "1.14.2" + "@wormhole-foundation/sdk-connect": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-sui-cctp": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui-cctp/-/sdk-sui-cctp-1.14.2.tgz", - "integrity": "sha512-5jf6rByaRvtEZyUpl16Tf9cAhm8o4Lrh4Huidzo97IrYknvPw00Azmy0r/FAjHFDNLidY+MnQvje9BdLe+4GIg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui-cctp/-/sdk-sui-cctp-2.1.0.tgz", + "integrity": "sha512-wew7AL6tSlJV3hnX3zgbU00Yr6bA31/eHQIbyLO26vl1OFttXJDPKeZUQsGL8hHGsXcHHD9pY+K/SEWaqadcew==", + "license": "Apache-2.0", "dependencies": { "@mysten/sui": "^1.21.2", - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-sui": "1.14.2" + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-sui": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-sui-core": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui-core/-/sdk-sui-core-1.14.2.tgz", - "integrity": "sha512-zrHDFEoNTsicLd+ib5xLad4q97Uwc/0TxIMHJY+EO9JJ6Qy39M3vdMChXnSdX7CTO4LE6oFuOJGHFdW0tfepqA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui-core/-/sdk-sui-core-2.1.0.tgz", + "integrity": "sha512-JgHbdXWAeP30nbdfSIYVv9lFdEeoVVID3vB487w03xkB67Wg/1X+h5oTDmRBu418fCIrcIYYZ6XdTCNUyqi/+g==", + "license": "Apache-2.0", "dependencies": { "@mysten/sui": "^1.21.2", - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-sui": "1.14.2" + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-sui": "2.1.0" }, "engines": { "node": ">=16" } }, "node_modules/@wormhole-foundation/sdk-sui-tokenbridge": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui-tokenbridge/-/sdk-sui-tokenbridge-1.14.2.tgz", - "integrity": "sha512-gK9Us4kCE/8go4VIVgnOCekR1qEBrbbt/JnorSaqCShT2VXWSYEdNH+lBbrRvJL5W+2SRSmVw8OuYSc6CkYJSg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@wormhole-foundation/sdk-sui-tokenbridge/-/sdk-sui-tokenbridge-2.1.0.tgz", + "integrity": "sha512-TcDp8bY6xoHjeqChwuNxcE/eDXi36Z0gTCQF6UCXpBVVdanwhK46acTsvI9dURoF5h8dBUiS65A3A+tKu0UJRQ==", + "license": "Apache-2.0", "dependencies": { "@mysten/sui": "^1.21.2", - "@wormhole-foundation/sdk-connect": "1.14.2", - "@wormhole-foundation/sdk-sui": "1.14.2", - "@wormhole-foundation/sdk-sui-core": "1.14.2" + "@wormhole-foundation/sdk-connect": "2.1.0", + "@wormhole-foundation/sdk-sui": "2.1.0", + "@wormhole-foundation/sdk-sui-core": "2.1.0" }, "engines": { "node": ">=16" @@ -5920,6 +6092,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@wry/caches/-/caches-1.0.1.tgz", "integrity": "sha512-bXuaUNLVVkD20wcGBWRyo7j9N3TxePEWFZj2Y+r9OoUzfqmavM84+mFykRicNsBqatba5JLay1t48wxaXaWnlA==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -5931,6 +6104,7 @@ "version": "0.7.4", "resolved": "https://registry.npmjs.org/@wry/context/-/context-0.7.4.tgz", "integrity": "sha512-jmT7Sb4ZQWI5iyu3lobQxICu2nC/vbUhP0vIdd6tHC9PTfenmRmuIFqktc6GH9cgi+ZHnsLWPvfSvc4DrYmKiQ==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -5942,6 +6116,7 @@ "version": "0.5.7", "resolved": "https://registry.npmjs.org/@wry/equality/-/equality-0.5.7.tgz", "integrity": "sha512-BRFORjsTuQv5gxcXsuDXx6oGRhuVsEGwZy6LOzRRfgu+eSfxbhUQ9L9YtSEIuIjY/o7g3iWFjrc5eSY1GXP2Dw==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -5953,6 +6128,7 @@ "version": "0.5.0", "resolved": "https://registry.npmjs.org/@wry/trie/-/trie-0.5.0.tgz", "integrity": "sha512-FNoYzHawTMk/6KMQoEG5O4PuioX19UbwdQKF44yw0nLfOypfQdjtfZzo/UIJWAJ23sNIFbD1Ug9lbaDGMwbqQA==", + "license": "MIT", "dependencies": { "tslib": "^2.3.0" }, @@ -6055,6 +6231,7 @@ "version": "2.7.0", "resolved": "https://registry.npmjs.org/algosdk/-/algosdk-2.7.0.tgz", "integrity": "sha512-sBE9lpV7bup3rZ+q2j3JQaFAE9JwZvjWKX00vPlG8e9txctXbgLL56jZhSWZndqhDI9oI+0P4NldkuQIWdrUyg==", + "license": "MIT", "dependencies": { "algo-msgpack-with-bigint": "^2.1.1", "buffer": "^6.0.3", @@ -6152,9 +6329,10 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.8.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz", - "integrity": "sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz", + "integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==", + "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -6332,9 +6510,10 @@ } }, "node_modules/binary-layout": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/binary-layout/-/binary-layout-1.2.0.tgz", - "integrity": "sha512-K3EHOEEjDLDm3BdT6MXMu/8JQZx7wWMwPlV28ULxHIyW9RFqEp6sQB4Q22bt3u2EBP95H0mWNH6oDz7Cs8iPoA==" + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/binary-layout/-/binary-layout-1.2.2.tgz", + "integrity": "sha512-iySOJ1OB2uPxv8whrRwDJ7USTk7NqeCaSPZL/j4oaOK2iup8P5vr4BNvtpumXUAe0/aJZ8ZkNldj3fmhtcLnDQ==", + "license": "Apache-2.0" }, "node_modules/bindings": { "version": "1.5.0", @@ -6379,7 +6558,8 @@ "node_modules/blakejs": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/blakejs/-/blakejs-1.2.1.tgz", - "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==" + "integrity": "sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==", + "license": "MIT" }, "node_modules/bn.js": { "version": "5.2.1", @@ -6438,6 +6618,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "license": "MIT", "dependencies": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", @@ -6561,7 +6742,8 @@ "node_modules/buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==" + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "license": "MIT" }, "node_modules/bufferutil": { "version": "4.0.8", @@ -6617,6 +6799,7 @@ "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", + "license": "MIT", "peer": true, "engines": { "node": ">=10.6.0" @@ -6626,6 +6809,7 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", + "license": "MIT", "peer": true, "dependencies": { "clone-response": "^1.0.2", @@ -6755,6 +6939,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", + "license": "MIT", "peer": true, "dependencies": { "mimic-response": "^1.0.0" @@ -6947,7 +7132,20 @@ "node_modules/cosmjs-types": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/cosmjs-types/-/cosmjs-types-0.9.0.tgz", - "integrity": "sha512-MN/yUe6mkJwHnCFfsNPeCfXVhyxHYW6c/xDUzrSbBycYzw++XvWDMJArXp2pLdgD6FQ8DW79vkPjeNKVrXaHeQ==" + "integrity": "sha512-MN/yUe6mkJwHnCFfsNPeCfXVhyxHYW6c/xDUzrSbBycYzw++XvWDMJArXp2pLdgD6FQ8DW79vkPjeNKVrXaHeQ==", + "license": "Apache-2.0" + }, + "node_modules/crc-32": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", + "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", + "license": "Apache-2.0", + "bin": { + "crc32": "bin/crc32.njs" + }, + "engines": { + "node": ">=0.8" + } }, "node_modules/create-hash": { "version": "1.2.0", @@ -7039,7 +7237,8 @@ "node_modules/crypto-js": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", - "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==" + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "license": "MIT" }, "node_modules/cssom": { "version": "0.4.4", @@ -7125,7 +7324,6 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -7141,8 +7339,7 @@ "node_modules/debug/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/decimal.js": { "version": "10.4.3", @@ -7154,6 +7351,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "license": "MIT", "peer": true, "dependencies": { "mimic-response": "^3.1.0" @@ -7169,6 +7367,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=10" @@ -7215,6 +7414,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", + "license": "MIT", "peer": true, "engines": { "node": ">=10" @@ -7389,6 +7589,7 @@ "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "license": "MIT", "peer": true, "dependencies": { "once": "^1.4.0" @@ -7547,68 +7748,82 @@ } }, "node_modules/ethereum-cryptography": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", - "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", + "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", + "license": "MIT", "dependencies": { - "@types/pbkdf2": "^3.0.0", - "@types/secp256k1": "^4.0.1", - "blakejs": "^1.1.0", - "browserify-aes": "^1.2.0", - "bs58check": "^2.1.2", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "hash.js": "^1.1.7", - "keccak": "^3.0.0", - "pbkdf2": "^3.0.17", - "randombytes": "^2.1.0", - "safe-buffer": "^5.1.2", - "scrypt-js": "^3.0.0", - "secp256k1": "^4.0.1", - "setimmediate": "^1.0.5" + "@noble/curves": "1.4.2", + "@noble/hashes": "1.4.0", + "@scure/bip32": "1.4.0", + "@scure/bip39": "1.3.0" } }, - "node_modules/ethereumjs-abi": { - "version": "0.6.8", - "resolved": "https://registry.npmjs.org/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz", - "integrity": "sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA==", - "deprecated": "This library has been deprecated and usage is discouraged.", + "node_modules/ethereum-cryptography/node_modules/@noble/curves": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", + "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", + "license": "MIT", "dependencies": { - "bn.js": "^4.11.8", - "ethereumjs-util": "^6.0.0" + "@noble/hashes": "1.4.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/ethereumjs-abi/node_modules/@types/bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/@types/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==", - "dependencies": { - "@types/node": "*" + "node_modules/ethereum-cryptography/node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/ethereumjs-abi/node_modules/bn.js": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.1.tgz", - "integrity": "sha512-k8TVBiPkPJT9uHLdOKfFpqcfprwBFOAAXXozRubr7R7PfIuKvQlzcI4M0pALeqXN09vdaMbUdUj+pass+uULAg==" + "node_modules/ethereum-cryptography/node_modules/@scure/base": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", + "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/ethereum-cryptography/node_modules/@scure/bip32": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", + "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", + "license": "MIT", + "dependencies": { + "@noble/curves": "~1.4.0", + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } }, - "node_modules/ethereumjs-abi/node_modules/ethereumjs-util": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz", - "integrity": "sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==", + "node_modules/ethereum-cryptography/node_modules/@scure/bip39": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", + "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", + "license": "MIT", "dependencies": { - "@types/bn.js": "^4.11.3", - "bn.js": "^4.11.0", - "create-hash": "^1.1.2", - "elliptic": "^6.5.2", - "ethereum-cryptography": "^0.1.3", - "ethjs-util": "0.1.6", - "rlp": "^2.2.3" + "@noble/hashes": "~1.4.0", + "@scure/base": "~1.1.6" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, "node_modules/ethereumjs-util": { "version": "7.1.5", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz", "integrity": "sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg==", + "license": "MPL-2.0", "dependencies": { "@types/bn.js": "^5.1.0", "bn.js": "^5.1.2", @@ -7620,6 +7835,29 @@ "node": ">=10.0.0" } }, + "node_modules/ethereumjs-util/node_modules/ethereum-cryptography": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz", + "integrity": "sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==", + "license": "MIT", + "dependencies": { + "@types/pbkdf2": "^3.0.0", + "@types/secp256k1": "^4.0.1", + "blakejs": "^1.1.0", + "browserify-aes": "^1.2.0", + "bs58check": "^2.1.2", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "hash.js": "^1.1.7", + "keccak": "^3.0.0", + "pbkdf2": "^3.0.17", + "randombytes": "^2.1.0", + "safe-buffer": "^5.1.2", + "scrypt-js": "^3.0.0", + "secp256k1": "^4.0.1", + "setimmediate": "^1.0.5" + } + }, "node_modules/ethers": { "version": "6.13.5", "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.13.5.tgz", @@ -7702,19 +7940,6 @@ } } }, - "node_modules/ethjs-util": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz", - "integrity": "sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==", - "dependencies": { - "is-hex-prefixed": "1.0.0", - "strip-hex-prefix": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, "node_modules/eventemitter3": { "version": "4.0.7", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", @@ -7724,6 +7949,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "license": "MIT", "dependencies": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" @@ -8002,6 +8228,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "license": "MIT", "peer": true, "dependencies": { "pump": "^3.0.0" @@ -8088,6 +8315,7 @@ "version": "11.8.6", "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", + "license": "MIT", "peer": true, "dependencies": { "@sindresorhus/is": "^4.0.0", @@ -8113,6 +8341,7 @@ "version": "1.8.10", "resolved": "https://registry.npmjs.org/gql.tada/-/gql.tada-1.8.10.tgz", "integrity": "sha512-FrvSxgz838FYVPgZHGOSgbpOjhR+yq44rCzww3oOPJYi0OvBJjAgCiP6LEokZIYND2fUTXzQAyLgcvgw1yNP5A==", + "license": "MIT", "dependencies": { "@0no-co/graphql.web": "^1.0.5", "@0no-co/graphqlsp": "^1.12.13", @@ -8134,9 +8363,10 @@ "dev": true }, "node_modules/graphql": { - "version": "16.10.0", - "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.10.0.tgz", - "integrity": "sha512-AjqGKbDGUFRKIRCP9tCKiIGHyriz2oHEbPIbEtcSLSs4YjReZOIPQQWek4+6hjw62H9QShXHyaGivGiYVLeYFQ==", + "version": "16.11.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-16.11.0.tgz", + "integrity": "sha512-mS1lbMsxgQj6hge1XZ6p7GPhbrtFwUFYi3wRzXAC/FmYnyXMTvvI3td3rjmQ2u8ewXueaSvRPWaEcgVVOT9Jnw==", + "license": "MIT", "engines": { "node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0" } @@ -8145,6 +8375,7 @@ "version": "2.12.6", "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", + "license": "MIT", "dependencies": { "tslib": "^2.1.0" }, @@ -8249,6 +8480,7 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "license": "BSD-3-Clause", "dependencies": { "react-is": "^16.7.0" } @@ -8274,9 +8506,10 @@ "peer": true }, "node_modules/http-cache-semantics": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", - "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.2.0.tgz", + "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==", + "license": "BSD-2-Clause", "peer": true }, "node_modules/http-proxy-agent": { @@ -8297,12 +8530,14 @@ "node_modules/http-status-codes": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/http-status-codes/-/http-status-codes-2.3.0.tgz", - "integrity": "sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==" + "integrity": "sha512-RJ8XvFvpPM/Dmc5SV+dC4y5PCeOhT3x1Hq0NU3rjGeg5a/CqlhZ7uudknPwZFz4aeAXDcbAyaeP7GAo9lvngtA==", + "license": "MIT" }, "node_modules/http2-wrapper": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", + "license": "MIT", "peer": true, "dependencies": { "quick-lru": "^5.1.1", @@ -8424,6 +8659,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -8464,15 +8700,6 @@ "node": ">=6" } }, - "node_modules/is-hex-prefixed": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz", - "integrity": "sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA==", - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -10306,6 +10533,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "license": "MIT", "peer": true }, "node_modules/json-parse-even-better-errors": { @@ -10368,6 +10596,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-4.0.0.tgz", "integrity": "sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA==", + "license": "MIT", "engines": { "node": ">=18" } @@ -10400,6 +10629,7 @@ "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "license": "MIT", "peer": true, "dependencies": { "json-buffer": "3.0.1" @@ -10434,7 +10664,8 @@ "node_modules/libsodium-sumo": { "version": "0.7.15", "resolved": "https://registry.npmjs.org/libsodium-sumo/-/libsodium-sumo-0.7.15.tgz", - "integrity": "sha512-5tPmqPmq8T8Nikpm1Nqj0hBHvsLFCXvdhBFV7SGOitQPZAA6jso8XoL0r4L7vmfKXr486fiQInvErHtEvizFMw==" + "integrity": "sha512-5tPmqPmq8T8Nikpm1Nqj0hBHvsLFCXvdhBFV7SGOitQPZAA6jso8XoL0r4L7vmfKXr486fiQInvErHtEvizFMw==", + "license": "ISC" }, "node_modules/libsodium-wrappers": { "version": "0.7.13", @@ -10449,6 +10680,7 @@ "version": "0.7.15", "resolved": "https://registry.npmjs.org/libsodium-wrappers-sumo/-/libsodium-wrappers-sumo-0.7.15.tgz", "integrity": "sha512-aSWY8wKDZh5TC7rMvEdTHoyppVq/1dTSAeAR7H6pzd6QRT3vQWcT5pGwCotLcpPEOLXX6VvqihSPkpEhYAjANA==", + "license": "ISC", "dependencies": { "libsodium-sumo": "^0.7.15" } @@ -10500,6 +10732,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -10519,6 +10752,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "license": "MIT", "peer": true, "engines": { "node": ">=8" @@ -10606,6 +10840,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "license": "MIT", "engines": { "node": ">=8" }, @@ -10630,6 +10865,12 @@ "dev": true, "peer": true }, + "node_modules/micro-ftch": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", + "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", + "license": "MIT" + }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -10676,6 +10917,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "license": "MIT", "peer": true, "engines": { "node": ">=4" @@ -10825,6 +11067,7 @@ "version": "6.1.0", "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "license": "MIT", "peer": true, "engines": { "node": ">=10" @@ -10857,6 +11100,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -10897,6 +11141,7 @@ "version": "0.18.1", "resolved": "https://registry.npmjs.org/optimism/-/optimism-0.18.1.tgz", "integrity": "sha512-mLXNwWPa9dgFyDqkNi54sjDyNJ9/fTI6WGBLgnXku1vdKY/jovHfZT5r+aiVeFFLOz+foPNOm5YJ4mqgld2GBQ==", + "license": "MIT", "dependencies": { "@wry/caches": "^1.0.0", "@wry/context": "^0.7.0", @@ -10908,6 +11153,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", + "license": "MIT", "peer": true, "engines": { "node": ">=8" @@ -11036,6 +11282,7 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "license": "MIT", "dependencies": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -11088,10 +11335,20 @@ "node": ">=8" } }, + "node_modules/pony-cause": { + "version": "2.1.11", + "resolved": "https://registry.npmjs.org/pony-cause/-/pony-cause-2.1.11.tgz", + "integrity": "sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg==", + "license": "0BSD", + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/poseidon-lite": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/poseidon-lite/-/poseidon-lite-0.2.1.tgz", - "integrity": "sha512-xIr+G6HeYfOhCuswdqcFpSX47SPhm0EpisWJ6h7fHlWwaVIvH3dLnejpatrtw6Xc6HaLrpq05y7VRfvDmDGIog==" + "integrity": "sha512-xIr+G6HeYfOhCuswdqcFpSX47SPhm0EpisWJ6h7fHlWwaVIvH3dLnejpatrtw6Xc6HaLrpq05y7VRfvDmDGIog==", + "license": "MIT" }, "node_modules/prettier": { "version": "2.8.8", @@ -11158,6 +11415,7 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "license": "MIT", "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -11215,6 +11473,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "license": "MIT", "peer": true, "dependencies": { "end-of-stream": "^1.1.0", @@ -11259,6 +11518,7 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "license": "MIT", "peer": true, "engines": { "node": ">=10" @@ -11271,6 +11531,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -11278,7 +11539,8 @@ "node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "license": "MIT" }, "node_modules/readable-stream": { "version": "3.6.2", @@ -11327,6 +11589,7 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/rehackt/-/rehackt-0.1.0.tgz", "integrity": "sha512-7kRDOuLHB87D/JESKxQoRwv4DzbIdwkAGQ7p6QKGdVlY1IZheUnVhlk/4UZlNUVxdAXpyxikE3URsG067ybVzw==", + "license": "MIT", "peerDependencies": { "@types/react": "*", "react": "*" @@ -11375,6 +11638,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "license": "MIT", "peer": true }, "node_modules/resolve-cwd": { @@ -11423,6 +11687,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", + "license": "MIT", "peer": true, "dependencies": { "lowercase-keys": "^2.0.0" @@ -11460,6 +11725,7 @@ "version": "2.2.7", "resolved": "https://registry.npmjs.org/rlp/-/rlp-2.2.7.tgz", "integrity": "sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==", + "license": "MPL-2.0", "dependencies": { "bn.js": "^5.2.0" }, @@ -11487,9 +11753,9 @@ } }, "node_modules/rpc-websockets/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "version": "8.18.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.2.tgz", + "integrity": "sha512-DMricUmwGZUVr++AEAe2uiVM7UoO9MAVZMDu05UQOaUII0lp+zOzLLU4Xqh/JvTqklB1T4uELaaPBKyjE1r4fQ==", "license": "MIT", "engines": { "node": ">=10.0.0" @@ -11586,7 +11852,8 @@ "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==" + "integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==", + "license": "MIT" }, "node_modules/sha.js": { "version": "2.4.11", @@ -11627,6 +11894,7 @@ "version": "0.8.5", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "license": "BSD-3-Clause", "dependencies": { "glob": "^7.0.0", "interpret": "^1.0.0", @@ -11643,6 +11911,7 @@ "version": "0.3.4", "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.4.tgz", "integrity": "sha512-N6A9MLVqjxZYcVn8hLmtneQWIJtp8IKzMP4eMnx+nqkvXoqinUPCbUFLp2UcWTEIUONhlk0ewxr/jaVGlc+J+g==", + "license": "MIT", "dependencies": { "minimist": "^1.2.3", "shelljs": "^0.8.5" @@ -11690,6 +11959,7 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/snakecase-keys/-/snakecase-keys-5.5.0.tgz", "integrity": "sha512-r3kRtnoPu3FxGJ3fny6PKNnU3pteb29o6qAa0ugzhSseKNWRkw1dw8nIjXMyyKaU9vQxxVIE62Mb3bKbdrgpiw==", + "license": "MIT", "dependencies": { "map-obj": "^4.1.0", "snake-case": "^3.0.4", @@ -11703,6 +11973,7 @@ "version": "3.13.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=14.16" }, @@ -11821,18 +12092,6 @@ "node": ">=6" } }, - "node_modules/strip-hex-prefix": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz", - "integrity": "sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==", - "dependencies": { - "is-hex-prefixed": "1.0.0" - }, - "engines": { - "node": ">=6.5.0", - "npm": ">=3" - } - }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -11895,6 +12154,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz", "integrity": "sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ==", + "license": "MIT", "engines": { "node": ">=0.10" } @@ -12103,6 +12363,7 @@ "version": "0.10.3", "resolved": "https://registry.npmjs.org/ts-invariant/-/ts-invariant-0.10.3.tgz", "integrity": "sha512-uivwYcQaxAucv1CzRp2n/QdYPo4ILf9VXgH19zEIjFx2EJufV16P0JtJVpYHy89DItG6Kwj2oIUjrcK5au+4tQ==", + "license": "MIT", "dependencies": { "tslib": "^2.1.0" }, @@ -12414,11 +12675,6 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==" }, - "node_modules/tweetnacl-util": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz", - "integrity": "sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw==" - }, "node_modules/type-detect": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", @@ -12630,7 +12886,8 @@ "node_modules/valibot": { "version": "0.36.0", "resolved": "https://registry.npmjs.org/valibot/-/valibot-0.36.0.tgz", - "integrity": "sha512-CjF1XN4sUce8sBK9TixrDqFM7RwNkuXdJu174/AwmQUB62QbCQADg5lLe8ldBalFgtj1uKj+pKwDJiNo4Mn+eQ==" + "integrity": "sha512-CjF1XN4sUce8sBK9TixrDqFM7RwNkuXdJu174/AwmQUB62QbCQADg5lLe8ldBalFgtj1uKj+pKwDJiNo4Mn+eQ==", + "license": "MIT" }, "node_modules/vlq": { "version": "2.0.4", @@ -12912,22 +13169,24 @@ "node_modules/zen-observable": { "version": "0.8.15", "resolved": "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz", - "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==" + "integrity": "sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ==", + "license": "MIT" }, "node_modules/zen-observable-ts": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/zen-observable-ts/-/zen-observable-ts-1.2.5.tgz", "integrity": "sha512-QZWQekv6iB72Naeake9hS1KxHlotfRpe+WGNbNx5/ta+R3DNjVO2bswf63gXlWDcs+EMd7XY8HfVQyP1X6T4Zg==", + "license": "MIT", "dependencies": { "zen-observable": "0.8.15" } }, "sdk/definitions": { "name": "@wormhole-foundation/sdk-definitions-ntt", - "version": "0.5.0", + "version": "1.0.0", "peerDependencies": { - "@wormhole-foundation/sdk-base": "^1.14.2", - "@wormhole-foundation/sdk-definitions": "^1.14.2" + "@wormhole-foundation/sdk-base": "^2.1.0", + "@wormhole-foundation/sdk-definitions": "^2.1.0" } }, "sdk/evm": { @@ -12953,14 +13212,14 @@ }, "sdk/examples": { "name": "@wormhole-foundation/sdk-examples-ntt", - "version": "0.5.0", + "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk": "^1.14.2", - "@wormhole-foundation/sdk-definitions-ntt": "0.5.0", - "@wormhole-foundation/sdk-evm-ntt": "0.5.0", - "@wormhole-foundation/sdk-route-ntt": "0.5.0", - "@wormhole-foundation/sdk-solana-ntt": "0.5.0" + "@wormhole-foundation/sdk": "^2.1.0", + "@wormhole-foundation/sdk-definitions-ntt": "1.0.0", + "@wormhole-foundation/sdk-evm-ntt": "1.0.0", + "@wormhole-foundation/sdk-route-ntt": "1.0.0", + "@wormhole-foundation/sdk-solana-ntt": "1.0.0" }, "devDependencies": { "dotenv": "^16.4.5", @@ -12986,12 +13245,12 @@ }, "sdk/route": { "name": "@wormhole-foundation/sdk-route-ntt", - "version": "0.5.0", + "version": "1.0.0", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-definitions-ntt": "0.5.0", - "@wormhole-foundation/sdk-evm-ntt": "0.5.0", - "@wormhole-foundation/sdk-solana-ntt": "0.5.0" + "@wormhole-foundation/sdk-definitions-ntt": "1.0.0", + "@wormhole-foundation/sdk-evm-ntt": "1.0.0", + "@wormhole-foundation/sdk-solana-ntt": "1.0.0" }, "devDependencies": { "nock": "^13.3.3", @@ -13002,19 +13261,20 @@ "node": ">=16" }, "peerDependencies": { - "@wormhole-foundation/sdk-connect": "^1.0.0" + "@wormhole-foundation/sdk-connect": "^2.1.0", + "axios": "^1.9.0" } }, "solana": { "name": "@wormhole-foundation/sdk-solana-ntt", - "version": "0.5.0", + "version": "1.0.0", "license": "Apache-2.0", "dependencies": { "@coral-xyz/anchor": "0.29.0", "@coral-xyz/borsh": "0.29.0", "@solana/spl-token": "0.4.0", "@solana/web3.js": "^1.95.8", - "@wormhole-foundation/sdk-definitions-ntt": "0.5.0", + "@wormhole-foundation/sdk-definitions-ntt": "1.0.0", "bn.js": "5.2.1" }, "devDependencies": { @@ -13028,10 +13288,10 @@ "node": ">=16" }, "peerDependencies": { - "@wormhole-foundation/sdk-base": "^1.0.0", - "@wormhole-foundation/sdk-definitions": "^1.0.0", - "@wormhole-foundation/sdk-solana": "^1.0.0", - "@wormhole-foundation/sdk-solana-core": "^1.0.0" + "@wormhole-foundation/sdk-base": "^2.1.0", + "@wormhole-foundation/sdk-definitions": "^2.1.0", + "@wormhole-foundation/sdk-solana": "^2.1.0", + "@wormhole-foundation/sdk-solana-core": "^2.1.0" } }, "solana/node_modules/@solana/codecs-core": { diff --git a/package.json b/package.json index e66e20308..bcfe39eb4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ntt", - "version": "0.5.0", + "version": "1.0.0", "type": "module", "license": "Apache-2.0", "scripts": { @@ -21,7 +21,7 @@ "@solana/web3.js": "^1.95.8", "@types/jest": "^29.5.12", "@types/node": "^20.12.2", - "@wormhole-foundation/sdk": "^1.14.2", + "@wormhole-foundation/sdk": "^2.1.0", "@wormhole-foundation/wormchain-sdk": "^0.0.1", "ethers": "^6.5.1", "ts-jest": "^29.1.2", @@ -36,4 +36,4 @@ "sdk/examples", "cli" ] -} +} \ No newline at end of file diff --git a/sdk/definitions/package.json b/sdk/definitions/package.json index 055013b49..d8c26cee1 100644 --- a/sdk/definitions/package.json +++ b/sdk/definitions/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/sdk-definitions-ntt", - "version": "0.5.0", + "version": "1.0.0", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/example-native-token-transfers.git" @@ -49,8 +49,8 @@ "test": "jest --config ./jest.config.ts" }, "peerDependencies": { - "@wormhole-foundation/sdk-base": "^1.14.2", - "@wormhole-foundation/sdk-definitions": "^1.14.2" + "@wormhole-foundation/sdk-base": "^2.1.0", + "@wormhole-foundation/sdk-definitions": "^2.1.0" }, "type": "module" } \ No newline at end of file diff --git a/sdk/definitions/src/index.ts b/sdk/definitions/src/index.ts index 644b390cf..f2d804fdb 100644 --- a/sdk/definitions/src/index.ts +++ b/sdk/definitions/src/index.ts @@ -4,6 +4,7 @@ import { nttNamedPayloads } from "./layouts/index.js"; registerPayloadTypes("Ntt", nttNamedPayloads); export * from "./ntt.js"; +export * from "./nttWithExecutor.js"; export * from "./layouts/index.js"; export type * from "./layouts/index.js"; diff --git a/sdk/definitions/src/ntt.ts b/sdk/definitions/src/ntt.ts index a209ba0c5..f2a89bbfd 100644 --- a/sdk/definitions/src/ntt.ts +++ b/sdk/definitions/src/ntt.ts @@ -56,8 +56,6 @@ export namespace Ntt { queue: boolean; /** Whether or not to request this transfer should be relayed, otherwise manual redemption is required */ automatic?: boolean; - /** How much native gas on the destination to send along with the transfer */ - gasDropoff?: bigint; /** Whether or not the token needs to be wrapped, only relevant for gas token transfers */ wrapNative?: boolean; }; diff --git a/sdk/definitions/src/nttWithExecutor.ts b/sdk/definitions/src/nttWithExecutor.ts new file mode 100644 index 000000000..8dbb84f5a --- /dev/null +++ b/sdk/definitions/src/nttWithExecutor.ts @@ -0,0 +1,49 @@ +import type { Chain, Network } from "@wormhole-foundation/sdk-base"; +import { + type AccountAddress, + type ChainAddress, + type EmptyPlatformMap, + UnsignedTransaction, +} from "@wormhole-foundation/sdk-definitions"; +import { Ntt } from "./ntt.js"; + +export namespace NttWithExecutor { + export type Quote = { + signedQuote: Uint8Array; // The signed quote from the /v0/quote endpoint + relayInstructions: Uint8Array; // The relay instructions for the transfer + estimatedCost: bigint; // The estimated cost of the transfer in native token base units + payeeAddress: Uint8Array; // The wallet address on the source chain, designated by the Quoter, to receive funds when requesting an execution + referrer: ChainAddress; // The referrer address (to whom the referrer fee should be paid) + referrerFee: bigint; // The referrer fee in NTT token base units + remainingAmount: bigint; // The remaining amount after the referrer fee in NTT token base units + referrerFeeDbps: bigint; // The referrer fee in *tenths* of basis points + expires: Date; // The expiry time of the quote + gasDropOff: bigint; // The gas drop-off amount in native token base units + }; +} + +export interface NttWithExecutor { + transfer( + sender: AccountAddress, + destination: ChainAddress, + amount: bigint, + quote: NttWithExecutor.Quote, + ntt: Ntt, + wrapNative?: boolean + ): AsyncGenerator>; + + estimateMsgValueAndGasLimit( + recipient: ChainAddress | undefined + ): Promise<{ msgValue: bigint; gasLimit: bigint }>; +} + +declare module "@wormhole-foundation/sdk-definitions" { + export namespace WormholeRegistry { + interface ProtocolToInterfaceMapping { + NttWithExecutor: NttWithExecutor; + } + interface ProtocolToPlatformMapping { + NttWithExecutor: EmptyPlatformMap<"NttWithExecutor">; + } + } +} diff --git a/sdk/examples/package.json b/sdk/examples/package.json index 953568840..6a7b01624 100644 --- a/sdk/examples/package.json +++ b/sdk/examples/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/sdk-examples-ntt", - "version": "0.5.0", + "version": "1.0.0", "license": "Apache-2.0", "main": "./dist/cjs/index.js", "types": "./dist/cjs/index.d.ts", @@ -32,10 +32,10 @@ "tsx": "^4.7.2" }, "dependencies": { - "@wormhole-foundation/sdk": "^1.14.2", - "@wormhole-foundation/sdk-definitions-ntt": "0.5.0", - "@wormhole-foundation/sdk-evm-ntt": "0.5.0", - "@wormhole-foundation/sdk-solana-ntt": "0.5.0", - "@wormhole-foundation/sdk-route-ntt": "0.5.0" + "@wormhole-foundation/sdk": "^2.1.0", + "@wormhole-foundation/sdk-definitions-ntt": "1.0.0", + "@wormhole-foundation/sdk-evm-ntt": "1.0.0", + "@wormhole-foundation/sdk-solana-ntt": "1.0.0", + "@wormhole-foundation/sdk-route-ntt": "1.0.0" } } \ No newline at end of file diff --git a/sdk/route/__tests__/route.test.ts b/sdk/route/__tests__/route.test.ts index 6fee5a6e1..79471e355 100644 --- a/sdk/route/__tests__/route.test.ts +++ b/sdk/route/__tests__/route.test.ts @@ -249,7 +249,6 @@ describe("Automatic Route Tests", function () { "sourceToken", "destinationToken", "relayFee", - "destinationNativeGas", "eta", ]); }); diff --git a/sdk/route/package.json b/sdk/route/package.json index 3b8b8c6aa..0f7a794be 100644 --- a/sdk/route/package.json +++ b/sdk/route/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/sdk-route-ntt", - "version": "0.5.0", + "version": "1.0.0", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/example-native-token-transfers.git" @@ -45,12 +45,13 @@ "ts-node": "^10.9.2" }, "dependencies": { - "@wormhole-foundation/sdk-definitions-ntt": "0.5.0", - "@wormhole-foundation/sdk-solana-ntt": "0.5.0", - "@wormhole-foundation/sdk-evm-ntt": "0.5.0" + "@wormhole-foundation/sdk-definitions-ntt": "1.0.0", + "@wormhole-foundation/sdk-evm-ntt": "1.0.0", + "@wormhole-foundation/sdk-solana-ntt": "1.0.0" }, "peerDependencies": { - "@wormhole-foundation/sdk-connect": "^1.0.0" + "@wormhole-foundation/sdk-connect": "^2.1.0", + "axios": "^1.9.0" }, "type": "module", "exports": { diff --git a/sdk/route/src/automatic.ts b/sdk/route/src/automatic.ts index 4d40959a9..20d08afba 100644 --- a/sdk/route/src/automatic.ts +++ b/sdk/route/src/automatic.ts @@ -17,6 +17,7 @@ import { canonicalAddress, chainToPlatform, finality, + guardians, isAttested, isDestinationQueued, isNative, @@ -118,11 +119,6 @@ export class NttAutomaticRoute ): Promise { const options = params.options ?? this.getDefaultOptions(); - const gasDropoff = amount.parse( - options.gasDropoff ?? "0.0", - request.toChain.config.nativeTokenDecimals - ); - const wrapNative = isNative(request.source.id.address); const parsedAmount = amount.parse(params.amount, request.source.decimals); @@ -147,7 +143,6 @@ export class NttAutomaticRoute options: { queue: false, automatic: true, - gasDropoff: amount.units(gasDropoff), wrapNative, }, }, @@ -200,11 +195,9 @@ export class NttAutomaticRoute fromChain.config.nativeTokenDecimals ), }, - destinationNativeGas: amount.fromBaseUnits( - params.normalizedParams.options.gasDropoff ?? 0n, - toChain.config.nativeTokenDecimals - ), - eta: finality.estimateFinalityTime(request.fromChain.chain), + eta: + finality.estimateFinalityTime(request.fromChain.chain) + + guardians.guardianAttestationEta * 1000, }; const dstNtt = await toChain.getProtocol("Ntt", { ntt: params.normalizedParams.destinationContracts, diff --git a/sdk/route/src/executor/consts.ts b/sdk/route/src/executor/consts.ts new file mode 100644 index 000000000..b074e21b4 --- /dev/null +++ b/sdk/route/src/executor/consts.ts @@ -0,0 +1,20 @@ +import { + Chain, + chainToPlatform, + Network, +} from "@wormhole-foundation/sdk-connect"; + +export const apiBaseUrl: Partial> = { + Mainnet: "https://executor.labsapis.com", + Testnet: "https://executor-testnet.labsapis.com", +}; + +// Referrer addresses (to whom the referrer fee should be paid) +export const getReferrerAddress = (chain: Chain): string | undefined => { + if (chainToPlatform(chain) === "Evm") { + return "0xF11e0efF8b11Ce382645dd75352fC16b3aB3551E"; + } + if (chain === "Solana") { + return "JB3rmygUVuVZzgkxvMdV8mSKLJeQAkSXEK284Dqsziah"; + } +}; diff --git a/sdk/route/src/executor/executor.ts b/sdk/route/src/executor/executor.ts new file mode 100644 index 000000000..3170e0cb6 --- /dev/null +++ b/sdk/route/src/executor/executor.ts @@ -0,0 +1,734 @@ +import { + AttestedTransferReceipt, + Chain, + ChainAddress, + ChainContext, + CompletedTransferReceipt, + DestinationQueuedTransferReceipt, + Network, + RedeemedTransferReceipt, + Signer, + TokenId, + TransactionId, + TransferReceipt as _TransferReceipt, + TransferState, + UniversalAddress, + Wormhole, + WormholeMessageId, + amount, + canonicalAddress, + deserializeLayout, + encoding, + finality, + guardians, + isAttested, + isDestinationQueued, + isFailed, + isRedeemed, + isSourceFinalized, + isSourceInitiated, + nativeTokenId, + routes, + serializeLayout, + signSendWait, + toChainId, +} from "@wormhole-foundation/sdk-connect"; +import "@wormhole-foundation/sdk-definitions-ntt"; +import { NttRoute } from "../types.js"; +import { getReferrerAddress } from "./consts.js"; +import { + calculateReferrerFee, + fetchCapabilities, + fetchSignedQuote, + fetchStatus, + RelayStatus, +} from "./utils.js"; +import { Ntt, NttWithExecutor } from "@wormhole-foundation/sdk-definitions-ntt"; +import { + isNative, + relayInstructionsLayout, + signedQuoteLayout, +} from "@wormhole-foundation/sdk-definitions"; + +export namespace NttExecutorRoute { + export type Config = { + ntt: NttRoute.Config; + // Referrer Fee in *tenths* of basis points - e.g. 10 = 1 basis point (0.01%) + referrerFeeDbps?: bigint; + // token address => overrides + perTokenOverrides?: Record; + }; + + export type Options = { + // 0.0 - 1.0 percentage of the maximum gas drop-off amount + nativeGas?: number; + }; + + export type NormalizedParams = { + amount: amount.Amount; + sourceContracts: Ntt.Contracts; + destinationContracts: Ntt.Contracts; + referrerFeeDbps: bigint; + }; + + export interface ValidatedParams + extends routes.ValidatedTransferParams { + normalizedParams: NormalizedParams; + } + + export type TransferReceipt< + SC extends Chain = Chain, + DC extends Chain = Chain + > = _TransferReceipt & { + params: ValidatedParams; + }; +} + +type Op = NttExecutorRoute.Options; +type Tp = routes.TransferParams; +type Vr = routes.ValidationResult; + +type Vp = NttExecutorRoute.ValidatedParams; + +type Q = routes.Quote; +type QR = routes.QuoteResult; + +type R = NttExecutorRoute.TransferReceipt; + +export function nttExecutorRoute(config: NttExecutorRoute.Config) { + class NttExecutorRouteImpl extends NttExecutorRoute { + static override config = config; + } + return NttExecutorRouteImpl; +} + +export class NttExecutorRoute + extends routes.AutomaticRoute + implements routes.StaticRouteMethods +{ + // executor supports gas drop-off + static NATIVE_GAS_DROPOFF_SUPPORTED: boolean = true; + + // @ts-ignore + // Since we set the config on the static class, access it with this param + // the NttExecutorRoute.config will always be empty + readonly staticConfig: NttExecutorRoute.Config = this.constructor.config; + static config: NttExecutorRoute.Config = { ntt: { tokens: {} } }; + + static meta = { name: "NttExecutorRoute" }; + + static supportedNetworks(): Network[] { + return NttRoute.resolveSupportedNetworks(this.config.ntt); + } + + static supportedChains(network: Network): Chain[] { + return NttRoute.resolveSupportedChains(this.config.ntt, network); + } + + static async supportedSourceTokens( + fromChain: ChainContext + ): Promise { + return NttRoute.resolveSourceTokens(this.config.ntt, fromChain); + } + + static async supportedDestinationTokens( + sourceToken: TokenId, + fromChain: ChainContext, + toChain: ChainContext + ): Promise { + return NttRoute.resolveDestinationTokens( + this.config.ntt, + sourceToken, + fromChain, + toChain + ); + } + + static isProtocolSupported( + chain: ChainContext + ): boolean { + return chain.supportsProtocol("Ntt"); + } + + getDefaultOptions(): Op { + return { + nativeGas: 0, + }; + } + + async validate( + request: routes.RouteTransferRequest, + params: Tp + ): Promise { + const options = params.options ?? this.getDefaultOptions(); + + if ( + options.nativeGas !== undefined && + (options.nativeGas < 0 || options.nativeGas > 1) + ) { + return { + valid: false, + error: new Error("Invalid native gas percentage"), + params, + }; + } + + const parsedAmount = amount.parse(params.amount, request.source.decimals); + + // IMPORTANT: The EVM NttManager will revert if there is dust. This is not the case for Solana, + // but we want to be consistent across chains. + const trimmedAmount = NttRoute.trimAmount( + parsedAmount, + request.destination.decimals + ); + + const { srcContracts, dstContracts } = NttRoute.resolveNttContracts( + this.staticConfig.ntt, + request.source.id, + request.destination.id + ); + + let referrerFeeDbps = this.staticConfig.referrerFeeDbps ?? 0n; + if (this.staticConfig.perTokenOverrides) { + const srcTokenAddress = canonicalAddress(request.source.id); + const override = this.staticConfig.perTokenOverrides[srcTokenAddress]; + if (override) { + referrerFeeDbps = override.referrerFeeDbps; + } + } + + const validatedParams: Vp = { + amount: params.amount, + normalizedParams: { + amount: trimmedAmount, + sourceContracts: srcContracts, + destinationContracts: dstContracts, + referrerFeeDbps, + }, + options, + }; + + return { valid: true, params: validatedParams }; + } + + async quote( + request: routes.RouteTransferRequest, + params: Vp + ): Promise { + const { fromChain, toChain } = request; + + try { + const executorQuote = await this.fetchExecutorQuote(request, params); + + const { remainingAmount, estimatedCost, gasDropOff, expires } = + executorQuote; + + const receivedAmount = amount.scale( + amount.fromBaseUnits(remainingAmount, request.source.decimals), + request.destination.decimals + ); + + const result: QR = { + success: true, + params, + sourceToken: { + token: request.source.id, + amount: params.normalizedParams.amount, + }, + destinationToken: { + token: request.destination.id, + amount: receivedAmount, + }, + relayFee: { + token: nativeTokenId(fromChain.chain), + amount: amount.fromBaseUnits( + estimatedCost, + fromChain.config.nativeTokenDecimals + ), + }, + destinationNativeGas: amount.fromBaseUnits( + gasDropOff, + toChain.config.nativeTokenDecimals + ), + eta: + finality.estimateFinalityTime(request.fromChain.chain) + + guardians.guardianAttestationEta * 1000, + expires, + details: executorQuote, + }; + + const dstNtt = await toChain.getProtocol("Ntt", { + ntt: params.normalizedParams.destinationContracts, + }); + + const duration = await dstNtt.getRateLimitDuration(); + if (duration > 0n) { + const capacity = await dstNtt.getCurrentInboundCapacity( + fromChain.chain + ); + if ( + NttRoute.isCapacityThresholdExceeded( + amount.units(receivedAmount), + capacity + ) + ) { + result.warnings = [ + { + type: "DestinationCapacityWarning", + delayDurationSec: Number(duration), + }, + ]; + } + } + + return result; + } catch (e: unknown) { + return { + success: false, + error: e instanceof Error ? e : new Error(String(e)), + }; + } + } + + async fetchExecutorQuote( + request: routes.RouteTransferRequest, + params: Vp + ): Promise { + const { fromChain, toChain } = request; + + const referrerAddress = getReferrerAddress(fromChain.chain); + if (!referrerAddress) { + throw new Error("No referrer address found"); + } + const referrer = Wormhole.chainAddress(fromChain.chain, referrerAddress); + + const { referrerFee, remainingAmount, referrerFeeDbps } = + calculateReferrerFee( + params.normalizedParams.amount, + params.normalizedParams.referrerFeeDbps, + request.destination.decimals + ); + if (remainingAmount <= 0n) { + throw new Error("Amount after fee <= 0"); + } + + const capabilities = await fetchCapabilities(fromChain.network); + const srcCapabilities = capabilities[toChainId(fromChain.chain)]; + if (!srcCapabilities) { + throw new Error("Unsupported source chain"); + } + + const dstCapabilities = capabilities[toChainId(toChain.chain)]; + if (!dstCapabilities || !dstCapabilities.requestPrefixes.includes("ERN1")) { + throw new Error("Unsupported destination chain"); + } + + const { recipient } = request; + + const dstNttWithExec = await toChain.getProtocol("NttWithExecutor", { + ntt: params.normalizedParams.destinationContracts, + }); + + // Calculate the gas dropOff value + const gasDropOffLimit = BigInt(dstCapabilities.gasDropOffLimit); + const dropOff = + params.options.nativeGas && gasDropOffLimit > 0n + ? (BigInt(Math.round(params.options.nativeGas * 100)) * + gasDropOffLimit) / + 100n + : 0n; + + const { msgValue, gasLimit } = + await dstNttWithExec.estimateMsgValueAndGasLimit(recipient); + + const relayRequests = []; + + // Add the gas instruction + relayRequests.push({ + request: { + type: "GasInstruction" as const, + gasLimit, + msgValue, + }, + }); + + // Add the gas drop-off instruction if applicable + if (dropOff > 0n) { + relayRequests.push({ + request: { + type: "GasDropOffInstruction" as const, + dropOff, + // If the recipient is undefined (e.g. the user hasn’t connected their wallet yet), + // we temporarily use a dummy address to fetch a quote. + // The recipient address is validated later in the `initiate` method, which will throw if it's still missing. + recipient: recipient + ? recipient.address.toUniversalAddress() + : new UniversalAddress(new Uint8Array(32)), + }, + }); + } + + const relayInstructions = serializeLayout(relayInstructionsLayout, { + requests: relayRequests, + }); + + const quote = await fetchSignedQuote( + fromChain.network, + fromChain.chain, + toChain.chain, + encoding.hex.encode(relayInstructions, true) + ); + + if (!quote.estimatedCost) { + throw new Error("No estimated cost"); + } + const estimatedCost = BigInt(quote.estimatedCost); + + const signedQuoteBytes = encoding.hex.decode(quote.signedQuote); + const signedQuote = deserializeLayout(signedQuoteLayout, signedQuoteBytes); + + return { + signedQuote: signedQuoteBytes, + relayInstructions: relayInstructions, + estimatedCost, + payeeAddress: signedQuote.quote.payeeAddress, + referrer, + referrerFee, + remainingAmount, + referrerFeeDbps, + expires: signedQuote.quote.expiryTime, + gasDropOff: dropOff, + }; + } + + async initiate( + request: routes.RouteTransferRequest, + signer: Signer, + quote: Q, + to: ChainAddress + ): Promise { + if (!quote.details) { + throw new Error("Missing quote details"); + } + + const { params, details } = quote; + + const relayInstructions = deserializeLayout( + relayInstructionsLayout, + details.relayInstructions + ); + + // Make sure that the gas drop-off recipient matches the actual recipient + relayInstructions.requests.forEach(({ request }) => { + if ( + request.type === "GasDropOffInstruction" && + !request.recipient.equals(to.address.toUniversalAddress()) + ) { + throw new Error("Gas drop-off recipient does not match"); + } + }); + + const { fromChain } = request; + const sender = Wormhole.parseAddress(signer.chain(), signer.address()); + + const nttWithExec = await fromChain.getProtocol("NttWithExecutor", { + ntt: params.normalizedParams.sourceContracts, + }); + + const ntt = await fromChain.getProtocol("Ntt", { + ntt: params.normalizedParams.sourceContracts, + }); + + const wrapNative = isNative(request.source.id.address); + + const initXfer = nttWithExec.transfer( + sender, + to, + amount.units(params.normalizedParams.amount), + details, + ntt, + wrapNative + ); + const txids = await signSendWait(fromChain, initXfer, signer); + + // Status the transfer immediately before returning + let statusAttempts = 0; + + const statusTransferImmediately = async () => { + while (statusAttempts < 20) { + try { + const [txStatus] = await fetchStatus( + fromChain.network, + txids.at(-1)!.txid, + fromChain.chain + ); + + if (txStatus) { + break; + } + } catch (_) { + // is ok we just try again! + } + statusAttempts++; + await new Promise((resolve) => setTimeout(resolve, 2000)); + } + }; + + // Spawn a loop in the background that will status this transfer until + // the API gives a successful response. We don't await the result + // here because we don't need it for the return value. + statusTransferImmediately(); + + return { + from: fromChain.chain, + to: to.chain, + state: TransferState.SourceInitiated, + originTxs: txids, + params, + }; + } + + async complete(signer: Signer, receipt: R): Promise { + if (!isAttested(receipt) && !isFailed(receipt)) { + if (isRedeemed(receipt)) return receipt; + throw new Error( + "The source must be finalized in order to complete the transfer" + ); + } + + if (!receipt.attestation) { + throw new Error("No attestation found for the transfer"); + } + + const toChain = this.wh.getChain(receipt.to); + const ntt = await toChain.getProtocol("Ntt", { + ntt: receipt.params.normalizedParams.destinationContracts, + }); + const sender = Wormhole.parseAddress(signer.chain(), signer.address()); + const completeXfer = ntt.redeem([receipt.attestation.attestation], sender); + + const txids = await signSendWait(toChain, completeXfer, signer); + return { + ...receipt, + state: TransferState.DestinationInitiated, + attestation: receipt.attestation, + destinationTxs: txids, + }; + } + + async resume(tx: TransactionId): Promise { + const vaa = await this.wh.getVaa(tx.txid, "Ntt:WormholeTransfer"); + if (!vaa) throw new Error("No VAA found for transaction: " + tx.txid); + + const msgId: WormholeMessageId = { + chain: vaa.emitterChain, + emitter: vaa.emitterAddress, + sequence: vaa.sequence, + }; + + const { recipientChain, trimmedAmount } = + vaa.payload["nttManagerPayload"].payload; + + const token = canonicalAddress({ + chain: vaa.emitterChain, + address: vaa.payload["nttManagerPayload"].payload.sourceToken, + }); + const manager = canonicalAddress({ + chain: vaa.emitterChain, + address: vaa.payload["sourceNttManager"], + }); + const whTransceiver = + vaa.emitterChain === "Solana" + ? manager + : canonicalAddress({ + chain: vaa.emitterChain, + address: vaa.emitterAddress, + }); + + const dstInfo = NttRoute.resolveDestinationNttContracts( + this.staticConfig.ntt, + { + chain: vaa.emitterChain, + address: vaa.payload["sourceNttManager"], + }, + recipientChain + ); + + const amt = amount.fromBaseUnits( + trimmedAmount.amount, + trimmedAmount.decimals + ); + + return { + from: vaa.emitterChain, + to: recipientChain, + state: TransferState.Attested, + originTxs: [tx], + attestation: { + id: msgId, + attestation: vaa, + }, + params: { + amount: amount.display(amt), + options: {}, + normalizedParams: { + amount: amt, + sourceContracts: { + token, + manager, + transceiver: { + wormhole: whTransceiver, + }, + }, + destinationContracts: { + token: dstInfo.token, + manager: dstInfo.manager, + transceiver: { + wormhole: dstInfo.transceiver["wormhole"]!, + }, + }, + referrerFeeDbps: 0n, + }, + }, + }; + } + + // Even though this is an automatic route, the transfer may need to be + // manually finalized if it was queued + async finalize(signer: Signer, receipt: R): Promise { + if (!isDestinationQueued(receipt)) { + throw new Error( + "The transfer must be destination queued in order to finalize" + ); + } + + const { + attestation: { attestation: vaa }, + } = receipt; + + const toChain = this.wh.getChain(receipt.to); + const ntt = await toChain.getProtocol("Ntt", { + ntt: receipt.params.normalizedParams.destinationContracts, + }); + const sender = Wormhole.chainAddress(signer.chain(), signer.address()); + const completeTransfer = ntt.completeInboundQueuedTransfer( + receipt.from, + vaa.payload["nttManagerPayload"], + sender.address + ); + const finalizeTxids = await signSendWait(toChain, completeTransfer, signer); + return { + ...receipt, + state: TransferState.DestinationFinalized, + destinationTxs: [...(receipt.destinationTxs ?? []), ...finalizeTxids], + }; + } + + public override async *track(receipt: R, timeout?: number) { + // First we fetch the attestation (VAA) for the transfer + if (isSourceInitiated(receipt) || isSourceFinalized(receipt)) { + const { txid } = receipt.originTxs.at(-1)!; + const vaa = await this.wh.getVaa(txid, "Ntt:WormholeTransfer", timeout); + if (!vaa) throw new Error("No VAA found for transaction: " + txid); + + const msgId: WormholeMessageId = { + chain: vaa.emitterChain, + emitter: vaa.emitterAddress, + sequence: vaa.sequence, + }; + + receipt = { + ...receipt, + state: TransferState.Attested, + attestation: { + id: msgId, + attestation: vaa, + }, + } satisfies AttestedTransferReceipt as R; + + yield receipt; + } + + const toChain = this.wh.getChain(receipt.to); + const ntt = await toChain.getProtocol("Ntt", { + ntt: receipt.params.normalizedParams.destinationContracts, + }); + + // Check if the relay was successful or failed + if (isAttested(receipt) && !isFailed(receipt)) { + const [txStatus] = await fetchStatus( + this.wh.network, + receipt.originTxs.at(-1)!.txid, + receipt.from + ); + if (!txStatus) throw new Error("No transaction status found"); + + const relayStatus = txStatus.status; + if ( + relayStatus === RelayStatus.Failed || // this could happen if simulation fails + relayStatus === RelayStatus.Underpaid || // only happens if you don't pay at least the costEstimate + relayStatus === RelayStatus.Unsupported || // capabilities check didn't pass + relayStatus === RelayStatus.Aborted // An unrecoverable error indicating the attempt should stop (bad data, pre-flight checks failed, or chain-specific conditions) + ) { + receipt = { + ...receipt, + state: TransferState.Failed, + error: new routes.RelayFailedError( + `Relay failed with status: ${relayStatus}` + ), + }; + yield receipt; + } + } + + // Check if the transfer was redeemed + if (isAttested(receipt) || isFailed(receipt)) { + if (!receipt.attestation) { + throw new Error("No attestation found"); + } + + const { + attestation: { attestation: vaa }, + } = receipt; + + if (await ntt.getIsApproved(vaa)) { + receipt = { + ...receipt, + state: TransferState.DestinationInitiated, + attestation: receipt.attestation, + // TODO: check for destination event transactions to get dest Txids + } satisfies RedeemedTransferReceipt; + yield receipt; + } + } + + if (isRedeemed(receipt) || isDestinationQueued(receipt)) { + const { + attestation: { attestation: vaa }, + } = receipt; + + const queuedTransfer = await ntt.getInboundQueuedTransfer( + vaa.emitterChain, + vaa.payload["nttManagerPayload"] + ); + if (queuedTransfer !== null) { + receipt = { + ...receipt, + state: TransferState.DestinationQueued, + queueReleaseTime: new Date( + queuedTransfer.rateLimitExpiryTimestamp * 1000 + ), + } satisfies DestinationQueuedTransferReceipt; + yield receipt; + } else if (await ntt.getIsExecuted(vaa)) { + receipt = { + ...receipt, + state: TransferState.DestinationFinalized, + } satisfies CompletedTransferReceipt; + yield receipt; + } + } + + yield receipt; + } +} diff --git a/sdk/route/src/executor/utils.ts b/sdk/route/src/executor/utils.ts new file mode 100644 index 000000000..037797233 --- /dev/null +++ b/sdk/route/src/executor/utils.ts @@ -0,0 +1,156 @@ +import { + Chain, + Network, + toChainId, + amount as sdkAmount, +} from "@wormhole-foundation/sdk-base"; +import { SignedQuote } from "@wormhole-foundation/sdk-definitions"; +import axios from "axios"; +import { apiBaseUrl } from "./consts.js"; +import { NttRoute } from "../types.js"; + +export enum RelayStatus { + Pending = "pending", + Failed = "failed", + Unsupported = "unsupported", + Submitted = "submitted", + Underpaid = "underpaid", + Aborted = "aborted", +} + +export type RequestForExecution = { + quoterAddress: `0x${string}`; + amtPaid: string; + dstChain: number; + dstAddr: `0x${string}`; + refundAddr: `0x${string}`; + signedQuoteBytes: `0x${string}`; + requestBytes: `0x${string}`; + relayInstructionsBytes: `0x${string}`; + timestamp: Date; +}; + +export type TxInfo = { + txHash: string; + chainId: number; + blockNumber: string; + blockTime: Date | null; + cost: string; +}; + +export type RelayData = { + id: `0x${string}`; + txHash: string; + chainId: number; + status: string; + estimatedCost: string; + requestForExecution: RequestForExecution; + instruction?: Request; + txs?: TxInfo[]; + indexed_at: Date; +}; + +export enum RequestPrefix { + ERM1 = "ERM1", // MM + ERV1 = "ERV1", // VAA_V1 + ERN1 = "ERN1", // NTT_V1 + ERC1 = "ERC1", // CCTP_V1 + ERC2 = "ERC2", // CCTP_V2 +} + +export type Capabilities = { + requestPrefixes: Array; + gasDropOffLimit: string; + maxGasLimit: string; + maxMsgValue: string; // the maximum msgValue, inclusive of the gasDropOffLimit +}; + +export interface CapabilitiesResponse { + [chainId: string]: Capabilities; +} + +export async function fetchCapabilities( + network: Network +): Promise { + const url = `${apiBaseUrl[network]}/v0/capabilities`; + + try { + const response = await axios.get(url); + return response.data; + } catch (error) { + throw new Error(`Failed to fetch capabilities for network: ${network}.`); + } +} + +export interface QuoteResponse { + signedQuote: `0x${string}`; + estimatedCost?: string; +} + +export async function fetchSignedQuote( + network: Network, + srcChain: Chain, + dstChain: Chain, + relayInstructions: string // TODO: `0x:${string}` +): Promise { + const url = `${apiBaseUrl[network]}/v0/quote`; + + try { + const response = await axios.post(url, { + srcChain: toChainId(srcChain), + dstChain: toChainId(dstChain), + relayInstructions, + }); + return response.data; + } catch (error) { + throw new Error(`Failed to fetch signed quote.`); + } +} + +export interface StatusResponse extends RelayData { + signedQuote: SignedQuote; + estimatedCost: string; +} + +// Fetch Status +export async function fetchStatus( + network: Network, + txHash: string, + chain: Chain +): Promise { + const url = `${apiBaseUrl[network]}/v0/status/tx`; + + try { + const response = await axios.post(url, { + txHash, + chainId: toChainId(chain), + }); + return response.data; + } catch (error) { + throw new Error(`Failed to fetch status for txHash: ${txHash}.`); + } +} + +const MAX_U16 = 65_535n; +export function calculateReferrerFee( + _amount: sdkAmount.Amount, + dBps: bigint, + destinationTokenDecimals: number +): { referrerFee: bigint; remainingAmount: bigint; referrerFeeDbps: bigint } { + if (dBps > MAX_U16) { + throw new Error("dBps exceeds max u16"); + } + const amount = sdkAmount.units(_amount); + let remainingAmount: bigint = amount; + let referrerFee: bigint = 0n; + if (dBps > 0) { + referrerFee = (amount * dBps) / 100_000n; + // The NttManagerWithExecutor trims the fee before subtracting it from the amount + const trimmedFee = NttRoute.trimAmount( + sdkAmount.fromBaseUnits(referrerFee, _amount.decimals), + destinationTokenDecimals + ); + remainingAmount = amount - sdkAmount.units(trimmedFee); + } + return { referrerFee, remainingAmount, referrerFeeDbps: dBps }; +} diff --git a/sdk/route/src/index.ts b/sdk/route/src/index.ts index e355a2515..4f95b888b 100644 --- a/sdk/route/src/index.ts +++ b/sdk/route/src/index.ts @@ -1,3 +1,4 @@ export * from "./types.js"; export * from "./manual.js"; export * from "./automatic.js"; +export * from "./executor/executor.js"; diff --git a/sdk/route/src/manual.ts b/sdk/route/src/manual.ts index 8cbfdb099..1adca6092 100644 --- a/sdk/route/src/manual.ts +++ b/sdk/route/src/manual.ts @@ -24,6 +24,7 @@ import { signSendWait, finality, isNative, + guardians, } from "@wormhole-foundation/sdk-connect"; import "@wormhole-foundation/sdk-definitions-ntt"; import { NttRoute } from "./types.js"; @@ -110,13 +111,6 @@ export class NttManualRoute request.destination.decimals ); - const gasDropoff = amount.units( - amount.parse( - options.gasDropoff ?? "0.0", - request.toChain.config.nativeTokenDecimals - ) - ); - const wrapNative = isNative(request.source.id.address); const { srcContracts, dstContracts } = NttRoute.resolveNttContracts( @@ -134,7 +128,6 @@ export class NttManualRoute options: { queue: false, automatic: false, - gasDropoff, wrapNative, }, }, @@ -163,7 +156,9 @@ export class NttManualRoute token: request.destination.id, amount: dstAmount, }, - eta: finality.estimateFinalityTime(request.fromChain.chain), + eta: + finality.estimateFinalityTime(request.fromChain.chain) + + guardians.guardianAttestationEta * 1000, }; const { fromChain, toChain } = request; const dstNtt = await toChain.getProtocol("Ntt", { diff --git a/sdk/route/src/types.ts b/sdk/route/src/types.ts index 48bfadb8a..6848bd25f 100644 --- a/sdk/route/src/types.ts +++ b/sdk/route/src/types.ts @@ -44,7 +44,6 @@ export namespace NttRoute { /** Options for Per-TransferRequest settings */ export interface Options { automatic: boolean; - gasDropoff?: string; } export const ManualOptions: Options = { @@ -53,7 +52,6 @@ export namespace NttRoute { export const AutomaticOptions: Options = { automatic: true, - gasDropoff: "0.0", }; export type NormalizedParams = { diff --git a/solana/package.json b/solana/package.json index 7a570bc24..ce9802215 100644 --- a/solana/package.json +++ b/solana/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/sdk-solana-ntt", - "version": "0.5.0", + "version": "1.0.0", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/example-native-token-transfers.git" @@ -54,13 +54,13 @@ "@solana/spl-token": "0.4.0", "@solana/web3.js": "^1.95.8", "bn.js": "5.2.1", - "@wormhole-foundation/sdk-definitions-ntt": "0.5.0" + "@wormhole-foundation/sdk-definitions-ntt": "1.0.0" }, "peerDependencies": { - "@wormhole-foundation/sdk-base": "^1.0.0", - "@wormhole-foundation/sdk-definitions": "^1.0.0", - "@wormhole-foundation/sdk-solana": "^1.0.0", - "@wormhole-foundation/sdk-solana-core": "^1.0.0" + "@wormhole-foundation/sdk-base": "^2.1.0", + "@wormhole-foundation/sdk-definitions": "^2.1.0", + "@wormhole-foundation/sdk-solana": "^2.1.0", + "@wormhole-foundation/sdk-solana-core": "^2.1.0" }, "type": "module", "exports": { @@ -75,4 +75,4 @@ } } } -} +} \ No newline at end of file diff --git a/solana/tests/anchor.test.ts b/solana/tests/anchor.test.ts index 9f9cb49e1..e0fc1fefc 100644 --- a/solana/tests/anchor.test.ts +++ b/solana/tests/anchor.test.ts @@ -215,7 +215,7 @@ describe("example-native-token-transfers", () => { sender, amount, receiver, - { queue: false, automatic: false, gasDropoff: 0n }, + { queue: false, automatic: false }, outboxItem ); await signSendWait(ctx, xferTxs, signer); diff --git a/solana/ts/idl/executor/example_ntt_svm_lut.ts b/solana/ts/idl/executor/example_ntt_svm_lut.ts new file mode 100644 index 000000000..b76454853 --- /dev/null +++ b/solana/ts/idl/executor/example_ntt_svm_lut.ts @@ -0,0 +1,151 @@ +export type ExampleNttSvmLut = { + version: "0.1.0"; + name: "example_ntt_svm_lut"; + instructions: [ + { + name: "initializeLut"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "nttProgramId"; + isMut: false; + isSigner: false; + }, + { + name: "nttConfig"; + isMut: false; + isSigner: false; + }, + { + name: "authority"; + isMut: false; + isSigner: false; + }, + { + name: "lutAddress"; + isMut: true; + isSigner: false; + }, + { + name: "lut"; + isMut: true; + isSigner: false; + }, + { + name: "lutProgram"; + isMut: false; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "recentSlot"; + type: "u64"; + } + ]; + } + ]; + accounts: [ + { + name: "LUT"; + type: { + kind: "struct"; + fields: [ + { + name: "bump"; + type: "u8"; + }, + { + name: "address"; + type: "publicKey"; + } + ]; + }; + } + ]; +}; + +export const ExampleNttSvmLutIdl: ExampleNttSvmLut = { + version: "0.1.0", + name: "example_ntt_svm_lut", + instructions: [ + { + name: "initializeLut", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "nttProgramId", + isMut: false, + isSigner: false, + }, + { + name: "nttConfig", + isMut: false, + isSigner: false, + }, + { + name: "authority", + isMut: false, + isSigner: false, + }, + { + name: "lutAddress", + isMut: true, + isSigner: false, + }, + { + name: "lut", + isMut: true, + isSigner: false, + }, + { + name: "lutProgram", + isMut: false, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "recentSlot", + type: "u64", + }, + ], + }, + ], + accounts: [ + { + name: "LUT", + type: { + kind: "struct", + fields: [ + { + name: "bump", + type: "u8", + }, + { + name: "address", + type: "publicKey", + }, + ], + }, + }, + ], +}; diff --git a/solana/ts/idl/executor/example_ntt_with_executor.ts b/solana/ts/idl/executor/example_ntt_with_executor.ts new file mode 100644 index 000000000..02de88666 --- /dev/null +++ b/solana/ts/idl/executor/example_ntt_with_executor.ts @@ -0,0 +1,161 @@ +export type ExampleNttWithExecutor = { + version: "0.1.0"; + name: "example_ntt_with_executor"; + instructions: [ + { + name: "relayNttMesage"; + accounts: [ + { + name: "payer"; + isMut: true; + isSigner: true; + }, + { + name: "payee"; + isMut: true; + isSigner: false; + }, + { + name: "nttProgramId"; + isMut: false; + isSigner: false; + }, + { + name: "nttPeer"; + isMut: false; + isSigner: false; + }, + { + name: "nttMessage"; + isMut: false; + isSigner: false; + }, + { + name: "executorProgram"; + isMut: false; + isSigner: false; + }, + { + name: "systemProgram"; + isMut: false; + isSigner: false; + } + ]; + args: [ + { + name: "args"; + type: { + defined: "relayNttMessageArgs"; + }; + } + ]; + } + ]; + types: [ + { + name: "relayNttMessageArgs"; + type: { + kind: "struct"; + fields: [ + { + name: "recipientChain"; + type: "u16"; + }, + { + name: "execAmount"; + type: "u64"; + }, + { + name: "signedQuoteBytes"; + type: "bytes"; + }, + { + name: "relayInstructions"; + type: "bytes"; + } + ]; + }; + } + ]; +}; + +export const ExampleNttWithExecutorIdl: ExampleNttWithExecutor = { + version: "0.1.0", + name: "example_ntt_with_executor", + instructions: [ + { + name: "relayNttMesage", + accounts: [ + { + name: "payer", + isMut: true, + isSigner: true, + }, + { + name: "payee", + isMut: true, + isSigner: false, + }, + { + name: "nttProgramId", + isMut: false, + isSigner: false, + }, + { + name: "nttPeer", + isMut: false, + isSigner: false, + }, + { + name: "nttMessage", + isMut: false, + isSigner: false, + }, + { + name: "executorProgram", + isMut: false, + isSigner: false, + }, + { + name: "systemProgram", + isMut: false, + isSigner: false, + }, + ], + args: [ + { + name: "args", + type: { + defined: "relayNttMessageArgs", + }, + }, + ], + }, + ], + types: [ + { + name: "relayNttMessageArgs", + type: { + kind: "struct", + fields: [ + { + name: "recipientChain", + type: "u16", + }, + { + name: "execAmount", + type: "u64", + }, + { + name: "signedQuoteBytes", + type: "bytes", + }, + { + name: "relayInstructions", + type: "bytes", + }, + ], + }, + }, + ], +}; diff --git a/solana/ts/sdk/index.ts b/solana/ts/sdk/index.ts index 14430664d..665ba0394 100644 --- a/solana/ts/sdk/index.ts +++ b/solana/ts/sdk/index.ts @@ -1,8 +1,11 @@ import { registerProtocol } from "@wormhole-foundation/sdk-definitions"; import { _platform } from "@wormhole-foundation/sdk-solana"; import { SolanaNtt } from "./ntt.js"; +import { SolanaNttWithExecutor } from "./nttWithExecutor.js"; import "@wormhole-foundation/sdk-definitions-ntt"; registerProtocol(_platform, "Ntt", SolanaNtt); +registerProtocol(_platform, "NttWithExecutor", SolanaNttWithExecutor); export * from "./ntt.js"; +export * from "./nttWithExecutor.js"; diff --git a/solana/ts/sdk/ntt.ts b/solana/ts/sdk/ntt.ts index 6a9dc89ef..833536f9c 100644 --- a/solana/ts/sdk/ntt.ts +++ b/solana/ts/sdk/ntt.ts @@ -48,7 +48,7 @@ import { getNttProgram, getTransceiverProgram, } from "../lib/bindings.js"; -import { NTT, NttQuoter, WEI_PER_GWEI } from "../lib/index.js"; +import { NTT, NttQuoter } from "../lib/index.js"; import { parseVersion } from "../lib/utils.js"; export class SolanaNttWormholeTransceiver< @@ -537,10 +537,7 @@ export class SolanaNtt if (!this.quoter.isRelayEnabled(destination)) throw new Error("Relay not enabled"); - return await this.quoter.quoteDeliveryPrice( - destination, - options.gasDropoff - ); + return await this.quoter.quoteDeliveryPrice(destination, 0n); } static async fromRpc( @@ -579,6 +576,7 @@ export class SolanaNtt async getTokenDecimals(): Promise { const config = await this.getConfig(); return await SolanaPlatform.getDecimals( + this.network, this.chain, this.connection, config.mint @@ -946,8 +944,7 @@ export class SolanaNtt outboxItem.publicKey, destination.chain, Number(fee) / LAMPORTS_PER_SOL, - // NOTE: quoter expects gas dropoff to be in terms of gwei - Number(options.gasDropoff ?? 0n) / WEI_PER_GWEI + 0 ); tx.add(relayIx); } diff --git a/solana/ts/sdk/nttWithExecutor.ts b/solana/ts/sdk/nttWithExecutor.ts new file mode 100644 index 000000000..769cd4a09 --- /dev/null +++ b/solana/ts/sdk/nttWithExecutor.ts @@ -0,0 +1,327 @@ +import { toChainId, type Network } from "@wormhole-foundation/sdk-base"; +import { + type AccountAddress, + type ChainAddress, + type ChainsConfig, + Contracts, + UnsignedTransaction, +} from "@wormhole-foundation/sdk-definitions"; +import { Ntt, NttWithExecutor } from "@wormhole-foundation/sdk-definitions-ntt"; +import { + SolanaPlatform, + type SolanaPlatformType, + type SolanaChains, + SolanaAddress, +} from "@wormhole-foundation/sdk-solana"; +import { + AddressLookupTableAccount, + AddressLookupTableProgram, + Connection, + Keypair, + PublicKey, + SystemProgram, + TransactionMessage, + VersionedTransaction, +} from "@solana/web3.js"; +import { SolanaNtt } from "./ntt.js"; +import { + createAssociatedTokenAccountIdempotentInstruction, + createTransferInstruction, + getAssociatedTokenAddressSync, +} from "@solana/spl-token"; +import { BN, Program } from "@coral-xyz/anchor"; +import { + ExampleNttWithExecutor, + ExampleNttWithExecutorIdl, +} from "../idl/executor/example_ntt_with_executor.js"; +import { + ExampleNttSvmLut, + ExampleNttSvmLutIdl, +} from "../idl/executor/example_ntt_svm_lut.js"; +import { chainToBytes } from "../lib/utils.js"; + +export class SolanaNttWithExecutor + implements NttWithExecutor +{ + readonly nttWithExecutorProgramId: PublicKey; + readonly nttLutProgramId: PublicKey; + readonly executorProgramId: PublicKey; + + constructor( + readonly network: N, + readonly chain: C, + readonly connection: Connection, + readonly contracts: Contracts & { ntt?: Ntt.Contracts } + ) { + this.nttWithExecutorProgramId = new PublicKey( + "nex1gkSWtRBheEJuQZMqHhbMG5A45qPU76KqnCZNVHR" + ); + + this.nttLutProgramId = new PublicKey( + "1uteB5DZdNfns9B12rgGf5msKh1d7FbbkvciWmhsZiC" + ); + + this.executorProgramId = new PublicKey( + "execXUrAsMnqMmTHj5m7N1YQgsDz3cwGLYCYyuDRciV" + ); + } + + static async fromRpc( + connection: Connection, + config: ChainsConfig + ): Promise> { + const [network, chain] = await SolanaPlatform.chainFromRpc(connection); + const conf = config[chain]!; + if (conf.network !== network) + throw new Error(`Network mismatch: ${conf.network} != ${network}`); + + return new SolanaNttWithExecutor( + network as N, + chain, + connection, + conf.contracts + ); + } + + async *transfer( + sender: AccountAddress, + destination: ChainAddress, + amount: bigint, + quote: NttWithExecutor.Quote, + ntt: SolanaNtt, + wrapNative: boolean = false + ): AsyncGenerator> { + const senderPk = new SolanaAddress(sender).unwrap(); + + const options = { queue: false, automatic: false, wrapNative }; + const outboxItem = Keypair.generate(); + + const txs = ntt.transfer( + sender, + quote.remainingAmount, + destination, + options, + outboxItem + ); + + for await (const tx of txs) { + if (tx.description === "Ntt.Transfer") { + const luts: AddressLookupTableAccount[] = []; + try { + luts.push(await ntt.getAddressLookupTable()); + } catch (e: any) { + console.debug(e); + } + + const message = TransactionMessage.decompile( + tx.transaction.transaction.message, + { addressLookupTableAccounts: luts } + ); + + if (quote.referrerFee > 0n) { + const referrer = new PublicKey(quote.referrer.address.toString()); + const { mint } = await ntt.getConfig(); + const referrerAta = getAssociatedTokenAddressSync( + mint, + referrer, + true + ); + const senderAta = getAssociatedTokenAddressSync(mint, senderPk, true); + const referrerAtaAccount = await this.connection.getAccountInfo( + referrerAta + ); + if (!referrerAtaAccount) { + message.instructions.push( + createAssociatedTokenAccountIdempotentInstruction( + senderPk, + referrerAta, + referrer, + mint + ) + ); + } + message.instructions.push( + createTransferInstruction( + senderAta, + referrerAta, + senderPk, + quote.referrerFee + ) + ); + } + + const nttWithExecutorProgram = new Program( + ExampleNttWithExecutorIdl as ExampleNttWithExecutor, + this.nttWithExecutorProgramId, + { connection: this.connection } + ); + + const nttProgramId = new PublicKey(this.contracts.ntt!.manager); + const nttPeer = PublicKey.findProgramAddressSync( + [Buffer.from("peer"), chainToBytes(destination.chain)], + nttProgramId + )[0]; + + message.instructions.push( + await nttWithExecutorProgram.methods + .relayNttMesage({ + execAmount: new BN(quote.estimatedCost.toString()), + recipientChain: toChainId(destination.chain), + signedQuoteBytes: Buffer.from(quote.signedQuote), + relayInstructions: Buffer.from(quote.relayInstructions), + }) + .accounts({ + payer: senderPk, + payee: new PublicKey(quote.payeeAddress), + nttProgramId, + nttPeer, + nttMessage: outboxItem.publicKey, + executorProgram: this.executorProgramId, + }) + .instruction() + ); + + if (luts.length === 0) { + console.debug( + "no manager lookup table found, checking helper program" + ); + const nttSvmLutProgram = new Program( + ExampleNttSvmLutIdl as ExampleNttSvmLut, + this.nttLutProgramId, + { connection: this.connection } + ); + + const lutPointerAddress = PublicKey.findProgramAddressSync( + [Buffer.from("lut"), nttProgramId.toBuffer()], + nttSvmLutProgram.programId + )[0]; + + let lutPointer = + // @ts-ignore + await nttSvmLutProgram.account.lut.fetchNullable(lutPointerAddress); + + if (!lutPointer) { + console.debug( + "no helper program lookup table found, initializing..." + ); + const [nttConfigPDA] = await PublicKey.findProgramAddressSync( + [Buffer.from("config")], + nttProgramId + ); + + const [authorityPDA] = await PublicKey.findProgramAddressSync( + [Buffer.from("lut_authority")], + nttSvmLutProgram.programId + ); + + const recentSlot = + (await this.connection.getSlot("finalized")) - 10; + + const [lutAddressPDA] = await PublicKey.findProgramAddressSync( + [ + authorityPDA.toBuffer(), + new BN(recentSlot).toArrayLike(Buffer, "le", 8), + ], + AddressLookupTableProgram.programId + ); + + const [lutPDA] = await PublicKey.findProgramAddressSync( + [Buffer.from("lut"), nttProgramId.toBuffer()], + nttSvmLutProgram.programId + ); + + const ix = await nttSvmLutProgram.methods + .initializeLut(new BN(recentSlot)) + .accounts({ + nttProgramId, + nttConfig: nttConfigPDA, + authority: authorityPDA, + lutAddress: lutAddressPDA, + lut: lutPDA, + lutProgram: AddressLookupTableProgram.programId, + systemProgram: SystemProgram.programId, + payer: senderPk, + }) + .instruction(); + + const lutInitMessage = new TransactionMessage({ + payerKey: senderPk, + recentBlockhash: ( + await this.connection.getLatestBlockhash("finalized") + ).blockhash, + instructions: [ix], + }).compileToV0Message(); + + yield ntt.createUnsignedTx( + { transaction: new VersionedTransaction(lutInitMessage) }, + "NttSvmLut.InitializeLut" + ); + + console.debug(`initialized lookup table: ${tx}`); + + let retries = 0; + while (!lutPointer && retries < 10) { + // wait for lut to warm up + await new Promise((resolve) => setTimeout(resolve, 2000)); + lutPointer = + // @ts-ignore + await nttSvmLutProgram.account.lut.fetchNullable( + lutPointerAddress + ); + retries++; + } + } + + const response = await this.connection.getAddressLookupTable( + lutPointer.address + ); + if (!response.value) { + throw new Error("unable to fetch lookup table"); + } + luts.push(response.value); + } + + tx.transaction.transaction.message = message.compileToV0Message(luts); + yield tx; + } else { + yield tx; + } + } + } + + static associatedTokenAccountMinRent: bigint | undefined = undefined; + + async estimateMsgValueAndGasLimit( + recipient: ChainAddress | undefined + ): Promise<{ msgValue: bigint; gasLimit: bigint }> { + let msgValue = 0n; + + // These are estimates with some padding, actual values may vary + msgValue += 2n * 5000n + 7n * 5000n + 1_400_000n; // post vaa, 2 sigs + 7 Secp256k1 SigVerify Precompile + 1 sig account rent (59 bytes) + msgValue += 2n * 5000n + 7n * 5000n; // post vaa, 2 signatures + 7 Secp256k1 SigVerify Precompile + msgValue += 5000n + 3_200_000n; // core bridge post vaa account + msgValue += 5000n + 5_000_000n; // receive wormhole message accounts + msgValue += 5000n; // release has no accounts, unless sending to a new ATA + + if (recipient) { + const recipientPk = new PublicKey(recipient.address.toString()); + + const ata = getAssociatedTokenAddressSync( + new SolanaAddress(this.contracts.ntt!.token).unwrap(), + recipientPk, + true + ); + + if ((await this.connection.getAccountInfo(ata)) === null) { + if (!SolanaNttWithExecutor.associatedTokenAccountMinRent) { + SolanaNttWithExecutor.associatedTokenAccountMinRent = BigInt( + await this.connection.getMinimumBalanceForRentExemption(165) // ATA is 165 bytes + ); + } + msgValue += SolanaNttWithExecutor.associatedTokenAccountMinRent; + } + } + + return { msgValue, gasLimit: 250_000n }; + } +} From eec5e3fead96ec15c437f5beb557809cd9402a16 Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Fri, 13 Jun 2025 13:38:18 -0500 Subject: [PATCH 2/7] fix test --- sdk/__tests__/utils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/sdk/__tests__/utils.ts b/sdk/__tests__/utils.ts index 9254c60e7..3004e1bb6 100644 --- a/sdk/__tests__/utils.ts +++ b/sdk/__tests__/utils.ts @@ -244,7 +244,6 @@ export async function transferWithChecks(sourceCtx: Ctx, destinationCtx: Ctx) { const transferTxs = srcNtt.transfer(sender.address, srcAmt, receiver, { queue: false, automatic: useRelayer, - gasDropoff: 0n, }); const txids = await signSendWait(sourceCtx.context, transferTxs, srcSigner); From d6d7d20337fc8d2aab215a1f8a644e64bdba798d Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Mon, 16 Jun 2025 15:49:28 -0500 Subject: [PATCH 3/7] add perTokenOverrides chains key --- sdk/route/src/executor/executor.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sdk/route/src/executor/executor.ts b/sdk/route/src/executor/executor.ts index 3170e0cb6..29bb850a1 100644 --- a/sdk/route/src/executor/executor.ts +++ b/sdk/route/src/executor/executor.ts @@ -55,8 +55,11 @@ export namespace NttExecutorRoute { ntt: NttRoute.Config; // Referrer Fee in *tenths* of basis points - e.g. 10 = 1 basis point (0.01%) referrerFeeDbps?: bigint; - // token address => overrides - perTokenOverrides?: Record; + perTokenOverrides?: { + chain: Chain; + address: string; + referrerFeeDbps: bigint; + }[]; }; export type Options = { @@ -191,7 +194,10 @@ export class NttExecutorRoute let referrerFeeDbps = this.staticConfig.referrerFeeDbps ?? 0n; if (this.staticConfig.perTokenOverrides) { const srcTokenAddress = canonicalAddress(request.source.id); - const override = this.staticConfig.perTokenOverrides[srcTokenAddress]; + const override = this.staticConfig.perTokenOverrides.find( + (o) => + o.chain === request.source.id.chain && o.address === srcTokenAddress + ); if (override) { referrerFeeDbps = override.referrerFeeDbps; } From f9cd34bd8e9bf668094081ebfcbde26937cc3362 Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Tue, 17 Jun 2025 10:08:33 -0500 Subject: [PATCH 4/7] add referrer address to config --- evm/ts/src/nttWithExecutor.ts | 2 +- sdk/definitions/src/nttWithExecutor.ts | 2 +- sdk/route/src/executor/consts.ts | 16 +------- sdk/route/src/executor/executor.ts | 54 ++++++++++++++++---------- solana/ts/sdk/nttWithExecutor.ts | 1 + 5 files changed, 38 insertions(+), 37 deletions(-) diff --git a/evm/ts/src/nttWithExecutor.ts b/evm/ts/src/nttWithExecutor.ts index 70df5e232..2d15141f8 100644 --- a/evm/ts/src/nttWithExecutor.ts +++ b/evm/ts/src/nttWithExecutor.ts @@ -167,7 +167,7 @@ export class EvmNttWithExecutor }; const feeArgs = { dbps: quote.referrerFeeDbps, - payee: quote.referrer.address.toString(), + payee: quote.referrer ? quote.referrer.address.toString() : senderAddress, }; const data = iface.encodeFunctionData("transfer", [ diff --git a/sdk/definitions/src/nttWithExecutor.ts b/sdk/definitions/src/nttWithExecutor.ts index 8dbb84f5a..ac3579a0d 100644 --- a/sdk/definitions/src/nttWithExecutor.ts +++ b/sdk/definitions/src/nttWithExecutor.ts @@ -13,7 +13,7 @@ export namespace NttWithExecutor { relayInstructions: Uint8Array; // The relay instructions for the transfer estimatedCost: bigint; // The estimated cost of the transfer in native token base units payeeAddress: Uint8Array; // The wallet address on the source chain, designated by the Quoter, to receive funds when requesting an execution - referrer: ChainAddress; // The referrer address (to whom the referrer fee should be paid) + referrer?: ChainAddress; // The referrer address (to whom the referrer fee should be paid, undefined when fee is 0) referrerFee: bigint; // The referrer fee in NTT token base units remainingAmount: bigint; // The remaining amount after the referrer fee in NTT token base units referrerFeeDbps: bigint; // The referrer fee in *tenths* of basis points diff --git a/sdk/route/src/executor/consts.ts b/sdk/route/src/executor/consts.ts index b074e21b4..646333f05 100644 --- a/sdk/route/src/executor/consts.ts +++ b/sdk/route/src/executor/consts.ts @@ -1,20 +1,6 @@ -import { - Chain, - chainToPlatform, - Network, -} from "@wormhole-foundation/sdk-connect"; +import { Network } from "@wormhole-foundation/sdk-connect"; export const apiBaseUrl: Partial> = { Mainnet: "https://executor.labsapis.com", Testnet: "https://executor-testnet.labsapis.com", }; - -// Referrer addresses (to whom the referrer fee should be paid) -export const getReferrerAddress = (chain: Chain): string | undefined => { - if (chainToPlatform(chain) === "Evm") { - return "0xF11e0efF8b11Ce382645dd75352fC16b3aB3551E"; - } - if (chain === "Solana") { - return "JB3rmygUVuVZzgkxvMdV8mSKLJeQAkSXEK284Dqsziah"; - } -}; diff --git a/sdk/route/src/executor/executor.ts b/sdk/route/src/executor/executor.ts index 29bb850a1..387f7f40b 100644 --- a/sdk/route/src/executor/executor.ts +++ b/sdk/route/src/executor/executor.ts @@ -32,10 +32,11 @@ import { serializeLayout, signSendWait, toChainId, + Platform, + chainToPlatform, } from "@wormhole-foundation/sdk-connect"; import "@wormhole-foundation/sdk-definitions-ntt"; import { NttRoute } from "../types.js"; -import { getReferrerAddress } from "./consts.js"; import { calculateReferrerFee, fetchCapabilities, @@ -53,13 +54,17 @@ import { export namespace NttExecutorRoute { export type Config = { ntt: NttRoute.Config; + referrerFee?: ReferrerFeeConfig; + }; + + export type ReferrerFeeConfig = { // Referrer Fee in *tenths* of basis points - e.g. 10 = 1 basis point (0.01%) - referrerFeeDbps?: bigint; - perTokenOverrides?: { - chain: Chain; - address: string; - referrerFeeDbps: bigint; - }[]; + feeDbps: bigint; + // The address to which the referrer fee will be sent + referrerAddresses: Partial>; + perTokenOverrides?: Partial< + Record> + >; }; export type Options = { @@ -191,15 +196,18 @@ export class NttExecutorRoute request.destination.id ); - let referrerFeeDbps = this.staticConfig.referrerFeeDbps ?? 0n; - if (this.staticConfig.perTokenOverrides) { - const srcTokenAddress = canonicalAddress(request.source.id); - const override = this.staticConfig.perTokenOverrides.find( - (o) => - o.chain === request.source.id.chain && o.address === srcTokenAddress - ); - if (override) { - referrerFeeDbps = override.referrerFeeDbps; + let referrerFeeDbps = 0n; + if (this.staticConfig.referrerFee) { + referrerFeeDbps = this.staticConfig.referrerFee.feeDbps; + if (this.staticConfig.referrerFee.perTokenOverrides) { + const srcTokenAddress = canonicalAddress(request.source.id); + const override = + this.staticConfig.referrerFee.perTokenOverrides[ + request.source.id.chain + ]?.[srcTokenAddress]; + if (override) { + referrerFeeDbps = override.referrerFeeDbps; + } } } @@ -302,11 +310,17 @@ export class NttExecutorRoute ): Promise { const { fromChain, toChain } = request; - const referrerAddress = getReferrerAddress(fromChain.chain); - if (!referrerAddress) { - throw new Error("No referrer address found"); + let referrer: ChainAddress | undefined = undefined; + const referrerFeeConfig = this.staticConfig.referrerFee; + if (referrerFeeConfig && referrerFeeConfig.feeDbps > 0n) { + const platform = chainToPlatform(fromChain.chain); + const referrerAddress = + referrerFeeConfig.referrerAddresses?.[platform] ?? ""; + if (!referrerAddress) { + throw new Error("No referrer address found"); + } + referrer = Wormhole.chainAddress(fromChain.chain, referrerAddress); } - const referrer = Wormhole.chainAddress(fromChain.chain, referrerAddress); const { referrerFee, remainingAmount, referrerFeeDbps } = calculateReferrerFee( diff --git a/solana/ts/sdk/nttWithExecutor.ts b/solana/ts/sdk/nttWithExecutor.ts index 769cd4a09..4954237d0 100644 --- a/solana/ts/sdk/nttWithExecutor.ts +++ b/solana/ts/sdk/nttWithExecutor.ts @@ -119,6 +119,7 @@ export class SolanaNttWithExecutor ); if (quote.referrerFee > 0n) { + if (!quote.referrer) throw new Error("referrer is required"); const referrer = new PublicKey(quote.referrer.address.toString()); const { mint } = await ntt.getConfig(); const referrerAta = getAssociatedTokenAddressSync( From 05736050b4cd250dd1c2116a65459a5960f21eaf Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Tue, 17 Jun 2025 10:39:15 -0500 Subject: [PATCH 5/7] referrer address defaults --- evm/ts/src/nttWithExecutor.ts | 2 +- sdk/definitions/src/nttWithExecutor.ts | 2 +- sdk/route/src/executor/consts.ts | 21 ++++++++++++++++++++- sdk/route/src/executor/executor.ts | 12 ++++++------ solana/ts/sdk/nttWithExecutor.ts | 1 - 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/evm/ts/src/nttWithExecutor.ts b/evm/ts/src/nttWithExecutor.ts index 2d15141f8..70df5e232 100644 --- a/evm/ts/src/nttWithExecutor.ts +++ b/evm/ts/src/nttWithExecutor.ts @@ -167,7 +167,7 @@ export class EvmNttWithExecutor }; const feeArgs = { dbps: quote.referrerFeeDbps, - payee: quote.referrer ? quote.referrer.address.toString() : senderAddress, + payee: quote.referrer.address.toString(), }; const data = iface.encodeFunctionData("transfer", [ diff --git a/sdk/definitions/src/nttWithExecutor.ts b/sdk/definitions/src/nttWithExecutor.ts index ac3579a0d..8dbb84f5a 100644 --- a/sdk/definitions/src/nttWithExecutor.ts +++ b/sdk/definitions/src/nttWithExecutor.ts @@ -13,7 +13,7 @@ export namespace NttWithExecutor { relayInstructions: Uint8Array; // The relay instructions for the transfer estimatedCost: bigint; // The estimated cost of the transfer in native token base units payeeAddress: Uint8Array; // The wallet address on the source chain, designated by the Quoter, to receive funds when requesting an execution - referrer?: ChainAddress; // The referrer address (to whom the referrer fee should be paid, undefined when fee is 0) + referrer: ChainAddress; // The referrer address (to whom the referrer fee should be paid) referrerFee: bigint; // The referrer fee in NTT token base units remainingAmount: bigint; // The remaining amount after the referrer fee in NTT token base units referrerFeeDbps: bigint; // The referrer fee in *tenths* of basis points diff --git a/sdk/route/src/executor/consts.ts b/sdk/route/src/executor/consts.ts index 646333f05..52768ca58 100644 --- a/sdk/route/src/executor/consts.ts +++ b/sdk/route/src/executor/consts.ts @@ -1,6 +1,25 @@ -import { Network } from "@wormhole-foundation/sdk-connect"; +import { + Chain, + ChainAddress, + chainToPlatform, + Network, + Wormhole, +} from "@wormhole-foundation/sdk-connect"; export const apiBaseUrl: Partial> = { Mainnet: "https://executor.labsapis.com", Testnet: "https://executor-testnet.labsapis.com", }; + +// Referrer addresses (to whom the referrer fee should be paid) +export const getDefaultReferrerAddress = (chain: Chain): ChainAddress => { + let address = ""; + if (chainToPlatform(chain) === "Evm") { + address = "0xF11e0efF8b11Ce382645dd75352fC16b3aB3551E"; + } else if (chain === "Solana") { + address = "JB3rmygUVuVZzgkxvMdV8mSKLJeQAkSXEK284Dqsziah"; + } else { + throw new Error(`No referrer address for chain ${chain}`); + } + return Wormhole.chainAddress(chain, address); +}; diff --git a/sdk/route/src/executor/executor.ts b/sdk/route/src/executor/executor.ts index 387f7f40b..dacef5547 100644 --- a/sdk/route/src/executor/executor.ts +++ b/sdk/route/src/executor/executor.ts @@ -50,6 +50,7 @@ import { relayInstructionsLayout, signedQuoteLayout, } from "@wormhole-foundation/sdk-definitions"; +import { getDefaultReferrerAddress } from "./consts.js"; export namespace NttExecutorRoute { export type Config = { @@ -310,16 +311,15 @@ export class NttExecutorRoute ): Promise { const { fromChain, toChain } = request; - let referrer: ChainAddress | undefined = undefined; + let referrer = getDefaultReferrerAddress(fromChain.chain); const referrerFeeConfig = this.staticConfig.referrerFee; - if (referrerFeeConfig && referrerFeeConfig.feeDbps > 0n) { + if (referrerFeeConfig) { const platform = chainToPlatform(fromChain.chain); - const referrerAddress = + let referrerAddress = referrerFeeConfig.referrerAddresses?.[platform] ?? ""; - if (!referrerAddress) { - throw new Error("No referrer address found"); + if (referrerAddress) { + referrer = Wormhole.chainAddress(fromChain.chain, referrerAddress); } - referrer = Wormhole.chainAddress(fromChain.chain, referrerAddress); } const { referrerFee, remainingAmount, referrerFeeDbps } = diff --git a/solana/ts/sdk/nttWithExecutor.ts b/solana/ts/sdk/nttWithExecutor.ts index 4954237d0..769cd4a09 100644 --- a/solana/ts/sdk/nttWithExecutor.ts +++ b/solana/ts/sdk/nttWithExecutor.ts @@ -119,7 +119,6 @@ export class SolanaNttWithExecutor ); if (quote.referrerFee > 0n) { - if (!quote.referrer) throw new Error("referrer is required"); const referrer = new PublicKey(quote.referrer.address.toString()); const { mint } = await ntt.getConfig(); const referrerAta = getAssociatedTokenAddressSync( From 92e963d54f3623a5091953e50bf8406f68d02e41 Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Tue, 17 Jun 2025 11:05:05 -0500 Subject: [PATCH 6/7] make referrer addresses optional --- sdk/route/src/executor/executor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/route/src/executor/executor.ts b/sdk/route/src/executor/executor.ts index dacef5547..d93c83f4c 100644 --- a/sdk/route/src/executor/executor.ts +++ b/sdk/route/src/executor/executor.ts @@ -62,7 +62,7 @@ export namespace NttExecutorRoute { // Referrer Fee in *tenths* of basis points - e.g. 10 = 1 basis point (0.01%) feeDbps: bigint; // The address to which the referrer fee will be sent - referrerAddresses: Partial>; + referrerAddresses?: Partial>; perTokenOverrides?: Partial< Record> >; From 980bb0f3920e3526f12eb9dfa5066f61d2aae361 Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Tue, 17 Jun 2025 11:35:05 -0500 Subject: [PATCH 7/7] use const --- sdk/route/src/executor/executor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/route/src/executor/executor.ts b/sdk/route/src/executor/executor.ts index d93c83f4c..c9c51b600 100644 --- a/sdk/route/src/executor/executor.ts +++ b/sdk/route/src/executor/executor.ts @@ -315,7 +315,7 @@ export class NttExecutorRoute const referrerFeeConfig = this.staticConfig.referrerFee; if (referrerFeeConfig) { const platform = chainToPlatform(fromChain.chain); - let referrerAddress = + const referrerAddress = referrerFeeConfig.referrerAddresses?.[platform] ?? ""; if (referrerAddress) { referrer = Wormhole.chainAddress(fromChain.chain, referrerAddress);