Skip to main content
The x/metaprotocols module adds support for encoding and decoding additional fields attached to transactions. It is for builders of protocols that write data into Hub transactions (inscriptions, indexers) and for operators who see /gaia.metaprotocols.ExtensionData in blocks and want to know what it is. Source: x/metaprotocols README. The extension_options and non_critical_extension_options fields are optional. They can be used to attach data to valid transactions. The blockchain validates the fields but does not use them in any way. The fields pass validation if they are provided as empty lists ([ ]) or as a list of ExtensionData types. The application does not use the attached data. It does ensure that the correct type is provided and that the data can be unmarshalled. The attached data becomes part of a block.
Use only /gaia.metaprotocols.ExtensionData in extension_options and non_critical_extension_options. A transaction that populates either field with another type is invalid and is rejected.
The following is a correctly formed non_critical_extension_options entry. The @type must be exactly /gaia.metaprotocols.ExtensionData:
The following is a bank.MsgSend transaction with a correctly populated non_critical_extension_options field:

Verify

Decode any transaction that carries extension data and check that the type is the one the Hub accepts:
The output is /gaia.metaprotocols.ExtensionData for every entry. A transaction with any other type in either extension field is rejected before it reaches a block.

Next