# FromBTCSwap\<T>

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

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

## Extends

* [`IFromBTCSelfInitSwap`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/IFromBTCSelfInitSwap.md)<`T`, `FromBTCDefinition`<`T`>, [`FromBTCSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCSwapState.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

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

## Constructors

### Constructor

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

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

#### Parameters

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

#### Returns

`FromBTCSwap`<`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 FromBTCSwap<T>(wrapper, obj): FromBTCSwap<T>;
```

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

#### Parameters

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

#### Returns

`FromBTCSwap`<`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: [FromBTCSwap<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_BTC = SwapType.FROM_BTC;
```

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

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

### \_verifyQuoteDefinitelyExpired()

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

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

Checks if the swap's quote is expired for good (i.e. the swap strictly cannot be committed on-chain anymore)

#### Returns

`Promise`<`boolean`>

#### Implementation of

```
IClaimableSwap._verifyQuoteDefinitelyExpired
```

#### Inherited from

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

***

### \_verifyQuoteValid()

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

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

Checks if the swap's quote is still valid

#### Returns

`Promise`<`boolean`>

#### Implementation of

```
IClaimableSwap._verifyQuoteValid
```

#### Inherited from

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

***

### claim()

```
claim(

   _signer, 

   abortSignal?, 

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

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

Settles the swap by claiming the funds on the destination chain if the swap requires manual settlement, you can check so with isClaimable.

#### Parameters

| Parameter         | Type                                       | Description                                                                                   |
| ----------------- | ------------------------------------------ | --------------------------------------------------------------------------------------------- |
| `_signer`         | `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`] | Signer to use for signing the settlement transactions, can also be different to the recipient |
| `abortSignal?`    | `AbortSignal`                              | Abort signal                                                                                  |
| `onBeforeTxSent?` | (`txId`) => `void`                         | Optional callback triggered before the claim transaction is broadcasted                       |

#### Returns

`Promise`<`string`>

Transaction ID of the settlement (claim) transaction on the destination smart chain

#### Remarks

Might also sync the bitcoin light client during the process.

#### 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/onchain/FromBTCSwap.ts:1323](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L1323)

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)

***

### estimateBitcoinFee()

```
estimateBitcoinFee(_bitcoinWallet, feeRate?): Promise<TokenAmount<BtcToken<false>, true>>;
```

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

Estimates a bitcoin on-chain fee paid for the bitcoin swap transaction

#### Parameters

| Parameter        | Type                                                                                                                                                                                                                                                                | Description                                      |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| `_bitcoinWallet` | \| [`IBitcoinWallet`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IBitcoinWallet.md) \| [`MinimalBitcoinWalletInterface`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/MinimalBitcoinWalletInterface.md) | Sender's bitcoin wallet                          |
| `feeRate?`       | `number`                                                                                                                                                                                                                                                            | Optional fee rate in sats/vB for the transaction |

#### Returns

`Promise`<[`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)<`false`>, `true`>>

#### Implementation of

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

***

### execute()

```
execute(

   dstSigner, 

   wallet?, 

   callbacks?, 

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

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

Executes the swap with the provided bitcoin wallet,

#### 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 open a bitcoin swap address to which the BTC is then sent, this means that the address also needs to have enough native tokens to pay for gas on the destination network |
| `wallet?`                                          | \| [`IBitcoinWallet`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IBitcoinWallet.md) \| [`MinimalBitcoinWalletInterfaceWithSigner`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/MinimalBitcoinWalletInterfaceWithSigner.md)                                                                        | Bitcoin wallet to use to sign the bitcoin transaction, can also be null - then the execution waits till a transaction is received from an external wallet                                                                                                                                                                                                                  |
| `callbacks?`                                       | { `onDestinationCommitSent?`: (`destinationCommitTxId`) => `void`; `onSourceTransactionConfirmationStatus?`: (`sourceTxId?`, `confirmations?`, `targetConfirations?`, `etaMs?`) => `void`; `onSourceTransactionConfirmed?`: (`sourceTxId`) => `void`; `onSourceTransactionSent?`: (`sourceTxId`) => `void`; `onSwapSettled?`: (`destinationTxId`) => `void`; } | Callbacks to track the progress of the swap                                                                                                                                                                                                                                                                                                                                |
| `callbacks.onDestinationCommitSent?`               | (`destinationCommitTxId`) => `void`                                                                                                                                                                                                                                                                                                                            | -                                                                                                                                                                                                                                                                                                                                                                          |
| `callbacks.onSourceTransactionConfirmationStatus?` | (`sourceTxId?`, `confirmations?`, `targetConfirations?`, `etaMs?`) => `void`                                                                                                                                                                                                                                                                                   | -                                                                                                                                                                                                                                                                                                                                                                          |
| `callbacks.onSourceTransactionConfirmed?`          | (`sourceTxId`) => `void`                                                                                                                                                                                                                                                                                                                                       | -                                                                                                                                                                                                                                                                                                                                                                          |
| `callbacks.onSourceTransactionSent?`               | (`sourceTxId`) => `void`                                                                                                                                                                                                                                                                                                                                       | -                                                                                                                                                                                                                                                                                                                                                                          |
| `callbacks.onSwapSettled?`                         | (`destinationTxId`) => `void`                                                                                                                                                                                                                                                                                                                                  | -                                                                                                                                                                                                                                                                                                                                                                          |
| `options?`                                         | { `abortSignal?`: `AbortSignal`; `btcTxCheckIntervalSeconds?`: `number`; `feeRate?`: `number`; `maxWaitTillAutomaticSettlementSeconds?`: `number`; }                                                                                                                                                                                                           | Optional options for the swap like feeRate, AbortSignal, and timeouts/intervals                                                                                                                                                                                                                                                                                            |
| `options.abortSignal?`                             | `AbortSignal`                                                                                                                                                                                                                                                                                                                                                  | -                                                                                                                                                                                                                                                                                                                                                                          |
| `options.btcTxCheckIntervalSeconds?`               | `number`                                                                                                                                                                                                                                                                                                                                                       | -                                                                                                                                                                                                                                                                                                                                                                          |
| `options.feeRate?`                                 | `number`                                                                                                                                                                                                                                                                                                                                                       | -                                                                                                                                                                                                                                                                                                                                                                          |
| `options.maxWaitTillAutomaticSettlementSeconds?`   | `number`                                                                                                                                                                                                                                                                                                                                                       | -                                                                                                                                                                                                                                                                                                                                                                          |

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

[`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/onchain/FromBTCSwap.ts:243](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L243)

Returns bitcoin address where the on-chain BTC should be sent to

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

***

### getClaimerBounty()

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

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

Returns claimer bounty, acting as a reward for watchtowers to claim the swap automatically, this amount is pre-funded by the user on the destination chain when the swap escrow is initiated. For total pre-funded deposit amount see [getTotalDeposit](#gettotaldeposit).

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

***

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

***

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

  | SwapExecutionActionSignPSBT<"FUNDED_PSBT">

  | SwapExecutionActionWait<"SETTLEMENT" | "BITCOIN_CONFS">

| SwapExecutionActionSignSmartChainTx<T>>;
```

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

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?`                                       | { `bitcoinFeeRate?`: `number`; `bitcoinWallet?`: [`MinimalBitcoinWalletInterface`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/MinimalBitcoinWalletInterface.md); `manualSettlementSmartChainSigner?`: `string` \| `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`]; `maxWaitTillAutomaticSettlementSeconds?`: `number`; `skipChecks?`: `boolean`; } | Optional options argument for the additional action context (i.e. passing bitcoin wallet info to get funded PSBTs or passing the externally-generated swap secret), see the actual type in the respective swap classes |
| `options.bitcoinFeeRate?`                        | `number`                                                                                                                                                                                                                                                                                                                                                                      | Optional fee rate to use for the created Bitcoin transaction                                                                                                                                                           |
| `options.bitcoinWallet?`                         | [`MinimalBitcoinWalletInterface`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/MinimalBitcoinWalletInterface.md)                                                                                                                                                                                                                                | Bitcoin wallet to use, when provided the function returns a funded psbt (`"FUNDED_PSBT"`), if not passed just a bitcoin receive address is returned (`"ADDRESS"`)                                                      |
| `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.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)<`false`> | [`SwapExecutionActionSignPSBT`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionSignPSBT.md)<`"FUNDED_PSBT"`> | [`SwapExecutionActionWait`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionWait.md)<`"SETTLEMENT"` | `"BITCOIN_CONFS"`> | [`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<false>

     | SwapExecutionActionSignPSBT<"FUNDED_PSBT">

     | SwapExecutionActionWait<"SETTLEMENT" | "BITCOIN_CONFS">

     | SwapExecutionActionSignSmartChainTx<T>;

  stateInfo: SwapStateInfo<FromBTCSwapState>;

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

}>;
```

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

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?`                                       | { `bitcoinFeeRate?`: `number`; `bitcoinWallet?`: [`MinimalBitcoinWalletInterface`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/MinimalBitcoinWalletInterface.md); `manualSettlementSmartChainSigner?`: `string` \| `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`]; `maxWaitTillAutomaticSettlementSeconds?`: `number`; `skipBuildingAction?`: `boolean`; `skipChecks?`: `boolean`; } | Optional options argument for the additional execution status context, see the actual type in the respective swap classes |
| `options.bitcoinFeeRate?`                        | `number`                                                                                                                                                                                                                                                                                                                                                                                                        | -                                                                                                                         |
| `options.bitcoinWallet?`                         | [`MinimalBitcoinWalletInterface`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/MinimalBitcoinWalletInterface.md)                                                                                                                                                                                                                                                                  | -                                                                                                                         |
| `options.manualSettlementSmartChainSigner?`      | `string` \| `T`\[`"Signer"`] \| `T`\[`"NativeSigner"`]                                                                                                                                                                                                                                                                                                                                                          | -                                                                                                                         |
| `options.maxWaitTillAutomaticSettlementSeconds?` | `number`                                                                                                                                                                                                                                                                                                                                                                                                        | -                                                                                                                         |
| `options.skipBuildingAction?`                    | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                       | -                                                                                                                         |
| `options.skipChecks?`                            | `boolean`                                                                                                                                                                                                                                                                                                                                                                                                       | -                                                                                                                         |

#### Returns

`Promise`<{ `currentAction`: | [`SwapExecutionActionSendToAddress`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionSendToAddress.md)<`false`> | [`SwapExecutionActionSignPSBT`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionSignPSBT.md)<`"FUNDED_PSBT"`> | [`SwapExecutionActionWait`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionWait.md)<`"SETTLEMENT"` | `"BITCOIN_CONFS"`> | [`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)<[`FromBTCSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCSwapState.md)>; `steps`: \[[`SwapExecutionStepSetup`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionStepSetup.md)<`T`\[`"ChainId"`]>, [`SwapExecutionStepPayment`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionStepPayment.md)<`"BITCOIN"`>, [`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

[`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(options?): Promise<[SwapExecutionStepSetup<T["ChainId"]>, SwapExecutionStepPayment<"BITCOIN">, SwapExecutionStepSettlement<T["ChainId"], "awaiting_automatic" | "awaiting_manual">]>;
```

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

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`<\[[`SwapExecutionStepSetup`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionStepSetup.md)<`T`\[`"ChainId"`]>, [`SwapExecutionStepPayment`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionStepPayment.md)<`"BITCOIN"`>, [`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

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

***

### getFundedPsbt()

```
getFundedPsbt(

   _bitcoinWallet, 

   feeRate?, 

   additionalOutputs?): Promise<{

  feeRate: number;

  psbt: Transaction;

  psbtBase64: string;

  psbtHex: string;

  signInputs: number[];

}>;
```

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

Returns the PSBT that is already funded with wallet's UTXOs (runs a coin-selection algorithm to choose UTXOs to use), also returns inputs indices that need to be signed by the wallet before submitting the PSBT back to the SDK with [submitPsbt](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IBTCWalletSwap.md#submitpsbt)

#### Parameters

| Parameter            | Type                                                                                                                                                                                                                                                                | Description                                                                    |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| `_bitcoinWallet`     | \| [`IBitcoinWallet`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IBitcoinWallet.md) \| [`MinimalBitcoinWalletInterface`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/MinimalBitcoinWalletInterface.md) | Sender's bitcoin wallet                                                        |
| `feeRate?`           | `number`                                                                                                                                                                                                                                                            | Optional fee rate in sats/vB for the transaction                               |
| `additionalOutputs?` | ( \| { `amount`: `bigint`; `outputScript`: `Uint8Array`; } \| { `address`: `string`; `amount`: `bigint`; })\[]                                                                                                                                                      | additional outputs to add to the PSBT - can be used to collect fees from users |

#### Returns

`Promise`<{ `feeRate`: `number`; `psbt`: `Transaction`; `psbtBase64`: `string`; `psbtHex`: `string`; `signInputs`: `number`\[]; }>

#### Implementation of

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

***

### getHyperlink()

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

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

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)

#### 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<false>>;
```

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

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

#### 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/onchain/FromBTCSwap.ts:268](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L268)

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<false>;
```

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

Returns the input token of the swap

#### Returns

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

#### 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/onchain/FromBTCSwap.ts:275](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L275)

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)

***

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

***

### getRequiredConfirmationsCount()

```
getRequiredConfirmationsCount(): number;
```

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

Returns the number of confirmations required for the bitcoin transaction for this swap to complete and settle

#### Returns

`number`

#### Implementation of

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

***

### 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/IEscrowSelfInitSwap.ts:115](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/IEscrowSelfInitSwap.ts#L115)

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

#### Inherited from

[`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(): FromBTCSwapState;
```

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

[`FromBTCSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCSwapState.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<FromBTCSwapState>;
```

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)<[`FromBTCSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCSwapState.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/onchain/FromBTCSwap.ts:309](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L309)

Returns timeout time (in UNIX milliseconds) when the on-chain address will expire and no funds should be sent to that address anymore

#### 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/IFromBTCSelfInitSwap.ts:193](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/IFromBTCSelfInitSwap.ts#L193)

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`>; }>

#### Inherited from

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

***

### 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/onchain/FromBTCSwap.ts:330](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L330)

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/onchain/FromBTCSwap.ts:344](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L344)

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/onchain/FromBTCSwap.ts:323](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L323)

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/onchain/FromBTCSwap.ts:351](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L351)

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)

