Module-level declarations

Types

Link copied to clipboard
entity account
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
entity rl_state
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
val ACCOUNT_TYPE_USER: text = "FT4_USER"

Constant that represents account type for regular user accounts created with create_account_with_auth.

Link copied to clipboard
val GTV_NULL: gtv = null
Link copied to clipboard

Functions

Link copied to clipboard
function Account(id: byte_array): account
Link copied to clipboard
Link copied to clipboard
@extendable function account_rate_limit_config(account: account): rate_limit_config?

Extend this function to have different rate limiting for different accounts.

Link copied to clipboard
Link copied to clipboard
function add_rate_limit_points(account: account, amount: integer)
Link copied to clipboard
function add_signers(account: account, auth_descriptor: auth_descriptor, account_auth_descriptor: account_auth_descriptor)
Link copied to clipboard
function are_and_rules_violated(rules: list<rule_expression>, variables: map<text, gtv>): boolean
Link copied to clipboard
function are_rules_active(rules: gtv): boolean
Link copied to clipboard
function are_rules_violating(rules: gtv, variables: map<text, gtv>): boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function block_time(integer: integer): rule_parameters
Link copied to clipboard
function check_auth_args(a_t: auth_type, args: byte_array, signers: list<byte_array>, required_flags: list<text>): validation_result
Link copied to clipboard
function check_multi_sig_auth(args: byte_array, signers: list<byte_array>, required_flags: list<text>): validation_result
Link copied to clipboard
function check_required_flags(flags: set<text>, required_flags: list<text>): boolean
Link copied to clipboard
function check_single_sig_auth(args: byte_array, signers: list<byte_array>, required_flags: list<text>): validation_result
Link copied to clipboard
function create_account_with_auth(auth_descriptor: auth_descriptor, account_id: byte_array?): account
Link copied to clipboard
function create_account_without_auth(account_id: byte_array, type: text): account

Creates an account without auth descriptor. Used to create different "system" account types, that cannot be directly accessed, e.g. POOL, FEE, BLOCKCHAIN, ... accounts.

Link copied to clipboard
function current_rate_limit_points(rate_limit_config: rate_limit_config, rl_state: rl_state, current_timestamp: integer): integer
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function ensure_account_without_auth(account_id: byte_array, type: text): account

Finds or creates an account of specific type.

Link copied to clipboard
function equals(rule_parameters: rule_parameters): rule_expression
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function get_auth_descriptor_data(ad: immutable_mirror_struct<account_auth_descriptor>): (id: byte_array, account_id: byte_array, auth_type: auth_type, args: gtv, rules: gtv, created: integer)
Link copied to clipboard
function get_auth_descriptors(id: byte_array): list<(id: byte_array, account_id: byte_array, auth_type: auth_type, args: gtv, rules: gtv, created: integer)>
Link copied to clipboard
function get_auth_descriptors_by_signer(account_id: byte_array, signer: byte_array): list<(id: byte_array, account_id: byte_array, auth_type: auth_type, args: gtv, rules: gtv, created: integer)>
Link copied to clipboard
function get_auth_flags_config(): (mandatory: list<text>, default: list<text>)
Link copied to clipboard
function get_flags(auth_descriptor: auth_descriptor): set<text>
Link copied to clipboard
Link copied to clipboard
function get_paginated_accounts_by_ad_id(id: byte_array, page_size: integer?, page_cursor: text?): list<pagination_result>
Link copied to clipboard
Link copied to clipboard
function get_paginated_accounts_by_type(type: text, page_size: integer?, page_cursor: text?): list<pagination_result>
Link copied to clipboard
Link copied to clipboard
function get_signers(auth_descriptor: auth_descriptor): list<byte_array>
Link copied to clipboard
Link copied to clipboard
function greater_than(rule_parameters: rule_parameters): rule_expression
Link copied to clipboard
function has_flags(account_auth_descriptor: account_auth_descriptor, required_flags: list<text>): boolean

Checks if an account_auth_descriptor has all the specified flags

Link copied to clipboard
Link copied to clipboard
function is_active(account_auth_descriptor: account_auth_descriptor): boolean
Link copied to clipboard
                             block_height                                        *
Link copied to clipboard
                                block_time                                       *
Link copied to clipboard
Link copied to clipboard
function is_rule_violated(rule: rule_expression, variables: map<text, gtv>): boolean
Link copied to clipboard
function less_or_equal(rule_parameters: rule_parameters): rule_expression
Link copied to clipboard
function less_than(rule_parameters: rule_parameters): rule_expression
Link copied to clipboard
function load_variables(op_count: integer): map<text, gtv>
Link copied to clipboard
Link copied to clipboard
function multi_sig_auth_descriptor(signers: list<byte_array>, signatures_required: integer, flags: set<text>): auth_descriptor
Link copied to clipboard
function op_count(integer: integer): rule_parameters
Link copied to clipboard
function parse_auth_flags(gtv: gtv): list<text>
Link copied to clipboard
function rate_limit(account: account)
Link copied to clipboard
function require_mandatory_flags(auth_descriptor: auth_descriptor)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function rule_expression_to_gtv(rule_expression: rule_expression): gtv
Link copied to clipboard
Link copied to clipboard
function set_main_auth_descriptor(account: account, account_auth_descriptor: account_auth_descriptor)
Link copied to clipboard
Link copied to clipboard
function update_main_auth_descriptor(account: account, auth_descriptor: auth_descriptor)

Deletes old main auth descriptor and sets provided auth descriptor as main auth descriptor

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function variable_value(variable: rule_variable, variables: map<text, gtv>): integer