github.com/vipernet-xyz/tm@v0.34.24/crypto/sr25519/encoding.go (about)

     1  package sr25519
     2  
     3  import (
     4  	"github.com/vipernet-xyz/tm/crypto"
     5  	tmjson "github.com/vipernet-xyz/tm/libs/json"
     6  )
     7  
     8  var _ crypto.PrivKey = PrivKey{}
     9  
    10  const (
    11  	PrivKeyName = "tendermint/PrivKeySr25519"
    12  	PubKeyName  = "tendermint/PubKeySr25519"
    13  
    14  	// SignatureSize is the size of an Edwards25519 signature. Namely the size of a compressed
    15  	// Sr25519 point, and a field element. Both of which are 32 bytes.
    16  	SignatureSize = 64
    17  )
    18  
    19  func init() {
    20  
    21  	tmjson.RegisterType(PubKey{}, PubKeyName)
    22  	tmjson.RegisterType(PrivKey{}, PrivKeyName)
    23  }