add_auth_descriptor

Adds an auth descriptor to an account.

Can only be called from an operation.

Throws "TOO MANY AUTH DESCRIPTORS" if the account already has AUTH_DESCRIPTORS_PER_ACCOUNT_UPPER_BOUND number of auth descriptors registered to it.

Throws if auth_descriptor's args field is invalid. Common cases include:

  • if a multi-sig auth descriptor's required_signatures is 0 or less

  • if a multi-sig auth descriptor's required_signature parameter is greater than the number of signers

Throws if auth_descriptor's rules field is invalid. Common cases include:

  • rules is a complex rule with too many rule components

  • rules has already expired

  • rules is not the valid GTV representation of a rule

Return

The newly created account_auth_descriptor entity

Parameters

account

the account to add the auth descriptor to

auth_descriptor

the auth descriptor to add

See also

account_auth_descriptor.rules

for the list of valid GTV representations of rules