***

### isQuoteExpired()

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

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

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/onchain/FromBTCSwap.ts:366](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L366)

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/onchain/FromBTCSwap.ts:337](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L337)

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/onchain/FromBTCSwap.ts:316](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L316)

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

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

***

### sendBitcoinTransaction()

```
sendBitcoinTransaction(wallet, feeRate?): Promise<string>;
```

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

Sends a swap bitcoin transaction via the passed bitcoin wallet

#### Parameters

| Parameter  | Type                                                                                                                                                                                                                                                                                    | Description                                      |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| `wallet`   | \| [`IBitcoinWallet`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/interfaces/IBitcoinWallet.md) \| [`MinimalBitcoinWalletInterfaceWithSigner`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/MinimalBitcoinWalletInterfaceWithSigner.md) | Sender's bitcoin wallet                          |
| `feeRate?` | `number`                                                                                                                                                                                                                                                                                | Optional fee rate in sats/vB for the transaction |

#### Returns

`Promise`<`string`>

#### Implementation of

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

***

### serialize()

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

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

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)

***

### submitPsbt()

```
submitPsbt(_psbt): Promise<string>;
```

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

Submits a PSBT signed by the wallet back to the SDK

#### Parameters

| Parameter | Type  | Description                                                                |
| --------- | ----- | -------------------------------------------------------------------------- |
| `_psbt`   | `any` | A PSBT, either a Transaction object or a hex or base64 encoded PSBT string |

