# SpvFromBTCSwapState

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

State enum for SPV vault (UTXO-controlled vault) based swaps

## Enumeration Members

### CLOSED

```
CLOSED: -5;
```

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

Catastrophic failure has occurred when processing the swap on the smart chain side, this implies a bug in the smart contract code or the user and intermediary deliberately creating a bitcoin transaction with invalid format unparsable by the smart contract.

***

### FAILED

```
FAILED: -4;
```

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

Some of the bitcoin swap transaction inputs were double-spent, this means the swap has failed and no BTC was sent

***

### DECLINED

```
DECLINED: -3;
```

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

The intermediary (LP) declined to co-sign the submitted PSBT, hence the swap failed

***

### QUOTE\_EXPIRED

```
QUOTE_EXPIRED: -2;
```

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

Swap has expired for good and there is no way how it can be executed anymore

***

### QUOTE\_SOFT\_EXPIRED

```
QUOTE_SOFT_EXPIRED: -1;
```

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

A swap is almost expired, and it should be presented to the user as expired, though there is still a chance that it will be processed

***

### CREATED

```
CREATED: 0;
```

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

Swap was created, use the [SpvFromBTCSwap.getFundedPsbt](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SpvFromBTCSwap.md#getfundedpsbt) or [SpvFromBTCSwap.getPsbt](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SpvFromBTCSwap.md#getpsbt) functions to get the bitcoin swap PSBT that should be signed by the user's wallet and then submitted via the [SpvFromBTCSwap.submitPsbt](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SpvFromBTCSwap.md#submitpsbt) function.

***

### SIGNED

```
SIGNED: 1;
```

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

Swap bitcoin PSBT was submitted by the client to the SDK

***

### POSTED

```
POSTED: 2;
```

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

Swap bitcoin PSBT sent to the intermediary (LP), waiting for the intermediary co-sign it and broadcast. You can use the [SpvFromBTCSwap.waitTillClaimedOrFronted](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SpvFromBTCSwap.md#waittillclaimedorfronted) function to wait till the intermediary broadcasts the transaction and the transaction confirms.

***

### BROADCASTED

```
BROADCASTED: 3;
```

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

Intermediary (LP) has co-signed and broadcasted the bitcoin transaction. You can use the [SpvFromBTCSwap.waitTillClaimedOrFronted](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/SpvFromBTCSwap.md#waittillclaimedorfronted) function to wait till the transaction confirms.

***

### FRONTED

```
FRONTED: 4;
```

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

Settlement on the destination smart chain was fronted and funds were already received by the user, even before the final settlement.

***

### BTC\_TX\_CONFIRMED

```
BTC_TX_CONFIRMED: 5;
```

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

Bitcoin transaction confirmed with necessary amount of confirmations, wait for automatic settlement by the watchtower with the waitTillClaimedOrFronted function, or settle manually using the [FromBTCSwap.claim](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/FromBTCSwap.md#claim) or [FromBTCSwap.txsClaim](https://docs.atomiq.exchange/sdk-reference/api/atomiq-sdk/src/classes/FromBTCSwap.md#txsclaim) function.

***

### CLAIMED

```
CLAIMED: 6;
```

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

Swap settled on the smart chain and funds received
