# FromBTCLNSwap\<T>

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:127](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L127)

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.

## Extends

* [`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md)<`T`, `FromBTCLNDefinition`<`T`>, [`FromBTCLNSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCLNSwapState.md)>

## Type Parameters

| Type Parameter                                                                                                       | Default type                                                                                           |
| -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `T` *extends* [`ChainType`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/ChainType.md) | [`ChainType`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/ChainType.md) |

## Implements

* [`IAddressSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IAddressSwap.md)
* [`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md)<`T`, `FromBTCLNDefinition`<`T`>, [`FromBTCLNSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCLNSwapState.md)>

## Constructors

### Constructor

```
new FromBTCLNSwap<T>(wrapper, init): FromBTCLNSwap<T>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:178](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L178)

#### Parameters

| Parameter | Type                                                                                                                 |
| --------- | -------------------------------------------------------------------------------------------------------------------- |
| `wrapper` | [`FromBTCLNWrapper`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/FromBTCLNWrapper.md)<`T`> |
| `init`    | `FromBTCLNSwapInit`<`T`\[`"Data"`]>                                                                                  |

#### Returns

`FromBTCLNSwap`<`T`>

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`constructor`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#constructor)

### Constructor

```
new FromBTCLNSwap<T>(wrapper, obj): FromBTCLNSwap<T>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:179](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L179)

#### Parameters

| Parameter | Type                                                                                                                 |
| --------- | -------------------------------------------------------------------------------------------------------------------- |
| `wrapper` | [`FromBTCLNWrapper`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/FromBTCLNWrapper.md)<`T`> |
| `obj`     | `any`                                                                                                                |

#### Returns

`FromBTCLNSwap`<`T`>

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`constructor`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#constructor)

## Properties

### chainIdentifier

```
readonly chainIdentifier: T["ChainId"];
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:168](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L168)

Smart chain identifier string corresponding to this swap

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`chainIdentifier`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#chainidentifier)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`chainIdentifier`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#chainidentifier)

***

### createdAt

```
createdAt: number;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:176](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L176)

A UNIX milliseconds timestamps of when this swap was created

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`createdAt`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#createdat)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`createdAt`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#createdat)

***

### events

```
readonly events: EventEmitter<{

  swapState: [FromBTCLNSwap<T>];

}>;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:160](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L160)

Event emitter emitting `"swapState"` event when swap's state changes

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`events`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#events)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`events`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#events)

***

### exactIn

```
readonly exactIn: boolean;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:172](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L172)

Whether a swap is an exact input swap

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`exactIn`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#exactin)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`exactIn`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#exactin)

***

### url?

```
readonly optional url: string;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:164](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L164)

URL of the intermediary (LP) used for this swap, already has the swap service specific path appended

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`url`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#url)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`url`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#url)

***

### TYPE

```
protected readonly TYPE: FROM_BTCLN = SwapType.FROM_BTCLN;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:131](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L131)

Swap type

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`TYPE`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#type)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`TYPE`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#type)

## Methods

### canCommitAndClaimInOneShot()

```
canCommitAndClaimInOneShot(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1307](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1307)

Returns whether the underlying chain supports calling commit and claim in a single call, such that you can use the [commitAndClaim](#commitandclaim) function. If not you have to manually call [commit](#commit) first and then [claim](#claim).

#### Returns

`boolean`

***

### claim()

```
claim(

   _signer, 

   abortSignal?, 

   onBeforeTxSent?, 

secret?): Promise<string>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1186](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1186)

Settles the swap by claiming the funds on the destination chain if the swap requires manual settlement, you can check so with [isClaimable](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#isclaimable)

#### Parameters

| Parameter         | Type                                       | Description                                                                                                                                                        |
| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `_signer`         | `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`] |                                                                                                                                                                    |
| `abortSignal?`    | `AbortSignal`                              |                                                                                                                                                                    |
| `onBeforeTxSent?` | (`txId`) => `void`                         |                                                                                                                                                                    |
| `secret?`         | `string`                                   | A swap secret to use for the claim transaction, generally only needed if the swap was recovered from on-chain data, or the pre-image was generated outside the SDK |

#### Returns

`Promise`<`string`>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`claim`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#claim)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`claim`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#claim)

***

### commit()

```
commit(

   _signer, 

   abortSignal?, 

   skipChecks?, 

onBeforeTxSent?): Promise<string>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1065](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1065)

Creates the escrow on the destination smart chain side, pre-locking the tokens from the intermediary (LP) into an escrow.

#### Parameters

