@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.64 kB
TypeScript
import type { Chain, Network } from "@wormhole-foundation/sdk-base";
import { amount } from "@wormhole-foundation/sdk-base";
import { type ChainAddress, type ChainContext, type Signer, type TokenId } from "@wormhole-foundation/sdk-definitions";
import { CircleTransfer } from "../../protocols/cctp/cctpTransfer.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 AutomaticCCTPRoute {
type Options = {
nativeGas?: number;
};
type NormalizedParams = {
amount: amount.Amount;
fee: amount.Amount;
nativeGasAmount: amount.Amount;
};
interface ValidatedParams extends ValidatedTransferParams<Options> {
normalizedParams: NormalizedParams;
}
}
type Op = AutomaticCCTPRoute.Options;
type Vp = AutomaticCCTPRoute.ValidatedParams;
type Tp = TransferParams<Op>;
type Vr = ValidationResult<Op>;
type Q = Quote<Op, Vp>;
type QR = QuoteResult<Op, Vp>;
type R = Receipt<CircleTransfer.AttestationReceipt>;
export declare class AutomaticCCTPRoute<N extends Network> extends AutomaticRoute<N, Op, Vp, R> implements StaticRouteMethods<typeof AutomaticCCTPRoute> {
static NATIVE_GAS_DROPOFF_SUPPORTED: boolean;
static meta: {
name: string;
provider: 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>;
quote(request: RouteTransferRequest<N>, params: Vp): Promise<QR>;
private normalizeTransferParams;
private toTransferDetails;
initiate(request: RouteTransferRequest<N>, signer: Signer, quote: Q, to: ChainAddress): Promise<R>;
track(receipt: R, timeout?: number): AsyncGenerator<CircleTransfer.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>;
}
export {};
//# sourceMappingURL=automatic.d.ts.map