pub fn encode_rotate_authentication_key_script(new_key: Vec<u8>) -> ScriptExpand description
Summary
Rotates the transaction sender’s authentication key to the supplied new authentication key. May be sent by any account.
Technical Description
Rotate the account’s DiemAccount::DiemAccount authentication_key field to new_key.
new_key must be a valid ed25519 public key, and account must not have previously delegated
its DiemAccount::KeyRotationCapability.
Parameters
| Name | Type | Description |
|---|---|---|
account | &signer | Signer reference of the sending account of the transaction. |
new_key | vector<u8> | New ed25519 public key to be used for account. |
Common Abort Conditions
| Error Category | Error Reason | Description |
|---|---|---|
Errors::INVALID_STATE | DiemAccount::EKEY_ROTATION_CAPABILITY_ALREADY_EXTRACTED | account has already delegated/extracted its DiemAccount::KeyRotationCapability. |
Errors::INVALID_ARGUMENT | DiemAccount::EMALFORMED_AUTHENTICATION_KEY | new_key was an invalid length. |
Related Scripts
Script::rotate_authentication_key_with_nonceScript::rotate_authentication_key_with_nonce_adminScript::rotate_authentication_key_with_recovery_address