Module-level declarations
Types
Represents the information in a core.auth._auth_handler
that can be returned to the client.
Queries
Retrieves all registered auth handlers.
Retrieves the flags
field of the auth handler used to authorize the operation specified.
Throws if op_name
is not valid or no auth handler can be found for it.
Retrieves the auth handler that must be used to authorize a certain operation.
Throws if op_name
is not valid or no auth handler can be found for it.
Retrieves the message template that must be signed by EVM signers.
Throws if op_name
is not valid or no auth handler can be found for it.
Same as core.auth.get_first_allowed_auth_descriptor
.
Throws if the auth handler for this operation is not found or its resolver is a function that throws.
Same as core.auth.get_first_allowed_auth_descriptor_by_signers
.
Throws if the auth handler for this operation is not found or its resolver is a function that throws.
Retrieves the login configuration specified.
Throws "UNKNOWN LOGIN CONFIG"
if name is specified but no matching config exists.
Operations
For an operation to be authorized by an EVM signer, a specific message must be retrieved using get_auth_message_template
. That template will contain some of the following placeholders:
core.auth.ACCOUNT_ID_PLACEHOLDER
core.auth.AUTH_DESCRIPTOR_ID_PLACEHOLDER
core.auth.NONCE_PLACEHOLDER
core.auth.BLOCKCHAIN_RID_PLACEHOLDER
Those must be replaced with the corresponding value:
the ID of the account and auth descriptor that are currently being used to sign the operation auth message for the first two;
a valid nonce, as would be created by
utils.derive_nonce
with the current counter value of the auth descriptor being used; if multiple operations are authenticated with evm_auth using the same auth descriptor, the counter must increase by one on every subsequent operation;the rid of the blockchain.
The message must be signed following a standard EIP-191 implementation by all signers defined in the auth descriptor used to authenticate, and the signatures must be passed to the signatures
parameter in the same order as they can be found in the auth descriptor's signer
field (inside args
). If any signer did not need to sign (e.g. the auth descriptor is a multi-sig, and only some signatures are required), that signature must be left null.
The transaction will then contain
evm_auth
the operation that is being authorized
with nothing else inbetween them. Other operations may be added before and after these two.
Throws if the next operation is blacklisted or this is the last operation in the transaction
When it is required that an EVM signer signs an operation, but the signer is not part of an account auth descriptor yet, this operation must be used.
The operation must contain:
evm_signers
if required, an auth operation or a strategy operation
the operation that is being authorized
with nothing else inbetween them. Other operations may be added before and after these two.
Throws if:
the operation that is being authorized is not whitelisted,
there's no operation after this one, or
there is only one operation after this one, and it's an auth or strategy operation
For an operation to be authorized by an FT signer, this operation must be called beforehand.
The transaction must then contain
ft_auth
the operation that is being authorized
with nothing else inbetween them. Other operations may be added before and after these two. The whole transaction must be signed by all the signers that are required by the auth descriptor.
Throws if the next operation is blacklisted or this is the last operation in the transaction