key

package
v0.10.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenCmd

func GenCmd() *cobra.Command

func InfoCmd

func InfoCmd() *cobra.Command

func KeyCmd

func KeyCmd() *cobra.Command

func LoadNodeKey

func LoadNodeKey(path string) (crypto.PrivateKey, error)

func SaveNodeKey

func SaveNodeKey(path string, pk crypto.PrivateKey) error

Types

type NodeKeyFile

type NodeKeyFile struct {
	Key crypto.PrivateKey
}

func (NodeKeyFile) MarshalJSON

func (nk NodeKeyFile) MarshalJSON() ([]byte, error)

func (*NodeKeyFile) UnmarshalJSON

func (nk *NodeKeyFile) UnmarshalJSON(data []byte) error

type PrivateKeyInfo

type PrivateKeyInfo struct {
	KeyType        string `json:"key_type"`
	PrivateKeyText string `json:"private_key_text"`

	PublicKeyHex string `json:"public_key_hex"`
	NodeID       string `json:"node_id,omitempty"`
	// Address is an optional field that may be set for certain key types that
	// can generate an address depending on the signature (auth) type used.
	Address string `json:"user_address,omitempty"`
	// contains filtered or unexported fields
}

func (*PrivateKeyInfo) MarshalJSON

func (p *PrivateKeyInfo) MarshalJSON() ([]byte, error)

func (*PrivateKeyInfo) MarshalText

func (p *PrivateKeyInfo) MarshalText() ([]byte, error)

Jump to

Keyboard shortcuts

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