silentpayments: add light client API - #1912
Open
theStack wants to merge 8 commits into
Open
Conversation
…zation Co-authored-by: josibake <josibake@protonmail.com>
Best reviewed with `--ignore-all-space` (or `-w` for short).
This is preparatory for introducing the light client API function in the next commit. To keep the current call-site which only creates a single output pubkey (in `_sender_create_outputs`) as-is, a corresponding wrapper function calls the new function with one spend pubkey. No behaviour or API change in this commit yet. Best reviewed with `--ignore-all-space` (or `-w` for short).
Add function for creating k=0 outputs for multiple spend public keys. These keys can then be checked for existance against the UTXO set/blockchain. If a match is found, the client needs to download the full transaction and rescan with `_scan_outputs`. Co-authored-by: josibake <josibake@protonmail.com>
Co-authored-by: josibake <josibake@protonmail.com>
TODO: also test with 65-byte sized prevout_summary serializations
theStack
force-pushed
the
silentpayments_module_lightclient_api
branch
from
August 19, 2026 18:11
c337dd6 to
0b1cde3
Compare
Contributor
Author
|
Rebased on master (adapting to the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the
silentpaymentsmodule with API functions forprevouts_summary(de)serialization and output public key (k=0) creation, intended to be used by tweak indexers and light clients. Note that this functionality was originally introduced in the take 3 PR (#1698), but was then later intentionally removed again in take 4 (#1765, recently merged and released), in order to reduce the scope and lower the review burden.The following 3 API functions are added:
secp256k1_silentpayments_recipient_prevouts_summary_serialize: given a prevouts_summary object, create the corresponding 33-bytes or 65-bytes serializationsecp256k1_silentpayments_recipient_prevouts_summary_parse: given a 33-byte or 65-byte prevouts_summary representation, create the corresponding prevouts_summary objectsecp256k1_silentpayments_recipient_create_output_pubkeys: given a prevouts_summary object, a recipients scan secret key and a list of spend public keys, create a list of corresponding x-only output public keys (one for each spend public key, each derived with k=0).Tests, benchmarks and the example are extended accordingly.