UNPKG

@wormhole-foundation/sdk-connect

Version:

The core package for the Connect SDK, used in conjunction with 1 or more of the chain packages

47 lines 3.71 kB
import type { Chain, Network } from "@wormhole-foundation/sdk-base"; import { amount } from "@wormhole-foundation/sdk-base"; import type { ChainAddress, ChainContext, Signer, TokenId } from "@wormhole-foundation/sdk-definitions"; import { TokenTransfer } from "../../protocols/tokenBridge/tokenTransfer.js"; import type { AttestationReceipt } from "../../types.js"; import type { StaticRouteMethods } from "../route.js"; import { AutomaticRoute } from "../route.js"; import type { Quote, QuoteResult, Receipt, TransferParams, ValidatedTransferParams, ValidationResult } from "../types.js"; import type { RouteTransferRequest } from "../request.js"; export declare namespace AutomaticTokenBridgeRoute { type Options = { nativeGas: number; }; type NormalizedParams = { fee: amount.Amount; amount: amount.Amount; nativeGasAmount: amount.Amount; }; interface ValidatedParams extends ValidatedTransferParams<Options> { normalizedParams: NormalizedParams; } } type Op = AutomaticTokenBridgeRoute.Options; type Vp = AutomaticTokenBridgeRoute.ValidatedParams; type Tp = TransferParams<Op>; type Vr = ValidationResult<Op>; type R = Receipt<AttestationReceipt<"AutomaticTokenBridge">>; type QR = QuoteResult<Op, Vp>; type Q = Quote<Op, Vp>; export declare class AutomaticTokenBridgeRoute<N extends Network> extends AutomaticRoute<N, Op, Vp, R> implements StaticRouteMethods<typeof AutomaticTokenBridgeRoute> { static NATIVE_GAS_DROPOFF_SUPPORTED: boolean; static meta: { name: string; }; static supportedNetworks(): Network[]; static supportedChains(network: Network): Chain[]; static supportedDestinationTokens<N extends Network>(sourceToken: TokenId, fromChain: ChainContext<N>, toChain: ChainContext<N>): Promise<TokenId[]>; getDefaultOptions(): Op; validate(request: RouteTransferRequest<N>, params: Tp): Promise<Vr>; private normalizeTransferParams; quote(request: RouteTransferRequest<N>, params: Vp): Promise<QR>; initiate(request: RouteTransferRequest<N>, signer: Signer, quote: Q, to: ChainAddress): Promise<R>; track(receipt: R, timeout?: number): AsyncGenerator<TokenTransfer.TransferReceipt<"Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Arbitrum" | "Avalanche" | "Base" | "Bsc" | "Celo" | "Ethereum" | "Fantom" | "Gnosis" | "Klaytn" | "Moonbeam" | "Neon" | "Optimism" | "Polygon" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "Mantle" | "Scroll" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Converge" | "Plume" | "Pythnet" | "Fogo" | "Cosmoshub" | "Evmos" | "Injective" | "Kujira" | "Osmosis" | "Sei" | "Terra2" | "Wormchain" | "Dymension" | "Neutron" | "Stargaze" | "Celestia" | "Seda" | "Provenance" | "Noble", "Solana" | "Btc" | "Algorand" | "Sui" | "Aptos" | "Near" | "Arbitrum" | "Avalanche" | "Base" | "Bsc" | "Celo" | "Ethereum" | "Fantom" | "Gnosis" | "Klaytn" | "Moonbeam" | "Neon" | "Optimism" | "Polygon" | "Sepolia" | "ArbitrumSepolia" | "BaseSepolia" | "OptimismSepolia" | "Holesky" | "PolygonSepolia" | "Mantle" | "Scroll" | "Blast" | "Xlayer" | "Linea" | "Berachain" | "Seievm" | "Snaxchain" | "Unichain" | "Worldchain" | "Ink" | "HyperEVM" | "Monad" | "Mezo" | "Sonic" | "Converge" | "Plume" | "Pythnet" | "Fogo" | "Cosmoshub" | "Evmos" | "Injective" | "Kujira" | "Osmosis" | "Sei" | "Terra2" | "Wormchain" | "Dymension" | "Neutron" | "Stargaze" | "Celestia" | "Seda" | "Provenance" | "Noble">, void, unknown>; private toTransferDetails; } export {}; //# sourceMappingURL=automatic.d.ts.map