Documentation ¶
Index ¶
Constants ¶
View Source
const IDByteLength = crypto.AddressSize
IDByteLength is the length of a crypto.Address. Currently only 20.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ID ¶
type ID string
ID is a hex-encoded crypto.Address
func PubKeyToID ¶
PubKeyToID returns the ID corresponding to the given PubKey. It's the hex-encoding of the pubKey.Address().
type NodeKey ¶
NodeKey is the persistent peer key. It contains the nodes private key for authentication.
func LoadOrGenNodeKey ¶
LoadOrGenNodeKey for secp256k1 curve LoadOrGenNodeKey attempts to load the NodeKey from the given filePath. If the file does not exist, it generates and saves a new NodeKey.
Click to show internal directories.
Click to hide internal directories.