Crate pallet_messages

source ·
Expand description

Messages pallet

A pallet for storing messages.

Overview

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

Terminology

  • 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.

Implementations

  • None

Re-exports

Modules

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

Structs

  • A single message type definition.

Type Definitions

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