Table of Contents

Class RLP

Namespace
Thirdweb
Assembly
Thirdweb.dll
public class RLP
Inheritance
RLP
Inherited Members

Fields

EMPTY_BYTE_ARRAY

public static readonly byte[] EMPTY_BYTE_ARRAY

Field Value

byte[]

OFFSET_SHORT_LIST

[0xc0] If the total payload of a list (i.e. the combined length of all its items) is 0-55 bytes long, the RLP encoding consists of a single byte with value 0xc0 plus the length of the list followed by the concatenation of the RLP encodings of the items. The range of the first byte is thus [0xc0, 0xf7].

public const byte OFFSET_SHORT_LIST = 192

Field Value

byte

ZERO_BYTE_ARRAY

public static readonly byte[] ZERO_BYTE_ARRAY

Field Value

byte[]

Methods

ByteArrayToInt(byte[])

public static int ByteArrayToInt(byte[] bytes)

Parameters

bytes byte[]

Returns

int

EncodeByte(byte)

public static byte[] EncodeByte(byte singleByte)

Parameters

singleByte byte

Returns

byte[]

EncodeDataItemsAsElementOrListAndCombineAsList(byte[][], int[])

public static byte[] EncodeDataItemsAsElementOrListAndCombineAsList(byte[][] dataItems, int[] indexOfListDataItems = null)

Parameters

dataItems byte[][]
indexOfListDataItems int[]

Returns

byte[]

EncodeElement(byte[])

public static byte[] EncodeElement(byte[] srcData)

Parameters

srcData byte[]

Returns

byte[]

EncodeList(params byte[][])

public static byte[] EncodeList(params byte[][] items)

Parameters

items byte[][]

Returns

byte[]