pub fn add_public_key_to_msa<T: Config>(
    msa_owner_public_key: T::AccountId,
    msa_owner_proof: MultiSignature,
    new_key_owner_proof: MultiSignature,
    add_key_payload: AddKeyData<T>
)
Expand description

Adds a new public key to an existing Message Source Account (MSA). This functionality enables the MSA owner to manage multiple keys for their account or rotate keys for enhanced security.

The origin parameter represents the account from which the function is called and can be either the MSA owner’s account or a delegated provider’s account, depending on the intended use.

The function requires two signatures: msa_owner_proof and new_key_owner_proof, which serve as proofs of ownership for the existing MSA and the new public key account, respectively. This ensures that a new key cannot be added without permission of both the MSA owner and the owner of the new key.

The necessary information for the key addition, the new public key and the MSA ID, is contained in the add_key_payload parameter of type AddKeyData. It also contains an expiration block number for both proofs, ensuring they are valid and must be greater than the current block.

Events

Errors

Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::add_public_key_to_msa.