| Parameter         | Type                                       | Description                                                                                                                                                                                |
| ----------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `_signer`         | `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`] | Signer to sign the transactions with, must be the same as used in the initialization                                                                                                       |
| `abortSignal?`    | `AbortSignal`                              | Abort signal                                                                                                                                                                               |
| `skipChecks?`     | `boolean`                                  | Skip checks like making sure init signature is still valid and swap wasn't commited yet (this is handled on swap creation, if you commit right after quoting, you can use skipChecks=true) |
| `onBeforeTxSent?` | (`txId`) => `void`                         | -                                                                                                                                                                                          |

#### Returns

`Promise`<`string`>

#### Throws

If invalid signer is provided that doesn't match the swap data

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`commit`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#commit)

***

### commitAndClaim()

```
commitAndClaim(

   _signer, 

   abortSignal?, 

   skipChecks?, 

   onBeforeCommitTxSent?, 

   onBeforeClaimTxSent?, 

secret?): Promise<string[]>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1367](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1367)

Commits and claims the swap, in a way that the transactions can be signed together by the provided signer and then automatically sent sequentially by the SDK. To check if the underlying chain supports this flow check the [canCommitAndClaimInOneShot](#cancommitandclaiminoneshot) function.

#### Parameters

| Parameter               | Type                                       | Description                                                                                                                                                                                             |
| ----------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `_signer`               | `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`] | Signer to sign the transactions with, must be the same as used in the initialization                                                                                                                    |
| `abortSignal?`          | `AbortSignal`                              | Abort signal to stop waiting for the transaction confirmation and abort                                                                                                                                 |
| `skipChecks?`           | `boolean`                                  | Skip checks like making sure init signature is still valid and swap wasn't commited yet (this is handled when swap is created (quoted), if you commit right after quoting, you can use skipChecks=true) |
| `onBeforeCommitTxSent?` | (`txId`) => `void`                         | Optional callback called before the initialization (commit) transaction is broadcasted                                                                                                                  |
| `onBeforeClaimTxSent?`  | (`txId`) => `void`                         | Optional callback called before the settlement (claim) transaction is broadcasted                                                                                                                       |
| `secret?`               | `string`                                   | A swap secret to use for the claim transaction, generally only needed if the swap was recovered from on-chain data, or the pre-image was generated outside the SDK                                      |

#### Returns

`Promise`<`string`\[]>

#### Throws

If in invalid state (must be PR\_PAID or CLAIM\_COMMITED)

#### Throws

If invalid signer is provided that doesn't match the swap data

***

### execute()

```
execute(

   dstSigner, 

   walletOrLnurlWithdraw?, 

   callbacks?, 

options?): Promise<boolean>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:545](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L545)

Executes the swap with the provided bitcoin lightning network wallet or LNURL

#### Parameters

| Parameter                                    | Type                                                                                                                                                                                                                                                                                              | Description                                                                                                                                                                                                                                                                                          |
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `dstSigner`                                  | `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`]                                                                                                                                                                                                                                                        | Signer on the destination network, needs to have the same address as the one specified when quote was created, this is required for legacy swaps because the destination wallet needs to actively claim the swap funds on the destination (this also means you need native token to cover gas costs) |
| `walletOrLnurlWithdraw?`                     | \| `string` \| [`LNURLWithdraw`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/LNURLWithdraw.md) \| [`MinimalLightningNetworkWalletInterface`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/MinimalLightningNetworkWalletInterface.md) | Bitcoin lightning wallet to use to pay the lightning network invoice, or an LNURL-withdraw link, wallet is not required and the LN invoice can be paid externally as well (just pass null or undefined here)                                                                                         |
| `callbacks?`                                 | { `onDestinationClaimSent?`: (`destinationClaimTxId`) => `void`; `onDestinationCommitSent?`: (`destinationCommitTxId`) => `void`; `onSourceTransactionReceived?`: (`sourceTxId`) => `void`; `onSwapSettled?`: (`destinationTxId`) => `void`; }                                                    | Callbacks to track the progress of the swap                                                                                                                                                                                                                                                          |
| `callbacks.onDestinationClaimSent?`          | (`destinationClaimTxId`) => `void`                                                                                                                                                                                                                                                                | -                                                                                                                                                                                                                                                                                                    |
| `callbacks.onDestinationCommitSent?`         | (`destinationCommitTxId`) => `void`                                                                                                                                                                                                                                                               | -                                                                                                                                                                                                                                                                                                    |
| `callbacks.onSourceTransactionReceived?`     | (`sourceTxId`) => `void`                                                                                                                                                                                                                                                                          | -                                                                                                                                                                                                                                                                                                    |
| `callbacks.onSwapSettled?`                   | (`destinationTxId`) => `void`                                                                                                                                                                                                                                                                     | -                                                                                                                                                                                                                                                                                                    |
| `options?`                                   | { `abortSignal?`: `AbortSignal`; `delayBetweenCommitAndClaimSeconds?`: `number`; `lightningTxCheckIntervalSeconds?`: `number`; `secret?`: `string`; }                                                                                                                                             | Optional options for the swap like feeRate, AbortSignal, and timeouts/intervals                                                                                                                                                                                                                      |
| `options.abortSignal?`                       | `AbortSignal`                                                                                                                                                                                                                                                                                     | -                                                                                                                                                                                                                                                                                                    |
| `options.delayBetweenCommitAndClaimSeconds?` | `number`                                                                                                                                                                                                                                                                                          | -                                                                                                                                                                                                                                                                                                    |
| `options.lightningTxCheckIntervalSeconds?`   | `number`                                                                                                                                                                                                                                                                                          | -                                                                                                                                                                                                                                                                                                    |
| `options.secret?`                            | `string`                                                                                                                                                                                                                                                                                          | A swap secret to use for the claim transaction, generally only needed if the swap was recovered from on-chain data, or the pre-image was generated outside the SDK                                                                                                                                   |

