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
origin
can be any signed account but themsa_owner_key
must be the actual owner - Signatures should be over the
RecoveryCommitmentPayload
struct - The Recovery Commitment is stored as a hash mapping from MSA ID to commitment value
§Events
§Errors
Error::InvalidSignature
-proof
verification fails;msa_owner_key
must have signedpayload
Error::NoKeyExists
- there is no MSA formsa_owner_key
Error::ProofNotYetValid
-payload
expiration is too far in the futureError::ProofHasExpired
-payload
expiration 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
.