tuweni / org.apache.tuweni.rlp / RLP / encode

encode

static fun encode(fn: Consumer<RLPWriter!>!): Bytes! (source)

Encode values to a Bytes value.

Important: this method does not write any list prefix to the result. If you are writing a RLP encoded list of values, you usually want to use #encodeList(Consumer).

Parameters

fn - Consumer<RLPWriter!>!: A consumer that will be provided with a RLPWriter that can consume values.

Return
Bytes!: The RLP encoding in a Bytes value.