Skip to content

Release: develop -> main#3299

Merged
TaprootFreak merged 3 commits intomainfrom
develop
Mar 2, 2026
Merged

Release: develop -> main#3299
TaprootFreak merged 3 commits intomainfrom
develop

Conversation

@github-actions
Copy link

Automatic Release PR

This PR was automatically created after changes were pushed to develop.

Commits: 1 new commit(s)

Checklist

  • Review all changes
  • Verify CI passes
  • Approve and merge when ready for production

)

* feat: add Boltz/Lightning.space adapter for Citrea cBTC liquidity

Integrate Lightning.space (Boltz) as an additional liquidity source for
Citrea/cBTC, enabling flexible BTC → cBTC reverse swaps for amounts
smaller than the fixed 10 BTC Clementine Bridge.

* fix: correct Boltz reverse swap status handling

Use invoice.settled as success status for reverse swaps (not
transaction.claimed which is for submarine swaps). Add complete
SwapUpdateEvent enum matching boltz-backend. Simplify createReverseSwap
params since EVM chains don't need preimageHash/claimPublicKey.

* fix: use Chain Swap instead of Reverse Swap for BTC->cBTC

BTC onchain -> cBTC onchain is a Chain Swap (not a Reverse Swap which
is Lightning -> onchain). Switch to POST /v2/swap/chain with
preimageHash, claimAddress, userLockAmount. Use correct final events:
transaction.claimed for success.

* fix: complete BTC→cBTC chain swap flow with BTC sending and claiming

Previously the Boltz adapter created a chain swap but never sent BTC to
the lockup address and never called helpMeClaim, leaving swaps stuck at
swap.created. This implements the full flow:

- Fix API URL (lightning.space/v1) and endpoint paths (/swap/v2/...)
- Add getChainPairs() for pairHash and helpMeClaim() for server-side claiming
- Send BTC to lockup address via BitcoinService after swap creation
- Add state machine (btc_sent → claiming → done) in checkDepositCompletion
- Store preimage/preimageHash in correlation data for claiming

* fix: add 0x prefix to preimageHash in helpMeClaim, use lockup amount from response

The helpMeClaim endpoint expects preimageHash with 0x prefix (verified
against JuiceSwap frontend's prefix0x() call). Also use the actual
lockup amount from the Boltz response instead of the requested amount
for defensive correctness.

* fix: use claimDetails.amount for outputAmount to account for Boltz fees

The outputAmount was incorrectly set to userLockAmountSats (BTC sent)
instead of claimAmountSats (cBTC received after Boltz fees). Now stores
swap.claimDetails.amount in correlation data and uses it for the final
outputAmount calculation.

* fix: add missing await in try-catch to resolve ESLint warnings

return-await is required inside try-catch blocks per
@typescript-eslint/return-await rule.

* feat: add migration to create Boltz action and activate cBTC rule

Creates Boltz deposit action and wires it as onFail fallback for
Clementine (Action 236). Activates Rule 320 (Citrea cBTC) with
thresholds: minimal=0, optimal=0.1, maximal=0.5.

Strategy: Clementine stays primary (fee-free, 10 BTC fixed). When it
fails (e.g. balance < 10 BTC), Boltz handles flexible amounts as
fallback.

* feat: add refundPublicKey to chain swap for BTC refund on failure

Generate secp256k1 key pair and send compressed public key as
refundPublicKey in createChainSwap request. Store private key in
correlation data for potential refund signing if swap fails.

* style: fix Prettier formatting in Boltz adapter

* fix: add transaction.lockupFailed to chain swap failure statuses

Without this status, a failed lockup would leave the swap polling
indefinitely. Verified against JuiceSwap bapp which includes
lockupFailed in its swapStatusFailed list.

* feat: validate swap amount against Boltz pair limits before creation

Fetch dynamic min/max limits from Boltz chain pairs API and reject
orders where the amount falls outside the allowed range. Prevents
invalid swap creation and allows the order to retry later.

* fix: store claimTxHash for idempotent claiming and include failureDetails in errors

Persist claim transaction hash in correlation data so helpMeClaim is
not called again on restart. Include both failureReason and
failureDetails from Boltz status response in error messages.

* chore: refactoring

* fix: remove migration

* feat: determine preimage + refund key deterministically

* chore: renaming

---------

Co-authored-by: David May <david.leo.may@gmail.com>
bernd2022 and others added 2 commits March 2, 2026 11:51
* feat: add Internet Computer (ICP) blockchain integration

Add full ICP support including native ICP and ICRC-1 tokens (ckBTC, ckETH, ckUSDC, ckUSDT):
- Principal-based wallet derivation (Ed25519, BIP32/BIP39)
- Native ICP monitoring via query_blocks with internal AccountIdentifier matching
- ICRC-1 token monitoring via get_transactions (ICRC-3)
- Buy (EUR → ICP/ckUSDT), Sell (ICP/ckUSDT → EUR) pipelines
- Payment Link (OCP) support with TxId and ICRC-2 Approve/TransferFrom flows
- DEX strategies (check-liquidity, purchase, sell, supplementary)
- PayIn strategies (register, send for coin and token)
- Payout strategies (prepare, payout for coin and token)
- Deposit address generation (one Principal per user for all ICP assets)
- Signature verification for user authentication

* fix: prettier formatting in config.ts after rebase

* refactor: refactor minConfirmations to use map-based lookup

Replace nested ternary with a record lookup for better readability and maintainability.

* feat: CEX withdraw networks

* fix: payment URI

---------

Co-authored-by: David May <david.leo.may@gmail.com>
@TaprootFreak TaprootFreak merged commit af3a432 into main Mar 2, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants