Function diem_sdk::transaction_builder::stdlib::encode_rotate_shared_ed25519_public_key_script_function
pub fn encode_rotate_shared_ed25519_public_key_script_function(
public_key: Vec<u8, Global>
) -> 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
Name | Type | Description |
---|---|---|
account | signer | The signer 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
AccountAdministrationScripts::publish_shared_ed25519_public_key