Optional
config: RecursivePartial<WormholeConfig<"Mainnet" | "Testnet" | "Devnet", "Solana" | "Algorand" | "Near" | "Sui" | "Aptos" | "Btc" | "Evm" | "Cosmwasm">>Protected
_chainsProtected
Readonly
_networkProtected
_platformsReadonly
configthe amount to transfer
the address to transfer from
the address to transfer to
whether to use automatic delivery
Optional
payload: Uint8Arraythe payload to send with the transfer
Optional
nativeGas: bigintthe amount of native gas to send with the transfer
the CircleTransfer object
Errors if the chain or protocol is not supported
Fetches the balance of a given token for a wallet
The chain name or id
The wallet address
The token balance of the wormhole asset as a BigNumber
Returns the chain "context", i.e. the class with chain-specific logic and methods
the chain name
the chain context class
Errors if context is not found
Gets the CircleAttestation corresponding to the message hash logged in the transfer transaction.
The keccak256 hash of the message emitted by the circle contract
The total amount of time to wait for the VAA to be available
The CircleAttestation as a string, if available
Errors if the CircleAttestation is not available after the retries
Gets the contract addresses for a given chain
the chain name or chain id
the contract addresses
Gets the number of decimals for a token on a given chain
The chain name or id of the token/representation
The token address
The number of decimals
Taking a the original TokenId for some wrapped token chain These are the Wormhole wrapped token addresses, not necessarily the cannonical version of that token
The Original TokenId corresponding to the token id passed,
Errors if the chain is not supported or the token does not exist
Returns the platform object, i.e. the class with platform-specific logic and methods
the platform context class
Errors if platform is not found
Gets the associated token account for chains that require it (only Solana currently).
the address of the primary account that may require a separate token account
the TokenId of the token to get the token account for
Get the status of a transaction, identified by the chain, emitter address, and sequence number
the message id for the Wormhole Message to get transaction status for
the TransactionStatus
Get recent transactions for an address
the string formatted address to get transactions for
the TransactionStatus
Gets a VAA from the API or Guardian RPC, finality must be met before the VAA will be available.
The WormholeMessageId corresponding to the VAA to be fetched
The VAA type to decode the bytes as
The total amount of time to wait for the VAA to be available
The VAA if available
Errors if the VAA is not available after the retries
Gets a VAA from the API or Guardian RPC, finality must be met before the VAA will be available.
The Transaction Hash corresponding to the transaction that cause the wormhole core contract to emit a vaa
The VAA type to decode the bytes as
The total amount of time to wait for the VAA to be available
The VAA if available
Errors if the VAA is not available after the retries
Gets the Raw VAA Bytes from the API or Guardian RPC, finality must be met before the VAA will be available.
The WormholeMessageId corresponding to the VAA to be fetched
The total amount of time to wait for the VAA to be available
The VAA bytes if available
Errors if the VAA is not available after the retries
Gets the TokenId for a token representation on any chain These are the Wormhole wrapped token addresses, not necessarily the cannonical version of that token
The chain name or id to get the wrapped token address
The TokenId on the given chain, null if it does not exist
Errors if the chain is not supported or the token does not exist
Creates a TokenTransfer object to move a token from one chain to another
the token to transfer
the amount to transfer
the address to transfer from
the address to transfer to
whether to use automatic delivery
Optional
payload: Uint8Arraythe payload to send with the transfer
Optional
nativeGas: bigintthe amount of native gas to send with the transfer
the TokenTransfer object
Errors if the chain or protocol is not supported
Static
chainParse an address from its canonincal string format to a NativeAddress
The chain the address is for
The native address in canonical string format
The ChainAddress
Static
parseParse an address from its canonincal string format to a NativeAddress
The chain the address is for
The address in canonical string format
The address in the NativeAddress format
Static
parseParses all relevant information from a transaction given the sending tx hash and sending chain
The sending chain name or context
The parsed WormholeMessageId
Generated using TypeDoc
Creates a CircleTransfer object to move Native USDC from one chain to another