# FromBTCLNAutoSwap\<T>

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:152](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L152)

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. Permissionless watchtower network handles 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).

## Extends

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

## 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)
* [`ISwapWithGasDrop`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/ISwapWithGasDrop.md)<`T`>
* [`IClaimableSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md)<`T`, `FromBTCLNAutoDefinition`<`T`>, [`FromBTCLNAutoSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCLNAutoSwapState.md)>

## Constructors

### Constructor

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:219](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L219)

#### Parameters

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

#### Returns

`FromBTCLNAutoSwap`<`T`>

#### Overrides

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

### Constructor

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:220](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L220)

#### Parameters

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

#### Returns

`FromBTCLNAutoSwap`<`T`>

#### Overrides

[`IEscrowSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.md).[`constructor`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.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

[`IEscrowSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.md).[`chainIdentifier`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.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

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

***

### events

```
readonly events: EventEmitter<{

  swapState: [FromBTCLNAutoSwap<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

[`IEscrowSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.md).[`events`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.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

[`IEscrowSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.md).[`exactIn`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.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

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

***

### TYPE

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:156](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L156)

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

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

## Methods

### \_verifyQuoteDefinitelyExpired()

```
_verifyQuoteDefinitelyExpired(): Promise<boolean>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:512](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L512)

#### Returns

`Promise`<`boolean`>

#### Inherit Doc

#### Implementation of

```
IClaimableSwap._verifyQuoteDefinitelyExpired
```

#### Overrides

```
IEscrowSwap._verifyQuoteDefinitelyExpired
```

***

### \_verifyQuoteValid()

```
_verifyQuoteValid(): Promise<boolean>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:519](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L519)

#### Returns

`Promise`<`boolean`>

#### Inherit Doc

#### Implementation of

```
IClaimableSwap._verifyQuoteValid
```

#### Overrides

```
IEscrowSwap._verifyQuoteValid
```

***

### claim()

```
claim(

   _signer, 

   abortSignal?, 

   onBeforeTxSent?, 

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:1470](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L1470)

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"`] | Signer to sign the transactions with, can also be different to the initializer                                                                                     |
| `abortSignal?`    | `AbortSignal`                              | Abort signal to stop waiting for transaction confirmation                                                                                                          |
| `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)

***

### execute()

```
execute(

   walletOrLnurlWithdraw?, 

   callbacks?, 

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:784](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L784)

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

#### Parameters

| Parameter                                        | Type                                                                                                                                                                                                                                                                                              | Description                                                                                                                                                                                                  |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `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?`                                     | { `onSourceTransactionReceived?`: (`sourceTxId`) => `void`; `onSwapSettled?`: (`destinationTxId`) => `void`; }                                                                                                                                                                                    | Callbacks to track the progress of the swap                                                                                                                                                                  |
| `callbacks.onSourceTransactionReceived?`         | (`sourceTxId`) => `void`                                                                                                                                                                                                                                                                          | -                                                                                                                                                                                                            |
| `callbacks.onSwapSettled?`                       | (`destinationTxId`) => `void`                                                                                                                                                                                                                                                                     | -                                                                                                                                                                                                            |
| `options?`                                       | { `abortSignal?`: `AbortSignal`; `lightningTxCheckIntervalSeconds?`: `number`; `maxWaitTillAutomaticSettlementSeconds?`: `number`; `secret?`: `string`; }                                                                                                                                         | Optional options for the swap like AbortSignal, and timeouts/intervals                                                                                                                                       |
| `options.abortSignal?`                           | `AbortSignal`                                                                                                                                                                                                                                                                                     | -                                                                                                                                                                                                            |
| `options.lightningTxCheckIntervalSeconds?`       | `number`                                                                                                                                                                                                                                                                                          | -                                                                                                                                                                                                            |
| `options.maxWaitTillAutomaticSettlementSeconds?` | `number`                                                                                                                                                                                                                                                                                          | -                                                                                                                                                                                                            |
| `options.secret?`                                | `string`                                                                                                                                                                                                                                                                                          | A swap secret to broadcast to watchtowers, generally only needed if the swap was recovered from on-chain data, or the pre-image was generated outside the SDK                                                |

#### Returns

`Promise`<`boolean`>

Whether a swap was settled automatically by swap watchtowers or requires manual claim by the user, in case `false` is returned the user should call `swap.claim()` to settle the swap on the destination manually

#### 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

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

***

### getAddress()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:425](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L425)

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

#### 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)

***

### 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

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

***

### getDefinitiveExpiryTime()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:440](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L440)

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

[`IEscrowSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.md).[`getDirection`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.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

[`IEscrowSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.md).[`getEscrowClaimTxId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.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

[`IEscrowSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.md).[`getEscrowHash`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.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

[`IEscrowSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.md).[`getEscrowInitTxId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.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

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

***

### getExecutionAction()

```
getExecutionAction(options?): Promise<

  | SwapExecutionActionSendToAddress<true>

  | SwapExecutionActionWait<"LP" | "SETTLEMENT">

| SwapExecutionActionSignSmartChainTx<T>>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:1089](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L1089)

#### Parameters

| Parameter                                        | Type                                                                                                                                                                      | Description                                                                                                                                                   |
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `options?`                                       | { `manualSettlementSmartChainSigner?`: `string` \| `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`]; `maxWaitTillAutomaticSettlementSeconds?`: `number`; `secret?`: `string`; } | -                                                                                                                                                             |
| `options.manualSettlementSmartChainSigner?`      | `string` \| `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`]                                                                                                                    | Optional smart chain signer to create a manual claim (settlement) transaction                                                                                 |
| `options.maxWaitTillAutomaticSettlementSeconds?` | `number`                                                                                                                                                                  | Maximum time to wait for an automatic settlement after the bitcoin transaction is confirmed (defaults to 60 seconds)                                          |
| `options.secret?`                                | `string`                                                                                                                                                                  | A swap secret to broadcast to watchtowers, generally only needed if the swap was recovered from on-chain data, or the pre-image was generated outside the SDK |

#### Returns

`Promise`< | [`SwapExecutionActionSendToAddress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionSendToAddress.md)<`true`> | [`SwapExecutionActionWait`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionWait.md)<`"LP"` | `"SETTLEMENT"`> | [`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

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

***

### getExecutionStatus()

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

  currentAction:   | SwapExecutionActionSendToAddress<true>

     | SwapExecutionActionWait<"LP" | "SETTLEMENT">

     | SwapExecutionActionSignSmartChainTx<T>;

  stateInfo: SwapStateInfo<FromBTCLNAutoSwapState>;

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

}>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:1107](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L1107)

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?`                                       | { `manualSettlementSmartChainSigner?`: `string` \| `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`]; `maxWaitTillAutomaticSettlementSeconds?`: `number`; `secret?`: `string`; `skipBuildingAction?`: `boolean`; } | Optional options argument for the additional execution status context, see the actual type in the respective swap classes |
| `options.manualSettlementSmartChainSigner?`      | `string` \| `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`]                                                                                                                                                      | -                                                                                                                         |
| `options.maxWaitTillAutomaticSettlementSeconds?` | `number`                                                                                                                                                                                                    | -                                                                                                                         |
| `options.secret?`                                | `string`                                                                                                                                                                                                    | -                                                                                                                         |
| `options.skipBuildingAction?`                    | `boolean`                                                                                                                                                                                                   | -                                                                                                                         |

#### Returns

`Promise`<{ `currentAction`: | [`SwapExecutionActionSendToAddress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionSendToAddress.md)<`true`> | [`SwapExecutionActionWait`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionWait.md)<`"LP"` | `"SETTLEMENT"`> | [`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)<[`FromBTCLNAutoSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCLNAutoSwapState.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_automatic"` | `"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

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

***

### getExecutionSteps()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:1135](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L1135)

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).

#### Parameters

| Parameter                                        | Type                                                    | Description                                                                                                                                        |
| ------------------------------------------------ | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `options?`                                       | { `maxWaitTillAutomaticSettlementSeconds?`: `number`; } | Optional options argument for the additional steps context (i.e. automatic settlement timeout), see the actual type in the respective swap classes |
| `options.maxWaitTillAutomaticSettlementSeconds?` | `number`                                                | -                                                                                                                                                  |

#### 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_automatic"` | `"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

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

***

### getFee()

```
getFee(): Fee<T["ChainId"], BtcToken<true>, SCToken<T["ChainId"]>>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:702](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L702)

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)<`T`\[`"ChainId"`], [`BtcToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/BtcToken.md)<`true`>, [`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).[`getFee`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IClaimableSwap.md#getfee)

#### Overrides

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

***

### getFeeBreakdown()

```
getFeeBreakdown(): [{

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

  type: SWAP;

}, {

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

  type: NETWORK_OUTPUT;

}];
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:725](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L725)

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)<`true`>, [`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); }, { `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)<`true`>, [`SCToken`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SCToken.md)<`T`\[`"ChainId"`]>>; `type`: [`NETWORK_OUTPUT`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FeeType.md#network_output); }]

#### 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)

#### Overrides

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

***

### getGasDropOutput()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:632](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L632)

Returns the output of the "gas drop", additional native token received by the user on the destination chain

#### 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

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

***

### getHtlcTimeoutTime()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:453](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L453)

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\_auto/FromBTCLNAutoSwap.ts:432](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L432)

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`

#### 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)

***

### getId()

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

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

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)