#### Returns

`Promise`<`boolean`>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`execute`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#execute)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`execute`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#execute)

***

### getAddress()

```
getAddress(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:320](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L320)

Returns the lightning network BOLT11 invoice that needs to be paid as an input to the swap.

In case the swap is recovered from on-chain data, the address returned might be just a payment hash, as it is impossible to retrieve the actual lightning network invoice paid purely from on-chain data.

#### Returns

`string`

#### Implementation of

[`IAddressSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IAddressSwap.md).[`getAddress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IAddressSwap.md#getaddress)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getAddress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getaddress)

***

### getClaimHash()

```
getClaimHash(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/IEscrowSwap.ts:130](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/IEscrowSwap.ts#L130)

Returns the claim data hash specifying the claim path of the escrow - i.e. hash passed to the claim handler

#### Returns

`string`

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getClaimHash`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getclaimhash)

***

### getClaimNetworkFee()

```
getClaimNetworkFee(): Promise<TokenAmount<SCToken<T["ChainId"]>, true>>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:276](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L276)

Returns the transaction fee required for the claim transaction to settle the escrow on the destination smart chain

#### Returns

`Promise`<[`TokenAmount`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/TokenAmount.md)<[`SCToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SCToken.md)<`T`\[`"ChainId"`]>, `true`>>

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getClaimNetworkFee`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getclaimnetworkfee)

***

### getCommitAndClaimNetworkFee()

```
getCommitAndClaimNetworkFee(): Promise<TokenAmount<SCToken<T["ChainId"]>, true>>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1276](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1276)

Estimated transaction fee for commit & claim transactions combined, required to settle the swap on the smart chain destination side.

#### Returns

`Promise`<[`TokenAmount`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/TokenAmount.md)<[`SCToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SCToken.md)<`T`\[`"ChainId"`]>, `true`>>

***

### getDefinitiveExpiryTime()

```
getDefinitiveExpiryTime(): number;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:341](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L341)

Returns the timeout time (in UNIX milliseconds) when the swap will definitelly be considered as expired if the LP doesn't make it expired sooner

#### Returns

`number`

***

### getDirection()

```
getDirection(): SwapDirection;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:560](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L560)

Returns the direction of the swap

#### Returns

[`SwapDirection`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/SwapDirection.md)

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getDirection`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getdirection)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getDirection`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getdirection)

***

### getEscrowClaimTxId()

```
getEscrowClaimTxId(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/IEscrowSwap.ts:151](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/IEscrowSwap.ts#L151)

Returns the smart chain transaction ID of the tx that claimed (settled) the escrow

#### Returns

`string`

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getEscrowClaimTxId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getescrowclaimtxid)

***

### getEscrowHash()

```
getEscrowHash(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/IEscrowSwap.ts:123](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/IEscrowSwap.ts#L123)

Returns the escrow hash - i.e. hash of the escrow data

#### Returns

`string`

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getEscrowHash`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getescrowhash)

***

### getEscrowInitTxId()

```
getEscrowInitTxId(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/IEscrowSwap.ts:144](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/IEscrowSwap.ts#L144)

Returns the smart chain transaction ID of the tx that initiated the escrow

#### Returns

`string`

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getEscrowInitTxId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getescrowinittxid)

***

### getEscrowRefundTxId()

```
getEscrowRefundTxId(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/IEscrowSwap.ts:158](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/IEscrowSwap.ts#L158)

Returns the smart chain transaction ID of the tx that refunded the escrow

#### Returns

`string`

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getEscrowRefundTxId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getescrowrefundtxid)

***

### getExecutionAction()

```
getExecutionAction(options?): Promise<

  | SwapExecutionActionSendToAddress<true>

| SwapExecutionActionSignSmartChainTx<T>>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:818](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L818)

