Skip to main content

Module allowance

Module allowance 

Source
Expand description

Rust bindings for sui::allowance.

At signing, a transaction’s declared (funder, allowance) pair is checked against the loaded Allowance object, and the withdrawal is reserved against the funder’s balance. At execution, the adapter mints the AllowanceWithdrawal<T> that the allowance’s spend paths consume.

Structs§

Allowance
Mirror of the Move struct sui::allowance::Allowance<T>.
ResolvedAllowance
Sign-time view of an Allowance<T>. NB: The spender can rotate from transaction to transaction.
Settings
Mirror of the Move struct sui::allowance::Settings.

Enums§

RateLimit
Mirror of the Move enum sui::allowance::RateLimit.
Window
Mirror of the Move enum sui::allowance::Window.

Constants§

ALLOWANCE_MODULE_NAME
ALLOWANCE_STRUCT_NAME
ALLOWANCE_WITHDRAWAL_STRUCT_NAME
RESOLVED_ALLOWANCE_WITHDRAWAL_STRUCT

Functions§

parse_allowance_object
Parses an object as an Allowance, extracting the sign-time-relevant fields.