cometbft

package
v1.49.3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateNodeKey

func GenerateNodeKey() (string, []byte, error)

func GeneratePrivKey

func GeneratePrivKey() ([]byte, error)

func GetNodeID

func GetNodeID(key []byte) (string, error)

func GetPubKey

func GetPubKey(keyb []byte) (string, error)

func PubKeyToString

func PubKeyToString(pk cryptotypes.PubKey) (string, error)

func UnpackPubKey

func UnpackPubKey(x *types.Any) (cryptotypes.PubKey, error)

Types

type PrivKey

type PrivKey struct {
	Address string `json:"address"`
	PubKey  struct {
		Type  string `json:"type"`
		Value string `json:"value"`
	} `json:"pub_key"`
	PrivKey struct {
		Type  string `json:"type"`
		Value string `json:"value"`
	} `json:"priv_key"`
}

func LoadPrivKey

func LoadPrivKey(b []byte) (*PrivKey, error)

Jump to

Keyboard shortcuts

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