Returns a current state-dependent action for the user to execute, or `undefined` if there is no more action required for this swap - this means that the swap is probably finished (either expired, failed or settled).

#### Parameters

| Parameter             | Type                                               | Description                                                                                                                                                                                  |
| --------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `options?`            | { `secret?`: `string`; `skipChecks?`: `boolean`; } |                                                                                                                                                                                              |
| `options.secret?`     | `string`                                           | A swap secret to use for the claim transaction, generally only needed if the swap was recovered from on-chain data, or the pre-image was generated outside the SDK                           |
| `options.skipChecks?` | `boolean`                                          | Skip checks like making sure init signature is still valid and swap wasn't commited yet (this is handled on swap creation, if you commit right after quoting, you can use `skipChecks=true`) |

#### Returns

`Promise`< | [`SwapExecutionActionSendToAddress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionSendToAddress.md)<`true`> | [`SwapExecutionActionSignSmartChainTx`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionSignSmartChainTx.md)<`T`>>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getExecutionAction`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getexecutionaction)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getExecutionAction`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getexecutionaction)

***

### getExecutionStatus()

```
getExecutionStatus(options?): Promise<{

  currentAction:   | SwapExecutionActionSendToAddress<true>

     | SwapExecutionActionSignSmartChainTx<T>;

  stateInfo: SwapStateInfo<FromBTCLNSwapState>;

  steps: [SwapExecutionStepPayment<"LIGHTNING">, SwapExecutionStepSettlement<T["ChainId"], "awaiting_manual">];

}>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:834](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L834)

Returns the current action and the full execution steps for a given swap. Prefer this to calling [getExecutionSteps](#getexecutionsteps) and [getExecutionAction](#getexecutionaction) separately - if called sequentially they might return the respective steps/actions in different states if you hit the state transition boundary.

#### Parameters

| Parameter                     | Type                                                                                 | Description                                                                                                               |
| ----------------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
| `options?`                    | { `secret?`: `string`; `skipBuildingAction?`: `boolean`; `skipChecks?`: `boolean`; } | Optional options argument for the additional execution status context, see the actual type in the respective swap classes |
| `options.secret?`             | `string`                                                                             | -                                                                                                                         |
| `options.skipBuildingAction?` | `boolean`                                                                            | -                                                                                                                         |
| `options.skipChecks?`         | `boolean`                                                                            | -                                                                                                                         |

#### Returns

`Promise`<{ `currentAction`: | [`SwapExecutionActionSendToAddress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionSendToAddress.md)<`true`> | [`SwapExecutionActionSignSmartChainTx`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionSignSmartChainTx.md)<`T`>; `stateInfo`: [`SwapStateInfo`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapStateInfo.md)<[`FromBTCLNSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCLNSwapState.md)>; `steps`: \[[`SwapExecutionStepPayment`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionStepPayment.md)<`"LIGHTNING"`>, [`SwapExecutionStepSettlement`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionStepSettlement.md)<`T`\[`"ChainId"`], `"awaiting_manual"`>]; }>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getExecutionStatus`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getexecutionstatus)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getExecutionStatus`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getexecutionstatus)

***

### getExecutionSteps()

```
getExecutionSteps(): Promise<[SwapExecutionStepPayment<"LIGHTNING">, SwapExecutionStepSettlement<T["ChainId"], "awaiting_manual">]>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:860](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L860)

Returns a list of execution steps the user has to go through for a given swap, to see the possible execution steps check out [SwapExecutionStep](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionStep.md).

#### Returns

`Promise`<\[[`SwapExecutionStepPayment`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionStepPayment.md)<`"LIGHTNING"`>, [`SwapExecutionStepSettlement`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionStepSettlement.md)<`T`\[`"ChainId"`], `"awaiting_manual"`>]>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getExecutionSteps`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getexecutionsteps)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getExecutionSteps`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getexecutionsteps)

***

### getFee()

```
getFee(): Fee;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:148](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L148)

Returns total fee for the swap, the fee is represented in source currency & destination currency, but is paid only once

#### Returns

[`Fee`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/Fee.md)

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getFee`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getfee)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getFee`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getfee)

***

### getFeeBreakdown()

```
getFeeBreakdown(): [{

  fee: Fee<T["ChainId"], BtcToken, SCToken<T["ChainId"]>>;

  type: SWAP;

}];
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:155](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L155)

Returns the breakdown of all the fees paid

#### Returns

\[{ `fee`: [`Fee`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/Fee.md)<`T`\[`"ChainId"`], [`BtcToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/BtcToken.md), [`SCToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SCToken.md)<`T`\[`"ChainId"`]>>; `type`: [`SWAP`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FeeType.md#swap); }]

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getFeeBreakdown`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getfeebreakdown)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getFeeBreakdown`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getfeebreakdown)

***

### getHtlcTimeoutTime()

```
getHtlcTimeoutTime(): number;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:353](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L353)

