update_main_auth_descriptor

function update_main_auth_descriptor(account: account, auth_descriptor: auth_descriptor)(source)

Sets provided auth descriptor as main auth descriptor, deleting the previous one.

Can only be called from an operation.

Throws "RESTRICTED MAIN AUTH" if the auth descriptor's rules are not GTV_NULL

Throws if any mandatory flags are missing on the auth descriptor.

Throws if the account has no main auth descriptor associated. This should normally not happen for user accounts.

Throws if the auth descriptor's args field is invalid. Common cases are:

  • the auth descriptor is a misconfigured multisig. required_signatures is:

    • 0 or less

    • greater than the number of signers

Parameters

account

the account to change the main auth descriptor for

auth_descriptor

the new auth descriptor to add as main

See also

auth_flags_config

for information on mandatory flags