# Class CosmwasmPlatform<N>

#### Type Parameters

- #### N extends Network

#### Hierarchy

- PlatformContext<N, CosmwasmPlatformType>
  - CosmwasmPlatform

- Defined in platforms/cosmwasm/src/platform.ts:35

#####
Index

### Constructors

constructor

### Properties

config
network
_platform

### Methods

getChain
getProtocol
getRpc
parseWormholeMessages
utils
chainFromChainId
chainFromRpc
getBalance
getBalances
getCounterpartyChannel
getDecimals
getIbcChannels
getLatestBlock
getLatestFinalizedBlock
getNativeDenom
getQueryClient
isNativeTokenId
isSupportedChain
nativeTokenId
sendWait

## Constructors

### constructor

- new CosmwasmPlatform<N>(network, _config?): CosmwasmPlatform<N>

- #### Type Parameters

  - #### N extends "Mainnet" | "Testnet" | "Devnet"

  #### Parameters

  - ##### network: N

  - ##### `Optional` _config: ChainsConfig<N, "Cosmwasm">

  #### Returns CosmwasmPlatform<N>

  Overrides PlatformContext.constructor

  - Defined in platforms/cosmwasm/src/platform.ts:38

## Properties

### `Readonly` config

config: ChainsConfig<N, "Cosmwasm">

Inherited from PlatformContext.config

- Defined in core/definitions/dist/esm/platform.d.ts:24

### `Readonly` network

network: N

Inherited from PlatformContext.network

- Defined in core/definitions/dist/esm/platform.d.ts:23

### `Static` _platform

_platform: "Cosmwasm" = _platform

- Defined in platforms/cosmwasm/src/platform.ts:36

## Methods

### getChain

- getChain<C>(chain, rpc?): CosmwasmChain<N, C>

- #### Type Parameters

  - #### C extends "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"

  #### Parameters

  - ##### chain: C

  - ##### `Optional` rpc: CosmWasmClient

  #### Returns CosmwasmChain<N, C>

  Overrides PlatformContext.getChain

  - Defined in platforms/cosmwasm/src/platform.ts:54

### getProtocol

- getProtocol<PN, T>(protocol, rpc): Promise<T>

- #### Type Parameters

  - #### PN extends "WormholeCore" | "TokenBridge" | "AutomaticTokenBridge" | "CircleBridge" | "AutomaticCircleBridge" | "Relayer" | "IbcBridge" | "NftBridge"

  - #### T

  #### Parameters

  - ##### protocol: PN

  - ##### rpc: any

  #### Returns Promise<T>

  Inherited from PlatformContext.getProtocol

  - Defined in core/definitions/dist/esm/platform.d.ts:29

### getRpc

- getRpc<C>(chain): Promise<CosmWasmClient>

- #### Type Parameters

  - #### C extends "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"

  #### Parameters

  - ##### chain: C

  #### Returns Promise<CosmWasmClient>

  Overrides PlatformContext.getRpc

  - Defined in platforms/cosmwasm/src/platform.ts:49

### parseWormholeMessages

- parseWormholeMessages<C>(chain, rpc, txid): Promise<WormholeMessageId[]>

- #### Type Parameters

  - #### C extends "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"

  #### Parameters

  - ##### chain: C

  - ##### rpc: any

  - ##### txid: string

  #### Returns Promise<WormholeMessageId[]>

  Inherited from PlatformContext.parseWormholeMessages

  - Defined in core/definitions/dist/esm/platform.d.ts:30

### utils

- utils(): PlatformUtils<N, "Cosmwasm">

- #### Returns PlatformUtils<N, "Cosmwasm">

  Inherited from PlatformContext.utils

  - Defined in core/definitions/dist/esm/platform.d.ts:26

### `Static` chainFromChainId

- chainFromChainId(chainMoniker): ["Mainnet" | "Testnet" | "Devnet", "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"]

- #### Parameters

  - ##### chainMoniker: string

  #### Returns ["Mainnet" | "Testnet" | "Devnet", "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"]

  - Defined in platforms/cosmwasm/src/platform.ts:169

### `Static` chainFromRpc

- chainFromRpc(rpc): Promise<["Mainnet" | "Testnet" | "Devnet", "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"]>

- #### Parameters

  - ##### rpc: CosmWasmClient

  #### Returns Promise<["Mainnet" | "Testnet" | "Devnet", "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"]>

  - Defined in platforms/cosmwasm/src/platform.ts:181

### `Static` getBalance

- getBalance<C>(chain, rpc, walletAddress, token): Promise<bigint>

- #### Type Parameters

  - #### C extends "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"

  #### Parameters

  - ##### chain: C

  - ##### rpc: CosmWasmClient

  - ##### walletAddress: string

  - ##### token: AnyCosmwasmAddress

  #### Returns Promise<bigint>

  - Defined in platforms/cosmwasm/src/platform.ts:108

