crypto

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PubKeyName = "cometbft/PubKeyBls12_381"
)

Variables

This section is empty.

Functions

func GetHrpPrefix added in v0.14.0

func GetHrpPrefix(a string) string

GetHrpPrefix returns the human-readable prefix for a given address. Examples of valid address HRPs are "cosmosvalcons", "cosmosvaloper". So this will return "cosmos" as the prefix

func PubKeyAddress added in v0.13.0

func PubKeyAddress(consensusPubkey *types1.Any) string

func PubKeyAddressHelper added in v0.14.0

func PubKeyAddressHelper(consensusPubkey *types1.Any) bytes.HexBytes

func PubKeyBech32Address added in v0.14.0

func PubKeyBech32Address(consensusPubkey *types1.Any, prefix string) string

Types

type Bls12PubKey

type Bls12PubKey []byte

func (Bls12PubKey) Address

func (pubKey Bls12PubKey) Address() crypto.Address

Address is the SHA256-20 of the raw pubkey bytes.

func (Bls12PubKey) Bytes

func (pubKey Bls12PubKey) Bytes() []byte

Bytes returns the PubKey byte format.

func (Bls12PubKey) Equals

func (pubKey Bls12PubKey) Equals(other crypto.PubKey) bool

func (Bls12PubKey) String

func (pubKey Bls12PubKey) String() string

func (Bls12PubKey) Type

func (Bls12PubKey) Type() string

func (Bls12PubKey) VerifySignature

func (pubKey Bls12PubKey) VerifySignature(msg []byte, sig []byte) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL