-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
musig2: export SignOptions members #2058
Conversation
Export the members of the SignOptions struct so that they can be inspected elsewhere.
Pull Request Test Coverage Report for Build 6810111343
💛 - Coveralls |
|
||
// taprootTweak specifies a taproot specific tweak. of the tweaks | ||
// TaprootTweak specifies a taproot specific tweak of the tweaks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good eye!
ACK 35e0f57 Looked at the git diffs, built & tested locally. |
// the method used to generate the musig2 partial signature. | ||
type signOptions struct { | ||
// fastSign determines if we'll skip the check at the end of the | ||
type SignOptions struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does any of this need to be exported here? Having these fields be private enables a type of encapsulation and information hiding here.
API design here is that new options are added to the package, as they're a bit more "curated", and exported via the functions like WithFastSign
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check out the link in the PR description. It is used in the RPCKeyRing.SignMuSig2
method here.
We cant pass the options as is over gRPC, so if we want to be able to do MuSig2 signing over the signer client, then we need to be able to inspect the signing options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, in the past, what I ended up doing there was to just sorta replicate the option types in an unrolled manner, then you map then to SignOption
at the latest stage. We had to do this for the musig2
options as well.
Ok yeah this isnt needed 🙃 thanks for the insights @Roasbeef 🙏 |
Export the members of the SignOptions struct so that they can be inspected elsewhere.
To see how this is used, see the
RPCKeyRing.SignMuSig2
method here