Skip to main content

FromBTCSwapState

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts:56

State enum for legacy escrow based Bitcoin -> Smart chain swaps.

Enumeration Members​

FAILED​

FAILED: -4;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts:61

Bitcoin swap address has expired and the intermediary (LP) has already refunded its funds. No BTC should be sent anymore!


EXPIRED​

EXPIRED: -3;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts:67

Bitcoin swap address has expired, user should not send any BTC anymore! Though the intermediary (LP) hasn't refunded yet. So if there is a transaction already in-flight the swap might still succeed.


QUOTE_EXPIRED​

QUOTE_EXPIRED: -2;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts:71

Swap has expired for good and there is no way how it can be executed anymore


QUOTE_SOFT_EXPIRED​

QUOTE_SOFT_EXPIRED: -1;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts:76

A swap is almost expired, and it should be presented to the user as expired, though there is still a chance that it will be processed


PR_CREATED​

PR_CREATED: 0;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts:81

Swap quote was created, use the FromBTCSwap.commit or FromBTCSwap.txsCommit functions to initiate it by creating the swap escrow on the destination smart chain


CLAIM_COMMITED​

CLAIM_COMMITED: 1;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts:87

Swap escrow was initiated (committed) on the destination chain, user can send the BTC to the swap address with the FromBTCSwap.getFundedPsbt, FromBTCSwap.getAddress or FromBTCSwap.getHyperlink functions.


BTC_TX_CONFIRMED​

BTC_TX_CONFIRMED: 2;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts:93

Input bitcoin transaction was confirmed, wait for automatic settlement by the watchtowers using the FromBTCSwap.waitTillClaimed function or settle manually using the FromBTCSwap.claim or FromBTCSwap.txsClaim function.


CLAIM_CLAIMED​

CLAIM_CLAIMED: 3;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts:97

Swap successfully settled and funds received on the destination chain