# Class ChainContext<N, P, C>`Abstract`

#### Type Parameters

- #### N extends Network

- #### P extends Platform = Platform

- #### C extends Chain = PlatformToChains<P>

#### Hierarchy

- ChainContext
  - testing.mocks.MockChain
  - testing.mocks.MockChain
  - EvmChain
  - SolanaChain
  - CosmwasmChain
  - Gateway

- Defined in definitions/src/chain.ts:20

#####
Index

### Constructors

constructor

### Properties

autoCircleBridge?
autoTokenBridge?
chain
circleBridge?
config
coreBridge?
ibcBridge?
network
platform
rpc?
tokenBridge?

### Methods

getAutomaticCircleBridge
getAutomaticTokenBridge
getBalance
getCircleBridge
getDecimals
getIbcBridge
getLatestBlock
getLatestFinalizedBlock
getNativeWrappedTokenId
getRpc
getToken
getTokenAccount
getTokenBridge
getWormholeCore
parseTransaction
sendWait
supportsAutomaticCircleBridge
supportsAutomaticTokenBridge
supportsCircleBridge
supportsIbcBridge
supportsProtocol
supportsTokenBridge
supportsWormholeCore

## Constructors

### constructor

- new ChainContext<N, P, C>(chain, platform, rpc?): ChainContext<N, P, C>

- #### Type Parameters

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

  - #### P extends "Solana" | "Algorand" | "Near" | "Sui" | "Aptos" | "Btc" | "Evm" | "Cosmwasm" = "Solana" | "Algorand" | "Near" | "Sui" | "Aptos" | "Btc" | "Evm" | "Cosmwasm"

  - #### C extends "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" = PlatformToChains<P>

  #### Parameters

  - ##### chain: C

  - ##### platform: PlatformContext<N, P>

  - ##### `Optional` rpc: any

  #### Returns ChainContext<N, P, C>

  - Defined in definitions/src/chain.ts:41

## Properties

### `Protected` `Optional` autoCircleBridge

autoCircleBridge?: AutomaticCircleBridge<N, P, C>

- Defined in definitions/src/chain.ts:38

### `Protected` `Optional` autoTokenBridge

autoTokenBridge?: AutomaticTokenBridge<N, P, C>

- Defined in definitions/src/chain.ts:36

### `Readonly` chain

chain: C

- Defined in definitions/src/chain.ts:29

### `Protected` `Optional` circleBridge

circleBridge?: CircleBridge<N, P, C>

- Defined in definitions/src/chain.ts:37

### `Readonly` config

config: ChainConfig<N, C>

- Defined in definitions/src/chain.ts:30

### `Protected` `Optional` coreBridge

coreBridge?: WormholeCore<N, P, C>

- Defined in definitions/src/chain.ts:34

### `Protected` `Optional` ibcBridge

ibcBridge?: IbcBridge<N, P, C>

- Defined in definitions/src/chain.ts:39

### `Readonly` network

network: N

- Defined in definitions/src/chain.ts:25

### `Readonly` platform

platform: PlatformContext<N, P>

- Defined in definitions/src/chain.ts:27

### `Protected` `Optional` rpc

rpc?: any

- Defined in definitions/src/chain.ts:33

### `Protected` `Optional` tokenBridge

tokenBridge?: TokenBridge<N, P, C>

- Defined in definitions/src/chain.ts:35

## Methods

### getAutomaticCircleBridge

- getAutomaticCircleBridge(): Promise<AutomaticCircleBridge<N, P, C>>

- #### Returns Promise<AutomaticCircleBridge<N, P, C>>

  - Defined in definitions/src/chain.ts:159

### getAutomaticTokenBridge

- getAutomaticTokenBridge(): Promise<AutomaticTokenBridge<N, P, C>>

- #### Returns Promise<AutomaticTokenBridge<N, P, C>>

  - Defined in definitions/src/chain.ts:141

### getBalance

- getBalance(walletAddr, token): Promise<bigint>

