pub fn encode_rotate_shared_ed25519_public_key_script_function(
    public_key: Vec<u8>
) -> TransactionPayload
Expand description

Summary

Rotates the authentication key in a SharedEd25519PublicKey. This transaction can be sent by any account that has previously published a shared ed25519 public key using AccountAdministrationScripts::publish_shared_ed25519_public_key.

Technical Description

public_key must be a valid ed25519 public key. This transaction first rotates the public key stored in account’s SharedEd25519PublicKey::SharedEd25519PublicKey resource to public_key, after which it rotates the account’s authentication key to the new authentication key derived from public_key as defined here using the DiemAccount::KeyRotationCapability stored in account’s SharedEd25519PublicKey::SharedEd25519PublicKey.

Parameters

NameTypeDescription
accountsignerThe signer of the sending account of the transaction.
public_keyvector<u8>32-byte Ed25519 public key.

Common Abort Conditions

Error CategoryError ReasonDescription
Errors::NOT_PUBLISHEDSharedEd25519PublicKey::ESHARED_KEYA SharedEd25519PublicKey::SharedEd25519PublicKey resource is not published under account.
Errors::INVALID_ARGUMENTSharedEd25519PublicKey::EMALFORMED_PUBLIC_KEYpublic_key is an invalid ed25519 public key.
  • AccountAdministrationScripts::publish_shared_ed25519_public_key