Versions in this module Expand all Collapse all v1 v1.10.18 Oct 19, 2022 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) + func (db *DB) FindFails(id ID, ip net.IP) int + func (db *DB) FindFailsV5(id ID, ip net.IP) int + func (db *DB) LastPingReceived(id ID, ip net.IP) time.Time + func (db *DB) LastPongReceived(id ID, ip net.IP) 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, ip net.IP, fails int) error + func (db *DB) UpdateFindFailsV5(id ID, ip net.IP, fails int) error + func (db *DB) UpdateLastPingReceived(id ID, ip net.IP, instance time.Time) error + func (db *DB) UpdateLastPongReceived(id ID, ip net.IP, instance time.Time) error + func (db *DB) UpdateNode(node *Node) error + type FairMix struct + func NewFairMix(timeout time.Duration) *FairMix + func (m *FairMix) AddSource(it Iterator) + func (m *FairMix) Close() + func (m *FairMix) Next() bool + func (m *FairMix) Node() *Node + type ID [32]byte + func HexID(in string) ID + func ParseID(in string) (ID, error) + func PubkeyToIDV4(key *ecdsa.PublicKey) 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 Iterator interface + Close func() + Next func() bool + Node func() *Node + func CycleNodes(nodes []*Node) Iterator + func Filter(it Iterator, check func(*Node) bool) Iterator + func IterNodes(nodes []*Node) Iterator + 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) Seq() uint64 + 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 MustParse(rawurl string) *Node + 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 Parse(validSchemes enr.IdentityScheme, input string) (*Node, error) + func ParseV4(rawurl string) (*Node, error) + func ReadNodes(it Iterator, n int) []*Node + 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) URLv4() string + 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