Crate pallet_messages

source ·
Expand description

Messages pallet

A pallet for storing messages.


Messages allow for discovery of new content matching a given Schema. Each message MUST have either a provider or a validated source and provider. Message is the metadata of the source, order, schema for a payload or referenced payload.

The Messages Pallet provides functions for:

  • Adding messages for a given schema.
  • Enabling retrieving messages for a given schema.
  • (FUTURE) Removing messages after expiration


  • Message: A message that matches a registered Schema (on-chain or off-chain).
  • Payload: The data in a Message that matches a Schema.
  • MSA Id: The 64 bit unsigned integer associated with an Message Source Account.
  • MSA: Message Source Account. A registered identifier with the MSA pallet.
  • Schema: A registered data structure and the settings around it. (See Schemas pallet)
  • Schema Id: A U16 bit identifier for a schema stored on-chain.


  • None



  • The module that hosts all the FRAME types needed to add this pallet to a runtime.
  • Autogenerated weights for pallet_messages


  • A single message type definition.

Type Definitions

  • Payloads stored offchain contain a tuple of (bytes(the payload reference), payload length).