Full Pallet API Reference - v8.1.3 to v8.2.1
Every structural API change between Polymesh chain v8.1.3 and v8.2.1. It complements the narrative pages in the v8.1.3 → v8.2.1 changelog. This reference was produced by comparing the v8.1.3 metadata of the live networks with the v8.2.0 metadata snapshots, then adding the v8.2.1 changes. Items new in v8.2.1 are marked (v8.2.1); the v8.2.0 → v8.2.1 delta is summarized in What Changed in v8.2.1.
Scope:
transaction_versionis unchanged at8. Existing signing code needs no update, apart from the new transaction extension for signers that hard-code the list.- Mainnet gains two pallets,
WorkerModules(60) andConfidentialAssets(70). Testnet and Develop gainWorkerModules, and their existingConfidentialAssetspallet changes in ways that are not backwards compatible. - In every other pallet, everything is appended, so existing call, event and error indices are unchanged. Nothing is removed or renamed outside
ConfidentialAssets. pallet-precompilesadds nothing to metadata. Precompile changes are in Precompile Changes.
Summary
| Pallet | Calls | Events | Errors | Constants | Storage |
|---|---|---|---|---|---|
| ConfidentialAssets | 5 added, 4 changed (Testnet) | 7 added | 12 added, 1 removed, indices shift (Testnet) | 3 added, 1 changed | 6 added, 1 changed, 1 removed (Testnet) |
| WorkerModules | New pallet (4) | New pallet (4) | New pallet (8) | — | New pallet (5) |
| ExternalAgents | — | — | 1 added | — | 1 added |
| MultiSig | — | — | 1 added | — | — |
| Nft | 1 added | 1 added | 2 added | — | 1 added |
| Portfolio | — | — | 1 added | — | — |
| Settlement | — | — | 1 added | — | — |
| Validators | — | — | — | — | 1 added |
On Mainnet, every ConfidentialAssets item is new. The "changed" and "removed" entries apply to Testnet and Develop.
Storage versions: pallet-validators 1 → 2, migrated automatically. pallet-confidential-assets is at version 1: on Testnet and Develop its 0 → 1 migration ran at v8.2.0, and on Mainnet the pallet is new. See the overview.
Several calls change behaviour or cost without a signature change. See Behaviour changes without a signature change.
ConfidentialAssets
Pallet index 70. New on Mainnet. See Confidential Assets for the behaviour, and the Confidential Assets documentation for how the calls fit together.
Calls
The complete call list, for Mainnet integrators:
| Index | Call | Change since v8.1.3 (Testnet) |
|---|---|---|
| 0 | register_accounts | |
| 1 | register_encryption_keys | |
| 2 | create_asset | Now checks role claims |
| 3 | register_account_assets | |
| 4 | mint_asset | |
| 5 | create_settlement | Leg limit, frozen-asset check |
| 6 | sender_affirmation | |
| 7 | receiver_affirmation | |
| 8 | mediator_affirmation | Argument type changed |
| 9 | sender_update_counter | |
| 10 | sender_revert_affirmation | |
| 11 | receiver_revert_affirmation | |
| 12 | receiver_claim | |
| 13 | batched_settlement | Proofs bound to the signer (v8.2.1) |
| 14 | register_fee_accounts | |
| 15 | topup_fee_accounts | |
| 16 | submit_batched_proofs | Argument type changed; proofs bound to the signer (v8.2.1) |
| 17 | relayer_submit_batched_proofs | Argument type changed; must be top-level |
| 18 | execute_instant_settlement | Argument type changed; proofs bound to the signer (v8.2.1) |
| 19 | instant_sender_affirmation | |
| 20 | instant_receiver_affirmation | |
| 21 | set_required_claim | Added |
| 22 | remove_required_claim | Added |
| 23 | distribute_encryption_key | Added |
| 24 | update_asset_keys | Added |
| 25 | set_asset_frozen | Added |
All proofs must come from DART v1.0.1, so every proof-carrying call needs new client code on Testnet, whether or not its argument type changed. Calls 13, 16 and 18 verify every proof in the batch under non_relayer_batch_proof_context(signer): the SCALE encoding of (b"polymesh/dart/submission/v1", 2u8, account_id). Call 17 binds to the fee nullifier, as in v8.2.0. See Proof submission contexts.
The added calls:
| Call | Arguments | Origin |
|---|---|---|
set_required_claim | role: RoleKind, claim: Claim, trusted_issuers: BoundedVec<IdentityId> | Root |
remove_required_claim | role: RoleKind | Root |
distribute_encryption_key | proof: KeyDistributionProof | Signed, Auditor claim |
update_asset_keys | asset_id: u32, mediators: BoundedBTreeMap<AccountPublicKey, EncryptionPublicKey>, auditors: BoundedBTreeSet<EncryptionPublicKey> | Asset issuer |
set_asset_frozen | asset_id: u32, frozen: bool | Asset issuer or Root |
RoleKind is AssetCreator, Auditor or Mediator. FreezeOrigin is Issuer or Root.
Events
Added at the end of the enum:
| Index | Event | Fields |
|---|---|---|
| 26 | RequiredClaimSet | role: RoleKind, claim: Claim, trusted_issuers: BoundedVec<IdentityId> |
| 27 | RequiredClaimRemoved | role: RoleKind |
| 28 | EncryptionKeyDistributed | caller_did: IdentityId, encryption_key: EncryptionPublicKey, proof: KeyDistributionProof |
| 29 | AssetFrozen | asset_id: u32, freeze_origin: FreezeOrigin |
| 30 | AssetUnfrozen | asset_id: u32, unfreeze_origin: FreezeOrigin |
| 31 | AccountStateUpdated (v8.2.1) | leaf_index: u32, account_commitment: AccountStateCommitment, update_action: AccountStateUpdateAction |
| 32 | FeeAccountStateUpdated (v8.2.1) | leaf_index: u32, fee_account_commitment: FeeAccountStateCommitment, update_action: FeeAccountStateUpdateAction |
AssetStateLeafUpdated is now emitted after every asset leaf write, including key updates and freezes.
AccountStateLeafInserted (17) and FeeAccountStateLeafInserted (18) are deprecated in favour of AccountStateUpdated and FeeAccountStateUpdated. They are still emitted, unchanged, immediately before the new events. See Account-state update events for the update_action variants.
Errors
Testnet and Develop: InsufficientFeePaymentAmount (previously index 6) is removed, and errors previously at indices 7 to 45 move down by one. Decoders that work by index must be regenerated.
New errors, at the end of the list:
| Index | Error | Raised when |
|---|---|---|
| 45 | MissingLegMediators | The mediators for a settlement leg are missing |
| 46 | EncryptionKeyMismatch | An encryption key does not match the key registered for the account |
| 47 | MissingRequiredClaim | An identity lacks the claim required for a role |
| 48 | NoKeyRecipients | distribute_encryption_key names no recipients |
| 49 | TooManySharedKeyRecipients | It names more than MaxSharedKeyRecipients |
| 50 | EncryptionKeyNotShared | A mediator's encryption key is neither its own nor shared with it |
| 51 | AssetIsFrozen | A new settlement names a frozen asset |
| 52 | AssetFrozenByRoot | The issuer tries to change a Root freeze |
| 53 | AssetIdOverflow | No more confidential asset ids are available |
| 54 | TooManyProofs | A registration or proof batch exceeds its limit |
| 55 | RelayerCallMustBeTopLevel | relayer_submit_batched_proofs is nested inside another call |
| 56 | SettlementLegCountMismatch | The leg count given with a batched proof does not match the settlement |
Constants
| Constant | Value | Change |
|---|---|---|
MaxFeeAccountCurveTreeRootAge | 14,400,000 ms (4 hours) | Was 172,800,000 ms (2 days) |
MaxRelayerCommission | 10 POLYX | Added |
MaxSharedKeyRecipients | 5 | Added |
MaxTrustedClaimIssuers | 2 | Added |
Other limits are unchanged and identical on all three networks: at most 2 auditors and 2 mediators per asset, 10 legs per settlement, 10 proofs per batch, and root ages of 24 hours (assets) and 2 days (accounts).
Storage
| Item | Shape | Change |
|---|---|---|
RequiredClaims | RoleKind → RequiredClaim | Added |
SharedKeyRecipients | EncryptionPublicKey → BoundedBTreeSet<EncryptionPublicKey> | Added |
AssetFrozen | u32 → FreezeOrigin | Added |
LegMediators | (SettlementRef, u8) → LegMediatorKeys | Added |
CachedDartParametersVersion | ProtocolVersion | Added |
RelayerSubmitExtensionMarker | () | Added (transient, used by the transaction extension) |
Keys | u32 → AssetKeys | Value type changed (Testnet) |
FeeAccountRegistrations | Removed (Testnet) |
After finalization, a settlement keeps only its SettlementState entry. Its legs, memo, affirmation status, counters and LegMediators entries are removed.
Client helper
pallet_confidential_assets::non_relayer_batch_proof_context(account) → Vec<u8> (v8.2.1) is a Rust helper, not a runtime call. It returns the context bytes for proofs submitted through batched_settlement, submit_batched_proofs and execute_instant_settlement by account. Clients in other languages can compute the same SCALE encoding.
Runtime API
ConfidentialAssetsApi::relayer_submit_batched_fee_info(batch: BatchedProofs) → RelayerSubmitBatchedFeeInfo { weight, fee } returns the dispatch weight, including transaction extensions, and the full transaction fee of a relayer_submit_batched_proofs transaction for the batch.
WorkerModules
Pallet index 60. New on every network. All calls require Root. See Worker Modules and Node Changes.
Calls
| Index | Call | Arguments |
|---|---|---|
| 0 | register_protocol | protocol_id: ProtocolId, metadata: ProtocolMetadata |
| 1 | upload_protocol_module_code | protocol: Protocol, code: BoundedVec<u8>, module_version: u32 |
| 2 | upload_protocol_module_context | protocol: Protocol, context: BoundedVec<u8> |
| 3 | upload_protocol_module_config | config: ProtocolModuleConfig |
Events
| Event | Fields |
|---|---|
ProtocolRegistered | protocol_id: ProtocolId, metadata: ProtocolMetadata |
ProtocolModuleCodeUploaded | protocol: Protocol, code: BoundedVec<u8>, code_hash: BackendCodeHash |
ProtocolModuleContextUploaded | protocol: Protocol, context: BoundedVec<u8>, context_hash: BackendContextHash |
ProtocolModuleConfigUploaded | protocol: Protocol, config: ProtocolModuleConfig, config_hash: ProtocolModuleConfigHash |
The code and context events carry the full uploaded bytes, up to several MiB.
Errors
ProtocolAlreadyRegistered, ProtocolNotRegistered, InvalidProtocolMetadata, ProtocolModuleCodeAlreadyExists, ProtocolModuleContextAlreadyExists, ProtocolModuleConfigAlreadyExists, ModuleCodeMissing, ModuleContextMissing.
Storage
| Item | Shape |
|---|---|
Metadata | ProtocolId → ProtocolMetadata |
ProtocolConfigHash | Protocol → ProtocolModuleConfigHash (the active config) |
ProtocolConfig | (Protocol, ProtocolModuleConfigHash) → ProtocolModuleConfig |
ProtocolCode | (Protocol, BackendCodeHash) → BoundedVec<u8> |
ProtocolContext | (Protocol, BackendContextHash) → BoundedVec<u8> |
Limits are set in the runtime: module code up to 3 MiB, context up to 2 MiB, and up to 8 modules per configuration.
ExternalAgents
| Kind | Item | Detail |
|---|---|---|
| Error | StaleAuthorization (8) | A BecomeAgent authorization was issued before the target was last removed as an agent of the asset |
| Storage | AgentAuthCutoff | (AssetId, IdentityId) → u64: the authorization id at the time of the agent's last removal. Default 0 |
MultiSig
| Kind | Item | Detail |
|---|---|---|
| Error | DuplicateSigners (25) | create_multisig, add_multisig_signers or add_multisig_signers_via_admin lists an account twice |
Nft
| Kind | Item | Detail |
|---|---|---|
| Call | set_nfts_frozen (8) | holder: AssetHolder, nfts: NFTs, frozen: bool. Agent of the collection |
| Event | NFTsFrozenStatusUpdated (7) | caller_did: IdentityId, holder: AssetHolder, nfts: NFTs, frozen: bool |
| Error | InvalidNFTTransferNFTIsFrozen (32) | A transfer, settlement execution or report includes an NFT frozen for the sender |
| Error | NFTIsFrozen (33) | Locking (affirming) or redeeming an NFT frozen for its holder |
| Storage | FrozenNFT | (AssetId, AssetHolder, NFTId) → bool. Default false |
See NFT Freezing.
Portfolio
| Kind | Item | Detail |
|---|---|---|
| Error | InvalidTransferNFTIsFrozen (24) | move_portfolio_funds includes an NFT frozen for the source |
Settlement
| Kind | Item | Detail |
|---|---|---|
| Error | InstructionHasNoLegs (61) | An instruction is created with no legs |
Validators
| Kind | Item | Detail |
|---|---|---|
| Storage | IdentityValidatorStashes | (IdentityId, AccountId32) → (): the stashes of each identity that are validating. Filled by the 1 → 2 migration |
Transaction extensions
CheckRelayerSubmitBatchedProofs is added after CheckMetadataHash and before SetOrigin, on every runtime. Its explicit and implicit data are (), so it adds no bytes to the extrinsic or the signed payload. See Other Runtime Changes.
Runtime APIs
ConfidentialAssetsApi is new, with one method, relayer_submit_batched_fee_info. No other runtime API changes its version or signature.
The NFT transfer report behind NFTApi and the settlement report APIs now returns every applicable ownership error, rather than only the first. See NFT Freezing.
Behaviour changes without a signature change
| Call | Change |
|---|---|
Nft::controller_transfer, Nft::controller_transfer_to | Unfreeze the NFTs they take, emitting NFTsFrozenStatusUpdated first |
Nft::transfer_nft, Nft::redeem_nft, Settlement::* affirm and execute, Portfolio::move_portfolio_funds | Refuse NFTs frozen for the sender |
MultiSig::remove_multisig_signers, remove_multisig_signers_via_admin | Outdate pending authorizations for the removed keys |
ExternalAgents::remove_agent, abdicate | Record an authorization cutoff for the removed agent |
Identity::remove_authorization | Accepts outdated authorizations |
Settlement affirmation counts | Count a leg on both sides when the holders include its sender and receiver |
| Settlement NFT transfers | Fail if the receiving portfolio does not exist |
Portfolio::accept_portfolio_custody | Fails if the portfolio does not exist |
Asset::set_asset_metadata, set_asset_metadata_details | Refuse to lock an empty value |
| Committee voting | A motion needs at least one vote; removed members lose all their votes |
Validators::remove_permissioned_validator | Chills the identity's validating stashes |
| Relayer subsidies | Relayer calls are self-paid before the subsidy allowance is checked |
Asset::redeem, controller_transfer, controller_transfer_to, CapitalDistribution::claim, push_benefit | Declare worst-case weight and refund the difference |
See Other Runtime Changes for each.