Documentation ¶
Overview ¶
Package identity implements a node's identity, consisting out of id and public key. A LocalIdentity additionally contains the private key and enables signing messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
ID is a unique identifier for each peer.
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
LocalIdentity is a node's identity.
func GenerateIdentity ¶
func GenerateIdentity() *Identity
func Parse ¶
func Parse(marshalUtil *marshalutil.MarshalUtil, optionalTargetObject ...*Identity) (result *Identity, err error)
type LocalIdentity ¶
type LocalIdentity struct { *Identity // contains filtered or unexported fields }
LocalIdentity is a local node's identity.
func GenerateLocalIdentity ¶
func GenerateLocalIdentity() *LocalIdentity
func NewLocalIdentity ¶
func NewLocalIdentity(publicKey ed25519.PublicKey, privateKey ed25519.PrivateKey) *LocalIdentity
NewLocalIdentity creates a new LocalIdentity.
func NewLocalIdentityWithIdentity ¶
func NewLocalIdentityWithIdentity(identity *Identity, privateKey ed25519.PrivateKey) *LocalIdentity
NewLocalIdentityWithIdentity creates a new LocalIdentity with a given LocalIdentity.
Click to show internal directories.
Click to hide internal directories.