# SpvFromBTCSwap\<T>

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:202](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L202)

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

## Extends

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

## Type Parameters

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

## Constructors

### Constructor

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:291](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L291)

#### Parameters

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

#### Returns

`SpvFromBTCSwap`<`T`>

#### Overrides

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

### Constructor

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:292](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L292)

#### Parameters

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

#### Returns

`SpvFromBTCSwap`<`T`>

#### Overrides

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

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

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

***

### events

```
readonly events: EventEmitter<{

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

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

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

***

### minimumBtcFeeRate

```
readonly minimumBtcFeeRate: number;
```

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:281](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L281)

Minimum fee rate in sats/vB that the input bitcoin transaction needs to pay

***

### TYPE

```
readonly TYPE: SPV_VAULT_FROM_BTC = SwapType.SPV_VAULT_FROM_BTC;
```

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:208](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L208)

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

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

***

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

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

## Methods

### claim()

```
claim(

   _signer, 

   abortSignal?, 

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:1659](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1659)

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

#### Remarks

Might also sync the bitcoin light client during the process.

#### Throws

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

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

***

### estimateBitcoinFee()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:1032](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1032)

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(

   wallet, 

   callbacks?, 

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:1066](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1066)

Executes the swap with the provided 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)       | Bitcoin wallet to use to sign the bitcoin transaction                           |
| `callbacks?`                                       | { `onSourceTransactionConfirmationStatus?`: (`sourceTxId?`, `confirmations?`, `targetConfirations?`, `etaMs?`) => `void`; `onSourceTransactionConfirmed?`: (`sourceTxId`) => `void`; `onSourceTransactionSent?`: (`sourceTxId`) => `void`; `onSwapSettled?`: (`destinationTxId`) => `void`; } | Callbacks to track the progress of the swap                                     |
| `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 the [claim](#claim) function 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

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

***

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

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

***

### getExecutionAction()

```
getExecutionAction(options?): Promise<

  | SwapExecutionActionWait<"SETTLEMENT" | "BITCOIN_CONFS">

  | SwapExecutionActionSignPSBT

| SwapExecutionActionSignSmartChainTx<T>>;
```

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:1443](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1443)

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`; } | 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)                                                                                                                                                                                                      | Optional bitcoin wallet address specification to return a funded PSBT, if not provided a raw PSBT is returned instead which necessitates the implementor to manually add inputs to the bitcoin transaction and **set the nSequence field of the 2nd input** (input 1 - indexing from 0) to the value returned in `in1sequence` |
| `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)                                                                                                                                                                                                           |

#### Returns

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

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

***

### getExecutionStatus()

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

  currentAction:   | SwapExecutionActionWait<"SETTLEMENT" | "BITCOIN_CONFS">

     | SwapExecutionActionSignPSBT

     | SwapExecutionActionSignSmartChainTx<T>;

  stateInfo: SwapStateInfo<SpvFromBTCSwapState>;

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

}>;
```

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:1461](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1461)

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

#### Returns

