What's Changed
This release merges the Arkade Swap feature branch into the SDK, shipping the new @arkade-os/swap package alongside improvements to the VHTLC and contract subsystems.
New Package: @arkade-os/swap
The @arkade-os/swap package is now part of the ts-sdk monorepo. It provides the full RFQ (Request-For-Quote) swap infrastructure:
- Maker-side RFQ — submit intents and manage offer covenants with the contract manager
- Taker-side RFQ — quote, then fill without further server interaction
- Lightning send/receive corridors — drive funded RFQ swaps to completion via
RfqSwapManager - Onchain BTC corridor — onchain HTLC leg for the maker-side RFQ layer
- Nostr RFQ transport — bring Nostr-based RFQ into the package
- Lockup registration — register RFQ lockups before funding, retryable on its own
- Lightning-receive claim — client-side claim driven by the swap manager arm
- Derived secrets — RFQ swap secrets derived from seed instead of stored
VHTLC
feat(vhtlc): ScriptV2 — a new HTLC construct for swap corridorsfeat(vhtlc): non-interactive claim and refund leaves;packages/swapadoptsVHTLC.Scriptfix(vhtlc):nonInteractiveRefundis immediate, gated by server+receiver, not a timelockfix(vhtlc): validate P2TR destination scripts by content, not just lengthfix(contracts): refuse an explicit settle of a VHTLC before its refund window opens
Contract System
feat(contracts): gate generic spending on a per-contract predicatefeat(contracts): retained-but-unwatched contract watch statefeat(worker): service-worker bus accepts anintentRepositoryfix(contracts): handlerless contract row no longer fails the whole syncfix(contracts): contain a contract whose params its handler rejectsfix(contracts):PathContextreceives the block height it declaresfix(contracts): judge timelocks by chain time, and CSV per input
SDK Fixes
fix(sdk): honourwithUnrolledin the worker'sgetVtxosfix(sdk): report every spendability exclusion from one snapshotfix(sdk): stop a look-ahead drain from outlivingdispose()
Security
fix(swap): closed a nonce-reuse vulnerability inClaimPackethandling; HTTP transport hardened (class: replay / nonce-reuse; location:packages/swapClaimPacket path)
Other
fix(vtxo-manager): price the intent fee inrenewVtxosandrecoverVtxosfix(ts-sdk): declaretypescript/tsupasdevDependenciesfor standalone buildsfeat(arkade): pin the emulator co-signer key per network
Full Changelog: https://github.com/arkade-os/ts-sdk/compare/@arkade-os/sdk/0.4.59...@arkade-os/sdk/0.4.60