Feat/sp sending#496
Open
jvgelder wants to merge 10 commits intocaravan-bitcoin:mainfrom
Open
Conversation
Added encoders and decoders for the given silent payment fields. Since we add new fields that are not allowed by v0 we also need to delete them when converting to v0.
Allow the user to set and get a silentpayment object instead of a script. As per BIP375 we need to make sure there is either an OUPUT_SCRIPT or PSBT_OUT_SP_V0_INFO updated getter, validation and unsignedtx accordingly.
- Add silentpayment.ts with pure BIP352 crypto primitives: eligibleIndices, sumECDHShares, computeInputHash, deriveSilentPaymentOutput, bip352TaggedHash - Add computeSilentPaymentOutputScripts() to PsbtV2 (Signer role) implementing BIP375 output script derivation from ECDH shares
🦋 Changeset detectedLatest commit: ea81977 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Return empty string instead of changing the signature, feels vary shaky.
Credits to @macgyver13 taken from bitcoin/bips#2046
- validate SegWit version range - use full compressed spend keys in derivation - enforce BIP352 scalar validity checks
Instead of having multiple places where we define checks call the proper assert functions. Also added a missing Bspend check.
Our assert was contained the wrong message (mentioned k instead of m). Also added a separate assert for 0 < k < Kmax (2323) output index check.
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.
What kind of change does this PR introduce?
feature
Issue Number:
Fixes #467
Summary
Implements sending to silent payment Bip352 address via psbtv2 bip375.
Still work in progress but gives some insights in how I plan to integrate.
TODO:
Does this PR introduce a breaking change?
Should not introduce any breaking changes
Checklist
npm run changeset)Other information
Have you read the contributing guide?
Yes