feat: support signet and regtest L402 capture #14

Merged
thesimplekid merged 1 commit from fix/8-signet-regtest into main 2026-10-09 14:21:21 +00:00
Owner

L402 and manual capture now work with signet and regtest LDK nodes. Invoice validation checks the correct BOLT11 currency for all four Bitcoin networks. Creating an X402 or Both intent on signet/regtest fails with a configuration error before issuing an invoice; the new internal receipt/L402 namespaces are never advertised as x402 network identifiers.

Adds a separate real-node test through the pinned LDK Server e2e-tests harness, plus just test-regtest and a regtest Nix shell. The runner uses an isolated scratch checkout/target and leaves the library lockfile unchanged. The shell supplies bitcoind, Git and Python so it also runs on NixOS.

Validation:

  • Formatting, Clippy, documentation and all 50 unit/protocol integration/doc tests pass in the x86_64 Linux Nix checks.
  • The new signet/regtest fixture test verifies manual L402 issuance/capture and rejection of unsupported x402 configurations before any invoice RPC.
  • The real regtest test passes against two LDK Server processes at 21a903ccb89496285c58a55ffdce42a9f0353a05 and pinned nixpkgs bitcoind 31.1. It verifies two intents for one resource, explicit capture of the selected payment, rejection with no preimage at the payer, and recovery/claim of a payment funded while the engine was closed.
  • Real-channel coverage was run on regtest; signet uses the signed-invoice fixtures. aarch64 was not checked.

Stacked on #13, which provides the missed-event reconciliation used by the real-node test.

Closes #8.

L402 and manual capture now work with signet and regtest LDK nodes. Invoice validation checks the correct BOLT11 currency for all four Bitcoin networks. Creating an `X402` or `Both` intent on signet/regtest fails with a configuration error before issuing an invoice; the new internal receipt/L402 namespaces are never advertised as x402 network identifiers. Adds a separate real-node test through the pinned LDK Server `e2e-tests` harness, plus `just test-regtest` and a `regtest` Nix shell. The runner uses an isolated scratch checkout/target and leaves the library lockfile unchanged. The shell supplies bitcoind, Git and Python so it also runs on NixOS. Validation: - Formatting, Clippy, documentation and all 50 unit/protocol integration/doc tests pass in the x86_64 Linux Nix checks. - The new signet/regtest fixture test verifies manual L402 issuance/capture and rejection of unsupported x402 configurations before any invoice RPC. - The real regtest test passes against two LDK Server processes at `21a903ccb89496285c58a55ffdce42a9f0353a05` and pinned nixpkgs bitcoind 31.1. It verifies two intents for one resource, explicit capture of the selected payment, rejection with no preimage at the payer, and recovery/claim of a payment funded while the engine was closed. - Real-channel coverage was run on regtest; signet uses the signed-invoice fixtures. aarch64 was not checked. Stacked on #13, which provides the missed-event reconciliation used by the real-node test. Closes #8.
feat: support signet and regtest L402 capture
Some checks failed
Checks / format (pull_request) Failing after 3s
Checks / cdk-compatible (pull_request) Failing after 2s
Checks / checks (pull_request) Failing after 2s
Checks / format (push) Has been cancelled
Checks / checks (push) Has been cancelled
Checks / cdk-compatible (push) Has been cancelled
887fe121f5
Validate BOLT11 currencies on all four Bitcoin networks and reject x402
configuration on signet/regtest before invoice issuance. Keep new internal
L402/receipt namespaces separate from supported x402 network identifiers.

Add a real two-node regtest scenario through the pinned LDK Server harness,
plus a Nix shell and runner for repeatable local channel tests.

Closes #8.
thesimplekid changed target branch from fix/5-reconcile-held-payments to main 2026-10-09 14:21:19 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thesimplekid/satsettle!14
No description provided.