diff --git a/VERSION b/VERSION index 935c2875e..629480aae 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.0-beta.8 \ No newline at end of file +0.3.0-beta.9 \ No newline at end of file diff --git a/connect/package.json b/connect/package.json index da476a0e7..848101e93 100644 --- a/connect/package.json +++ b/connect/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -45,7 +45,7 @@ }, "dependencies": { "axios": "^1.4.0", - "@wormhole-foundation/sdk-base": "^0.3.0-beta.8", - "@wormhole-foundation/sdk-definitions": "^0.3.0-beta.8" + "@wormhole-foundation/sdk-base": "^0.3.0-beta.9", + "@wormhole-foundation/sdk-definitions": "^0.3.0-beta.9" } } \ No newline at end of file diff --git a/core/base/package.json b/core/base/package.json index a39c8d719..c89869901 100644 --- a/core/base/package.json +++ b/core/base/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/sdk-base", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" diff --git a/core/definitions/package.json b/core/definitions/package.json index 54ce055f9..0f10237e1 100644 --- a/core/definitions/package.json +++ b/core/definitions/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/sdk-definitions", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -30,6 +30,6 @@ }, "dependencies": { "@noble/hashes": "^1.3.1", - "@wormhole-foundation/sdk-base": "^0.3.0-beta.8" + "@wormhole-foundation/sdk-base": "^0.3.0-beta.9" } } \ No newline at end of file diff --git a/examples/package.json b/examples/package.json index 8876e9e1d..6ea5e960f 100644 --- a/examples/package.json +++ b/examples/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-examples", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -52,18 +52,18 @@ "algosdk": "^2.7.0" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm-core": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm-tokenbridge": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana-tokenbridge": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm-tokenbridge": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm-cctp": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana-cctp": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm-ibc": "^0.3.0-beta.8" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm-core": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm-tokenbridge": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana-tokenbridge": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm-tokenbridge": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm-cctp": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana-cctp": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm-ibc": "^0.3.0-beta.9" } } \ No newline at end of file diff --git a/examples/src/multiTokenBridge.ts b/examples/src/multiTokenBridge.ts deleted file mode 100644 index f1dda618c..000000000 --- a/examples/src/multiTokenBridge.ts +++ /dev/null @@ -1,232 +0,0 @@ -import { - Chain, - Network, - Platform, - TokenId, - TokenTransfer, - TokenTransferProtocol, - TransferReceipt, - Wormhole, - isTokenId, - normalizeAmount, -} from "@wormhole-foundation/connect-sdk"; -import { TransferStuff, getStuff, waitLog } from "./helpers"; -import { inspect } from "util"; - -// Import the platform-specific packages -import { EvmPlatform } from "@wormhole-foundation/connect-sdk-evm"; -import { SolanaPlatform } from "@wormhole-foundation/connect-sdk-solana"; -import { AlgorandPlatform } from "@wormhole-foundation/connect-sdk-algorand"; - -// Register the protocols -import "@wormhole-foundation/connect-sdk-evm-tokenbridge"; -import "@wormhole-foundation/connect-sdk-solana-tokenbridge"; -import "@wormhole-foundation/connect-sdk-algorand-tokenbridge"; - -interface BridgingInputs { - fromChain: Chain; - asset: TokenId | "native"; - quantity: string; - toChain: Chain; - roundTrip?: boolean; - recoverTxId?: string | undefined; -} - -interface BridgingResult extends BridgingInputs { - result: TransferReceipt; -} - -// Use .env.example as a template for your .env file and populate it with secrets -// for funded accounts on the relevant chain+network combos to run the example - -(async function multipleBridges() { - const scenarios: BridgingInputs[] = [ - // Example input set showing all parameters with recoverTxId as optional - // { - // fromChain: "Avalanche", - // asset: Wormhole.chainAddress("Avalanche", "0x3bE4bce46442F5E85c47257145578E724E40cF97"), - // quantity: "0.0001", - // toChain: "Algorand", - // roundTrip: false, - // recoverTxId: "0xa4e0a2c1c994fe3298b5646dfd5ce92596dc1a589f42e241b7f07501a5a5a39f", - // }, - { - fromChain: "Algorand", - asset: "native", - quantity: "0.0001", - toChain: "Solana", - roundTrip: true, - }, - { - fromChain: "Algorand", - asset: Wormhole.chainAddress("Algorand", "10458941"), - quantity: "0.0001", - toChain: "Solana", - roundTrip: true, - }, - { - fromChain: "Solana", - asset: "native", - quantity: "0.0001", - toChain: "Algorand", - roundTrip: true, - }, - { - fromChain: "Solana", - asset: Wormhole.chainAddress("Solana", "3Ftc5hTz9sG4huk79onufGiebJNDMZNL8HYgdMJ9E7JR"), // Wrapped AVAX - quantity: "0.0001", - toChain: "Algorand", - roundTrip: true, - }, - ]; - - // Init Wormhole object, passing config for which network - // to use (e.g. Mainnet/Testnet) and what Platforms to support - const wh = new Wormhole("Testnet", [EvmPlatform, SolanaPlatform, AlgorandPlatform]); - - const results: BridgingResult[] = await Promise.all( - scenarios.map(async (scenario: BridgingInputs) => { - // Grab chain Contexts -- these hold a reference to a cached rpc client - const sendChain = wh.getChain(scenario.fromChain); - const receiveChain = wh.getChain(scenario.toChain); - - // Get signer from local key - // Anything that implements Signer interface (e.g. wrapper around web wallet) should also work - const source = await getStuff(sendChain); - const destination = await getStuff(receiveChain); - - // A TokenId is just a `{chain, address}` pair and an alias for ChainAddress - // The `address` field must be a parsed address. - // You can get a TokenId (or ChainAddress) prepared for you - // by calling the static `chainAddress` method on the Wormhole class. - // e.g. - // const token = Wormhole.chainAddress("Avalanche", "0xd00ae08403B9bbb9124bB305C09058E32C39A48c"); // TokenId<"Avalanche"> - // "Native" is a shortcut to allow transferring the native gas token - const token = scenario.asset; - - // Normalized given token decimals later but can just pass bigints as base units - // Note: The Token bridge will dedust past 8 decimals - // this means any amount specified past that point will be returned - // to the caller - const amount = scenario.quantity; - - // Used to normalize the amount to account for the tokens decimals - const decimals = isTokenId(scenario.asset) - ? await wh.getDecimals(scenario.asset.chain, scenario.asset.address) - : BigInt(sendChain.config.nativeTokenDecimals); - - // With automatic set to true, perform an automatic transfer. This will invoke a relayer - // contract intermediary that knows to pick up the transfers - // With automatic set to false, perform a manual transfer from source to destination - // of the token - // On the destination side, a wrapped version of the token will be minted - // to the address specified in the transfer VAA - const automatic = false; - - // The automatic relayer has the ability to deliver some native gas funds to the destination account - // The amount specified for native gas will be swapped for the native gas token according - // to the swap rate provided by the contract, denominated in native gas tokens - const nativeGas = automatic ? "0.01" : undefined; - - // Set this to the transfer txid of the initiating transaction to recover a token transfer - // and attempt to fetch details about its progress. - const recoverTxid = scenario.recoverTxId; - - // Finally create and perform the transfer given the parameters set above - const xfer = !recoverTxid - ? // Perform the token transfer - await tokenTransfer( - wh, - { - token, - amount: normalizeAmount(amount, decimals), - source, - destination, - delivery: { - automatic, - nativeGas: nativeGas ? normalizeAmount(nativeGas, decimals) : undefined, - }, - }, - scenario.roundTrip, - ) - : // Recover the transfer from the originating txid - await TokenTransfer.from(wh, { - chain: source.chain.chain, - txid: recoverTxid, - }); - - const receipt = await waitLog(wh, xfer); - return { ...scenario, result: receipt }; - }), - ); - - console.log("Results: ", inspect(results, { depth: null })); -})(); - -async function tokenTransfer( - wh: Wormhole, - route: { - token: TokenId | "native"; - amount: bigint; - source: TransferStuff; - destination: TransferStuff; - delivery?: { - automatic: boolean; - nativeGas?: bigint; - }; - payload?: Uint8Array; - }, - roundTrip?: boolean, -): Promise> { - // Create a TokenTransfer object to track the state of - // the transfer over time - const xfer = await wh.tokenTransfer( - route.token, - route.amount, - route.source.address, - route.destination.address, - route.delivery?.automatic ?? false, - route.payload, - route.delivery?.nativeGas, - ); - - const quote = await TokenTransfer.quoteTransfer( - route.source.chain, - route.destination.chain, - xfer.transfer, - ); - console.log("quote: ", inspect(quote, { depth: null })); - - if (xfer.transfer.automatic && quote.destinationToken.amount < 0) - throw "The amount requested is too low to cover the fee and any native gas requested."; - - // 1) Submit the transactions to the source chain, passing a signer to sign any txns - console.log("Starting transfer"); - const srcTxids = await xfer.initiateTransfer(route.source.signer); - console.log(`Started transfer: `, srcTxids); - - // If automatic, we're done - if (route.delivery?.automatic) return xfer; - - // 2) Wait for the VAA to be signed and ready (not required for auto transfer) - console.log("Getting Attestation"); - const attestIds = await xfer.fetchAttestation(60_000); - console.log(`Got Attestation: `, attestIds); - - // 3) Redeem the VAA on the dest chain - console.log("Completing Transfer"); - const destTxids = await xfer.completeTransfer(route.destination.signer); - console.log(`Completed Transfer: `, destTxids); - - // If no need to send back, dip - if (!roundTrip) return xfer; - - const { destinationToken: token } = quote; - return await tokenTransfer(wh, { - ...route, - token: token.token, - amount: token.amount, - source: route.destination, - destination: route.source, - }); -} diff --git a/examples/src/tokenBridge.ts b/examples/src/tokenBridge.ts index 22a798624..3a9ce5edc 100644 --- a/examples/src/tokenBridge.ts +++ b/examples/src/tokenBridge.ts @@ -30,24 +30,27 @@ import "@wormhole-foundation/connect-sdk-algorand-tokenbridge"; // Grab chain Contexts -- these hold a reference to a cached rpc client const sendChain = wh.getChain("Avalanche"); - const rcvChain = wh.getChain("Algorand"); + const rcvChain = wh.getChain("Solana"); // Shortcut to allow transferring native gas token - // const token: TokenId | "native" = "native"; + //const token: TokenId | "native" = "native"; // A TokenId is just a `{chain, address}` pair and an alias for ChainAddress // The `address` field must be a parsed address. // You can get a TokenId (or ChainAddress) prepared for you // by calling the static `chainAddress` method on the Wormhole class. // e.g. - // const token = Wormhole.chainAddress("Solana", "9rU2jFrzA5zDDmt9yR7vEABvXCUNJ1YgGigdTb9oCaTv"); - const token = Wormhole.chainAddress("Avalanche", "0x3bE4bce46442F5E85c47257145578E724E40cF97"); + // wAvax on Solana + // const token = Wormhole.chainAddress("Solana", "3Ftc5hTz9sG4huk79onufGiebJNDMZNL8HYgdMJ9E7JR"); + + // wSol on Avax + const token = Wormhole.chainAddress("Avalanche", "0xb10563644a6AB8948ee6d7f5b0a1fb15AaEa1E03"); // Normalized given token decimals later but can just pass bigints as base units // Note: The Token bridge will dedust past 8 decimals // this means any amount specified past that point will be returned // to the caller - const amount = "0.0001"; + const amount = "0.001"; // With automatic set to true, perform an automatic transfer. This will invoke a relayer // contract intermediary that knows to pick up the transfers diff --git a/package-lock.json b/package-lock.json index 823a38ca7..99ca4aefd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "connect-sdk", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "connect-sdk", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "workspaces": [ "core/base", @@ -50,11 +50,11 @@ }, "connect": { "name": "@wormhole-foundation/connect-sdk", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/sdk-base": "^0.3.0-beta.8", - "@wormhole-foundation/sdk-definitions": "^0.3.0-beta.8", + "@wormhole-foundation/sdk-base": "^0.3.0-beta.9", + "@wormhole-foundation/sdk-definitions": "^0.3.0-beta.9", "axios": "^1.4.0" }, "engines": { @@ -63,7 +63,7 @@ }, "core/base": { "name": "@wormhole-foundation/sdk-base", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@scure/base": "^1.1.3" @@ -71,30 +71,30 @@ }, "core/definitions": { "name": "@wormhole-foundation/sdk-definitions", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "dependencies": { "@noble/hashes": "^1.3.1", - "@wormhole-foundation/sdk-base": "^0.3.0-beta.8" + "@wormhole-foundation/sdk-base": "^0.3.0-beta.9" } }, "examples": { "name": "@wormhole-foundation/connect-sdk-examples", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm-ibc": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm-tokenbridge": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm-cctp": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm-core": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm-tokenbridge": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana-cctp": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana-tokenbridge": "^0.3.0-beta.8" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm-ibc": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm-tokenbridge": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm-cctp": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm-core": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm-tokenbridge": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana-cctp": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana-tokenbridge": "^0.3.0-beta.9" }, "devDependencies": { "algosdk": "^2.7.0", @@ -9527,10 +9527,10 @@ }, "platforms/algorand": { "name": "@wormhole-foundation/connect-sdk-algorand", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", "algosdk": "2.7.0" }, "engines": { @@ -9539,11 +9539,11 @@ }, "platforms/algorand/protocols/core": { "name": "@wormhole-foundation/connect-sdk-algorand-core", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.8" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.9" }, "engines": { "node": ">=16" @@ -9551,12 +9551,12 @@ }, "platforms/algorand/protocols/tokenBridge": { "name": "@wormhole-foundation/connect-sdk-algorand-tokenbridge", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-algorand-core": "^0.3.0-beta.8" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-algorand-core": "^0.3.0-beta.9" }, "engines": { "node": ">=16" @@ -9564,7 +9564,7 @@ }, "platforms/cosmwasm": { "name": "@wormhole-foundation/connect-sdk-cosmwasm", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", @@ -9572,7 +9572,7 @@ "@cosmjs/stargate": "^0.32.0", "@cosmjs/tendermint-rpc": "^0.32.0", "@injectivelabs/sdk-ts": "^1.14.4", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", "cosmjs-types": "^0.9.0" }, "engines": { @@ -9581,13 +9581,13 @@ }, "platforms/cosmwasm/protocols/core": { "name": "@wormhole-foundation/connect-sdk-cosmwasm-core", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/stargate": "^0.32.0", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.9", "cosmjs-types": "^0.9.0" }, "engines": { @@ -9596,14 +9596,14 @@ }, "platforms/cosmwasm/protocols/ibc": { "name": "@wormhole-foundation/connect-sdk-cosmwasm-ibc", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/stargate": "^0.32.0", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.3.0-beta.9", "cosmjs-types": "^0.9.0" }, "engines": { @@ -9612,13 +9612,13 @@ }, "platforms/cosmwasm/protocols/tokenBridge": { "name": "@wormhole-foundation/connect-sdk-cosmwasm-tokenbridge", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/stargate": "^0.32.0", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.9", "cosmjs-types": "^0.9.0" }, "engines": { @@ -9627,11 +9627,11 @@ }, "platforms/evm": { "name": "@wormhole-foundation/connect-sdk-evm", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@typechain/ethers-v6": "^0.4.0", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", "ethers": "^6.5.1", "typechain": "^8.2.0" }, @@ -9695,12 +9695,12 @@ }, "platforms/evm/protocols/cctp": { "name": "@wormhole-foundation/connect-sdk-evm-cctp", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@typechain/ethers-v6": "^0.4.0", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.9", "ethers": "^6.5.1", "typechain": "^8.2.0" }, @@ -9710,12 +9710,12 @@ }, "platforms/evm/protocols/core": { "name": "@wormhole-foundation/connect-sdk-evm-core", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@typechain/ethers-v6": "^0.4.0", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.9", "ethers": "^6.5.1", "typechain": "^8.2.0" }, @@ -9725,13 +9725,13 @@ }, "platforms/evm/protocols/tokenBridge": { "name": "@wormhole-foundation/connect-sdk-evm-tokenbridge", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@typechain/ethers-v6": "^0.4.0", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm-core": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm-core": "^0.3.0-beta.9", "ethers": "^6.5.1", "typechain": "^8.2.0" }, @@ -9741,7 +9741,7 @@ }, "platforms/solana": { "name": "@wormhole-foundation/connect-sdk-solana", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@coral-xyz/borsh": "0.2.6", @@ -9749,7 +9749,7 @@ "@project-serum/borsh": "0.2.5", "@solana/spl-token": "0.3.5", "@solana/web3.js": "1.66.2", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", "lodash": "^4.17.21" }, "devDependencies": { @@ -9761,7 +9761,7 @@ }, "platforms/solana/protocols/cctp": { "name": "@wormhole-foundation/connect-sdk-solana-cctp", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@coral-xyz/borsh": "0.2.6", @@ -9769,9 +9769,9 @@ "@project-serum/borsh": "0.2.5", "@solana/spl-token": "0.3.5", "@solana/web3.js": "1.66.2", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.8" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.9" }, "devDependencies": { "nock": "^13.3.3" @@ -9782,7 +9782,7 @@ }, "platforms/solana/protocols/core": { "name": "@wormhole-foundation/connect-sdk-solana-core", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@coral-xyz/borsh": "0.2.6", @@ -9790,8 +9790,8 @@ "@project-serum/borsh": "0.2.5", "@solana/spl-token": "0.3.5", "@solana/web3.js": "1.66.2", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.9", "lodash": "^4.17.21" }, "devDependencies": { @@ -9804,7 +9804,7 @@ }, "platforms/solana/protocols/tokenBridge": { "name": "@wormhole-foundation/connect-sdk-solana-tokenbridge", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "dependencies": { "@coral-xyz/borsh": "0.2.6", @@ -9812,9 +9812,9 @@ "@project-serum/borsh": "0.2.5", "@solana/spl-token": "0.3.5", "@solana/web3.js": "1.66.2", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.9", "lodash": "^4.17.21" }, "devDependencies": { diff --git a/package.json b/package.json index 08a9cf032..4ec96e9d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "connect-sdk", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "license": "Apache-2.0", "directories": { "test": "__tests__" @@ -63,4 +63,4 @@ "platforms/aptos/protocols/core", "platforms/aptos/protocols/tokenBridge" ] -} +} \ No newline at end of file diff --git a/platforms/algorand/package.json b/platforms/algorand/package.json index 633115244..1e8981b3a 100644 --- a/platforms/algorand/package.json +++ b/platforms/algorand/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-algorand", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -43,7 +43,7 @@ "test": "jest --config ./jest.config.ts" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", "algosdk": "2.7.0" } } \ No newline at end of file diff --git a/platforms/algorand/protocols/core/package.json b/platforms/algorand/protocols/core/package.json index 08d5b60e6..aef29cdba 100644 --- a/platforms/algorand/protocols/core/package.json +++ b/platforms/algorand/protocols/core/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-algorand-core", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -42,7 +42,7 @@ "prettier": "prettier --write ./src" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.8" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.9" } } \ No newline at end of file diff --git a/platforms/algorand/protocols/tokenBridge/package.json b/platforms/algorand/protocols/tokenBridge/package.json index 05085e107..3c3a307aa 100644 --- a/platforms/algorand/protocols/tokenBridge/package.json +++ b/platforms/algorand/protocols/tokenBridge/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-algorand-tokenbridge", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -42,8 +42,8 @@ "prettier": "prettier --write ./src" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-algorand-core": "^0.3.0-beta.8" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-algorand": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-algorand-core": "^0.3.0-beta.9" } } \ No newline at end of file diff --git a/platforms/cosmwasm/package.json b/platforms/cosmwasm/package.json index fc25ec490..ead8f4c4e 100644 --- a/platforms/cosmwasm/package.json +++ b/platforms/cosmwasm/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-cosmwasm", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -50,7 +50,7 @@ "test": "jest --config ./jest.config.ts" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/proto-signing": "^0.32.0", "@cosmjs/stargate": "^0.32.0", diff --git a/platforms/cosmwasm/protocols/core/package.json b/platforms/cosmwasm/protocols/core/package.json index edac69a4d..845c3c21a 100644 --- a/platforms/cosmwasm/protocols/core/package.json +++ b/platforms/cosmwasm/protocols/core/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-cosmwasm-core", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -49,8 +49,8 @@ "prettier": "prettier --write ./src" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.9", "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/stargate": "^0.32.0", "cosmjs-types": "^0.9.0" diff --git a/platforms/cosmwasm/protocols/ibc/package.json b/platforms/cosmwasm/protocols/ibc/package.json index 65547a2a0..5570b8a45 100644 --- a/platforms/cosmwasm/protocols/ibc/package.json +++ b/platforms/cosmwasm/protocols/ibc/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-cosmwasm-ibc", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -52,8 +52,8 @@ "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/stargate": "^0.32.0", "cosmjs-types": "^0.9.0", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.3.0-beta.8" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm-core": "^0.3.0-beta.9" } } \ No newline at end of file diff --git a/platforms/cosmwasm/protocols/tokenBridge/package.json b/platforms/cosmwasm/protocols/tokenBridge/package.json index 6c36a1cfa..0cb82c978 100644 --- a/platforms/cosmwasm/protocols/tokenBridge/package.json +++ b/platforms/cosmwasm/protocols/tokenBridge/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-cosmwasm-tokenbridge", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -52,7 +52,7 @@ "@cosmjs/cosmwasm-stargate": "^0.32.0", "@cosmjs/stargate": "^0.32.0", "cosmjs-types": "^0.9.0", - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.8" + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-cosmwasm": "^0.3.0-beta.9" } } \ No newline at end of file diff --git a/platforms/evm/package.json b/platforms/evm/package.json index 4e912dc30..10b237e48 100644 --- a/platforms/evm/package.json +++ b/platforms/evm/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-evm", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -53,7 +53,7 @@ "nock": "13.3.8" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", "typechain": "^8.2.0", "ethers": "^6.5.1", "@typechain/ethers-v6": "^0.4.0" diff --git a/platforms/evm/protocols/cctp/package.json b/platforms/evm/protocols/cctp/package.json index 1e7c26302..8234b7806 100644 --- a/platforms/evm/protocols/cctp/package.json +++ b/platforms/evm/protocols/cctp/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-evm-cctp", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -49,8 +49,8 @@ "prettier": "prettier --write ./src" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.9", "typechain": "^8.2.0", "ethers": "^6.5.1", "@typechain/ethers-v6": "^0.4.0" diff --git a/platforms/evm/protocols/core/package.json b/platforms/evm/protocols/core/package.json index 2ccfcf7c2..de7883278 100644 --- a/platforms/evm/protocols/core/package.json +++ b/platforms/evm/protocols/core/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-evm-core", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -49,8 +49,8 @@ "prettier": "prettier --write ./src" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.9", "typechain": "^8.2.0", "ethers": "^6.5.1", "@typechain/ethers-v6": "^0.4.0" diff --git a/platforms/evm/protocols/tokenBridge/package.json b/platforms/evm/protocols/tokenBridge/package.json index be5d28d1e..25c6291de 100644 --- a/platforms/evm/protocols/tokenBridge/package.json +++ b/platforms/evm/protocols/tokenBridge/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-evm-tokenbridge", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -49,9 +49,9 @@ "prettier": "prettier --write ./src" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-evm-core": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-evm-core": "^0.3.0-beta.9", "typechain": "^8.2.0", "ethers": "^6.5.1", "@typechain/ethers-v6": "^0.4.0" diff --git a/platforms/solana/package.json b/platforms/solana/package.json index 8b423de28..87f0d972d 100644 --- a/platforms/solana/package.json +++ b/platforms/solana/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-solana", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -46,7 +46,7 @@ "nock": "^13.3.3" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", "@coral-xyz/borsh": "0.2.6", "@project-serum/anchor": "0.25.0", "@project-serum/borsh": "0.2.5", diff --git a/platforms/solana/protocols/cctp/package.json b/platforms/solana/protocols/cctp/package.json index a435debac..990e255d4 100644 --- a/platforms/solana/protocols/cctp/package.json +++ b/platforms/solana/protocols/cctp/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-solana-cctp", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -47,9 +47,9 @@ "nock": "^13.3.3" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.9", "@coral-xyz/borsh": "0.2.6", "@project-serum/anchor": "0.25.0", "@project-serum/borsh": "0.2.5", diff --git a/platforms/solana/protocols/core/package.json b/platforms/solana/protocols/core/package.json index f3fbc2d73..defff076b 100644 --- a/platforms/solana/protocols/core/package.json +++ b/platforms/solana/protocols/core/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-solana-core", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -46,8 +46,8 @@ "nock": "^13.3.3" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.9", "@coral-xyz/borsh": "0.2.6", "@project-serum/anchor": "0.25.0", "@project-serum/borsh": "0.2.5", diff --git a/platforms/solana/protocols/tokenBridge/package.json b/platforms/solana/protocols/tokenBridge/package.json index 8f3f4f72f..631f39b24 100644 --- a/platforms/solana/protocols/tokenBridge/package.json +++ b/platforms/solana/protocols/tokenBridge/package.json @@ -1,6 +1,6 @@ { "name": "@wormhole-foundation/connect-sdk-solana-tokenbridge", - "version": "0.3.0-beta.8", + "version": "0.3.0-beta.9", "repository": { "type": "git", "url": "git+https://github.com/wormhole-foundation/connect-sdk.git" @@ -45,9 +45,9 @@ "nock": "^13.3.3" }, "dependencies": { - "@wormhole-foundation/connect-sdk": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.8", - "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.8", + "@wormhole-foundation/connect-sdk": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana": "^0.3.0-beta.9", + "@wormhole-foundation/connect-sdk-solana-core": "^0.3.0-beta.9", "@coral-xyz/borsh": "0.2.6", "@project-serum/anchor": "0.25.0", "@project-serum/borsh": "0.2.5", diff --git a/platforms/solana/protocols/tokenBridge/src/tokenBridge.ts b/platforms/solana/protocols/tokenBridge/src/tokenBridge.ts index 4253fb880..02dece97c 100644 --- a/platforms/solana/protocols/tokenBridge/src/tokenBridge.ts +++ b/platforms/solana/protocols/tokenBridge/src/tokenBridge.ts @@ -606,7 +606,7 @@ export class SolanaTokenBridge async *redeem( sender: AnySolanaAddress, vaa: TokenBridge.TransferVAA, - unwrapNative: boolean = false, + unwrapNative: boolean = true, ) { const { blockhash } = await SolanaPlatform.latestBlockhash(this.connection); @@ -622,17 +622,19 @@ export class SolanaTokenBridge // Post the VAA if necessary yield* this.coreBridge.postVaa(sender, vaa, blockhash); - // Check if this is native wrapped sol - const wrappedNative = new SolanaAddress(await this.getWrappedNative()); - const isNativeToken = encoding.bytes.equals( - nativeAddress.toUint8Array(), - wrappedNative.toUint8Array(), - ); - // redeem vaa and unwrap to native sol from wrapped sol - if (unwrapNative && isNativeToken) { - yield* this.redeemAndUnwrap(sender, vaa, blockhash); - return; + if (unwrapNative) { + // Check if this is native wrapped sol + const wrappedNative = new SolanaAddress(await this.getWrappedNative()); + if ( + encoding.bytes.equals( + nativeAddress.toUint8Array(), + wrappedNative.toUint8Array(), + ) + ) { + yield* this.redeemAndUnwrap(sender, vaa, blockhash); + return; + } } const senderAddress = new SolanaAddress(sender).unwrap();