-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add SignatureV2 infrastructure (#6373)
* Updte tx generator * Add sigv2, PublicKeyCodec * revert changes * revert changes * updates * Updates * Integrate multisig support * Undo move * remove func * undo * godocs * godocs, cleanup * Cleanup * godocs, tests * lint * Re-enable VerifyBytes * Address comments * Fix imports * Update crypto/types/multisig/multisignature.go * Add test for MultiSignatureData * Add nested multisig case * Add test for AddSignatureV2 * Add changelog Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
- Loading branch information
1 parent
7871910
commit 60f7edf
Showing
25 changed files
with
750 additions
and
284 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package multisig | ||
|
||
import ( | ||
"github.com/tendermint/tendermint/crypto" | ||
|
||
"github.com/cosmos/cosmos-sdk/types/tx/signing" | ||
) | ||
|
||
// PubKey defines a type which supports multi-signature verification via MultiSignatureData | ||
// which supports multiple SignMode's. | ||
type PubKey interface { | ||
crypto.PubKey | ||
|
||
// VerifyMultisignature verifies the provide multi-signature represented by MultiSignatureData | ||
// using getSignBytes to retrieve the sign bytes to verify against for the provided mode. | ||
VerifyMultisignature(getSignBytes GetSignBytesFunc, sig *signing.MultiSignatureData) error | ||
|
||
// GetPubKeys returns the crypto.PubKey's nested within the multi-sig PubKey | ||
GetPubKeys() []crypto.PubKey | ||
} | ||
|
||
// GetSignBytesFunc defines a function type which returns sign bytes for a given SignMode or an error. | ||
// It will generally be implemented as a closure which wraps whatever signable object signatures are | ||
// being verified against. | ||
type GetSignBytesFunc func(mode signing.SignMode) ([]byte, error) |
This file contains 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
Oops, something went wrong.