# Versions

## 17.1.1

- `signSharedUtxosRefund`, `signSwapInFallbackRefund`: Add `block_height` to
    timelock a refund until a later block

## 17.0.0

- Add support for the `btcsignet` network
- `cancelSwapIn`: Add method to cancel a swap in before signing its fallback
- `cancelSwapOut`, `releaseSwapOutSecret`: `is_taproot` is no longer needed
- `createSharedAddress`: Add method to create a shared address with the swap
    service to receive utxos for swap ins
- `createSwapIn`: Add method to create a swap in with shared address utxos
- `deferSwapInCoopSettlement`: Add method to defer cosigning the cooperative
    settlement of a swap in that is not paid yet
- `getSharedUtxos`: Add method to get the unspent utxos of a shared address
- `getSwapInQuote`: Add `is_fast` and `utxos_count` to quote swap ins
- `sharedAddressScript`: Add method to derive the scripts of a shared address
- `signSharedUtxosRefund`: Add method to refund expired shared address utxos
- `signSwapInCoopSettlement`: Add method to cosign the cooperative settlement
    of a swap in
- `signSwapInFallbackRefund`: Add method to refund a swap in fallback HTLC
    that the swap service published without paying, after it times out
- `signSwapInServiceFallback`: Add method to sign the service fallback
    transactions of a swap in
- `spendSharedUtxos`: Add method to spend shared address utxos with the swap
    service
- `subscribeToSwapInStatus`: Add method to subscribe to the status of swap ins
- `swapInServiceFallbackTx`: Add method to get a swap in service fallback
    transaction

### Breaking Changes

- `checkQuote`: Method is removed
- `createSwapIn`: Method is renamed to `createLegacySwapIn`
- `createSwapOut`: Method is renamed to `createLegacySwapOut`
- `createTaprootSwapOut`: Method is renamed to `createSwapOut`
- `subscribeToSwapInStatus`: Method is renamed to
    `subscribeToLegacySwapInStatus`
- `swapInFee`: Method is renamed to `legacySwapInFee`

## 16.0.10

### Breaking Changes

- Node.js 22 or greater is now required

## 15.0.1

### Breaking Changes

- Node.js 20 or greater is now required

## 14.0.11

- `createSwapOut`, `getSwapMacaroon`: Adjust getting auth for new response

## 14.0.2

### Breaking Changes

- Node.js 18 or greater is now required

## 13.0.2

### Breaking Changes

- Node.js 16 or greater is now required

## 12.0.5

- Add support for P2TR addresses

### Breaking Changes

- Node.js 14 or greater is now required

## 11.4.0

- `cancelSwapOut`: Add method to early cancel a pending swap out

## 11.3.0

- `createTaprootSwapOut`: Add method to request a Taproot Loop Out
- `getCoopSignedTx`: Add method to support getting a cooperative sweep tx
- `releaseSwapOutSecret`: Add `is_taproot` to support releasing Taproot secret

## 11.2.3

- `findDeposit`: Add option to specify `output_script` instead of `address`
- `findDeposit`: Add `poll_interval_ms` for request polling timer control
- `taprootClaimTransaction`, `taprootRefundTransaction`: Add `internal_key`

## 11.1.1

- `attemptTaprootClaim`, `swapScriptBranches`, `taprootCoopTransaction`,
     `taprootRefundTransaction`: Add methods for Taproot swaps

## 11.0.1

### Breaking Changes

- Remove `askForFeeRate`, `getFundedTransaction`, `maintainUtxoLocks` methods
    and move to `ln-sync` library.

## 10.4.2

- `getFundedTransaction`: Return `lock_expires_at` to indicate input expiration lock date
- `maintainUtxoLocks`: Add method to keep internal tx funding input locks active

## 10.3.0

- `askForFeeRate`: Add method to get a desired chain fee rate
- `getFundedTransaction`: Add `chain_fee_tokens_per_vbyte` to specify chain fee rate

## 10.2.0

- `getFundedTransaction`: Add method to get a funded transaction
- `getPsbtFromTransaction`: Add method to derive a PSBT from a raw transaction

## 10.1.0

- `cancelSwapOut`: Cleanly cancel a swap out

## 10.0.6

- `attemptSweep`: Clamp output value above dust when fees consume all funds

## 10.0.3

- `createSwapIn`: `probe_request` is now required
- `createSwapIn`: Add support for `user_agent`
- `createSwapOut`: Add support for `user_agent`

## 9.0.1

- Fix missing dependency reference

## 9.0.0

### Breaking Changes

