Skip to main content

SwapType

Defined in: atomiq-sdk/src/enums/SwapType.ts:6

Enum representing different types of swap protocols used by atomiq.

Enumeration Members

FROM_BTC

FROM_BTC: 0;

Defined in: atomiq-sdk/src/enums/SwapType.ts:15

Legacy escrow (PrTLC) based swap for Bitcoin -> Smart chains, requires manual initiation of the swap on the destination chain.

Handled by FromBTCWrapper & FromBTCSwap.

Legacy swaps are only used on Solana!


FROM_BTCLN

FROM_BTCLN: 1;

Defined in: atomiq-sdk/src/enums/SwapType.ts:24

Legacy escrow (HTLC) based swap for Bitcoin Lightning -> Smart chains, requires manual settlement of the swap on the destination network once the lightning network payment is received by the LP

Handled by FromBTCLNWrapper & FromBTCLNSwap.

Legacy swaps are only used on Solana!


TO_BTC

TO_BTC: 2;

Defined in: atomiq-sdk/src/enums/SwapType.ts:30

Escrow based (PrTLC) swap for Smart chains -> Bitcoin

Handled by ToBTCWrapper & ToBTCSwap.


TO_BTCLN

TO_BTCLN: 3;

Defined in: atomiq-sdk/src/enums/SwapType.ts:36

Escrow based (HTLC) swap for Smart chains -> Bitcoin Lightning

Handled by ToBTCLNWrapper & ToBTCLNSwap.


TRUSTED_FROM_BTC

TRUSTED_FROM_BTC: 4;

Defined in: atomiq-sdk/src/enums/SwapType.ts:44

Trusted swap for Bitcoin -> Smart chains, to be used for minor amounts to get gas tokens on the destination chain, which is only needed for Solana, which still uses legacy swaps and doesn't support newer SPV_VAULT_FROM_BTC & FROM_BTCLN_AUTO swaps.

Handled by OnchainForGasWrapper & OnchainForGasSwap.


TRUSTED_FROM_BTCLN

TRUSTED_FROM_BTCLN: 5;

Defined in: atomiq-sdk/src/enums/SwapType.ts:52

Trusted swap for Bitcoin Lightning -> Smart chains, to be used for minor amounts to get gas tokens on the destination chain, which is only needed for Solana, which still uses legacy swaps and doesn't support newer SPV_VAULT_FROM_BTC & FROM_BTCLN_AUTO swaps.

Handled by LnForGasWrapper & LnForGasSwap.


SPV_VAULT_FROM_BTC

SPV_VAULT_FROM_BTC: 6;

Defined in: atomiq-sdk/src/enums/SwapType.ts:62

New spv vault (UTXO-controlled vault) based swaps for Bitcoin -> Smart chain swaps not requiring any initiation on the destination chain, and with the added possibility for the user to receive a native token on the destination chain as part of the swap (a "gas drop" feature).

Handled by SpvFromBTCWrapper & SpvFromBTCSwap.

Used on all the supported chains except Solana!


FROM_BTCLN_AUTO

FROM_BTCLN_AUTO: 7;

Defined in: atomiq-sdk/src/enums/SwapType.ts:74

New escrow based (HTLC) swaps for Bitcoin Lightning -> Smart chain swaps not requiring manual settlement on the destination by the user, and instead letting the LP initiate the escrow, with the permissionless watchtower network managing the claiming of HTLC, with the swap secret broadcasted over Nostr. Also adds a possibility for the user to receive a native token on the destination chain as part of the swap (a "gas drop" feature).

Handled by FromBTCLNAutoWrapper & FromBTCLNAutoSwap.

Used on all the supported chains except Solana!