`Promise`<{ `currentAction`: | [`SwapExecutionActionWait`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionWait.md)<`"SETTLEMENT"` | `"BITCOIN_CONFS"`> | [`SwapExecutionActionSignPSBT`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/type-aliases/SwapExecutionActionSignPSBT.md) | [`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)<[`SpvFromBTCSwapState`](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/SpvFromBTCSwapState.md)>; `steps`: \[[`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

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

***

### getExecutionSteps()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:1490](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1490)

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

#### Parameters

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

#### Returns

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

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

***

### getFee()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:685](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L685)

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

#### Returns

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

#### Implementation of

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

#### Overrides

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

***

### getFeeBreakdown()

```
getFeeBreakdown(): [{

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

  type: SWAP;

}, {

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

  type: NETWORK_OUTPUT;

}];
```

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:708](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L708)

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

#### Implementation of

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

#### Overrides

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

***

### getFundedPsbt()

```
getFundedPsbt(

   _bitcoinWallet, 

   feeRate?, 

   additionalOutputs?): Promise<{

  feeRate: number;

  psbt: Transaction;

  psbtBase64: string;

  psbtHex: string;

  signInputs: number[];

}>;
```

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:894](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L894)

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](#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`\[]; }>

#### Remarks

Note that when passing the `feeRate` argument, the fee must be at least [minimumBtcFeeRate](#minimumbtcfeerate) sats/vB.

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

***

### getGasDropOutput()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:741](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L741)

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

#### Returns

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

#### Implementation of

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

***

### getId()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:446](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L446)

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

#### Returns

`string`

#### Implementation of

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

#### Overrides

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

***

### getInput()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:762](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L762)

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

#### Implementation of

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

#### Overrides

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

***

### getInputAddress()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:490](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L490)

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

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

***

### getInputToken()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:755](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L755)

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

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

***

### getInputTxId()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:497](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L497)

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

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

***

### getInputWithoutFee()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:748](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L748)

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

#### Implementation of

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

#### Overrides

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

***

### getOutput()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:734](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L734)

Returns output amount of the swap, user receives this much

#### Returns

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

#### Implementation of

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

#### Overrides

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

***

### getOutputAddress()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:476](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L476)

Returns destination address of the swap

#### Returns

`string`

#### Implementation of

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

#### Overrides

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

***

### getOutputToken()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:727](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L727)

Returns the output token of the swap

#### Returns

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

#### Implementation of

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

#### Overrides

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

***

### getOutputTxId()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:483](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L483)

Returns swap output transaction ID on the destination chain

#### Returns

`string`

#### Implementation of

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

#### Overrides

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

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

***

### getPsbt()

```
getPsbt(): Promise<{

  feeRate: number;

  in1sequence: number;

  psbt: Transaction;

  psbtBase64: string;

  psbtHex: string;

}>;
```

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:838](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L838)

Returns the raw PSBT (not funded), the wallet should fund the PSBT (add its inputs) and importantly **set the nSequence field of the 2nd input** (input 1 - indexing from 0) to the value returned in `in1sequence`, sign the PSBT and then pass it back to the swap with [submitPsbt](#submitpsbt) function. The transaction should use at least the returned `feeRate` sats/vB as the transaction fee.

#### Returns

`Promise`<{ `feeRate`: `number`; `in1sequence`: `number`; `psbt`: `Transaction`; `psbtBase64`: `string`; `psbtHex`: `string`; }>

***

### getQuoteExpiry()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:453](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L453)

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)

#### Overrides

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

***

### getRequiredConfirmationsCount()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:773](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L773)

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)

***

### getSpvVaultData()

```
getSpvVaultData(): object;
```

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:562](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L562)

Returns the data about used spv vault (UTXO-controlled vault) to perform the swap

#### Returns

`object`

| Name      | Type     | Defined in                                                                                                                                                                                 |
| --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `owner`   | `string` | [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:563](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L563) |
| `utxo`    | `string` | [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:565](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L565) |
| `vaultId` | `bigint` | [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:564](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L564) |

***

### getState()

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

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

Returns the current state of the swap

#### Returns

`number`

#### Implementation of

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

#### Inherited from

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

***

### getStateInfo()

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

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

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

#### Returns

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

#### Implementation of

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

#### Inherited from

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

***

### getTransactionDetails()

```
getTransactionDetails(): Promise<{

  in0sequence: number;

  in0txid: string;

  in0vout: number;

  in1sequence: number;

  locktime: number;

  out1script: Uint8Array;

  out2amount: bigint;

  out2script: Uint8Array;

  vaultAmount: bigint;

  vaultScript: Uint8Array;

}>;
```

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:781](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L781)

