package
Version:
v1.2.0
Opens a new window with list of versions in this module.
Published: Jan 24, 2019
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
ID is an identity of nodes, using its public key hash and network address.
CreateID is a factory function creating ID.
Equals determines if two peer IDs are equal to each other based on the contents of their public keys.
func (id ID) Less(other interface{}) bool
Less determines if this peer ID's public key is less than other ID's public key.
func (id ID) PrefixLen() int
PrefixLen returns the number of prefixed zeros in a peer ID.
PublicKeyHex generates a hex-encoded string of public key hash of this given peer ID.
String returns the identity address and public key.
Xor performs XOR (^) over another peer ID's public key.
func (id ID) XorID(other ID) ID
XorID performs XOR (^) over another peer ID's public key hash.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.