UNPKG

@wormhole-foundation/sdk-connect

Version:

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

48 lines 15.7 kB
import type { StaticRouteMethods } from "../route.js"; import { AutomaticRoute } from "../route.js"; import type { Quote, QuoteResult, Receipt, TransferParams, ValidatedTransferParams, ValidationResult } from "../types.js"; import type { AttestationReceipt, AttestedTransferReceipt, Chain, ChainContext, CompletedTransferReceipt, Network, Signer, SourceInitiatedTransferReceipt, TokenId, TransactionId } from "./../../index.js"; import { PorticoBridge, amount } from "./../../index.js"; import type { ChainAddress } from "@wormhole-foundation/sdk-definitions"; import type { RouteTransferRequest } from "../request.js"; export declare const SLIPPAGE_BPS = 15n; export declare const MAX_SLIPPAGE_BPS = 100n; export declare const BPS_PER_HUNDRED_PERCENT = 10000n; export declare namespace PorticoRoute { type Options = {}; type NormalizedParams = { amount: amount.Amount; canonicalSourceToken: TokenId; canonicalDestinationToken: TokenId; sourceToken: TokenId; destinationToken: TokenId; }; interface ValidatedParams extends ValidatedTransferParams<Options> { normalizedParams: NormalizedParams; } } type OP = PorticoRoute.Options; type R = Receipt<AttestationReceipt<"PorticoBridge">>; type VP = PorticoRoute.ValidatedParams; type VR = ValidationResult<OP>; type TP = TransferParams<OP>; type Q = Quote<OP, VP, PorticoBridge.Quote>; type QR = QuoteResult<OP, VP, PorticoBridge.Quote>; export declare class AutomaticPorticoRoute<N extends Network> extends AutomaticRoute<N, OP, VP, R> implements StaticRouteMethods<typeof AutomaticPorticoRoute> { 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>; quote(request: RouteTransferRequest<N>, params: VP): Promise<QR>; initiate(request: RouteTransferRequest<N>, sender: Signer<N>, quote: Q, to: ChainAddress): Promise<SourceInitiatedTransferReceipt<"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">>; track(receipt: R, timeout?: number): AsyncGenerator<import("../../types.js").CreatedTransferReceipt<"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"> | import("../../types.js").FailedTransferReceipt<AttestationReceipt<"PorticoBridge">, "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"> | import("../../types.js").InReviewTransferReceipt<AttestationReceipt<"PorticoBridge">, "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"> | AttestedTransferReceipt<AttestationReceipt<"PorticoBridge">, "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"> | import("../../types.js").RefundedTransferReceipt<AttestationReceipt<"PorticoBridge">, "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"> | import("../../types.js").RedeemedTransferReceipt<AttestationReceipt<"PorticoBridge">, "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"> | import("../../types.js").DestinationQueuedTransferReceipt<AttestationReceipt<"PorticoBridge">, "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"> | CompletedTransferReceipt<AttestationReceipt<"PorticoBridge">, "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>; complete(signer: Signer<N>, receipt: R): Promise<TransactionId[]>; private fetchSwapQuote; } export {}; //# sourceMappingURL=automatic.d.ts.map