tuweni / org.apache.tuweni.devp2p / EthereumNodeRecord

EthereumNodeRecord

class EthereumNodeRecord (source)

Ethereum Node Record (ENR) as described in EIP-778.

Constructors

<init>

EthereumNodeRecord(signature: Bytes, seq: Long, data: Map<String, Bytes>)

Ethereum Node Record (ENR) as described in EIP-778.

Properties

data

val data: Map<String, Bytes>

seq

val seq: Long

signature

val signature: Bytes

Functions

ip

fun ip(): InetAddress

publicKey

fun publicKey(): PublicKey

tcp

fun tcp(): Int

udp

fun udp(): Int

validate

fun validate(): Unit

Companion Object Functions

fromRLP

fun fromRLP(rlp: Bytes): EthereumNodeRecord

Creates an ENR from its serialized form as a RLP list

toRLP

fun toRLP(signatureKeyPair: KeyPair, seq: Long = Instant.now().toEpochMilli(), data: Map<String, Bytes>? = null, ip: InetAddress, tcp: Int? = null, udp: Int? = null): Bytes

Creates the serialized form of a ENR