AuthorizationFunction Type
The AuthorizationFunction
type in the Flooks library is a function type used for handling authorization in Flow blockchain transactions.
Definition
export type AuthorizationFunction = (account: unknown) => Promise<unknown>;
Description
- This type defines a function that takes an
account
parameter of an unknown type and returns aPromise
of an unknown type. - The use of
unknown
type indicates that the function is highly flexible and can be adapted to various contexts where specific account details and authorization mechanisms are involved.
Usage
AuthorizationFunction
is typically used in scenarios where custom logic is required to authorize transactions on the Flow blockchain. It allows developers to define their own implementation for how an account should be authorized, which is particularly useful in applications with complex or unique authentication and authorization requirements.