#### Overrides

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

***

### getInput()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:604](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L604)

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

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

***

### getInputAddress()

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

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

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

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

***

### getInputToken()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:597](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L597)

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

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

***

### getInputTxId()

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

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

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

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

***

### getInputWithoutFee()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:611](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L611)

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)<`true`>>

#### 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)

#### Overrides

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

***

### getLNURL()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:1580](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L1580)

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/ln\_auto/FromBTCLNAutoSwap.ts:625](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L625)

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)

#### Overrides

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

***

### getOutputAddress()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:360](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L360)

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)

#### Overrides

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

***

### getOutputToken()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:618](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L618)

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)

#### Overrides

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

***

### getOutputTxId()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:367](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L367)

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)

#### Overrides

[`IEscrowSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.md).[`getOutputTxId`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.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

[`IEscrowSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.md).[`getPriceInfo`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.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

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

***

### getState()

```
getState(): number;
```

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

`number`

#### 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

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

***

### getStateInfo()

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

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)<`number`>

#### 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

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

***

### 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

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

***

### hasSecretPreimage()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:763](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L763)

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

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

***

### isClaimable()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:467](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L467)

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)

***

### isFailed()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:481](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L481)

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

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

***

### isFinished()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:460](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L460)

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

[`IEscrowSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.md).[`isFinished`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IEscrowSwap.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

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

***

### isInProgress()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:488](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L488)

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

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

***

### isLNURL()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:1573](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L1573)

Whether this swap uses an LNURL-withdraw link

#### Returns

`boolean`

***

### isQuoteExpired()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:498](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L498)

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

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

***

### isQuoteSoftExpired()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:505](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L505)

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

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

***

### isSuccessful()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:474](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L474)

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

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

***

### refreshPriceData()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:312](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L312)

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)

#### Overrides

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

***

### requiresAction()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:374](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L374)

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)

#### Overrides

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

***

### serialize()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:1627](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L1627)

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

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

***

### setSecretPreimage()

```
setSecretPreimage(secret): Promise<void>;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:754](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L754)

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

