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).
Documentation Links
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 Term | Frequency Term |
---|---|
User | User / Delegator |
Delegate | Provider |
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()
Operation | Principal(s) | Pallet::Extrinsic | State Change Record |
---|---|---|---|
Create Identifier | None | ||
msa::create() , | |||
msa::create_sponsored_account_with_delegation() | Identifier Creation Record | ||
Retire Identifier | User | ||
msa::retire_msa() | Identifier Retirement Record | ||
Define Delegation | User AND Delegate | ||
msa::grant_delegation() , | |||
msa::create_sponsored_account_with_delegation() | Delegation Definition Record | ||
Revoke Delegation | User | ||
msa::revoke_delegation_by_delegator() | Delegation Revocation Record | ||
Revoke Delegation | Delegate | ||
msa::revoke_delegation_by_provider() | Delegation Revocation Record | ||
Add Control Key | User | ||
msa::add_public_key_to_msa() | Control Key Addition Record | ||
Remove Control Key | User | ||
msa::delete_msa_public_key() | Control Key Removal Record | ||
Publish Announcement | User OR Delegate | ||
messages::add_onchain_message() | Announcement Published Record | ||
Publish Batch | User OR Delegate | ||
messages::add_ipfs_message() | Batch Published Record | ||
Get User Data | Any | See User Data: Read Operation Mapping | - |
Replace User Data | User OR Delegate | See User Data: Write Operation Mapping | User Data Replaced Record |