Function diem_transaction_builder::stdlib::encode_rotate_dual_attestation_info_script_function
source · pub fn encode_rotate_dual_attestation_info_script_function(
new_url: Vec<u8>,
new_key: Vec<u8>
) -> TransactionPayloadExpand description
Summary
Updates the url used for off-chain communication, and the public key used to verify dual attestation on-chain. Transaction can be sent by any account that has dual attestation information published under it. In practice the only such accounts are Designated Dealers and Parent VASPs.
Technical Description
Updates the base_url and compliance_public_key fields of the DualAttestation::Credential
resource published under account. The new_key must be a valid ed25519 public key.
Events
Successful execution of this transaction emits two events:
- A
DualAttestation::ComplianceKeyRotationEventcontaining the new compliance public key, and the blockchain time at which the key was updated emitted on theDualAttestation::Credentialcompliance_key_rotation_eventshandle published underaccount; and - A
DualAttestation::BaseUrlRotationEventcontaining the new base url to be used for off-chain communication, and the blockchain time at which the url was updated emitted on theDualAttestation::Credentialbase_url_rotation_eventshandle published underaccount.
Parameters
| Name | Type | Description |
|---|---|---|
account | signer | Signer of the sending account of the transaction. |
new_url | vector<u8> | ASCII-encoded url to be used for off-chain communication with account. |
new_key | vector<u8> | New ed25519 public key to be used for on-chain dual attestation checking. |
Common Abort Conditions
| Error Category | Error Reason | Description |
|---|---|---|
Errors::NOT_PUBLISHED | DualAttestation::ECREDENTIAL | A DualAttestation::Credential resource is not published under account. |
Errors::INVALID_ARGUMENT | DualAttestation::EINVALID_PUBLIC_KEY | new_key is not a valid ed25519 public key. |
Related Scripts
AccountCreationScripts::create_parent_vasp_accountAccountCreationScripts::create_designated_dealerAccountAdministrationScripts::rotate_dual_attestation_info