local

package
v0.14.8 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: AGPL-3.0 Imports: 4 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Local

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

func New

func New(id *flow.Identity, sk crypto.PrivateKey) (*Local, error)

func (*Local) Address

func (l *Local) Address() string

func (*Local) NodeID

func (l *Local) NodeID() flow.Identifier

func (*Local) NotMeFilter

func (l *Local) NotMeFilter() flow.IdentityFilter

func (*Local) Sign

func (l *Local) Sign(msg []byte, hasher hash.Hasher) (crypto.Signature, error)

func (*Local) SignFunc

func (l *Local) SignFunc(data []byte, hasher hash.Hasher, f func(crypto.PrivateKey, []byte, hash.Hasher) (crypto.Signature,
	error)) (crypto.Signature, error)

SignFunc provides a signature oracle that given a message, a hasher, and a signing function, it generates and returns a signature over the message using the node's private key as well as the input hasher by invoking the given signing function. The overall idea of this function is to not expose the private key to the caller.

Jump to

Keyboard shortcuts

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