Documentation ¶
Index ¶
- func EncodeUint64(val uint64) []byte
- func ExtractSignerAddress(data Signable) (sdk.AccAddress, error)
- func GenerateFloatingKey() (secretKey *btcSecp256k1.PrivateKey, addr sdk.AccAddress)
- func GetKeyName(clientCtx client.Context) (string, error)
- func GetPrivKey(clientCtx client.Context, keyName string) (*btcSecp256k1.PrivateKey, error)
- func HashMsg(msgData []byte) []byte
- func Join(s [][]byte) []byte
- func RecoverPubKey(data Signable) (secp256k1.PubKey, error)
- func Sign(pkey *btcSecp256k1.PrivateKey, data Signable) ([]byte, error)
- type Signable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeUint64 ¶
EncodeUint64 encodes a uint64 value to a byte array
func ExtractSignerAddress ¶
func ExtractSignerAddress(data Signable) (sdk.AccAddress, error)
ExtractSignerAddress extracts the signer address of data
func GenerateFloatingKey ¶
func GenerateFloatingKey() (secretKey *btcSecp256k1.PrivateKey, addr sdk.AccAddress)
GenerateFloatingKey creates a new private key with an account address derived from the corresponding public key
func GetPrivKey ¶
func GetPrivKey(clientCtx client.Context, keyName string) (*btcSecp256k1.PrivateKey, error)
func Join ¶
Join() is faster than bytes.Join because it does what bytes.Join() does without appending (empty) separators
func RecoverPubKey ¶
RecoverPubKey recovers the public key from data's signature
func Sign ¶
func Sign(pkey *btcSecp256k1.PrivateKey, data Signable) ([]byte, error)
Sign creates a signature for a struct. The prepareFunc prepares the struct before extracting the data for the signature
Types ¶
Click to show internal directories.
Click to hide internal directories.