Returns timeout time (in UNIX milliseconds) when the swap htlc will expire

#### Returns

`number`

***

### getHyperlink()

```
getHyperlink(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:333](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L333)

A hyperlink representation of the address + amount that the user needs to sends on the source chain. This is suitable to be displayed in a form of QR code.

#### Returns

`string`

#### Remarks

In case the swap is recovered from on-chain data, the address returned might be just a payment hash, as it is impossible to retrieve the actual lightning network invoice paid purely from on-chain data.

#### Implementation of

[`IAddressSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IAddressSwap.md).[`getHyperlink`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IAddressSwap.md#gethyperlink)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getHyperlink`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#gethyperlink)

***

### getId()

```
getId(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/IEscrowSwap.ts:137](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/IEscrowSwap.ts#L137)

Returns the ID of the swap, as used in the storage

#### Returns

`string`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getid)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getid)

***

### getInput()

```
getInput(): TokenAmount<BtcToken<true>>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:459](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L459)

Returns input amount of the swap, user needs to pay this much

#### Returns

[`TokenAmount`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/TokenAmount.md)<[`BtcToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/BtcToken.md)<`true`>>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getInput`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getinput)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getInput`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getinput)

***

### getInputAddress()

```
getInputAddress(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:300](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L300)

Returns source address of the swap

#### Returns

`string`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getInputAddress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getinputaddress)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getInputAddress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getinputaddress)

***

### getInputToken()

```
getInputToken(): BtcToken<true>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:452](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L452)

Returns the input token of the swap

#### Returns

[`BtcToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/BtcToken.md)<`true`>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getInputToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getinputtoken)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getInputToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getinputtoken)

***

### getInputTxId()

```
getInputTxId(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:307](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L307)

Returns swap input transaction ID on the source chain

#### Returns

`string`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getInputTxId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getinputtxid)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getInputTxId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getinputtxid)

***

### getInputWithoutFee()

```
getInputWithoutFee(): TokenAmount<BtcToken>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:184](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L184)

Returns input amount of the swap without the fees (swap fee, network fee)

#### Returns

[`TokenAmount`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/TokenAmount.md)<[`BtcToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/BtcToken.md)>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getInputWithoutFee`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getinputwithoutfee)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getInputWithoutFee`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getinputwithoutfee)

***

### getLNURL()

```
getLNURL(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1411](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1411)

Gets the used LNURL or `null` if this is not an LNURL-withdraw swap

#### Returns

`string`

***

### getOutput()

```
getOutput(): TokenAmount<SCToken<T["ChainId"]>, true>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:172](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L172)

Returns output amount of the swap, user receives this much

#### Returns

[`TokenAmount`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/TokenAmount.md)<[`SCToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SCToken.md)<`T`\[`"ChainId"`]>, `true`>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getOutput`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getoutput)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getOutput`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getoutput)

***

### getOutputAddress()

```
getOutputAddress(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:94](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L94)

Returns destination address of the swap

#### Returns

`string`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getOutputAddress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getoutputaddress)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getOutputAddress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getoutputaddress)

***

### getOutputToken()

```
getOutputToken(): SCToken<T["ChainId"]>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:165](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L165)

Returns the output token of the swap

#### Returns

[`SCToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SCToken.md)<`T`\[`"ChainId"`]>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getOutputToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getoutputtoken)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getOutputToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getoutputtoken)

***

### getOutputTxId()

```
getOutputTxId(): string;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:87](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L87)

Returns swap output transaction ID on the destination chain

#### Returns

`string`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getOutputTxId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getoutputtxid)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getOutputTxId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getoutputtxid)

***

### getPriceInfo()

```
getPriceInfo(): object;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:388](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L388)

Returns pricing info about the swap

#### Returns

`object`

| Name           | Type                                                                                                           | Defined in                                                                                                                                          |
| -------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| `difference`   | [`PercentagePPM`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/PercentagePPM.md) | [atomiq-sdk/src/swaps/ISwap.ts:391](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L391) |
| `marketPrice?` | `number`                                                                                                       | [atomiq-sdk/src/swaps/ISwap.ts:389](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L389) |
| `swapPrice`    | `number`                                                                                                       | [atomiq-sdk/src/swaps/ISwap.ts:390](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L390) |

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getPriceInfo`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getpriceinfo)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getPriceInfo`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getpriceinfo)

***

### getQuoteExpiry()

```
getQuoteExpiry(): number;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:546](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L546)

