Module-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
struct auth_data
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
struct signature

Properties

Link copied to clipboard
val ACCOUNT_ID_PLACEHOLDER: text = "{account_id}"
Link copied to clipboard
val APP_SCOPE: text = "app"
Link copied to clipboard
val AUTH_DESCRIPTOR_ID_PLACEHOLDER: text = "{auth_descriptor_id}"
Link copied to clipboard
val BLOCKCHAIN_RID_PLACEHOLDER: text = "{blockchain_rid}"
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val EVM_AUTH_OP: text = "ft4.evm_auth"
Link copied to clipboard
val FT_AUTH_OP: text = "ft4.ft_auth"
Link copied to clipboard
Link copied to clipboard
val NONCE_PLACEHOLDER: text = "{nonce}"

Functions

Link copied to clipboard
function _evm_message_hash(message: text): byte_array
Link copied to clipboard
function _recover_evm_address(message: text, signature: signature): byte_array
Link copied to clipboard
function _validate_evm_address(message: text, signature: signature?, account_auth_descriptor: account_auth_descriptor): byte_array
Link copied to clipboard
function _validate_evm_arguments(auth_args: list<gtv>, required_flags: set<text>, account: account, auth_descriptor: account_auth_descriptor): evm_auth_args
Link copied to clipboard
function _validate_evm_signature(op: gtx_operation, auth_op: gtx_operation, flags: list<text>, account: account, auth_descriptor: account_auth_descriptor)
Link copied to clipboard
function _validate_ft4_signature(flags: list<text>, account: account, auth_descriptor: account_auth_descriptor)
Link copied to clipboard
function _validate_multiple_evm_addresses(message: text, signatures: list<signature?>, account_auth_descriptor: account_auth_descriptor): list<byte_array>
Link copied to clipboard
function add_auth_handler(scope: text, flags: list<text>, message: (gtv) -> text?, resolver: (gtv, byte_array, list<byte_array>) -> byte_array??): map<text, _auth_handler>
Link copied to clipboard
function add_login_config(name: text, flags: list<text>, rules: gtv?): map<text, _login_config>
Link copied to clipboard
function add_overridable_auth_handler(scope: text, flags: list<text>, message: (gtv) -> text?, resolver: (gtv, byte_array, list<byte_array>) -> byte_array??): map<text, _auth_handler>
Link copied to clipboard
@extendable function after_authenticate(account: account, account_auth_descriptor: account_auth_descriptor?)

This function can be extended by users to add custom logic after authentication.

Link copied to clipboard
function args(): gtv
Link copied to clipboard
@extendable function auth_handler(): map<text, _auth_handler>
Link copied to clipboard
function authenticate(): account
Link copied to clipboard
@extendable function before_authenticate(account: account, account_auth_descriptor: account_auth_descriptor)

This function can be extended by users to add custom logic before authentication.

Link copied to clipboard
Link copied to clipboard
function block_time(integer: integer): rule_parameters
Link copied to clipboard
function create_message_from_template(evm_auth_args: evm_auth_args, message_template: text, args: list<gtv>, nonce: text): text
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_details_from_auth_operation(): (account_id: byte_array, auth_descriptor_id: byte_array)?
Link copied to clipboard
function get_auth_flags(op_name: text): list<text>
Link copied to clipboard
function get_auth_handler(op_name: text): _auth_handler
Link copied to clipboard
function get_auth_message_template(op_name: text, op_args: gtv?): text
Link copied to clipboard
function get_evm_signatures(): (signers: list<byte_array>, signatures: list<signature>)
Link copied to clipboard
function get_first_allowed_auth_descriptor(op_name: text, args: gtv, account_id: byte_array, ad_ids: list<byte_array>): byte_array?
function get_first_allowed_auth_descriptor_by_signers(op_name: text, args: gtv, account_id: byte_array, signers: list<byte_array>): byte_array?
Link copied to clipboard
function get_mount_scope_auth_handler(auth_handlers: map<text, _auth_handler>, op_name: text): _auth_handler?
Link copied to clipboard
Link copied to clipboard
function greater_than(rule_parameters: rule_parameters): rule_expression
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function join_text_list(components: list<text>, count: integer): text
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
@extendable function login_config(): map<text, _login_config>
Link copied to clipboard
function login_rules(rules_list: list<rule_expression>): gtv
Link copied to clipboard
Link copied to clipboard
function map_rule(rule: rule_expression): gtv
Link copied to clipboard
function op_count(integer: integer): rule_parameters
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
function try_fetch_auth_descriptor(account: account, auth_descriptor_id: byte_array): account_auth_descriptor?
Link copied to clipboard
function ttl(millis: integer): gtv
Link copied to clipboard
function valid_scope_name(scope: text): text
Link copied to clipboard
function verify_signers(ft_and_evm_signers: list<byte_array>)

Verifies whether provided list of signers have signed the operation/transaction. FT (GTX) signers are checked against GTX signers and signatures fields, while EVM signers are checked against signers and signatures provided in ft4.evm_signatures operation.

Link copied to clipboard
function verify_signers_with_message(ft_and_evm_signers: list<byte_array>, message: text)