node

package
v0.18.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	NodeName string
	// contains filtered or unexported fields
}

Context holds key information about the running node. This is generally used to to access its address and perform signing functions

func NewNodeContext

func NewNodeContext(cfg *config.Server) (*Context, error)

NewNodeContext returns a Context by reading from the specified configuration files. This function WILL exit if the private validator key files (priv_validator_state, and priv_validator_key) don't exist in the configured location

func (Context) Address

func (n Context) Address() keys.Address

Address returns the address of the node's public key (the key's hash)

func (Context) PrivKey

func (n Context) PrivKey() keys.PrivateKey

private key of the nodes

func (Context) PrivVal

func (n Context) PrivVal() keys.PrivateKey

PrivVal returns the private validator file

func (Context) PubKey

func (n Context) PubKey() keys.PublicKey

PubKey returns the public key of the node's NodeKey

func (Context) ValidatorAddress

func (n Context) ValidatorAddress() keys.Address

func (Context) ValidatorBTCScriptAddress added in v0.13.0

func (n Context) ValidatorBTCScriptAddress(params *chaincfg.Params) (keys.Address, error)

func (Context) ValidatorECDSAPrivateKey added in v0.13.0

func (n Context) ValidatorECDSAPrivateKey() *keys.PrivateKey

func (Context) ValidatorECDSAPubKey added in v0.12.0

func (n Context) ValidatorECDSAPubKey() keys.PublicKey

func (Context) ValidatorPubKey

func (n Context) ValidatorPubKey() keys.PublicKey

Jump to

Keyboard shortcuts

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