Skip to main content

SwapExecutionActionWait<T>

type SwapExecutionActionWait<T> = object;

Defined in: atomiq-sdk/src/types/SwapExecutionAction.ts:248

Swap action indicating that the user should wait for either LP to process the swap, automatic settlement to happen or until the Bitcoin transaction gets enough confirmations

Type Parameters

Type ParameterDefault type
T extends "LP" | "SETTLEMENT" | "BITCOIN_CONFS""LP" | "SETTLEMENT" | "BITCOIN_CONFS"

Properties

description

description: string;

Defined in: atomiq-sdk/src/types/SwapExecutionAction.ts:263

Human-readable description of the action


expectedTimeSeconds

expectedTimeSeconds: number;

Defined in: atomiq-sdk/src/types/SwapExecutionAction.ts:282

Expected time in seconds for this action to take


name

name: T extends "LP" ? "Awaiting LP payout" : T extends "SETTLEMENT" ? "Automatic settlement" : "Bitcoin confirmations";

Defined in: atomiq-sdk/src/types/SwapExecutionAction.ts:255

Human-readable name of the action


pollTimeSeconds

pollTimeSeconds: number;

Defined in: atomiq-sdk/src/types/SwapExecutionAction.ts:286

Recommended time interval in seconds after which you should re-check the current action


type

type: "Wait";

Defined in: atomiq-sdk/src/types/SwapExecutionAction.ts:251


wait

wait: T extends "BITCOIN_CONFS" ? (maxWaitTimeSeconds?, pollIntervalSeconds?, abortSignal?, btcConfirmationsCallback?) => Promise<void> : (maxWaitTimeSeconds?, pollIntervalSeconds?, abortSignal?) => Promise<void>;

Defined in: atomiq-sdk/src/types/SwapExecutionAction.ts:273

Allows you to await till this action resolves

Param

Maximum time in seconds to wait for

Param

How often to poll for the state change (default 5 seconds)

Param

AbortSignal to abort the wait

Param

Optional callback when awaiting bitcoin confirmations, gets called when number of bitcoin confirmations change