Returns raw transaction details that can be used to manually create a swap PSBT. It is better to use the [getPsbt](#getpsbt) or [getFundedPsbt](#getfundedpsbt) function retrieve an already prepared PSBT.

#### Returns

`Promise`<{ `in0sequence`: `number`; `in0txid`: `string`; `in0vout`: `number`; `in1sequence`: `number`; `locktime`: `number`; `out1script`: `Uint8Array`; `out2amount`: `bigint`; `out2script`: `Uint8Array`; `vaultAmount`: `bigint`; `vaultScript`: `Uint8Array`; }>

***

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

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

***

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

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

***

### isClaimable()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:518](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L518)

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

#### Returns

`boolean`

#### Implementation of

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

***

### isFailed()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:532](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L532)

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

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

***

### isFinished()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:511](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L511)

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

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

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

***

### isInProgress()

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

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

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

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

***

### isQuoteExpired()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:548](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L548)

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

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

***

### isQuoteSoftExpired()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:555](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L555)

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

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

***

### isSuccessful()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:525](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L525)

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

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

***

### refreshPriceData()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:406](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L406)

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

#### Returns

`Promise`<`void`>

#### Implementation of

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

#### Overrides

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

***

### requiresAction()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:504](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L504)

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

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

***

### sendBitcoinTransaction()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:1042](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1042)

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/spv\_swaps/SpvFromBTCSwap.ts:1858](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1858)

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

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

***

### submitPsbt()

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:938](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L938)

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/spv\_swaps/SpvFromBTCSwap.ts:1603](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1603)

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, can also be different to the recipient |

#### 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 [SpvFromBTCSwapState.BTC\_TX\_CONFIRMED](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/SpvFromBTCSwapState.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)

***

### waitForBitcoinTransaction()

```
waitForBitcoinTransaction(

   updateCallback?, 

   checkIntervalSeconds?, 

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:1534](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1534)

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?): Promise<boolean>;
```

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:1744](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1744)

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

#### Parameters

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

#### Returns

`Promise`<`boolean`>

Whether the swap was claimed in time or not

#### Remarks

This is an alias for the [waitTillClaimedOrFronted](#waittillclaimedorfronted) function and will also resolve if the swap has been fronted (not necessarily claimed)

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

***

### waitTillClaimedOrFronted()

```
waitTillClaimedOrFronted(

   maxWaitTimeSeconds?, 

   abortSignal?, 

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:1759](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1759)

Waits till the swap is successfully fronted or settled on the destination chain

#### Parameters

| Parameter              | Type          | Description                                                                                   |
| ---------------------- | ------------- | --------------------------------------------------------------------------------------------- |
| `maxWaitTimeSeconds?`  | `number`      | Maximum time in seconds to wait for the swap to be settled (by default it waits indefinitely) |
| `abortSignal?`         | `AbortSignal` | Abort signal                                                                                  |
| `pollIntervalSeconds?` | `number`      | How often to poll via the watchdog                                                            |

#### Returns

`Promise`<`boolean`>

whether the swap was claimed or fronted automatically or not, if the swap was not claimed the user can claim manually through the [claim](#claim) function

***

### waitTillExecuted()

```
waitTillExecuted(

   updateCallback?, 

   checkIntervalSeconds?, 

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

Defined in: [atomiq-sdk/src/swaps/spv\_swaps/SpvFromBTCSwap.ts:1842](https://github.com/atomiqlabs/atomiq-sdk/blob/786509324f7f09c427e9ccfe527d82e496f06af5/src/swaps/spv_swaps/SpvFromBTCSwap.ts#L1842)

Waits till the bitcoin transaction confirms and swap settled on the destination chain

#### 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 (5 seconds by default)                 |
| `abortSignal?`          | `AbortSignal`                                                             | Abort signal                                                                      |

#### Returns

`Promise`<`void`>

#### Throws

if in invalid state (must be [SpvFromBTCSwapState.POSTED](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/SpvFromBTCSwapState.md#posted) or [SpvFromBTCSwapState.BROADCASTED](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/enumerations/SpvFromBTCSwapState.md#broadcasted) states)
