CBOR Major Type

enum cardano_cbor_major_type_t

Represents CBOR Major Types as defined in RFC 7049 section 2.1.

These major types are used to identify the type of data in a CBOR data item.

Values:

enumerator CARDANO_CBOR_MAJOR_TYPE_UNSIGNED_INTEGER

An unsigned integer.

Range: 0 to 2^64-1 inclusive. The value of the encoded item is the argument itself.

enumerator CARDANO_CBOR_MAJOR_TYPE_NEGATIVE_INTEGER

A negative integer.

Range: -2^64 to -1 inclusive. The value of the item is -1 minus the argument.

enumerator CARDANO_CBOR_MAJOR_TYPE_BYTE_STRING

A byte string.

The number of bytes in the string is equal to the argument.

enumerator CARDANO_CBOR_MAJOR_TYPE_UTF8_STRING

A text string encoded as UTF-8.

Refer to Section 2 and RFC 3629. The number of bytes in the string is equal to the argument.

enumerator CARDANO_CBOR_MAJOR_TYPE_ARRAY

An array of data items.

Also known as lists, sequences, or tuples. A “CBOR sequence” is slightly different (see RFC 8742). The argument specifies the number of data items in the array.

enumerator CARDANO_CBOR_MAJOR_TYPE_MAP

A map of pairs of data items.

Also known as tables, dictionaries, hashes, or objects (in JSON).

enumerator CARDANO_CBOR_MAJOR_TYPE_TAG

A tagged data item (“tag”).

Tag number ranges from 0 to 2^64-1 inclusive. The enclosed data item (tag content) follows the head.

enumerator CARDANO_CBOR_MAJOR_TYPE_SIMPLE

Simple values, floating-point numbers, and the “break” stop code.

enumerator CARDANO_CBOR_MAJOR_TYPE_UNDEFINED

Undefined major type.