### `Static` getBalances

- getBalances<C>(chain, rpc, walletAddress, tokens): Promise<Balances>

- #### Type Parameters

  - #### C extends "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"

  #### Parameters

  - ##### chain: C

  - ##### rpc: CosmWasmClient

  - ##### walletAddress: string

  - ##### tokens: AnyCosmwasmAddress[]

  #### Returns Promise<Balances>

  - Defined in platforms/cosmwasm/src/platform.ts:125

### `Static` getCounterpartyChannel

- getCounterpartyChannel(sourceChannel, rpc): Promise<string>

- #### Parameters

  - ##### sourceChannel: string

  - ##### rpc: CosmWasmClient

  #### Returns Promise<string>

  - Defined in platforms/cosmwasm/src/platform.ts:186

### `Static` getDecimals

- getDecimals<C>(chain, rpc, token): Promise<bigint>

- #### Type Parameters

  - #### C extends "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"

  #### Parameters

  - ##### chain: C

  - ##### rpc: CosmWasmClient

  - ##### token: AnyCosmwasmAddress

  #### Returns Promise<bigint>

  - Defined in platforms/cosmwasm/src/platform.ts:94

### `Static` getIbcChannels

- getIbcChannels<N, C>(network, chain): Partial<Record<"Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira", string>>

- #### Type Parameters

  - #### N extends "Mainnet" | "Testnet" | "Devnet"

  - #### C extends "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"

  #### Parameters

  - ##### network: N

  - ##### chain: C

  #### Returns Partial<Record<"Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira", string>>

  - Defined in platforms/cosmwasm/src/platform.ts:64

### `Static` getLatestBlock

- getLatestBlock(rpc): Promise<number>

- #### Parameters

  - ##### rpc: CosmWasmClient

  #### Returns Promise<number>

  - Defined in platforms/cosmwasm/src/platform.ts:162

### `Static` getLatestFinalizedBlock

- getLatestFinalizedBlock(rpc): Promise<number>

- #### Parameters

  - ##### rpc: CosmWasmClient

  #### Returns Promise<number>

  - Defined in platforms/cosmwasm/src/platform.ts:165

### `Static` getNativeDenom

- getNativeDenom<N, C>(network, chain): string

- #### Type Parameters

  - #### N extends "Mainnet" | "Testnet" | "Devnet"

  - #### C extends "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"

  #### Parameters

  - ##### network: N

  - ##### chain: C

  #### Returns string

  - Defined in platforms/cosmwasm/src/platform.ts:147

### `Static` getQueryClient

- getQueryClient(rpc): QueryClient & BankExtension & IbcExtension

- #### Parameters

  - ##### rpc: CosmWasmClient

  #### Returns QueryClient & BankExtension & IbcExtension

  - Defined in platforms/cosmwasm/src/platform.ts:59

### `Static` isNativeTokenId

- isNativeTokenId<N, C>(network, chain, tokenId): boolean

- #### Type Parameters

  - #### N extends "Mainnet" | "Testnet" | "Devnet"

  - #### C extends "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"

  #### Parameters

  - ##### network: N

  - ##### chain: C

  - ##### tokenId: TokenId

  #### Returns boolean

  - Defined in platforms/cosmwasm/src/platform.ts:83

### `Static` isSupportedChain

- isSupportedChain(chain): boolean

- #### Parameters

  - ##### chain: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  #### Returns boolean

  - Defined in platforms/cosmwasm/src/platform.ts:78

### `Static` nativeTokenId

- nativeTokenId<C>(network, chain): TokenId<C>

- #### Type Parameters

  - #### C extends "Terra" | "Terra2" | "Injective" | "Osmosis" | "Xpla" | "Sei" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira"

  #### Parameters

  - ##### network: "Mainnet" | "Testnet" | "Devnet"

  - ##### chain: C

  #### Returns TokenId<C>

  - Defined in platforms/cosmwasm/src/platform.ts:73

### `Static` sendWait

- sendWait(chain, rpc, stxns): Promise<string[]>

- #### Parameters

  - ##### chain: "Solana" | "Ethereum" | "Terra" | "Bsc" | "Polygon" | "Avalanche" | "Oasis" | "Algorand" | "Aurora" | "Fantom" | "Karura" | "Acala" | "Klaytn" | "Celo" | "Near" | "Moonbeam" | "Neon" | "Terra2" | "Injective" | "Osmosis" | "Sui" | "Aptos" | "Arbitrum" | "Optimism" | "Gnosis" | "Pythnet" | "Xpla" | "Btc" | "Base" | "Sei" | "Rootstock" | "Wormchain" | "Cosmoshub" | "Evmos" | "Kujira" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky"

  - ##### rpc: CosmWasmClient

  - ##### stxns: any[]

  #### Returns Promise<string[]>

  - Defined in platforms/cosmwasm/src/platform.ts:151

Generated using TypeDoc