netann

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by by default until UseLogger is called.

func UseLogger

func UseLogger(logger btclog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using btclog.

Types

type NodeSigner

type NodeSigner struct {
	// contains filtered or unexported fields
}

NodeSigner is an implementation of the MessageSigner interface backed by the identity private key of running lnd node.

func NewNodeSigner

func NewNodeSigner(key *btcec.PrivateKey) *NodeSigner

NewNodeSigner creates a new instance of the NodeSigner backed by the target private key.

func (*NodeSigner) SignCompact

func (n *NodeSigner) SignCompact(msg []byte) ([]byte, error)

SignCompact signs a double-sha256 digest of the msg parameter under the resident node's private key. The returned signature is a pubkey-recoverable signature.

func (*NodeSigner) SignDigestCompact

func (n *NodeSigner) SignDigestCompact(hash []byte) ([]byte, error)

SignDigestCompact signs the provided message digest under the resident node's private key. The returned signature is a pubkey-recoverable signature.

func (*NodeSigner) SignMessage

func (n *NodeSigner) SignMessage(pubKey *btcec.PublicKey,
	msg []byte) (*btcec.Signature, error)

SignMessage signs a double-sha256 digest of the passed msg under the resident node's private key. If the target public key is _not_ the node's private key, then an error will be returned.

Jump to

Keyboard shortcuts

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