mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-11 20:31:20 +00:00
Signature bytes
This commit is contained in:
@ -9,6 +9,7 @@ import (
|
||||
|
||||
// Signature is a part of Txs and consensus Votes.
|
||||
type Signature interface {
|
||||
Bytes() []byte
|
||||
IsZero() bool
|
||||
String() string
|
||||
}
|
||||
@ -29,6 +30,10 @@ var _ = wire.RegisterInterface(
|
||||
// Implements Signature
|
||||
type SignatureEd25519 [64]byte
|
||||
|
||||
func (sig SignatureEd25519) Bytes() []byte {
|
||||
return wire.BinaryBytes(struct{ Signature }{sig})
|
||||
}
|
||||
|
||||
func (sig SignatureEd25519) IsZero() bool { return len(sig) == 0 }
|
||||
|
||||
func (sig SignatureEd25519) String() string { return fmt.Sprintf("/%X.../", Fingerprint(sig[:])) }
|
||||
|
Reference in New Issue
Block a user