@wormhole-foundation/sdk-cosmwasm
Version:
SDK for EVM chains, used in conjunction with @wormhole-foundation/sdk
35 lines • 2.74 kB
TypeScript
import { CosmWasmClient } from "@cosmjs/cosmwasm-stargate";
import type { BankExtension, IbcExtension } from "@cosmjs/stargate";
import { QueryClient } from "@cosmjs/stargate";
import type { Chain, ChainsConfig, Network, SignedTx, StaticPlatformMethods, TxHash } from "@wormhole-foundation/sdk-connect";
import { PlatformContext } from "@wormhole-foundation/sdk-connect";
import { CosmwasmChain } from "./chain.js";
import type { IbcChannels } from "./constants.js";
import type { CosmwasmChains, CosmwasmPlatformType } from "./types.js";
import type { Balances, TokenId } from "@wormhole-foundation/sdk-connect";
import type { AnyCosmwasmAddress } from "./types.js";
/**
* @category Cosmwasm
*/
export declare class CosmwasmPlatform<N extends Network> extends PlatformContext<N, CosmwasmPlatformType> implements StaticPlatformMethods<CosmwasmPlatformType, typeof CosmwasmPlatform> {
static _platform: "Cosmwasm";
constructor(network: N, _config?: ChainsConfig<N, CosmwasmPlatformType>);
getRpc<C extends CosmwasmChains>(chain: C): Promise<CosmWasmClient>;
getChain<C extends CosmwasmChains>(chain: C, rpc?: CosmWasmClient): CosmwasmChain<N, C>;
static getQueryClient: (rpc: CosmWasmClient) => QueryClient & BankExtension & IbcExtension;
static getIbcChannels<N extends Network, C extends CosmwasmChains>(network: N, chain: C): IbcChannels | null;
static nativeTokenId<C extends CosmwasmChains>(network: Network, chain: C): TokenId<C>;
static isSupportedChain(chain: Chain): boolean;
static isNativeTokenId<N extends Network, C extends CosmwasmChains>(network: N, chain: C, tokenId: TokenId): boolean;
static getDecimals<C extends CosmwasmChains>(_network: Network, _chain: C, rpc: CosmWasmClient, token: AnyCosmwasmAddress): Promise<number>;
static getBalance<C extends CosmwasmChains>(_network: Network, chain: C, rpc: CosmWasmClient, walletAddress: string, token: AnyCosmwasmAddress): Promise<bigint | null>;
static getBalances<C extends CosmwasmChains>(_network: Network, chain: C, rpc: CosmWasmClient, walletAddress: string): Promise<Balances>;
static getNativeDenom<N extends Network, C extends CosmwasmChains>(network: N, chain: C): string;
static sendWait(chain: Chain, rpc: CosmWasmClient, stxns: SignedTx[]): Promise<TxHash[]>;
static getLatestBlock(rpc: CosmWasmClient): Promise<number>;
static getLatestFinalizedBlock(rpc: CosmWasmClient): Promise<number>;
static chainFromChainId(chainMoniker: string): [Network, CosmwasmChains];
static chainFromRpc(rpc: CosmWasmClient): Promise<[Network, CosmwasmChains]>;
static getCounterpartyChannel(sourceChannel: string, rpc: CosmWasmClient): Promise<string | null>;
}
//# sourceMappingURL=platform.d.ts.map