PACKAGE
lib.ft4.core.accounts.strategies
Types
_strategy
Represents a single strategy which can be used to register accounts. It is composed of three
account_details
Represents information about an account that will be created using a strategy.
allowlist
Represents a list of allowed values. Used by rules to represent allowed senders, recipients,
asset_limit
Represents an asset's lower limit, below which a transfer is deemed not sufficient for
rule
A set of requirements to be satisfied to register an account.
Functions
_default_signers
Sets the default signers based on the provided account details, used only when adding a strategy
_no_action
An empty function that can be used if a strategy does not need to perform checks for the
add_strategy
Used to add new strategies to the dapp. This does not need to be called for FT4-defined
after_register_account
Extendable function that allows the developer to add more functionality to the
auth_message_auth_descriptor
Builds a text description of an auth descriptor. It's used to represent the auth descriptor
auth_message_auth_descriptors_details
Builds a portion of the message that will be used to authorize account registration.
auth_message_multi_sig
Builds a text description of a multi-sig auth descriptor. It's used to represent the auth
auth_message_operation_details
Builds a portion of the message that will be used to authorize account registration.
auth_message_single_sig
Builds a text description of a single-sig auth descriptor. It's used to represent the auth
before_register_account
Extendable function that allows the developer to add more functionality to the
get_account_id_for_strategy
Retrieves an account id given the strategy operation, using the accountdetails function
get_register_account_message
Gives a default message used by EVM wallets to authorize the account registration.
get_strategy
Returns a strategy, given the mount name of the operation that defines it.
is_strategy_op
Checks whether an operation is a strategy operation that can be used on this chain.
parse_account_id_single_value_from_gtv
Reads a GTV-encoded moduleArgs field containing a single account ID.
parse_account_ids_from_gtv
Reads a GTV-encoded moduleArgs field containing account IDs.
parse_amount
Reads a GTV-encoded moduleArgs field containing asset limits.
parse_asset_limit
Reads a moduleArgs field containing a single asset limit, structured like a dictionary.
parse_asset_limits_from_gtv
Reads a GTV-encoded moduleArgs field containing asset limits.
parse_blockchain_single_value_from_gtv
Reads a GTV-encoded moduleArgs field containing a single blockchain RID.
parse_blockchains_from_gtv
Reads a GTV-encoded moduleArgs field containing blockchain RIDs.
register_account
Registers an account on this chain, using a certain strategy.
require_register_account_next_operation
Verifies that the next operation in the transaction is an operation that can be used to
strategy
Returns a map of all possible strategies used to register accounts on this chain.
Properties
_CONFIG_ERROR_TEXT
A starting string for configuration errors
CURRENT_CHAIN_REF
Used in transfer strategy rules config to specify current chain
CURRENT_ACCOUNT_REF
Used in transfer strategy rules to specify current account for
ANY_REF
Used in transfer strategy rules to specify that any value is accepted.
© 2024 Chromia