mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-07 05:46:32 +00:00
* fix raw import sr25519 * add sr25519 to multisig codec * bump go-schnorrkel Co-authored-by: Marko <marbar3778@yahoo.com> Fixes sr25519 pubkey generation and signing when importing from raw bytes
30 lines
900 B
Go
30 lines
900 B
Go
package multisig
|
|
|
|
import (
|
|
amino "github.com/tendermint/go-amino"
|
|
"github.com/tendermint/tendermint/crypto"
|
|
"github.com/tendermint/tendermint/crypto/ed25519"
|
|
"github.com/tendermint/tendermint/crypto/secp256k1"
|
|
"github.com/tendermint/tendermint/crypto/sr25519"
|
|
)
|
|
|
|
// TODO: Figure out API for others to either add their own pubkey types, or
|
|
// to make verify / marshal accept a cdc.
|
|
const (
|
|
PubKeyMultisigThresholdAminoRoute = "tendermint/PubKeyMultisigThreshold"
|
|
)
|
|
|
|
var cdc = amino.NewCodec()
|
|
|
|
func init() {
|
|
cdc.RegisterInterface((*crypto.PubKey)(nil), nil)
|
|
cdc.RegisterConcrete(PubKeyMultisigThreshold{},
|
|
PubKeyMultisigThresholdAminoRoute, nil)
|
|
cdc.RegisterConcrete(ed25519.PubKeyEd25519{},
|
|
ed25519.PubKeyAminoName, nil)
|
|
cdc.RegisterConcrete(sr25519.PubKeySr25519{},
|
|
sr25519.PubKeyAminoName, nil)
|
|
cdc.RegisterConcrete(secp256k1.PubKeySecp256k1{},
|
|
secp256k1.PubKeyAminoName, nil)
|
|
}
|