Returns quote expiry in UNIX millis

#### Returns

`number`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getQuoteExpiry`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getquoteexpiry)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getQuoteExpiry`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getquoteexpiry)

***

### getSecurityDeposit()

```
getSecurityDeposit(): TokenAmount<SCToken<T["ChainId"]>, true>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:215](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L215)

Returns the amount of native token of the destination chain locked up during initialization of the escrow to act as a security deposit that can be taken by the intermediary (LP) if the user doesn't go through with the swap

#### Returns

[`TokenAmount`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/TokenAmount.md)<[`SCToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SCToken.md)<`T`\[`"ChainId"`]>, `true`>

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getSecurityDeposit`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getsecuritydeposit)

***

### getSmartChainNetworkFee()

```
getSmartChainNetworkFee(): Promise<TokenAmount<SCToken<T["ChainId"]>, true>>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:472](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L472)

Returns the transaction fee paid on the smart chain side to initiate the escrow

#### Returns

`Promise`<[`TokenAmount`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/TokenAmount.md)<[`SCToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SCToken.md)<`T`\[`"ChainId"`]>, `true`>>

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getSmartChainNetworkFee`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getsmartchainnetworkfee)

***

### getState()

```
getState(): FromBTCLNSwapState;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:567](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L567)

Returns the current state of the swap

#### Returns

[`FromBTCLNSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCLNSwapState.md)

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getstate)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getstate)

***

### getStateInfo()

```
getStateInfo(): SwapStateInfo<FromBTCLNSwapState>;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:574](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L574)

Returns the current state of the swap along with the human-readable description of the state

#### Returns

[`SwapStateInfo`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapStateInfo.md)<[`FromBTCLNSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCLNSwapState.md)>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getStateInfo`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getstateinfo)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getStateInfo`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#getstateinfo)

***

### getTimeoutTime()

```
getTimeoutTime(): number;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:361](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L361)

Returns timeout time (in UNIX milliseconds) when the LN invoice will expire

#### Returns

`number`

***

### getTotalDeposit()

```
getTotalDeposit(): TokenAmount<SCToken<T["ChainId"]>, true>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:224](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L224)

Returns the total amount of native token of the destination chain locked up during initialization of the escrow. This covers the security deposit and the watchtower fee (if applicable), it is calculated a maximum of those two values.

#### Returns

[`TokenAmount`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/TokenAmount.md)<[`SCToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SCToken.md)<`T`\[`"ChainId"`]>, `true`>

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getTotalDeposit`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#gettotaldeposit)

***

### getType()

```
getType(): SwapType;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:553](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L553)

Returns the type of the swap

#### Returns

[`SwapType`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/SwapType.md)

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`getType`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#gettype)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`getType`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#gettype)

***

### hasEnoughForTxFees()

```
hasEnoughForTxFees(): Promise<{

  balance: TokenAmount<SCToken<T["ChainId"]>, true>;

  enoughBalance: boolean;

  required: TokenAmount<SCToken<T["ChainId"]>, true>;

}>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:479](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L479)

Checks if the initiator/sender has enough balance on the smart chain side to cover the transaction fee for processing the swap

#### Returns

`Promise`<{ `balance`: [`TokenAmount`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/TokenAmount.md)<[`SCToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SCToken.md)<`T`\[`"ChainId"`]>, `true`>; `enoughBalance`: `boolean`; `required`: [`TokenAmount`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/TokenAmount.md)<[`SCToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SCToken.md)<`T`\[`"ChainId"`]>, `true`>; }>

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`hasEnoughForTxFees`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#hasenoughfortxfees)

***

### hasSecretPreimage()

```
hasSecretPreimage(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:524](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L524)

Returns whether the secret preimage for this swap is known

#### Returns

`boolean`

***

### hasValidPrice()

```
hasValidPrice(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:380](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L380)

Checks if the pricing for the swap is valid, according to max allowed price difference set in the ISwapPrice

#### Returns

`boolean`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`hasValidPrice`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#hasvalidprice)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`hasValidPrice`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#hasvalidprice)

***

### isClaimable()

```
isClaimable(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:378](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L378)

Checks whether a swap currently requires a manual claiming (settlement)

#### Returns

`boolean`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`isClaimable`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#isclaimable)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`isClaimable`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#isclaimable)

***

### isFailed()

```
isFailed(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:392](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L392)

Returns whether the swap failed (e.g. was refunded)

#### Returns

`boolean`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`isFailed`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#isfailed)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`isFailed`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#isfailed)

***

### isFinished()

