UNPKG

@xswap-link/sdk

Version:
70 lines (64 loc) 1.62 kB
type TransferType = "CROSS_CHAIN" | "SINGLE_CHAIN"; export type TransactionHistory = { history: HistoryTransaction[]; }; export type HistoryTransaction = { transferId: string; transferType: TransferType; walletAddress: string; messageId: string; // ExecutorRunFailed failed: boolean; // MessageSent source: { blockchainId: string; transactionHash: string; blockTime: Date; tokenAmount: string; tokenAddress: string; transferredTokenAddress: string; transferredTokenAmount: string; valueForInstantCcipRecieve: string; tokenOutAddress: string; estimatedAmountOut: string; targetBlockchainId: string; } | null; // MessageReceived target: { blockchainId: string; transactionHash: string; blockTime: Date; tokenAmount: string; tokenAddress: string; } | null; }; export type TransactionStatus = | "IN_PROGRESS" | "DONE" | "REVERTED" | "NOT_FOUND"; export type Transaction = { messageId?: string; hash: string; timestamp: number; sourceChainId: string; targetChainId: string; amountWei: string; tokenAddress: string; tokenOutAddress: string | undefined; tokenOutAmount: string | undefined; estimatedDeliveryTimestamp: number; status: TransactionStatus; }; export type MonitoredTransaction = { srcChain: string | undefined; srcChainImage: string | undefined; srcToken: string | undefined; srcTokenImage: string | undefined; srcAmount: string | undefined; dstChain: string | undefined; dstChainImage: string | undefined; isDone: boolean; txHash: string; explorer: string | undefined; };