FUNCTION
check_single_sig_auth
function check_single_sig_auth(args: byte_array, signers: list<byte_array>, required_flags: list<text>): validation_resultChecks that the single signature auth descriptor has all the requirements to authorize an operation.
Can only be called from an operation.
Gives invalid result "SIGNERS ERROR" if signers has zero or more than one elements.
Gives invalid result "MISSING SIGNATURE" if the signer did not sign the
operation that called this function.
Gives invalid result "MISSING FLAGS" if the single_sig_args does not contain
all required flags.
Parameters
- args — The args for this auth descriptor. Expected to be a gtv encoded version of the
single_sig_argsstruct. - signers — The signer for this auth descriptor. Expected to be a list containing exactly one pubkey or EVM address (without
0x) - required_flags — The flags it must have for the operation that needs to be authorized.
Returns
utils.VALID if valid, utils.invalid otherwise.
© 2024 Chromia