pub fn encode_rotate_shared_ed25519_public_key_script(
    public_key: Vec<u8>
) -> Script
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 Script::publish_shared_ed25519_public_key.

Technical Description

This first rotates the public key stored in account’s SharedEd25519PublicKey::SharedEd25519PublicKey resource to public_key, after which it rotates the authentication key using the capability stored in account’s SharedEd25519PublicKey::SharedEd25519PublicKey to a new value derived from public_key

Parameters

NameTypeDescription
account&signerThe signer reference 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.
  • Script::publish_shared_ed25519_public_key