- Pass a `metadata` object instead of `macaroon` and `preimage` for authentication.

## 8.0.1

- `getSwapOutQuote`: remove `cltv_delta` from response

### Breaking Change

- `getSwapOutQuote`: `cltv_delta` is undefined, use the `cltv_delta` from the request instead

## 7.1.2

- `decodeSwapRecovery`: Pull out version field from recovery details

## 7.1.0

- `genericSwapService`: Add method to create generic swap server object

##  7.0.2

- `isSweep`: Add support for more raw transaction scenarios

## 7.0.0

Switch swap script to V2:

- `attemptRefund`: Allow specifying the `version` of the swap script
- `createSwapIn`: Returns `version` of the created swap
- `createSwapOut`: Returns `version` of the created swap
- `decodeSwapRecovery`: Returns `version` of the swap recovery
- `encodeSwapRecovery`: Allow specifying `version` of the swap script
- `isSweep`: Add support for detecting v2 sweeps

### Breaking Changes

- `attemptRefund`: Specifying the `version` of the swap script required for v2
- `createSwapIn`: Now creates a version 2 swap
- `createSwapOut`: Now creates a version 2 swap
- `encodeSwapRecovery`: You must now specify the swap version
- `swapInAddress`: Method is removed, use `createSwapIn`: `address`

## 6.1.1

- `swapScriptV2`: Improve overall support for future swap script version

## 6.1.0

- `swapScriptV2`: Add method to support future swap script version

## 6.0.0

- `createSwapOut`: Add argument `timeout` to request a specific swap timeout
- `getSwapOutQuote`: Add argument `timeout` to request a specific swap timeout
- `getSwapOutTerms` add `max_cltv_delta` for server maximum cltv delta tolerance
- `getSwapOutTerms` add `min_cltv_delta` for server minimum cltv delta tolerance
- `subscribeToSwapInStatus`: Add method to track server's view of swap in
- `subscribeToSwapOutStatus`: Add method to track server's view of swap out

### Breaking Changes

- `createSwapOut`: The argument `timeout` is now required
- `getSwapOutQuote`: The argument `timeout` is now required

## 5.8.1

- `createSwapIn`: Add support for `service_message`
- `createSwapOut`: Add support for `service_message`

## 5.7.0

- `getSwapInQuote`: Add support for macaroon and preimage for an api-key quote
- `getSwapInTerms`: Add support for macaroon and preimage for api-key terms
- `getSwapOutQuote`: Add support for macaroon and preimage for an api-key quote
- `getSwapOutTerms`: Add support for macaroon and preimage for api-key terms

## 5.6.0

- `releaseSwapOutSecret`: Add method to release the swap secret to the server

## 5.5.1

- `lightningLabsSwapsService`:  add `socket` argument to specify custom socket

## 5.4.1

- `createSwapIn`: switch `address` to use native segwit swap address
- `createSwapIn`: add `nested_address` to show alternative nested swap address

## 5.3.4

- `attemptSweep`: add `sends` parameter to specify exact amount sends to attempt

## 5.2.1

- `createSwapIn`: add `in_through` parameter to specify swap inbound peer

## 5.1.2

- `swapUserId`: add method to derive a user id that is encoded in a macaroon

## 5.0.0

Switch to using paid LightningLabs swap service by default

- `getSwapMacaroon`: add method to get a swap macaroon and auth payment request

## 4.1.0

- Add delay parameter to swap out quotes

## 4.0.2

- Add `isSweep` to determine if a raw transaction is a sweep

### Breaking Changes

- `checkQuote`: Eliminate function

## 3.1.1

- `createSwapOut`: Add `fund_at` attribute to specify an acceptable funding time

## 3.0.0

- Add `getSwapInTerms` to look up max and min swap sizes for on-to-off-chain
- Add `getSwapOutTerms` to look up max and min swap sizes for off-to-on-chain
- Add `getSwapInQuote`: attribute `fee` for the total fee of the swap
- Add `getSwapOutQuote`: attribute `fee` for the total fee of the swap

### Breaking Changes

- `createSwapIn`: Remove `base_fee` and `fee_rate`
- `createSwapIn`: Add required argument `fee` to specify fee to pay for swap
- `getSwapInQuote`: Add required `tokens` argument
- `getSwapInQuote`: Remove max and min swap sizes
- `getSwapInQuote`: Remove base fee and fee rate
- `getSwapOutQuote`: Add required `tokens` argument
- `getSwapOutQuote`: Remove max and min swap sizes
- `getSwapOutQuote`: Remove base fee and fee rate