- #### Parameters

  - ##### walletAddr: string

  - ##### token: TokenAddress<C>

  #### Returns Promise<bigint>

  - Defined in definitions/src/chain.ts:66

### getCircleBridge

- getCircleBridge(): Promise<CircleBridge<N, P, C>>

- #### Returns Promise<CircleBridge<N, P, C>>

  - Defined in definitions/src/chain.ts:150

### getDecimals

- getDecimals(token): Promise<bigint>

- #### Parameters

  - ##### token: TokenAddress<C>

  #### Returns Promise<bigint>

  - Defined in definitions/src/chain.ts:55

### getIbcBridge

- getIbcBridge(): Promise<IbcBridge<N, P, C>>

- #### Returns Promise<IbcBridge<N, P, C>>

  - Defined in definitions/src/chain.ts:168

### getLatestBlock

- getLatestBlock(): Promise<number>

- #### Returns Promise<number>

  - Defined in definitions/src/chain.ts:70

### getLatestFinalizedBlock

- getLatestFinalizedBlock(): Promise<number>

- #### Returns Promise<number>

  - Defined in definitions/src/chain.ts:74

### getNativeWrappedTokenId

- getNativeWrappedTokenId(): Promise<TokenId<C>>

- #### Returns Promise<TokenId<C>>

  - Defined in definitions/src/chain.ts:94

### getRpc

- getRpc(): Promise<any>

- #### Returns Promise<any>

  - Defined in definitions/src/chain.ts:49

### getToken

- getToken(symbol): tokens.Token

- #### Parameters

  - ##### symbol: string

  #### Returns tokens.Token

  - Defined in definitions/src/chain.ts:88

### getTokenAccount

- getTokenAccount(address, token): Promise<ChainAddress<C>>

- #### Parameters

  - ##### address: UniversalOrNative<C>

  - ##### token: UniversalOrNative<C>

  #### Returns Promise<ChainAddress<C>>

  - Defined in definitions/src/chain.ts:107

### getTokenBridge

- getTokenBridge(): Promise<TokenBridge<N, P, C>>

- #### Returns Promise<TokenBridge<N, P, C>>

  - Defined in definitions/src/chain.ts:132

### getWormholeCore

- getWormholeCore(): Promise<WormholeCore<N, P, C>>

- #### Returns Promise<WormholeCore<N, P, C>>

  - Defined in definitions/src/chain.ts:124

### parseTransaction

- parseTransaction(txid): Promise<WormholeMessageId[]>

- #### Parameters

  - ##### txid: string

  #### Returns Promise<WormholeMessageId[]>

  - Defined in definitions/src/chain.ts:79

### sendWait

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

- #### Parameters

  - ##### stxns: any

  #### Returns Promise<string[]>

  - Defined in definitions/src/chain.ts:84

### supportsAutomaticCircleBridge

- supportsAutomaticCircleBridge(): boolean

- #### Returns boolean

  - Defined in definitions/src/chain.ts:158

### supportsAutomaticTokenBridge

- supportsAutomaticTokenBridge(): boolean

- #### Returns boolean

  - Defined in definitions/src/chain.ts:140

### supportsCircleBridge

- supportsCircleBridge(): boolean

- #### Returns boolean

  - Defined in definitions/src/chain.ts:149

### supportsIbcBridge

- supportsIbcBridge(): boolean

- #### Returns boolean

  - Defined in definitions/src/chain.ts:167

### supportsProtocol

- supportsProtocol(protocolName): boolean

- #### Parameters

  - ##### protocolName: "WormholeCore" | "TokenBridge" | "AutomaticTokenBridge" | "CircleBridge" | "AutomaticCircleBridge" | "Relayer" | "IbcBridge" | "NftBridge"

  #### Returns boolean

  - Defined in definitions/src/chain.ts:119

### supportsTokenBridge

- supportsTokenBridge(): boolean

- #### Returns boolean

  - Defined in definitions/src/chain.ts:131

### supportsWormholeCore

- supportsWormholeCore(): boolean

- #### Returns boolean

  - Defined in definitions/src/chain.ts:123

Generated using TypeDoc