# Interface PlatformUtils<N, P>

#### Type Parameters

- #### N extends Network

- #### P extends Platform

#### Hierarchy

- PlatformUtils

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

#####
Index

### Constructors

constructor

### Properties

_platform

### Methods

chainFromChainId
chainFromRpc
getBalance
getBalances
getDecimals
getLatestBlock
getLatestFinalizedBlock
isNativeTokenId
isSupportedChain
nativeTokenId
sendWait

## Constructors

### constructor

- new PlatformUtils(network, config?): PlatformContext<N, P>

- #### Parameters

  - ##### network: N

  - ##### `Optional` config: ChainsConfig<N, P>

  #### Returns PlatformContext<N, P>

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

## Properties

### _platform

_platform: P

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

## Methods

### chainFromChainId

- chainFromChainId(chainId): ["Mainnet" | "Testnet" | "Devnet", "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"]

- #### Parameters

  - ##### chainId: string | bigint

  #### Returns ["Mainnet" | "Testnet" | "Devnet", "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"]

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

### chainFromRpc

- chainFromRpc(rpc): Promise<["Mainnet" | "Testnet" | "Devnet", "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"]>

- #### Parameters

  - ##### rpc: any

  #### Returns Promise<["Mainnet" | "Testnet" | "Devnet", "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"]>

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

### getBalance

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

- #### Type Parameters

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

  #### Parameters

  - ##### chain: C

  - ##### rpc: any

  - ##### walletAddr: string

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

  #### Returns Promise<bigint>

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

### getBalances

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

- #### Type Parameters

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

  #### Parameters

  - ##### chain: C

  - ##### rpc: any

  - ##### walletAddress: string

  - ##### tokens: TokenAddress<C>[]

  #### Returns Promise<Balances>

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

### getDecimals

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

- #### Type Parameters

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

  #### Parameters

  - ##### chain: C

  - ##### rpc: any

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

  #### Returns Promise<bigint>

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

### getLatestBlock

- getLatestBlock(rpc): Promise<number>

- #### Parameters

  - ##### rpc: any

  #### Returns Promise<number>

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

### getLatestFinalizedBlock

- getLatestFinalizedBlock(rpc): Promise<number>

- #### Parameters

  - ##### rpc: any

  #### Returns Promise<number>

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

### isNativeTokenId

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

- #### Type Parameters

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

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

  #### Parameters

  - ##### network: N

  - ##### chain: C

  - ##### tokenId: TokenId

  #### Returns boolean

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

### 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 core/definitions/dist/esm/platform.d.ts:10

### nativeTokenId

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

- #### Type Parameters

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

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

  #### Parameters

  - ##### network: N

  - ##### chain: C

  #### Returns TokenId<C>

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

### sendWait

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

- #### Type Parameters

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

  #### Parameters

  - ##### chain: C

  - ##### rpc: any

  - ##### stxns: any[]

  #### Returns Promise<string[]>

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

Generated using TypeDoc