# lib.ft4.core.accounts · FT4 Rell API · Chromia Docs (concept)

> Types account Represents a user profile on a dapp. Multiple users could access this profile, account_auth_descriptor An entity that allows fine-tuned acces

Source: https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/

PACKAGE

# lib.ft4.core.accounts

On this page

* [Types](#types)
* [Functions](#functions)
* [Properties](#properties)

## Types

[account](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/account/)
:   Represents a user profile on a dapp. Multiple users could access this profile,

[account\_auth\_descriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/account_auth_descriptor/)
:   An entity that allows fine-tuned access control over accounts. It's used to specify

[auth\_descriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/auth_descriptor/)
:   Used to represent accountauthdescriptor entities before creation.

[auth\_descriptor\_config](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/auth_descriptor_config/)
:   Represents the auth descriptor configuration found on the chromia.yml file.

[auth\_descriptor\_signer](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/auth_descriptor_signer/)
:   Represents a keypair that has access to an auth descriptor.

[auth\_flags\_config](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/auth_flags_config/)
:   Represents the auth flag configuration found on the chromia.yml file.

[auth\_type](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/auth_type/)
:   Types of authentication supported for auth descriptors.

[main\_auth\_descriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/main_auth_descriptor/)
:   The auth descriptor that manages an account.

[module\_args](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/module_args/)
:   The configuration defined in the chromia.yml file.

[multi\_sig\_args](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/multi_sig_args/)
:   What the args property of an accountauth descriptor entity or authdescriptor struct

[rate\_limit\_config](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/rate_limit_config/)
:   Represents the rate limit configuration found on the chromia.yml file.

[rl\_state](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/rl_state/)
:   Rate limiter state, keeping track of whether an account can do more operations.

[rule\_expression](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/rule_expression/)
:   The expression of a single rule.

[rule\_operator](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/rule_operator/)
:   The comparison operator that the auth descriptor rule will use.

[rule\_parameters](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/rule_parameters/)
:   Used to simplify rule creation, it describes a rule without the operator.

[rule\_variable](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/rule_variable/)
:   The variables that an auth descriptor rule can check against.

[single\_sig\_args](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/single_sig_args/)
:   What the args property of an accountauth descriptor entity or authdescriptor struct

## Functions

[Account](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/-account/)
:   Retrieve an account given the id

[AuthDescriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/-auth-descriptor/)
:   Retrieve an accountauthdescriptor given the id

[account\_by\_id](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/account_by_id/)
:   Finds an account based on its ID.

[account\_rate\_limit\_config](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/account_rate_limit_config/)
:   Extend this function to have different rate limiting for different accounts.

[add\_auth\_descriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/add_auth_descriptor/)
:   Adds an auth descriptor to an account.

[add\_rate\_limit\_points](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/add_rate_limit_points/)
:   Adds rate limit points to an account to allow calling more operations in a short amount

[add\_signers](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/add_signers/)
:   Associates new signers with an account.

[are\_and\_rules\_violated](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/are_and_rules_violated/)
:   Detects whether any of a list of rule expressions is violated.

[are\_rules\_active](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/are_rules_active/)
:   Checks whether all the rules in the gtv are active.

[are\_rules\_violating](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/are_rules_violating/)
:   Checks whether any of the rules in the gtv are violated currently.

[auth\_descriptor\_by\_id](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/auth_descriptor_by_id/)
:   Finds an auth descriptor based on its ID and the account it belongs to.

[block\_height](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/block_height/)
:   First step in creating a ruleexpression based on blockheight. Should be passed

[block\_time](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/block_time/)
:   First step in creating a ruleexpression based on blocktime. Should be passed

[check\_auth\_args](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/check_auth_args/)
:   Checks that the multi-sig auth descriptor has all the requirements to authorize an

[check\_multi\_sig\_auth](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/check_multi_sig_auth/)
:   Checks that the multi-sig auth descriptor has all the requirements to authorize an

[check\_required\_flags](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/check_required_flags/)
:   Checks that the set of flags contains all the required flags, which means the auth

[check\_single\_sig\_auth](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/check_single_sig_auth/)
:   Checks that the single signature auth descriptor has all the requirements to authorize an

[create\_account\_with\_auth](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/create_account_with_auth/)
:   Standard way of creating a user account. Account registration strategies call this function.

[create\_account\_without\_auth](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/create_account_without_auth/)
:   Creates an account without auth descriptor. Used to create different "system" account types

[create\_rate\_limiter\_state\_for\_account](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/create_rate_limiter_state_for_account/)
:   Creates a rate limiter state entity (rlstate) for the specified account

[current\_rate\_limit\_points](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/current_rate_limit_points/)
:   Returns how many rate limit points are available to a certain rlstate given

[delete\_all\_auth\_descriptors\_except\_main](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/delete_all_auth_descriptors_except_main/)
:   Deletes all auth descriptors of an account that are not the main auth descriptor.

[delete\_auth\_descriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/delete_auth_descriptor/)
:   Deletes an auth descriptor that is not a main auth descriptor.

[delete\_expired\_auth\_descriptors](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/delete_expired_auth_descriptors/)
:   Deletes all expired auth descriptors associated with an account, except keepauthdesc if

[delete\_main\_auth\_descriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/delete_main_auth_descriptor/)
:   Deletes the main auth descriptor for the account. It does not add a new one, so it leaves

[ensure\_account\_without\_auth](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/ensure_account_without_auth/)
:   Finds or creates an account of specific type.

[equals](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/equals/)
:   Composes a rule from the ruleparameters and the eq operator

[evaluate\_int\_variable\_rule](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/evaluate_int_variable_rule/)
:   Checks whether the rule is valid.

[get\_account\_id\_from\_signers](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_account_id_from_signers/)
:   Default calculation for new account IDs.

[get\_auth\_descriptor\_config](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_auth_descriptor_config/)
:   Retrieves the auth descriptor config

[get\_auth\_descriptor\_data](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_auth_descriptor_data/)
:   Extract info from an accountauthdescriptor in a more accessible format.

[get\_auth\_descriptors](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_auth_descriptors/)
:   Returns all auth descriptors registered to an account.

[get\_auth\_descriptors\_by\_signer](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_auth_descriptors_by_signer/)
:   Returns all auth descriptors of which the signer takes part that are registered to

[get\_auth\_flags\_config](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_auth_flags_config/)
:   retrieve the settings for auth flags written in the chromia.yml file

[get\_flags](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_flags/)
:   Extracts the flags from an auth descriptor.

[get\_flags\_from\_args](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_flags_from_args/)
:   Extracts the set of flags found in the "args" parameter.

[get\_max\_allowed\_auth\_descriptor\_rules](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_max_allowed_auth_descriptor_rules/)
:   Returns the maximum number of rules that can be composed to limit the duration of

[get\_paginated\_accounts\_by\_ad\_id](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_paginated_accounts_by_ad_id/)
:   Retrieves all accounts the given auth descriptor can interact with, paginated.

[get\_paginated\_accounts\_by\_signer](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_paginated_accounts_by_signer/)
:   Retrieves all accounts the given signer can interact with, paginated.

[get\_paginated\_accounts\_by\_type](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_paginated_accounts_by_type/)
:   Retrieves all accounts of the given type, paginated.

[get\_rate\_limit\_config](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_rate_limit_config/)
:   Returns the rate limit config extracted from the chromia.yml.

[get\_rate\_limit\_config\_for\_account](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_rate_limit_config_for_account/)
:   Retrieves the rate limit config to apply to a specific account. Defaults to the value

[get\_raw\_auth\_flags\_config](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_raw_auth_flags_config/)
:   retrieve the settings for auth flags written in the chromia.yml file, unparsed

[get\_signers](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_signers/)
:   Extracts the signer list from an auth descriptor

[get\_signers\_from\_encoded\_auth\_descriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/get_signers_from_encoded_auth_descriptor/)
:   Extracts the signer list from an auth descriptor's args

[greater\_or\_equal](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/greater_or_equal/)
:   Composes a rule from the ruleparameters and the ge operator

[greater\_than](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/greater_than/)
:   Composes a rule from the ruleparameters and the gt operator

[has\_flags](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/has_flags/)
:   Checks if an accountauthdescriptor has all the specified flags

[have\_violating\_rules](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/have_violating_rules/)
:   Checks if any rules of the given auth descriptor are violated.

[is\_active](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/is_active/)
:   Checks whether all the rules of the auth descriptor are active.

[is\_block\_height\_rule\_active](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/is_block_height_rule_active/)
:   Whether the rule, which is expected to have a blockheight variable, is active.

[is\_block\_time\_rule\_active](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/is_block_time_rule_active/)
:   Whether the rule, which is expected to have a blocktime variable, is active.

[is\_rule\_active](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/is_rule_active/)
:   Checks whether the rule expression is active.

[is\_rule\_violated](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/is_rule_violated/)
:   Detects whether a rule expression is violated.

[less\_or\_equal](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/less_or_equal/)
:   Composes a rule from the ruleparameters and the le operator

[less\_than](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/less_than/)
:   Composes a rule from the ruleparameters and the lt operator

[load\_variables](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/load_variables/)
:   Loads the current value of all possible variables that can appear in an auth descriptor

[map\_account](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/map_account/)
:   Maps an account's info into a readable format for the frontend

[map\_rule\_expressions\_from\_gtv](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/map_rule_expressions_from_gtv/)
:   Takes a gtv representation of rules, and converts them into a list of ruleexpressions

[multi\_sig\_auth\_descriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/multi_sig_auth_descriptor/)
:   Creates a multi-signature auth descriptor given the arguments with no expiration rules.

[op\_count](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/op_count/)
:   First step in creating a ruleexpression based on opcount. Should be passed

[parse\_auth\_flags](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/parse_auth_flags/)
:   Parse the values in the gtv as auth flags. Used to retrieve the configuration found in

[rate\_limit](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/rate_limit/)
:   Rate limit an account, i.e. verify that the account is only sending up to as

[require\_mandatory\_flags](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/require_mandatory_flags/)
:   Checks that the auth descriptor contains all the flags deemed necessary for this dapp.

[require\_valid\_auth\_flags](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/require_valid_auth_flags/)
:   Checks that all flags values passed are composed of letters and/or underscores.

[rule\_expression\_from\_gtv](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/rule_expression_from_gtv/)
:   Takes a GTV representation of one rule, and converts it into a single ruleexpression

[rule\_expression\_to\_gtv](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/rule_expression_to_gtv/)
:   Takes a single ruleexpression and returns the gtv representation that can be used

[serialize\_rules](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/serialize_rules/)
:   Takes a list of ruleexpressions and returns the gtv representation that can be used

[set\_main\_auth\_descriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/set_main_auth_descriptor/)
:   Sets an auth descriptor as mainauthdescriptor of the account

[single\_sig\_auth\_descriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/single_sig_auth_descriptor/)
:   Creates a single signature auth descriptor given the arguments with no expiration rules.

[update\_auth\_descriptor\_rule\_variables](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/update_auth_descriptor_rule_variables/)
:   Updates the counter of the auth descriptor, which should always be increased by one

[update\_main\_auth\_descriptor](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/update_main_auth_descriptor/)
:   Sets provided auth descriptor as main auth descriptor, deleting the previous one.

[validate\_auth\_descriptor\_args](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/validate_auth_descriptor_args/)
:   Checks if the auth descriptor args correspond to singlesigargs or multisigargs,

[validate\_auth\_descriptor\_rules](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/validate_auth_descriptor_rules/)
:   Analyze the rules before assigning them to an auth descriptor, to check that they haven't

[validate\_rule](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/validate_rule/)
:   Checks that the rule is sensible. This means that the rule does not expect:

[variable\_value](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/variable_value/)
:   Extracts the required variable value from the state

## Properties

[GTV\_NULL](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/-g-t-v_-n-u-l-l/)
:   The GTV representation of null

[GTV\_NULL\_BYTES](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/-g-t-v_-n-u-l-l_-b-y-t-e-s/)
:   The bytearray representation of null

[AUTH\_DESCRIPTORS\_PER\_ACCOUNT\_UPPER\_BOUND](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/-a-u-t-h_-d-e-s-c-r-i-p-t-o-r-s_-p-e-r_-a-c-c-o-u-n-t_-u-p-p-e-r_-b-o-u-n-d/)
:   Used instead of moduleargs -> authdescriptor.maxnumberperaccount

[ACCOUNT\_TYPE\_USER](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/-a-c-c-o-u-n-t_-t-y-p-e_-u-s-e-r/)
:   Constant that represents account type for regular user accounts

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-rell/-f-t4%20-library/lib.ft4.core.accounts/index.html)Generated API reference, mirrored from the live docs