```
isFinished(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:371](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L371)

Returns whether the swap is finished and in its terminal state (this can mean successful, refunded or failed)

#### Returns

`boolean`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`isFinished`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#isfinished)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`isFinished`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#isfinished)

***

### isInitiated()

```
isInitiated(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:539](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L539)

Whether a swap was initialized, a swap is considered initialized on first interaction with it, i.e. calling commit() on a Smart chain -> Bitcoin swaps, calling waitForPayment() or similar on the other direction. Not initiated swaps are not saved to the persistent storage by default (see SwapperOptions.saveUninitializedSwaps)

#### Returns

`boolean`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`isInitiated`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#isinitiated)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`isInitiated`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#isinitiated)

***

### isInProgress()

```
isInProgress(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:399](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L399)

Returns whether the swap is currently being processed

#### Returns

`boolean`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`isInProgress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#isinprogress)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`isInProgress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#isinprogress)

***

### isLNURL()

```
isLNURL(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1404](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1404)

Whether this swap uses an LNURL-withdraw link

#### Returns

`boolean`

***

### isQuoteExpired()

```
isQuoteExpired(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:409](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L409)

Checks whether the swap's quote has definitely expired and cannot be committed anymore, we can remove such swap

#### Returns

`boolean`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`isQuoteExpired`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#isquoteexpired)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`isQuoteExpired`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#isquoteexpired)

***

### isQuoteSoftExpired()

```
isQuoteSoftExpired(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:416](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L416)

Checks whether the swap's quote is soft expired (this means there is not enough time buffer for it to commit, but it still can happen)

#### Returns

`boolean`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`isQuoteSoftExpired`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#isquotesoftexpired)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`isQuoteSoftExpired`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#isquotesoftexpired)

***

### isSuccessful()

```
isSuccessful(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:385](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L385)

Returns whether the swap finished successful

#### Returns

`boolean`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`isSuccessful`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#issuccessful)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`isSuccessful`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#issuccessful)

***

### refreshPriceData()

```
refreshPriceData(): Promise<void>;
```

Defined in: [atomiq-sdk/src/swaps/ISwap.ts:336](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/ISwap.ts#L336)

Re-fetches & revalidates the price data based on the current market prices

#### Returns

`Promise`<`void`>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`refreshPriceData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#refreshpricedata)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`refreshPriceData`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#refreshpricedata)

***

### requiresAction()

```
requiresAction(): boolean;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:101](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L101)

Checks whether there is some action required from the user for this swap - can mean either refundable or claimable

#### Returns

`boolean`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`requiresAction`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#requiresaction)

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`requiresAction`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#requiresaction)

***

### serialize()

```
serialize(): any;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1458](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1458)

Serializes the swap to a JSON stringifiable representation (i.e. no bigints, buffers etc.)

#### Returns

`any`

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`serialize`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#serialize)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`serialize`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#serialize)

***

### setSecretPreimage()

```
setSecretPreimage(secret): void;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:516](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L516)

Sets the secret preimage for the swap, in case it is not known already

#### Parameters

| Parameter | Type     | Description                                            |
| --------- | -------- | ------------------------------------------------------ |
| `secret`  | `string` | Secret preimage that matches the expected payment hash |

#### Returns

`void`

#### Throws

If an invalid secret preimage is provided

***

### settleWithLNURLWithdraw()

```
settleWithLNURLWithdraw(lnurl): Promise<void>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1423](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1423)

Pay the generated lightning network invoice with an LNURL-withdraw link, this is useful when you want to display a lightning payment QR code and also want to allow payments using LNURL-withdraw NFC cards.

Note that the swap needs to be created **without** an LNURL to begin with for this function to work. If this swap is already using an LNURL-withdraw link, this function throws.

#### Parameters

| Parameter | Type                                                                                                                       |
| --------- | -------------------------------------------------------------------------------------------------------------------------- |
| `lnurl`   | `string` \| [`LNURLWithdraw`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/LNURLWithdraw.md) |

#### Returns

`Promise`<`void`>

***

### txsClaim()

```
txsClaim(_signer?, secret?): Promise<T["TX"][]>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1172](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1172)

Returns transactions for settling (claiming) the swap if the swap requires manual settlement, you can check so with [isClaimable](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#isclaimable). After sending the transaction manually be sure to call the [waitTillClaimed](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#waittillclaimed) function to wait till the claim transaction is observed, processed by the SDK and state of the swap properly updated.

#### Parameters

| Parameter  | Type                                                   | Description                                                                                                                                                        |
| ---------- | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `_signer?` | `string` \| `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`] | Optional signer address to use for claiming the swap, can also be different from the initializer                                                                   |
| `secret?`  | `string`                                               | A swap secret to use for the claim transaction, generally only needed if the swap was recovered from on-chain data, or the pre-image was generated outside the SDK |

#### Returns

