pub fn encode_rotate_dual_attestation_info_script_function(
    new_url: Vec<u8, Global>,
    new_key: Vec<u8, Global>
) -> TransactionPayload
Expand 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::ComplianceKeyRotationEvent containing the new compliance public key, and the blockchain time at which the key was updated emitted on the DualAttestation::Credential compliance_key_rotation_events handle published under account; and
  • A DualAttestation::BaseUrlRotationEvent containing the new base url to be used for off-chain communication, and the blockchain time at which the url was updated emitted on the DualAttestation::Credential base_url_rotation_events handle published under account.

Parameters

NameTypeDescription
accountsignerSigner of the sending account of the transaction.
new_urlvector<u8>ASCII-encoded url to be used for off-chain communication with account.
new_keyvector<u8>New ed25519 public key to be used for on-chain dual attestation checking.

Common Abort Conditions

Error CategoryError ReasonDescription
Errors::NOT_PUBLISHEDDualAttestation::ECREDENTIALA DualAttestation::Credential resource is not published under account.
Errors::INVALID_ARGUMENTDualAttestation::EINVALID_PUBLIC_KEYnew_key is not a valid ed25519 public key.
  • AccountCreationScripts::create_parent_vasp_account
  • AccountCreationScripts::create_designated_dealer
  • AccountAdministrationScripts::rotate_dual_attestation_info