Frequency User Data

On Frequency, User Data is mapped to Schemas which use Stateful Storage for storage and retrieval of the data.

User Data Sets

User Data SetDeployed Schema IdsFrequency Model TypeFrequency Payload LocationSettings
Public Key (Key Agreement)Mainnet: 7
Testnet (Paseo): 7
AvroBinary
ItemizedAppend Only, Signature Required
Public FollowsMainnet: 8
Testnet (Paseo): 8
AvroBinary
PaginatedNone
Private FollowsMainnet: 9
Testnet (Paseo): 9
AvroBinary
PaginatedNone
Private ConnectionsMainnet: 10
Testnet (Paseo): 10
AvroBinary
PaginatedNone
Public Key (Assertion Method)Mainnet: 14
Testnet (Paseo): 14
AvroBinary
ItemizedSignature Required
Profile ResourcesMainnet: 15
Testnet (Paseo): 15
AvroBinary
ItemizedNone

Private Connection Pseudonymous Relationship Identifiers (PRIds) are stored alongside Private Connections in the same Stateful Storage page.

For historical reasons, bytes for the Public Key (Key Agreement) schema are serialized to the corresponding Avro bytes field without the leading multicodec identifier. Readers should prepend or assume leading 0xec 0x01 bytes (indicating the x25519-pub multicodec). Writers should omit these leading bytes when inserting new items.

Source code for each schema is located in the LibertyDSNP/schemas repository.

Read Operation Mapping

Stateful data is retrieved via state queries (pallet.stateQuery) or RPC calls (pallet.rpcCall()).

Model TypeDSNP PropertiesQuery/Call
ItemizedEntity Tag
stateful_storage.getItemizedStorage()
PaginatedEntity Tag, Chunked
stateful_storage.getPaginatedStorage()

Write Operation Mapping

Write operations are via Transactions (also called Extrinsics): pallet::extrinsic()

Model TypeOperationPallet::Extrinsic
ItemizedInsert, Update, Delete
stateful_storage::apply_item_actions()
stateful_storage::apply_item_actions_with_signature()
PaginatedInsert, Update
stateful_storage::upsert_page()
stateful_storage::upsert_page_with_signature()
PaginatedDelete
stateful_storage::delete_page()
stateful_storage::delete_page_with_signature()

Entity Tags

Frequency requires the hash of current state for any Stateful Storage change.