pub fn encode_rotate_shared_ed25519_public_key_script(
public_key: Vec<u8, Global>
) -> 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
Name | Type | Description |
---|---|---|
account | &signer | The signer reference of the sending account of the transaction. |
public_key | vector<u8> | 32-byte Ed25519 public key. |
Common Abort Conditions
Error Category | Error Reason | Description |
---|---|---|
Errors::NOT_PUBLISHED | SharedEd25519PublicKey::ESHARED_KEY | A SharedEd25519PublicKey::SharedEd25519PublicKey resource is not published under account . |
Errors::INVALID_ARGUMENT | SharedEd25519PublicKey::EMALFORMED_PUBLIC_KEY | public_key is an invalid ed25519 public key. |
Related Scripts
Script::publish_shared_ed25519_public_key