Documentation ¶
Index ¶
- func Decode(t cadence.Type, b []byte) (cadence.Value, error)
- func Encode(v cadence.Value) ([]byte, error)
- type Decoder
- func (d *Decoder) Decode(t cadence.Type) (cadence.Value, error)
- func (d *Decoder) DecodeAddress() (v cadence.Address, err error)
- func (d *Decoder) DecodeArray(t cadence.ArrayType) (v cadence.Array, err error)
- func (d *Decoder) DecodeBool() (v cadence.Bool, err error)
- func (d *Decoder) DecodeBytes() (v cadence.Bytes, err error)
- func (d *Decoder) DecodeDictionary(t cadence.DictionaryType) (v cadence.Dictionary, err error)
- func (d *Decoder) DecodeEvent(t cadence.EventType) (v cadence.Event, err error)
- func (d *Decoder) DecodeFix64() (v cadence.Fix64, err error)
- func (d *Decoder) DecodeInt() (v cadence.Int, err error)
- func (d *Decoder) DecodeInt128() (v cadence.Int128, err error)
- func (d *Decoder) DecodeInt16() (v cadence.Int16, err error)
- func (d *Decoder) DecodeInt256() (v cadence.Int256, err error)
- func (d *Decoder) DecodeInt32() (v cadence.Int32, err error)
- func (d *Decoder) DecodeInt64() (v cadence.Int64, err error)
- func (d *Decoder) DecodeInt8() (v cadence.Int8, err error)
- func (d *Decoder) DecodeOptional(t cadence.OptionalType) (v cadence.Optional, err error)
- func (d *Decoder) DecodeResource(t cadence.ResourceType) (v cadence.Resource, err error)
- func (d *Decoder) DecodeString() (v cadence.String, err error)
- func (d *Decoder) DecodeStruct(t cadence.StructType) (v cadence.Struct, err error)
- func (d *Decoder) DecodeUFix64() (v cadence.UFix64, err error)
- func (d *Decoder) DecodeUInt() (v cadence.UInt, err error)
- func (d *Decoder) DecodeUInt128() (v cadence.UInt128, err error)
- func (d *Decoder) DecodeUInt16() (v cadence.UInt16, err error)
- func (d *Decoder) DecodeUInt256() (v cadence.UInt256, err error)
- func (d *Decoder) DecodeUInt32() (v cadence.UInt32, err error)
- func (d *Decoder) DecodeUInt64() (v cadence.UInt64, err error)
- func (d *Decoder) DecodeUInt8() (v cadence.UInt8, err error)
- func (d *Decoder) DecodeVoid() (cadence.Void, error)
- func (d *Decoder) DecodeWord16() (v cadence.Word16, err error)
- func (d *Decoder) DecodeWord32() (v cadence.Word32, err error)
- func (d *Decoder) DecodeWord64() (v cadence.Word64, err error)
- func (d *Decoder) DecodeWord8() (v cadence.Word8, err error)
- type Encoder
- func (e *Encoder) Encode(v cadence.Value) error
- func (e *Encoder) EncodeAddress(v cadence.Address) error
- func (e *Encoder) EncodeArray(v cadence.Array) error
- func (e *Encoder) EncodeBool(v cadence.Bool) error
- func (e *Encoder) EncodeBytes(v cadence.Bytes) error
- func (e *Encoder) EncodeDictionary(v cadence.Dictionary) error
- func (e *Encoder) EncodeEvent(v cadence.Event) error
- func (e *Encoder) EncodeFix64(v cadence.Fix64) error
- func (e *Encoder) EncodeInt(v cadence.Int) error
- func (e *Encoder) EncodeInt128(v cadence.Int128) error
- func (e *Encoder) EncodeInt16(v cadence.Int16) error
- func (e *Encoder) EncodeInt256(v cadence.Int256) error
- func (e *Encoder) EncodeInt32(v cadence.Int32) error
- func (e *Encoder) EncodeInt64(v cadence.Int64) error
- func (e *Encoder) EncodeInt8(v cadence.Int8) error
- func (e *Encoder) EncodeOptional(v cadence.Optional) error
- func (e *Encoder) EncodeResource(v cadence.Resource) error
- func (e *Encoder) EncodeString(v cadence.String) error
- func (e *Encoder) EncodeStruct(v cadence.Struct) error
- func (e *Encoder) EncodeUFix64(v cadence.UFix64) error
- func (e *Encoder) EncodeUInt(v cadence.UInt) error
- func (e *Encoder) EncodeUInt128(v cadence.UInt128) error
- func (e *Encoder) EncodeUInt16(v cadence.UInt16) error
- func (e *Encoder) EncodeUInt256(v cadence.UInt256) error
- func (e *Encoder) EncodeUInt32(v cadence.UInt32) error
- func (e *Encoder) EncodeUInt64(v cadence.UInt64) error
- func (e *Encoder) EncodeUInt8(v cadence.UInt8) error
- func (e *Encoder) EncodeVoid() error
- func (e *Encoder) EncodeWord16(v cadence.Word16) error
- func (e *Encoder) EncodeWord32(v cadence.Word32) error
- func (e *Encoder) EncodeWord64(v cadence.Word64) error
- func (e *Encoder) EncodeWord8(v cadence.Word8) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
A Decoder decodes XDR-encoded representations of Cadence values.
func NewDecoder ¶
NewDecoder initializes a Decoder that will decode XDR-encoded bytes from the given io.Reader.
func (*Decoder) Decode ¶
Decode reads XDR-encoded bytes from the io.Reader and decodes them to a Cadence value of the given type.
This function returns an error if the bytes do not match the given type definition.
func (*Decoder) DecodeAddress ¶
DecodeAddress reads the XDR-encoded representation of an address.
Reference: https://tools.ietf.org/html/rfc4506#section-4.9
RFC Section 4.9 - Fixed-Length Opaque Data Fixed-length uninterpreted data zero-padded to a multiple of four
func (*Decoder) DecodeArray ¶
DecodeArray reads the XDR-encoded representation of an array.
Reference: https://tools.ietf.org/html/rfc4506#section-4.13
RFC Section 4.13 - Variable-Length Array Unsigned integer length followed by individually XDR-encoded array elements
func (*Decoder) DecodeBool ¶
DecodeBool reads the XDR-encoded representation of a boolean value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.4
RFC Section 4.4 - Boolean Represented as an XDR encoded enumeration where 0 is false and 1 is true
func (*Decoder) DecodeBytes ¶
DecodeBytes reads the XDR-encoded representation of a byte array.
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Decoder) DecodeDictionary ¶
func (d *Decoder) DecodeDictionary(t cadence.DictionaryType) (v cadence.Dictionary, err error)
DecodeDictionary reads the XDR-encoded representation of a dictionary.
The size of the dictionary is encoded as an unsigned integer, followed by the dictionary keys, then elements, each represented as individually XDR-encoded array elements.
func (*Decoder) DecodeEvent ¶
DecodeEvent reads the XDR-encoded representation of an event value.
An event is encoded as a fixed-length array of its field values.
func (*Decoder) DecodeFix64 ¶
DecodeFix64 reads the XDR-encoded representation of an int-64 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.5
RFC Section 4.5 - Hyper Integer 64-bit big-endian signed integer in range [-9223372036854775808, 9223372036854775807]
func (*Decoder) DecodeInt ¶
DecodeInt reads the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Decoder) DecodeInt128 ¶
DecodeInt128 reads the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Decoder) DecodeInt16 ¶
DecodeInt16 reads the XDR-encoded representation of an int-16 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.1
RFC Section 4.1 - Integer 32-bit big-endian signed integer in range [-2147483648, 2147483647]
func (*Decoder) DecodeInt256 ¶
DecodeInt256 reads the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Decoder) DecodeInt32 ¶
DecodeInt32 reads the XDR-encoded representation of an int-32 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.1
RFC Section 4.1 - Integer 32-bit big-endian signed integer in range [-2147483648, 2147483647]
func (*Decoder) DecodeInt64 ¶
DecodeInt64 reads the XDR-encoded representation of an int-64 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.5
RFC Section 4.5 - Hyper Integer 64-bit big-endian signed integer in range [-9223372036854775808, 9223372036854775807]
func (*Decoder) DecodeInt8 ¶
DecodeInt8 reads the XDR-encoded representation of an int-8 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.1
RFC Section 4.1 - Integer 32-bit big-endian signed integer in range [-2147483648, 2147483647]
func (*Decoder) DecodeOptional ¶
DecodeOptional reads the XDR-encoded representation of an optional value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.19
RFC Section 4.19 - Optional-Data Union of boolean and encoded value
func (*Decoder) DecodeResource ¶
DecodeResource reads the XDR-encoded representation of a resource value.
A resource is encoded as a fixed-length array of its field values.
func (*Decoder) DecodeString ¶
DecodeString reads the XDR-encoded representation of a string value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.11
RFC Section 4.11 - StringType Unsigned integer length followed by bytes zero-padded to a multiple of four
func (*Decoder) DecodeStruct ¶
DecodeStruct reads the XDR-encoded representation of a struct value.
A struct is encoded as a fixed-length array of its field values.
func (*Decoder) DecodeUFix64 ¶
DecodeUFix64 reads the XDR-encoded representation of a uint-64 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.5
RFC Section 4.5 - Unsigned Hyper Integer 64-bit big-endian unsigned integer in range [0, 18446744073709551615]
func (*Decoder) DecodeUInt ¶
DecodeUInt reads the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Decoder) DecodeUInt128 ¶
DecodeUInt128 reads the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Decoder) DecodeUInt16 ¶
DecodeUInt16 reads the XDR-encoded representation of a uint-16 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]
func (*Decoder) DecodeUInt256 ¶
DecodeUInt256 reads the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Decoder) DecodeUInt32 ¶
DecodeUInt32 reads the XDR-encoded representation of a uint-32 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]
func (*Decoder) DecodeUInt64 ¶
DecodeUInt64 reads the XDR-encoded representation of a uint-64 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.5
RFC Section 4.5 - Unsigned Hyper Integer 64-bit big-endian unsigned integer in range [0, 18446744073709551615]
func (*Decoder) DecodeUInt8 ¶
DecodeUInt8 reads the XDR-encoded representation of a uint-8 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]
func (*Decoder) DecodeVoid ¶
DecodeVoid reads the XDR-encoded representation of a void value.
VoidType values are skipped by the decoder because they are empty by definition, but this function still exists in order to support composite types that contain void values.
func (*Decoder) DecodeWord16 ¶
DecodeWord16 reads the XDR-encoded representation of a uint-16 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]
func (*Decoder) DecodeWord32 ¶
DecodeWord32 reads the XDR-encoded representation of a uint-32 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]
func (*Decoder) DecodeWord64 ¶
DecodeWord64 reads the XDR-encoded representation of a uint-64 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.5
RFC Section 4.5 - Unsigned Hyper Integer 64-bit big-endian unsigned integer in range [0, 18446744073709551615]
func (*Decoder) DecodeWord8 ¶
DecodeWord8 reads the XDR-encoded representation of a uint-8 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
An Encoder converts Cadence values into XDR-encoded bytes.
func NewEncoder ¶
NewEncoder initializes an Encoder that will write XDR-encoded bytes to the given io.Writer.
func (*Encoder) Encode ¶
Encode writes the XDR-encoded representation of the given value to this encoder's io.Writer.
This function returns an error if the given value's type is not supported by this encoder.
func (*Encoder) EncodeAddress ¶
EncodeAddress writes the XDR-encoded representation of an address.
Reference: https://tools.ietf.org/html/rfc4506#section-4.9
RFC Section 4.9 - Fixed-Length Opaque Data Fixed-length uninterpreted data zero-padded to a multiple of four
func (*Encoder) EncodeArray ¶
EncodeArray writes the XDR-encoded representation of an array.
Reference: https://tools.ietf.org/html/rfc4506#section-4.13
RFC Section 4.13 - Variable-Length Array Unsigned integer length followed by individually XDR-encoded array elements
func (*Encoder) EncodeBool ¶
EncodeBool writes the XDR-encoded representation of a boolean value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.4
RFC Section 4.4 - Boolean Represented as an XDR encoded enumeration where 0 is false and 1 is true
func (*Encoder) EncodeBytes ¶
EncodeBytes writes the XDR-encoded representation of a byte array.
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Encoder) EncodeDictionary ¶
func (e *Encoder) EncodeDictionary(v cadence.Dictionary) error
EncodeDictionary writes the XDR-encoded representation of a dictionary.
The size of the dictionary is encoded as an unsigned integer, followed by the dictionary keys, then elements, each represented as individually XDR-encoded array elements.
func (*Encoder) EncodeFix64 ¶
EncodeFix64 writes the XDR-encoded representation of an int-64 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.5
RFC Section 4.5 - Hyper Integer 64-bit big-endian signed integer in range [-9223372036854775808, 9223372036854775807]
func (*Encoder) EncodeInt ¶
EncodeInt writes the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Encoder) EncodeInt128 ¶
EncodeInt128 writes the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Encoder) EncodeInt16 ¶
EncodeInt16 writes the XDR-encoded representation of an int-16 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.1
RFC Section 4.1 - Integer 32-bit big-endian signed integer in range [-2147483648, 2147483647]
func (*Encoder) EncodeInt256 ¶
EncodeInt256 writes the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Encoder) EncodeInt32 ¶
EncodeInt32 writes the XDR-encoded representation of an int-32 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.1
RFC Section 4.1 - Integer 32-bit big-endian signed integer in range [-2147483648, 2147483647]
func (*Encoder) EncodeInt64 ¶
EncodeInt64 writes the XDR-encoded representation of an int-64 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.5
RFC Section 4.5 - Hyper Integer 64-bit big-endian signed integer in range [-9223372036854775808, 9223372036854775807]
func (*Encoder) EncodeInt8 ¶
EncodeInt8 writes the XDR-encoded representation of an int-8 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.1
RFC Section 4.1 - Integer 32-bit big-endian signed integer in range [-2147483648, 2147483647]
func (*Encoder) EncodeOptional ¶
EncodeOptional writes the XDR-encoded representation of an optional value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.19
RFC Section 4.19 - Optional-Data Union of boolean and encoded value
func (*Encoder) EncodeString ¶
EncodeString writes the XDR-encoded representation of a string value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.11
RFC Section 4.11 - String Unsigned integer length followed by bytes zero-padded to a multiple of four
func (*Encoder) EncodeUFix64 ¶
EncodeUFix64 writes the XDR-encoded representation of a uint-64 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.5
RFC Section 4.5 - Unsigned Hyper Integer 64-bit big-endian unsigned integer in range [0, 18446744073709551615]
func (*Encoder) EncodeUInt ¶
EncodeUInt writes the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Encoder) EncodeUInt128 ¶
EncodeUInt128 writes the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Encoder) EncodeUInt16 ¶
EncodeUInt16 writes the XDR-encoded representation of a uint-16 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]
func (*Encoder) EncodeUInt256 ¶
EncodeUInt256 writes the XDR-encoded representation of an arbitrary-precision integer value.
An arbitrary-precision integer is encoded as follows:
Sign as a byte flag (positive is 1, negative is 0) Absolute value as variable-length big-endian byte array
Reference: https://tools.ietf.org/html/rfc4506#section-4.10
RFC Section 4.10 - Variable-Length Opaque Data Unsigned integer length followed by fixed opaque data of that length
func (*Encoder) EncodeUInt32 ¶
EncodeUInt32 writes the XDR-encoded representation of a uint-32 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]
func (*Encoder) EncodeUInt64 ¶
EncodeUInt64 writes the XDR-encoded representation of a uint-64 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.5
RFC Section 4.5 - Unsigned Hyper Integer 64-bit big-endian unsigned integer in range [0, 18446744073709551615]
func (*Encoder) EncodeUInt8 ¶
EncodeUInt8 writes the XDR-encoded representation of a uint-8 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]
func (*Encoder) EncodeVoid ¶
EncodeVoid writes the XDR-encoded representation of a void value.
Void values are skipped by the encoder because they are empty by definition, but this function still exists in order to support composite types that contain void values.
func (*Encoder) EncodeWord16 ¶
EncodeWord16 writes the XDR-encoded representation of a uint-16 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]
func (*Encoder) EncodeWord32 ¶
EncodeWord32 writes the XDR-encoded representation of a uint-32 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]
func (*Encoder) EncodeWord64 ¶
EncodeWord64 writes the XDR-encoded representation of a uint-64 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.5
RFC Section 4.5 - Unsigned Hyper Integer 64-bit big-endian unsigned integer in range [0, 18446744073709551615]
func (*Encoder) EncodeWord8 ¶
EncodeWord8 writes the XDR-encoded representation of a uint-8 value.
Reference: https://tools.ietf.org/html/rfc4506#section-4.2
RFC Section 4.2 - Unsigned Integer 32-bit big-endian unsigned integer in range [0, 4294967295]