mirror of
https://github.com/fluencelabs/tendermint
synced 2025-05-03 02:22:14 +00:00
* crypto/multisig: Pubkey -> PubKey * crypto/encoding/amino: use pkg vars for routes * crypto/multisig/bitarray * crypto/multisig: ThresholdMultiSignaturePubKey -> PubKeyMultisigThreshold * crypto/encoding/amino: add PubKeyMultisig to table * remove bA import alias https://github.com/tendermint/tendermint/pull/2255#discussion_r211900709
27 lines
772 B
Go
27 lines
772 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"
|
|
)
|
|
|
|
// 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.PubKeyAminoRoute, nil)
|
|
cdc.RegisterConcrete(secp256k1.PubKeySecp256k1{},
|
|
secp256k1.PubKeyAminoRoute, nil)
|
|
}
|