Skip to content

[RFC] common: add BOLT12 payer proof support#8990

Open
vincenzopalazzo wants to merge 1 commit intoElementsProject:masterfrom
vincenzopalazzo:codex/payer-proof-1295
Open

[RFC] common: add BOLT12 payer proof support#8990
vincenzopalazzo wants to merge 1 commit intoElementsProject:masterfrom
vincenzopalazzo:codex/payer-proof-1295

Conversation

@vincenzopalazzo
Copy link
Copy Markdown
Collaborator

@vincenzopalazzo vincenzopalazzo commented Mar 25, 2026

Summary

  • add common-layer payer proof encode, decode, and verification support for the lnp BOLT12 proof format
  • expose payer proof decoding through decode, bolt12-cli, and type guessing in the offers plugin
  • add vector-backed payer proof tests covering the published payer-proof corpus, including note-bearing proofs and selective disclosure of an odd experimental TLV

Testing

  • make -j1 common/test/run-payer_proof
  • ./common/test/run-payer_proof
  • make -j1 plugins/test/run-decode_guess_type devtools/bolt12-cli plugins/offers
  • ./plugins/test/run-decode_guess_type
  • jq -r '.vectors[] | select(.expected.valid) | [.name, .expected.proof_bech32] | @tsv' /tmp/payer-proof-test-vectors/test_vectors.json | while IFS=$'\t' read -r name proof; do ./devtools/bolt12-cli decode "$proof" >/dev/null || { echo "$name"; exit 1; }; done
  • make -j1 common/test/run-bolt12_merkle common/test/run-bolt12-format-string-test
  • ./common/test/run-bolt12_merkle
  • ./common/test/run-bolt12-format-string-test

Changelog-None

@vincenzopalazzo vincenzopalazzo changed the title common: add BOLT12 payer proof support [RFC] common: add BOLT12 payer proof support Mar 26, 2026
vincenzopalazzo

This comment was marked as resolved.

@vincenzopalazzo vincenzopalazzo force-pushed the codex/payer-proof-1295 branch from a7db989 to d7a2239 Compare March 26, 2026 18:32
Add common-layer payer proof encode, decode, and verification support
for the `lnp` BOLT12 proof format. Expose payer proof decoding through
`decode`, `bolt12-cli`, and type guessing in the offers plugin.

Add vector-backed payer proof tests covering the published payer-proof
corpus, including note-bearing proofs and selective disclosure of an odd
experimental TLV.

Changelog-None
@vincenzopalazzo vincenzopalazzo force-pushed the codex/payer-proof-1295 branch from d7a2239 to 8be6d5c Compare March 26, 2026 18:48
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.

1 participant