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 - Consumer<RLPWriter!>!: A consumer that will be provided with a RLPWriter that can consume values.

Return
Bytes!: 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 - MutableList<T>!: A list of values to be encoded.

fn - BiConsumer<RLPWriter!, T>!: A consumer that will be provided with a RLPWriter and an element of the list.

- The type of the list elements.

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