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.
Changes:
Schnorr Signer
This PR introduces a schnorr signer that makes starting up pretty easily. It's main purpose is to hide the complexity behind it.
To initialize a signer, just create a new instance with your private key:
And you're ready to go:
This produces a verifiable signature again by the signer:
On-chain, there's are two helper functions:
signer.getSchnorrAddress()
- which provides the schnorr ethereum address used for on-chain verificationssigner.getEcrecoverSignature(signature)
- which returns the on-chain data needed to successfully verify a signatureSchnorr Multisig Provider
The multisig provider cannot sign as it's not a signer. But he accepts a
SchnorrSigner
or it's parent class,SchnorrProvider
, to help up with setting up the multisig:OR if you have the signers, you can pass them:
Once set up:
getSchnorrAddress
to give you directly the correct schnorr ethereum multisig address of all the signersgetPublicNonces
- which gets all the required public nonces from all the signers before signing can begingetEcrecoverSignature
- a helper to format the on-chain data for the multisig