@wormhole-foundation/sdk-connect
Version:
The core package for the Connect SDK, used in conjunction with 1 or more of the chain packages
43 lines • 2.5 kB
TypeScript
import type { Chain, Network } from "@wormhole-foundation/sdk-base";
import type { AttestationId, ChainContext, GatewayTransferDetails, IbcTransferInfo, Signer, TokenId, TransactionId, TxHash, WormholeMessageId } from "@wormhole-foundation/sdk-definitions";
import { TokenBridge } from "@wormhole-foundation/sdk-definitions";
import { TransferState } from "../../types.js";
import { Wormhole } from "../../wormhole.js";
import type { WormholeTransfer } from "../wormholeTransfer.js";
export declare class GatewayTransfer<N extends Network = Network> implements WormholeTransfer<"IbcBridge"> {
static chain: "Wormchain";
private readonly wh;
private readonly gateway;
private readonly gatewayIbcBridge;
private readonly gatewayAddress;
private _state;
private msg;
transfer: GatewayTransferDetails;
transactions: TransactionId[];
vaas?: {
id: WormholeMessageId;
vaa?: TokenBridge.TransferVAA;
}[];
ibcTransfers: IbcTransferInfo[];
private constructor();
getTransferState(): TransferState;
static from<N extends Network>(wh: Wormhole<N>, from: GatewayTransferDetails): Promise<GatewayTransfer<N>>;
static from<N extends Network>(wh: Wormhole<N>, from: WormholeMessageId, timeout?: number): Promise<GatewayTransfer<N>>;
static from<N extends Network>(wh: Wormhole<N>, from: TransactionId, timeout?: number): Promise<GatewayTransfer<N>>;
private static _fromMsgId;
private static _fromTransaction;
private static ibcTransfertoGatewayTransfer;
initiateTransfer(signer: Signer): Promise<TxHash[]>;
private _transfer;
private _transferIbc;
fetchAttestation(timeout?: number): Promise<AttestationId[]>;
completeTransfer(signer: Signer): Promise<TxHash[]>;
private fromGateway;
private toGateway;
}
export declare namespace GatewayTransfer {
function getTransferVaa<N extends Network>(wh: Wormhole<N>, whm: WormholeMessageId, timeout?: number): Promise<TokenBridge.TransferVAA>;
function destinationOverrides<N extends Network>(srcChain: ChainContext<N>, dstChain: ChainContext<N>, gatewayChain: ChainContext<N, "Wormchain">, transfer: GatewayTransferDetails): Promise<GatewayTransferDetails>;
function lookupDestinationToken<N extends Network, SC extends Chain, DC extends Chain>(srcChain: ChainContext<N, SC>, dstChain: ChainContext<N, DC>, gatewayChain: ChainContext<N, "Wormchain">, token: TokenId<SC>): Promise<TokenId<DC>>;
}
//# sourceMappingURL=gatewayTransfer.d.ts.map