UNPKG

@wormhole-foundation/sdk-algorand

Version:

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

25 lines 1.82 kB
import type { Chain, ChainsConfig, Network, SignedTx, StaticPlatformMethods, TokenId, TxHash } from "@wormhole-foundation/sdk-connect"; import { PlatformContext } from "@wormhole-foundation/sdk-connect"; import algosdk from "algosdk"; import { AlgorandChain } from "./chain.js"; import type { AlgorandChains, AlgorandPlatformType, AnyAlgorandAddress } from "./types.js"; /** * @category Algorand */ export declare class AlgorandPlatform<N extends Network> extends PlatformContext<N, AlgorandPlatformType> implements StaticPlatformMethods<AlgorandPlatformType, typeof AlgorandPlatform> { static _platform: "Algorand"; constructor(network: N, _config?: ChainsConfig<N, AlgorandPlatformType>); getRpc<C extends AlgorandChains>(chain: C): algosdk.Algodv2; getChain<C extends AlgorandChains>(chain: C): AlgorandChain<N, C>; static nativeTokenId<N extends Network, C extends AlgorandChains>(network: N, chain: C): TokenId<C>; static isNativeTokenId<N extends Network, C extends AlgorandChains>(network: N, chain: C, tokenId: TokenId): boolean; static isSupportedChain(chain: Chain): boolean; static getDecimals(network: Network, chain: Chain, rpc: algosdk.Algodv2, token: AnyAlgorandAddress): Promise<number>; static getBalance(network: Network, chain: Chain, rpc: algosdk.Algodv2, walletAddr: string, token: AnyAlgorandAddress): Promise<bigint | null>; static sendWait(chain: Chain, rpc: algosdk.Algodv2, stxns: SignedTx[]): Promise<TxHash[]>; static getLatestBlock(rpc: algosdk.Algodv2): Promise<number>; static getLatestFinalizedBlock(rpc: algosdk.Algodv2): Promise<number>; static chainFromChainId(genesisId: string): [Network, AlgorandChains]; static chainFromRpc(rpc: algosdk.Algodv2): Promise<[Network, AlgorandChains]>; } //# sourceMappingURL=platform.d.ts.map