#### Returns

`Promise`<`string`>

#### Implementation of

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

***

### txsClaim()

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

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

Returns transactions for settling (claiming) the swap if the swap requires manual settlement, you can check so with isClaimable. After sending the transaction manually be sure to call the 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"`] | Address of the signer to create the claim transactions for |

#### Returns

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

#### Remarks

Might also return transactions necessary to sync the bitcoin light client.

#### Throws

If the swap is in invalid state (must be [FromBTCSwapState.BTC\_TX\_CONFIRMED](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/FromBTCSwapState.md#btc_tx_confirmed))

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

***

### waitForBitcoinTransaction()

```
waitForBitcoinTransaction(

   updateCallback?, 

   checkIntervalSeconds?, 

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

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

Waits till the bitcoin transaction gets the required number of confirmations

#### Parameters

| Parameter               | Type                                                                      | Description                                                                       |
| ----------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `updateCallback?`       | (`txId?`, `confirmations?`, `targetConfirmations?`, `txEtaMs?`) => `void` | Callback called when txId is found, and also called with subsequent confirmations |
| `checkIntervalSeconds?` | `number`                                                                  | How often to check the bitcoin transaction                                        |
| `abortSignal?`          | `AbortSignal`                                                             | Abort signal                                                                      |

#### Returns

`Promise`<`string`>

#### Throws

if in invalid state

#### Implementation of

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

***

### waitTillClaimed()

```
waitTillClaimed(

   maxWaitTimeSeconds?, 

   abortSignal?, 

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

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

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                                                |
| `pollIntervalSeconds?` | `number`      | -                                                          |

#### 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/onchain/FromBTCSwap.ts:1346](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/escrow_swaps/frombtc/onchain/FromBTCSwap.ts#L1346)

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)
