tip: 23 title: Tagged Data Payload description: Block payload for arbitrary data author: Wolfgang Welz (@Wollac)
discussions-to: https://github.com/iotaledger/tips/pull/54 status: Active type: Standards layer: Core created: 2022-01-24
The payload concept offers a very flexible way to combine and encapsulate information in the IOTA protocol. This document proposes a basic payload type that allows the addition of arbitrary data.
The most flexible way to extend an existing object is by the addition of arbitrary data. This payload provides a way to do just that. An optional tag can be used to categorize the data.
The following table describes the serialization of a Tagged Data Payload following the notation from TIP-21:
|Set to value 5 to denote an Tagged Data Payload.
|The tag of the data. A leading uint8 denotes its length.
|Binary data. A leading uint32 denotes its length.
It is important to note that
Tag is not considered by the protocol, it just serves as a marker for second layer applications.
length(Tag)must not be larger than
Max Tag Length.
- Given the type and length information, the Tagged Data Payload must consume the entire byte array of the
Payloadfield of the encapsulating object.
As the tag is not considered by the protocol, it could also be removed completely. However, Legacy IOTA and Chrysalis supported sending of arbitrary data indexed with a tag. Thus, in order to simplify the migration of second layer applications using these protocols, the optional
Tag has been added which can be used in a similar manner.
Copyright and related rights waived via CC0.