FUNCTION

add_auth_descriptor

function add_auth_descriptor(account: account, auth_descriptor: auth_descriptor): account_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

Parameters

  • account — the account to add the auth descriptor to
  • auth_descriptor — the auth descriptor to add

Returns

The newly created account_auth_descriptor entity

See Also

© 2024 Chromia