tuweni / org.apache.tuweni.devp2p / EthereumNodeRecord / create

create

@JvmOverloads @JvmStatic fun create(signatureKeyPair: KeyPair, seq: Long = Instant.now().toEpochMilli(), data: Map<String, Bytes>? = null, listData: Map<String, List<Bytes>>? = null, ip: InetAddress, tcp: Int? = null, udp: Int? = null): EthereumNodeRecord (source)

Creates the serialized form of a ENR

Parameters

signatureKeyPair - the key pair to use to sign the ENR

seq - the sequence number for the ENR. It should be higher than the previous time the ENR was generated. It defaults to the current time since epoch in milliseconds.

data - the key pairs to encode in the ENR

listData - the key pairs of list values to encode in the ENR

ip - the IP address of the host

tcp - an optional parameter to a TCP port used for the wire protocol

udp - an optional parameter to a UDP port used for discovery

Return
the ENR