# Class SolanaPlatform<N>

#### Type Parameters

- #### N extends Network

#### Hierarchy

- PlatformContext<N, SolanaPlatformType>
  - SolanaPlatform

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

#####
Index

### Constructors

constructor

### Properties

config
network
_platform

### Methods

getChain
getProtocol
getRpc
parseWormholeMessages
utils
chainFromChainId
chainFromRpc
getBalance
getBalances
getDecimals
getLatestBlock
getLatestFinalizedBlock
isNativeTokenId
isSupportedChain
latestBlock
nativeTokenId
sendWait

## Constructors

### constructor

- new SolanaPlatform<N>(network, config?): SolanaPlatform<N>

- #### Type Parameters

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

  #### Parameters

  - ##### network: N

  - ##### `Optional` config: ChainsConfig<N, "Solana">

  #### Returns SolanaPlatform<N>

  Overrides PlatformContext.constructor

  - Defined in platforms/solana/src/platform.ts:44

## Properties

### `Readonly` config

config: ChainsConfig<N, "Solana">

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: "Solana" = _platform

- Defined in platforms/solana/src/platform.ts:42

## Methods

### getChain

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

- #### Type Parameters

  - #### C extends "Solana" | "Pythnet"

  #### Parameters

  - ##### chain: C

  - ##### `Optional` rpc: Connection

  #### Returns SolanaChain<N, C>

  Overrides PlatformContext.getChain

  - Defined in platforms/solana/src/platform.ts:63

### 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, config?): Connection

- #### Type Parameters

  - #### C extends "Solana" | "Pythnet"

  #### Parameters

  - ##### chain: C

  - ##### config: ConnectionConfig = ...

  #### Returns Connection

  Overrides PlatformContext.getRpc

  - Defined in platforms/solana/src/platform.ts:51

### parseWormholeMessages

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

- #### Type Parameters

  - #### C extends "Solana" | "Pythnet"

  #### 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, "Solana">

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

  Inherited from PlatformContext.utils

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

### `Static` chainFromChainId

- chainFromChainId(genesisHash): ["Mainnet" | "Testnet" | "Devnet", "Solana" | "Pythnet"]

- #### Parameters

  - ##### genesisHash: string

  #### Returns ["Mainnet" | "Testnet" | "Devnet", "Solana" | "Pythnet"]

  - Defined in platforms/solana/src/platform.ts:225

### `Static` chainFromRpc

- chainFromRpc(rpc): Promise<["Mainnet" | "Testnet" | "Devnet", "Solana" | "Pythnet"]>

- #### Parameters

  - ##### rpc: Connection

  #### Returns Promise<["Mainnet" | "Testnet" | "Devnet", "Solana" | "Pythnet"]>

  - Defined in platforms/solana/src/platform.ts:240

### `Static` getBalance

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

- #### 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: Connection

  - ##### walletAddress: string

  - ##### token: AnySolanaAddress

  #### Returns Promise<bigint>

  - Defined in platforms/solana/src/platform.ts:115

### `Static` getBalances

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

- #### 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: Connection

  - ##### walletAddress: string

  - ##### tokens: AnySolanaAddress[]

  #### Returns Promise<Balances>

  - Defined in platforms/solana/src/platform.ts:134

### `Static` getDecimals

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

- #### 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: Connection

  - ##### token: AnySolanaAddress

  #### Returns Promise<bigint>

  - Defined in platforms/solana/src/platform.ts:96

### `Static` getLatestBlock

- getLatestBlock(rpc): Promise<number>

- #### Parameters

  - ##### rpc: Connection

  #### Returns Promise<number>

  - Defined in platforms/solana/src/platform.ts:215

### `Static` getLatestFinalizedBlock

- getLatestFinalizedBlock(rpc): Promise<number>

- #### Parameters

  - ##### rpc: Connection

  #### Returns Promise<number>

  - Defined in platforms/solana/src/platform.ts:220

### `Static` isNativeTokenId

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

- #### Type Parameters

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

  - #### C extends "Solana" | "Pythnet"

  #### Parameters

  - ##### network: N

  - ##### chain: C

  - ##### tokenId: TokenId

  #### Returns boolean

  - Defined in platforms/solana/src/platform.ts:80

### `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/solana/src/platform.ts:91

### `Static` latestBlock

- latestBlock(rpc, commitment?): Promise<{
  blockhash: string;
  lastValidBlockHeight: number;
  }>

- #### Parameters

  - ##### rpc: Connection

  - ##### `Optional` commitment: Commitment

  #### Returns Promise<{
  blockhash: string;
  lastValidBlockHeight: number;
  }>

  - Defined in platforms/solana/src/platform.ts:208

### `Static` nativeTokenId

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

- #### Type Parameters

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

  - #### C extends "Solana" | "Pythnet"

  #### Parameters

  - ##### network: N

  - ##### chain: C

  #### Returns TokenId<C>

  - Defined in platforms/solana/src/platform.ts:71

### `Static` sendWait

- sendWait(chain, rpc, stxns, opts?): 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: Connection

  - ##### stxns: any[]

  - ##### `Optional` opts: SendOptions

  #### Returns Promise<string[]>

  - Defined in platforms/solana/src/platform.ts:167

Generated using TypeDoc