Operations

Method of execution

DSNP Operations are executed on Frequency via on-chain transactions, also known as extrinsic calls. An extrinsic is a type of function defined in a Substrate Pallet. A Pallet is a Substrate runtime module and also a Cargo crate.

MSA Pallet

Responsible for DSNP Identity Operations and Delegation management.

Schema Pallet

Responsible for managing the data structures for DSNP Announcements and User Data.

Messages Pallet

Responsible for most DSNP Announcement Operations (see Publishing).

Stateful Storage Pallet

Responsible for DSNP User Data (see User Data) and select Announcement Operations (see Publishing).

Principals

Every Frequency transaction for DSNP is accompanied by an Schnorrkel/Ristretto X25519 (“sr25519”) derived cryptographic signature and associated public key. When the transaction occurs, the signature is validated and the MSA Id is retrieved.

DSNP TermFrequency Term
UserUser / Delegator
DelegateProvider

Failure Handling

Frequency has a variety of errors that fall into these classes:

  • Timeout: A transaction with an unknown status after a set time.
  • Node Rejection: Public nodes may reject transactions from unknown parties.
  • Node Validation Error: A node will reject malformed or invalid transactions when possible.
  • Execution Error: A transaction that was included in a block but failed upon execution.

Transactions are not automatically resubmitted. Check with the Frequency Documentation for more information regarding errors.

List of Operations

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

OperationPrincipal(s)Pallet::ExtrinsicState Change Record
Create IdentifierNone
msa::create(),
msa::create_sponsored_account_with_delegation()Identifier Creation Record
Retire IdentifierUser
msa::retire_msa()Identifier Retirement Record
Define DelegationUser AND Delegate
msa::grant_delegation(),
msa::create_sponsored_account_with_delegation()Delegation Definition Record
Revoke DelegationUser
msa::revoke_delegation_by_delegator()Delegation Revocation Record
Revoke DelegationDelegate
msa::revoke_delegation_by_provider()Delegation Revocation Record
Add Control KeyUser
msa::add_public_key_to_msa()Control Key Addition Record
Remove Control KeyUser
msa::delete_msa_public_key()Control Key Removal Record
Publish AnnouncementUser OR Delegate
messages::add_onchain_message()Announcement Published Record
Publish BatchUser OR Delegate
messages::add_ipfs_message()Batch Published Record
Get User DataAnySee User Data: Read Operation Mapping-
Replace User DataUser OR DelegateSee User Data: Write Operation MappingUser Data Replaced Record