Documentation ¶
Index ¶
- type Local
- func (l *Local) Address() string
- func (l *Local) NodeID() flow.Identifier
- func (l *Local) NotMeFilter() flow.IdentityFilter[flow.Identity]
- func (l *Local) Sign(msg []byte, hasher hash.Hasher) (crypto.Signature, error)
- func (l *Local) SignFunc(data []byte, hasher hash.Hasher, ...) (crypto.Signature, error)
- type LocalNoKey
- func (l *LocalNoKey) Address() string
- func (l *LocalNoKey) NodeID() flow.Identifier
- func (l *LocalNoKey) NotMeFilter() flow.IdentityFilter[flow.Identity]
- func (l *LocalNoKey) Sign(msg []byte, hasher hash.Hasher) (crypto.Signature, error)
- func (l *LocalNoKey) SignFunc(data []byte, hasher hash.Hasher, ...) (crypto.Signature, error)
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.IdentitySkeleton, sk crypto.PrivateKey) (*Local, error)
func (*Local) NodeID ¶
func (l *Local) NodeID() flow.Identifier
func (*Local) NotMeFilter ¶
func (l *Local) NotMeFilter() flow.IdentityFilter[flow.Identity]
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.
type LocalNoKey ¶ added in v0.23.9
type LocalNoKey struct {
// contains filtered or unexported fields
}
func NewNoKey ¶ added in v0.23.9
func NewNoKey(id flow.IdentitySkeleton) (*LocalNoKey, error)
func (*LocalNoKey) Address ¶ added in v0.23.9
func (l *LocalNoKey) Address() string
func (*LocalNoKey) NodeID ¶ added in v0.23.9
func (l *LocalNoKey) NodeID() flow.Identifier
func (*LocalNoKey) NotMeFilter ¶ added in v0.23.9
func (l *LocalNoKey) NotMeFilter() flow.IdentityFilter[flow.Identity]
func (*LocalNoKey) SignFunc ¶ added in v0.23.9
func (l *LocalNoKey) 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.