enr

package
v0.13.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2023 License: GPL-3.0 Imports: 7 Imported by: 1

Documentation

Overview

Package enr provides a minimal implementation of Ethereum Node Records (ENR).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	// Node public key (identity).
	PubKey *ecdsa.PublicKey
	// Signature of the record.
	Signature []byte
}

Record represents an Ethereum Node Record.

func New

func New(privkey *ecdsa.PrivateKey) (Record, error)

New returns a new enr record for the given private key.

func Parse

func Parse(enrStr string) (Record, error)

Parse parses the given base64 encoded string into a record.

func (Record) String

func (r Record) String() string

String returns the base64 encoded string representation of the record.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL