FUNCTION
create_account_with_auth
function create_account_with_auth(auth_descriptor: auth_descriptor, account_id: byte_array?): accountStandard way of creating a user account. Account registration strategies call this function.
Can only be called from an operation.
Throws "RESTRICTED MAIN AUTH" if the auth descriptor has expiration rules, i.e. if the
rules field is not equivalent to the value of GTV_NULL.
Throws if the auth descriptor is invalid. Common cases include:
- errors with the
argsfield:- some required flags are missing
- in multi-sig auth descriptors, the
required_signaturesfield:- is 0 or less
- is greater than the number of signers
Parameters
- auth_descriptor — the main auth descriptor for the account.
- account_id — optionally, the id for this account.
See Also
- auth_flags_config.mandatory — for the required flags
- account_auth_descriptor.rules — for the list of valid GTV representations of rules
© 2024 Chromia