`Promise`<`void`>

#### Throws

If an invalid secret preimage is provided

***

### settleWithLNURLWithdraw()

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:1592](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L1592)

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\_auto/FromBTCLNAutoSwap.ts:1435](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L1435)

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)

***

### waitForPayment()

```
waitForPayment(

   onPaymentReceived?, 

   checkIntervalSeconds?, 

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:1345](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L1345)

Waits till a lightning network payment is received by the intermediary, and the intermediary initiates the swap HTLC on the smart chain side. After the HTLC is initiated you can wait for an automatic settlement by the watchtowers with the [waitTillClaimed](#waittillclaimed) function, or settle manually using the [claim](#claim) or [txsClaim](#txsclaim) functions.

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?, 

   secret?, 

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

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:1503](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L1503)

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                                                                                                                                                   |
| `secret?`              | `string`      | A swap secret to broadcast to watchtowers, generally only needed if the swap was recovered from on-chain data, or the pre-image was generated outside the SDK |
| `pollIntervalSeconds?` | `number`      | How often to poll via the watchdog                                                                                                                            |

#### Returns

`Promise`<`boolean`>

whether the swap was claimed in time or not

#### Throws

If swap is in invalid state (must be [FromBTCLNAutoSwapState.CLAIM\_COMMITED](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCLNAutoSwapState.md#claim_commited))

#### Throws

If the LP refunded sooner than we were able to claim

#### 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)

***

### getWatchtowerFeeAmountBtc()

```
protected getWatchtowerFeeAmountBtc(): bigint;
```

Defined in: [atomiq-sdk/src/swaps/escrow\_swaps/frombtc/ln\_auto/FromBTCLNAutoSwap.ts:548](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/ln_auto/FromBTCLNAutoSwap.ts#L548)

Returns the watchtower fee paid in BTC satoshis, or null if known (i.e. if the swap was recovered from on-chain data)

#### Returns

`bigint`
