Versions in this module Expand all Collapse all v1 v1.8.21 Jan 21, 2019 Changes in this version + var ValidSchemes = enr.SchemeMap + var ValidSchemesForTesting = enr.SchemeMap + func DistCmp(target, a, b ID) int + func LogDist(a, b ID) int + func SignV4(r *enr.Record, privkey *ecdsa.PrivateKey) error + type DB struct + func OpenDB(path string) (*DB, error) + func (db *DB) Close() + func (db *DB) DeleteNode(id ID) error + func (db *DB) FindFails(id ID) int + func (db *DB) LastPingReceived(id ID) time.Time + func (db *DB) LastPongReceived(id ID) time.Time + func (db *DB) Node(id ID) *Node + func (db *DB) NodeSeq(id ID) uint64 + func (db *DB) QuerySeeds(n int, maxAge time.Duration) []*Node + func (db *DB) Resolve(n *Node) *Node + func (db *DB) UpdateFindFails(id ID, fails int) error + func (db *DB) UpdateLastPingReceived(id ID, instance time.Time) error + func (db *DB) UpdateLastPongReceived(id ID, instance time.Time) error + func (db *DB) UpdateNode(node *Node) error + type ID [32]byte + func HexID(in string) ID + func PubkeyToIDV4(key *ecdsa.PublicKey) ID + func RandomID(a ID, n int) (b ID) + func (n *ID) UnmarshalText(text []byte) error + func (n ID) Bytes() []byte + func (n ID) GoString() string + func (n ID) MarshalText() ([]byte, error) + func (n ID) String() string + func (n ID) TerminalString() string + type LocalNode struct + func NewLocalNode(db *DB, key *ecdsa.PrivateKey) *LocalNode + func (ln *LocalNode) Database() *DB + func (ln *LocalNode) Delete(e enr.Entry) + func (ln *LocalNode) ID() ID + func (ln *LocalNode) Node() *Node + func (ln *LocalNode) Set(e enr.Entry) + func (ln *LocalNode) SetFallbackIP(ip net.IP) + func (ln *LocalNode) SetFallbackUDP(port int) + func (ln *LocalNode) SetStaticIP(ip net.IP) + func (ln *LocalNode) UDPContact(toaddr *net.UDPAddr) + func (ln *LocalNode) UDPEndpointStatement(fromaddr, endpoint *net.UDPAddr) + type Node struct + func MustParseV4(rawurl string) *Node + func New(validSchemes enr.IdentityScheme, r *enr.Record) (*Node, error) + func NewV4(pubkey *ecdsa.PublicKey, ip net.IP, tcp, udp int) *Node + func ParseV4(rawurl string) (*Node, error) + func SignNull(r *enr.Record, id ID) *Node + func (n *Node) ID() ID + func (n *Node) IP() net.IP + func (n *Node) Incomplete() bool + func (n *Node) Load(k enr.Entry) error + func (n *Node) MarshalText() ([]byte, error) + func (n *Node) Pubkey() *ecdsa.PublicKey + func (n *Node) Record() *enr.Record + func (n *Node) Seq() uint64 + func (n *Node) String() string + func (n *Node) TCP() int + func (n *Node) UDP() int + func (n *Node) UnmarshalText(text []byte) error + func (n *Node) ValidateComplete() error + type NullID struct + func (NullID) NodeAddr(r *enr.Record) []byte + func (NullID) Verify(r *enr.Record, sig []byte) error + type Secp256k1 ecdsa.PublicKey + func (v *Secp256k1) DecodeRLP(s *rlp.Stream) error + func (v Secp256k1) ENRKey() string + func (v Secp256k1) EncodeRLP(w io.Writer) error + type V4ID struct + func (V4ID) NodeAddr(r *enr.Record) []byte + func (V4ID) Verify(r *enr.Record, sig []byte) error