Implement BIP-375 Silent Payments PSBT Fields#79
Draft
notTanveer wants to merge 1 commit intodiybitcoinhardware:masterfrom
Draft
Implement BIP-375 Silent Payments PSBT Fields#79notTanveer wants to merge 1 commit intodiybitcoinhardware:masterfrom
notTanveer wants to merge 1 commit intodiybitcoinhardware:masterfrom
Conversation
Author
|
BIP 375 is still in draft and doesn’t have a reference implementation yet, mainly because folks are still figuring out the best way to handle it. so i’m converting this to a draft PR for now. once the test vectors and other pieces are in place, we can revisit and move it forward. |
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.
Key Changes:
PSBT_GLOBAL_SP_ECDH_SHARE(0x07)PSBT_GLOBAL_SP_DLEQ(0x08)PSBT_IN_SP_ECDH_SHARE(0x1d)PSBT_IN_SP_DLEQ(0x1e)PSBT_OUT_SP_V0_INFO(0x09)PSBT_OUT_SP_V0_LABEL(0x0a)PSBT.parse_unknowns,InputScope.read_value, andOutputScope.read_valuefor the new fields, including key and value length validations.PSBT.write_to,InputScope.write_to, andOutputScope.write_to.PSBTclass now explicitly handlesversion(None for v0, 2 for v2).PSBT.sign_with):SIGHASH_ALLfor inputs when Silent Payment outputs are present.OutputScope.voutproperty now correctly handles cases wherescript_pubkeymight be None ifsp_v0_infois present (indicating a Silent Payment output whose script is not yet computed).OutputScope.write_toafter version-conditional logic was added.still figuring out the tests for this implementation(BIP-375 has no test vectors) — will add them soon.