tuweni / org.apache.tuweni.rlp / RLP / encodeList

encodeList

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

Encode a list of values to a Bytes value.

Parameters

fn - A consumer that will be provided with a RLPWriter that can consume values.

Return
The RLP encoding in a Bytes value.

static fun <T : Any> encodeList(elements: MutableList<T>, fn: BiConsumer<RLPWriter, T>): Bytes (source)

Encode a list of values to a Bytes value.

Parameters

elements - A list of values to be encoded.

fn - A consumer that will be provided with a RLPWriter and an element of the list.

- The type of the list elements.

Return
The RLP encoding in a Bytes value.