Preparing search index...
The search index is not available
Connect SDK - v0.1.7
Connect SDK
@wormhole-foundation/sdk-definitions
testing
mocks
MockPlatform
Class MockPlatform<P>
Type Parameters
P
extends
PlatformName
Hierarchy
MockPlatform
Implements
Platform
<
P
>
Index
Constructors
constructor
Properties
conf
network
platform
Methods
chain
From
Chain
Id
chain
From
Rpc
get
Automatic
Circle
Bridge
get
Automatic
Token
Bridge
get
Balance
get
Balances
get
Chain
get
Circle
Bridge
get
Circle
Relayer
get
Current
Block
get
Decimals
get
Native
Balance
get
Rpc
get
Token
Balance
get
Token
Bridge
get
Token
Decimals
get
Wormhole
Core
get
Wrapped
Asset
is
Native
Token
Id
is
Supported
Chain
native
Token
Id
parse
Address
parse
Transaction
send
Wait
set
Config
Constructors
constructor
new
Mock
Platform
<
P
>
(
network
,
conf
)
:
testing
.
mocks
.
MockPlatform
<
P
>
Type Parameters
P
extends
"Evm"
|
"Solana"
|
"Cosmwasm"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
Parameters
network
:
"Mainnet"
|
"Testnet"
|
"Devnet"
conf
:
ChainsConfig
Returns
testing
.
mocks
.
MockPlatform
<
P
>
Properties
conf
conf
:
ChainsConfig
network
network
:
"Mainnet"
|
"Testnet"
|
"Devnet"
Readonly
platform
platform
:
P
Methods
chain
From
Chain
Id
chain
From
Chain
Id
(
chainId
)
:
[
"Mainnet"
|
"Testnet"
|
"Devnet"
,
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
]
Parameters
chainId
:
string
Returns
[
"Mainnet"
|
"Testnet"
|
"Devnet"
,
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
]
chain
From
Rpc
chain
From
Rpc
(
rpc
)
:
Promise
<
[
"Mainnet"
|
"Testnet"
|
"Devnet"
,
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
]
>
Parameters
rpc
:
any
Returns
Promise
<
[
"Mainnet"
|
"Testnet"
|
"Devnet"
,
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
]
>
get
Automatic
Circle
Bridge
get
Automatic
Circle
Bridge
(
rpc
)
:
Promise
<
AutomaticCircleBridge
<
P
>
>
Parameters
rpc
:
any
Returns
Promise
<
AutomaticCircleBridge
<
P
>
>
get
Automatic
Token
Bridge
get
Automatic
Token
Bridge
(
rpc
)
:
Promise
<
AutomaticTokenBridge
<
P
>
>
Parameters
rpc
:
any
Returns
Promise
<
AutomaticTokenBridge
<
P
>
>
get
Balance
get
Balance
(
chain
,
rpc
,
walletAddr
,
token
)
:
Promise
<
null
|
bigint
>
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
rpc
:
any
walletAddr
:
string
token
:
UniversalAddress
|
"native"
|
NativeAddress
<
P
>
Returns
Promise
<
null
|
bigint
>
get
Balances
get
Balances
(
chain
,
rpc
,
walletAddress
,
tokens
)
:
Promise
<
Balances
>
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
rpc
:
any
walletAddress
:
string
tokens
:
AnyAddress
[]
Returns
Promise
<
Balances
>
get
Chain
get
Chain
(
chain
)
:
ChainContext
<
P
>
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
Returns
ChainContext
<
P
>
get
Circle
Bridge
get
Circle
Bridge
(
rpc
)
:
Promise
<
CircleBridge
<
P
>
>
Parameters
rpc
:
any
Returns
Promise
<
CircleBridge
<
P
>
>
get
Circle
Relayer
get
Circle
Relayer
(
rpc
)
:
Promise
<
AutomaticCircleBridge
<
P
>
>
Parameters
rpc
:
any
Returns
Promise
<
AutomaticCircleBridge
<
P
>
>
get
Current
Block
get
Current
Block
(
rpc
)
:
Promise
<
number
>
Parameters
rpc
:
any
Returns
Promise
<
number
>
get
Decimals
get
Decimals
(
chain
,
rpc
,
token
)
:
Promise
<
bigint
>
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
rpc
:
any
token
:
UniversalAddress
|
"native"
|
NativeAddress
<
P
>
Returns
Promise
<
bigint
>
get
Native
Balance
get
Native
Balance
(
rpc
,
walletAddr
)
:
Promise
<
bigint
>
Parameters
rpc
:
any
walletAddr
:
string
Returns
Promise
<
bigint
>
get
Rpc
get
Rpc
(
chain
)
:
any
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
Returns
any
get
Token
Balance
get
Token
Balance
(
chain
,
rpc
,
walletAddr
,
token
)
:
Promise
<
null
|
bigint
>
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
rpc
:
any
walletAddr
:
string
token
:
TokenId
Returns
Promise
<
null
|
bigint
>
get
Token
Bridge
get
Token
Bridge
(
rpc
)
:
Promise
<
TokenBridge
<
P
>
>
Parameters
rpc
:
any
Returns
Promise
<
TokenBridge
<
P
>
>
get
Token
Decimals
get
Token
Decimals
(
rpc
,
token
)
:
Promise
<
bigint
>
Parameters
rpc
:
any
token
:
TokenId
Returns
Promise
<
bigint
>
get
Wormhole
Core
get
Wormhole
Core
(
rpc
)
:
Promise
<
WormholeCore
<
P
>
>
Parameters
rpc
:
any
Returns
Promise
<
WormholeCore
<
P
>
>
get
Wrapped
Asset
get
Wrapped
Asset
(
chain
,
rpc
,
token
)
:
Promise
<
null
|
TokenId
>
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
rpc
:
any
token
:
TokenId
Returns
Promise
<
null
|
TokenId
>
is
Native
Token
Id
is
Native
Token
Id
(
chain
,
tokenId
)
:
boolean
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
tokenId
:
TokenId
Returns
boolean
is
Supported
Chain
is
Supported
Chain
(
chain
)
:
boolean
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
Returns
boolean
native
Token
Id
native
Token
Id
(
chain
)
:
TokenId
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
Returns
TokenId
parse
Address
parse
Address
(
chain
,
address
)
:
NativeAddress
<
P
>
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
address
:
string
Returns
NativeAddress
<
P
>
parse
Transaction
parse
Transaction
(
chain
,
rpc
,
txid
)
:
Promise
<
WormholeMessageId
[]
>
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
rpc
:
any
txid
:
string
Returns
Promise
<
WormholeMessageId
[]
>
send
Wait
send
Wait
(
chain
,
rpc
,
stxns
)
:
Promise
<
string
[]
>
Parameters
chain
:
"Solana"
|
"Btc"
|
"Algorand"
|
"Sui"
|
"Aptos"
|
"Near"
|
"Ethereum"
|
"Terra"
|
"Bsc"
|
"Polygon"
|
"Avalanche"
|
"Oasis"
|
"Aurora"
|
"Fantom"
|
"Karura"
|
"Acala"
|
"Klaytn"
|
"Celo"
|
"Moonbeam"
|
"Neon"
|
"Terra2"
|
"Injective"
|
"Osmosis"
|
"Arbitrum"
|
"Optimism"
|
"Gnosis"
|
"Pythnet"
|
"Xpla"
|
"Base"
|
"Sei"
|
"Rootstock"
|
"Wormchain"
|
"Cosmoshub"
|
"Evmos"
|
"Kujira"
|
"Sepolia"
rpc
:
any
stxns
:
any
[]
Returns
Promise
<
string
[]
>
set
Config
set
Config
(
network
,
_conf
)
:
testing
.
mocks
.
MockPlatform
<
P
>
Parameters
network
:
"Mainnet"
|
"Testnet"
|
"Devnet"
_conf
:
ChainsConfig
Returns
testing
.
mocks
.
MockPlatform
<
P
>
Settings
Member Visibility
Protected
Private
Inherited
Theme
OS
Light
Dark
On This Page
constructor
conf
network
platform
chain
From
Chain
Id
chain
From
Rpc
get
Automatic
Circle
Bridge
get
Automatic
Token
Bridge
get
Balance
get
Balances
get
Chain
get
Circle
Bridge
get
Circle
Relayer
get
Current
Block
get
Decimals
get
Native
Balance
get
Rpc
get
Token
Balance
get
Token
Bridge
get
Token
Decimals
get
Wormhole
Core
get
Wrapped
Asset
is
Native
Token
Id
is
Supported
Chain
native
Token
Id
parse
Address
parse
Transaction
send
Wait
set
Config
Connect SDK -
v0.1.7
@wormhole-
foundation/connect-
sdk -
v0.1.7
@wormhole-
foundation/connect-
sdk-
solana -
v0.1.7
@wormhole-
foundation/connect-
sdk-
evm -
v0.1.7
@wormhole-
foundation/connect-
sdk-
cosmwasm -
v0.1.7
@wormhole-
foundation/sdk-
base -
v0.1.7
@wormhole-
foundation/sdk-
definitions -
v0.1.7
Token
Bridge
testing
mocks
Mock
Api
Mock
Chain
Mock
Contracts
Mock
Platform
Mock
Token
Bridge
chain
Factory
mock
Platform
Factory
utils
Chain
Context
Signature
Universal
Address
Address
Automatic
Circle
Bridge
Automatic
Token
Bridge
Circle
Bridge
Gateway
Ibc
Transfer
Msg
Gateway
Msg
Gateway
Transfer
Msg
Gateway
Transfer
With
Payload
Msg
Ibc
Bridge
Ibc
Transfer
Data
Ibc
Transfer
Info
Platform
Platform
Utils
Relayer
Sign
And
Send
Signer
Sign
Only
Signer
Supports
Automatic
Circle
Bridge
Supports
Automatic
Token
Bridge
Supports
Circle
Bridge
Supports
Ibc
Bridge
Supports
Token
Bridge
Supports
Wormhole
Core
Token
Bridge
Unsigned
Transaction
VAA
Wormhole
Core
Any
Address
Balances
Byteish
Chain
Address
Chain
Config
Chains
Config
Circle
Attestation
Circle
Message
Id
Circle
Transfer
Message
Contracts
DistributiveVAA
Extract
Literal
Gateway
Transfer
Details
Ibc
Message
Id
Layout
Literal
Mapped
Platforms
Named
Payloads
Native
Address
Payload
Discriminator
Payload
Literal
ProtocolVAA
Register
Payload
Types
Rpc
Connection
Sequence
Id
Signed
Tx
Signer
Token
Id
Transaction
Id
Tx
Hash
Universal
Or
Native
Wormhole
Message
Id
get
Circle
Attestation
get
Wormhole
Attestation
circle
Message
Layout
Err
Not
Wrapped
blind
Deserialize
Payload
compose
Literal
createVAA
deserialize
deserialize
Circle
Message
deserialize
Payload
gateway
Transfer
Msg
get
Contracts
is
Circle
Message
Id
is
Gateway
Ibc
Transfer
Msg
is
Gateway
Transfer
Details
is
Gateway
Transfer
Msg
is
Gateway
Transfer
With
Payload
Msg
is
Ibc
Message
Id
is
Ibc
Transfer
Info
is
Sign
And
Send
Signer
is
Sign
Only
Signer
is
Signer
is
Token
Id
is
Transaction
Identifier
is
Wormhole
Message
Id
make
Gateway
Transfer
Msg
native
Chain
Address
native
Is
Registered
payload
Discriminator
register
Native
register
Payload
Type
register
Payload
Types
serialize
serialize
Payload
supports
Automatic
Circle
Bridge
supports
Automatic
Token
Bridge
supports
Circle
Bridge
supports
Ibc
Bridge
supports
Token
Bridge
supports
Wormhole
Core
to
Gateway
Msg
to
Native
Generated using
TypeDoc