`Promise`<`T`\[`"TX"`]\[]>

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`txsClaim`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#txsclaim)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`txsClaim`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#txsclaim)

***

### txsCommit()

```
txsCommit(skipChecks?): Promise<T["TX"][]>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/IFromBTCSelfInitSwap.ts:241](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L241)

Returns transactions for initiating (committing) the escrow on the destination smart chain side, pre-locking the tokens from the intermediary (LP) into an escrow.

#### Parameters

| Parameter     | Type      | Description                                                                                                                                                                                |
| ------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `skipChecks?` | `boolean` | Skip checks like making sure init signature is still valid and swap wasn't commited yet (this is handled on swap creation, if you commit right after quoting, you can use skipChecks=true) |

#### Returns

`Promise`<`T`\[`"TX"`]\[]>

#### Throws

When in invalid state to commit the swap

#### Inherited from

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`txsCommit`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#txscommit)

***

### txsCommitAndClaim()

```
txsCommitAndClaim(skipChecks?, secret?): Promise<T["TX"][]>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1324](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1324)

Returns transactions for both commit & claim operation together, such that they can be signed all at once by the wallet. **WARNING**: transactions must be sent sequentially, such that the claim (2nd) transaction is only sent after the commit (1st) transaction confirms. Failure to do so can reveal the HTLC pre-image too soon, opening a possibility for the LP to steal funds!

#### Parameters

| Parameter     | Type      | Description                                                                                                                                                                                             |
| ------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `skipChecks?` | `boolean` | Skip checks like making sure init signature is still valid and swap wasn't commited yet (this is handled when swap is created (quoted), if you commit right after quoting, you can use skipChecks=true) |
| `secret?`     | `string`  | A swap secret to use for the claim transaction, generally only needed if the swap was recovered from on-chain data, or the pre-image was generated outside the SDK                                      |

#### Returns

`Promise`<`T`\[`"TX"`]\[]>

#### Throws

If in invalid state (must be PR\_PAID or CLAIM\_COMMITED)

***

### waitForPayment()

```
waitForPayment(

   onPaymentReceived?, 

   checkIntervalSeconds?, 

abortSignal?): Promise<boolean>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:976](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L976)

Waits till a lightning network payment is received by the intermediary and client can continue by initiating (committing) & settling (claiming) the HTLC by calling either the [commitAndClaim](#commitandclaim) function (if the underlying chain allows commit and claim in a single transaction - check with [canCommitAndClaimInOneShot](#cancommitandclaiminoneshot)). Or call [commit](#commit) and then [claim](#claim) separately.

If this swap is using an LNURL-withdraw link as input, it automatically posts the generated invoice to the LNURL service to pay it.

#### Parameters

| Parameter               | Type               | Description                                                        |
| ----------------------- | ------------------ | ------------------------------------------------------------------ |
| `onPaymentReceived?`    | (`txId`) => `void` | Callback as for when the LP reports having received the ln payment |
| `checkIntervalSeconds?` | `number`           | How often to poll the intermediary for answer (default 5 seconds)  |
| `abortSignal?`          | `AbortSignal`      | Abort signal to stop waiting for payment                           |

#### Returns

`Promise`<`boolean`>

***

### waitTillClaimed()

```
waitTillClaimed(maxWaitTimeSeconds?, abortSignal?): Promise<boolean>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1210](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1210)

Waits till the swap is successfully settled (claimed), should be called after sending the claim (settlement) transactions manually to wait till the SDK processes the settlement and updates the swap state accordingly

#### Parameters

| Parameter             | Type          | Description                                                |
| --------------------- | ------------- | ---------------------------------------------------------- |
| `maxWaitTimeSeconds?` | `number`      | Maximum time in seconds to wait for the swap to be settled |
| `abortSignal?`        | `AbortSignal` | AbortSignal                                                |

#### Returns

`Promise`<`boolean`>

whether the swap was claimed in time or not

#### Implementation of

[`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md).[`waitTillClaimed`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#waittillclaimed)

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`waitTillClaimed`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#waittillclaimed)

***

### waitTillCommited()

```
waitTillCommited(abortSignal?): Promise<void>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln/FromBTCLNSwap.ts:1088](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln/FromBTCLNSwap.ts#L1088)

Waits till a swap is initiated (committed) on-chain, should be called after sending the commit transactions ([txsCommit](#txscommit)) manually to wait till the SDK processes the escrow initialization and updates the swap state accordingly

#### Parameters

| Parameter      | Type          | Description |
| -------------- | ------------- | ----------- |
| `abortSignal?` | `AbortSignal` | AbortSignal |

#### Returns

`Promise`<`void`>

#### Overrides

[`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md).[`waitTillCommited`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md#waittillcommited)
