pub fn add_recovery_commitment<T: Config>(
msa_owner_key: T::AccountId,
proof: MultiSignature,
payload: RecoveryCommitmentPayload<T>,
)Expand description
Adds a Recovery Commitment to an MSA. The Recovery Commitment is a cryptographic commitment that can be used later in a recovery process to prove ownership or authorization.
This function allows the owner of an MSA to create a Recovery Commitment hash that is stored on-chain. The commitment must be signed by the MSA owner to prove authorization.
§Remarks
- The
origincan be any signed account but themsa_owner_keymust be the actual owner - Signatures should be over the
RecoveryCommitmentPayloadstruct - The Recovery Commitment is stored as a hash mapping from MSA ID to commitment value
§Events
§Errors
Error::InvalidSignature-proofverification fails;msa_owner_keymust have signedpayloadError::NoKeyExists- there is no MSA formsa_owner_keyError::ProofNotYetValid-payloadexpiration is too far in the futureError::ProofHasExpired-payloadexpiration is in the pastError::SignatureAlreadySubmitted- signature has already been used
§Warning: Doc-Only
This function is an automatically generated, and is doc-only, uncallable
stub. See the real version in
Pallet::add_recovery_commitment.