UNPKG

@wormhole-foundation/sdk-sui

Version:

SDK for Sui chains, used in conjunction with @wormhole-foundation/sdk

30 lines 1.98 kB
import type { Balances, Chain, ChainsConfig, Network, SignedTx, StaticPlatformMethods, TokenId, TxHash } from "@wormhole-foundation/sdk-connect"; import { PlatformContext } from "@wormhole-foundation/sdk-connect"; import { SuiClient } from "@mysten/sui/client"; import { SuiChain } from "./chain.js"; import type { AnySuiAddress, SuiChains, SuiPlatformType } from "./types.js"; /** * @category Sui */ export declare class SuiPlatform<N extends Network> extends PlatformContext<N, SuiPlatformType> implements StaticPlatformMethods<SuiPlatformType, typeof SuiPlatform> { static _platform: "Sui"; constructor(network: N, _config?: ChainsConfig<N, SuiPlatformType>); getRpc<C extends SuiChains>(chain: C): SuiClient; getChain<C extends SuiChains>(chain: C): SuiChain<N, C>; static nativeTokenId<N extends Network, C extends SuiChains>(network: N, chain: C): TokenId<C>; static isNativeTokenId<N extends Network, C extends SuiChains>(network: N, chain: C, tokenId: TokenId): boolean; static isSupportedChain(chain: Chain): boolean; static getDecimals(network: Network, chain: Chain, rpc: SuiClient, token: AnySuiAddress): Promise<number>; static getCoins(connection: SuiClient, account: AnySuiAddress, coinType: string): Promise<{ coinType: string; coinObjectId: string; }[]>; static getBalance(_network: Network, _chain: Chain, rpc: SuiClient, walletAddr: string, token: AnySuiAddress): Promise<bigint | null>; static getBalances(_network: Network, _chain: Chain, rpc: SuiClient, walletAddr: string): Promise<Balances>; static sendWait(chain: Chain, rpc: SuiClient, stxns: SignedTx[]): Promise<TxHash[]>; static getLatestBlock(rpc: SuiClient): Promise<number>; static getLatestFinalizedBlock(rpc: SuiClient): Promise<number>; static chainFromChainId(chainId: string): [Network, SuiChains]; static chainFromRpc(rpc: SuiClient): Promise<[Network, SuiChains]>; } //# sourceMappingURL=platform.d.ts.map