Skip to main content

FromBTCLNSwapState

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts:40

State enum for legacy Lightning -> Smart chain swaps

Enumeration Members

FAILED

FAILED: -4;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts:44

Swap has failed as the user didn't settle the HTLC on the destination before expiration


QUOTE_EXPIRED

QUOTE_EXPIRED: -3;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts:48

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


QUOTE_SOFT_EXPIRED

QUOTE_SOFT_EXPIRED: -2;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts:53

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


EXPIRED

EXPIRED: -1;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts:58

Swap HTLC on the destination chain has expired, it is not safe anymore to settle (claim) the swap on the destination smart chain.


PR_CREATED

PR_CREATED: 0;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts:65

Swap quote was created, use FromBTCLNSwap.getAddress or FromBTCLNSwap.getHyperlink to get the bolt11 lightning network invoice to pay to initiate the swap, then use the FromBTCLNSwap.waitForPayment to wait till the lightning network payment is received by the intermediary (LP)


PR_PAID

PR_PAID: 1;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts:72

Lightning network payment has been received by the intermediary (LP), the user can now settle the swap on the destination smart chain side with FromBTCLNSwap.commitAndClaim (if the underlying chain supports it - check with FromBTCLNSwap.canCommitAndClaimInOneShot), or by calling FromBTCLNSwap.commit and FromBTCLNSwap.claim separately.


CLAIM_COMMITED

CLAIM_COMMITED: 2;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts:77

Swap escrow HTLC has been created on the destination chain. Continue by claiming it with the FromBTCLNSwap.claim or FromBTCLNSwap.txsClaim function.


CLAIM_CLAIMED

CLAIM_CLAIMED: 3;

Defined in: atomiq-sdk/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts:81

Swap successfully settled and funds received on the destination chain