github.com/vipernet-xyz/tendermint-core@v0.32.0/crypto/sr25519/codec.go (about) 1 package sr25519 2 3 import ( 4 amino "github.com/tendermint/go-amino" 5 6 "github.com/tendermint/tendermint/crypto" 7 ) 8 9 var _ crypto.PrivKey = PrivKeySr25519{} 10 11 const ( 12 PrivKeyAminoName = "tendermint/PrivKeySr25519" 13 PubKeyAminoName = "tendermint/PubKeySr25519" 14 15 // SignatureSize is the size of an Edwards25519 signature. Namely the size of a compressed 16 // Sr25519 point, and a field element. Both of which are 32 bytes. 17 SignatureSize = 64 18 ) 19 20 var cdc = amino.NewCodec() 21 22 func init() { 23 cdc.RegisterInterface((*crypto.PubKey)(nil), nil) 24 cdc.RegisterConcrete(PubKeySr25519{}, 25 PubKeyAminoName, nil) 26 27 cdc.RegisterInterface((*crypto.PrivKey)(nil), nil) 28 cdc.RegisterConcrete(PrivKeySr25519{}, 29 PrivKeyAminoName, nil) 30 }