allowance
Module0x0000…0002
- Move path
- 0x0000…0002::allowance
- Functions
- 4027 public, 2 entry
- Structs
- 9
- Friend modules
- None
allowance
- accumulator18
- accumulator_metadata2
- accumulator_settlement8
- address10
- address_alias5
- allowance40
- authenticator_state13
- bag10
- balance18
- bcs30
- bls1238143
- borrow4
- clock3
- coin54
- coin_registry43
- config11
- deny_list21
- derived_object3
- display14
- display_registry18
- dynamic_field19
- dynamic_object_field15
- ecdsa_k13
- ecdsa_r12
- ecvrf1
- ed255191
- event3
- forwarding_address1
- funds_accumulator12
- groth1610
- group_ops23
- hash2
- hex3
- hmac1
- kiosk41
- kiosk_extension14
- linked_table19
- math7
- nitro_attestation11
- object32
- object_bag11
- object_table10
- package26
- party5
- pay8
- poseidon2
- priority_queue8
- protocol_config1
- prover0
- random20
- rangeproofs3
- ristretto25518
- scratch18
- sui2
- table10
- table_vec12
- token45
- transfer16
- transfer_policy18
- tx_context19
- types1
- url4
- vdf4
- vec_map20
- vec_set11
- versioned7
- zklogin_verified_id9
- zklogin_verified_issuer6
Functions40
- public fun allowance_cap_allowance<T0>(&AllowanceCap<T0>): ID
- public fun allowance_current_spend<T0>(&Allowance<T0>): u256
- public fun allowance_proposal_settings<T0>(&AllowanceProposal<T0>): &Settings
- public fun allowance_settings<T0>(&Allowance<T0>): &Settings
- public fun app(&Settings): Option<TypeName>
- public fun app_balance_spend<T0, T1>(&mut Allowance<Balance<T0>>,SpendPermit<T1>,AllowanceWithdrawal<Balance<T0>>,&Clock): Balance<T0>
- public fun balance_spend<T0>(&mut Allowance<Balance<T0>>,AllowanceWithdrawal<Balance<T0>>,&Clock): Balance<T0>
- public fun calendar_rate_limit(u8, u256): RateLimit
- public fun expiration_timestamp_ms(&Settings): Option<u64>
- public fun funder(&Settings): address
- public fun issue<T0, T1>(AllowanceProposal<T0>,SettingsPermit<T1>)
- public fun lifetime_cap(&Settings): Option<u256>
- public fun monthly_rate_limit(u256): RateLimit
- public fun name(&Settings): &String
- entry fun new<T0>(String,address,Option<u256>,Option<u64>,Option<u64>,Option<RateLimit>)
- public fun periodic_rate_limit(u64, u256): RateLimit
- entry fun propose_for_app<T0, T1>(String,address,Option<u256>,Option<u64>,Option<u64>,Option<RateLimit>): AllowanceProposal<T0>
- public fun quarterly_rate_limit(u256): RateLimit
- public fun rate_limit(&Settings): Option<RateLimit>
- public fun rate_limit_limit(&RateLimit): u256
- public fun rate_limit_spent(&RateLimit): u256
- public fun rate_limit_window(&RateLimit): Window
- public fun revoke<T0>(AllowanceCap<T0>,Allowance<T0>)
- public fun rotate_spender<T0, T1>(&mut Allowance<T0>,SettingsPermit<T1>,address)
- public fun settings_permit<T0>(Permit<T0>): SettingsPermit<T0>
- public fun spend_permit<T0>(Permit<T0>): SpendPermit<T0>
- public fun spender(&Settings): Option<address>
- public fun start_timestamp_ms(&Settings): Option<u64>
- public fun yearly_rate_limit(u256): RateLimit
Structs9
key is an object with an id. store can be kept inside other objects. copy can be duplicated. drop can be thrown away.
id UID settings Settings current_spend u256 id UID allowance ID pos0 Settings allowance ID is_sponsor bool inner Withdrawal<T0> - RateLimitcopydropstore
No fields
- Settingsdropstore
funder address spender Option<address> app Option<TypeName> lifetime_cap Option<u256> start_timestamp_ms Option<u64> expiration_timestamp_ms Option<u64> rate_limit Option<RateLimit> name String dummy_field bool dummy_field bool - Windowcopydropstore
No fields
Constants39
Constants are shown the way the code loads them. Bytecode does not keep their names.
| Index | Value | Type | Use | Used in |
|---|---|---|---|---|
| 0 | "ENotSpender" // interpreted as UTF8 string | vector<u8> | Value | |
| 1 | "Transaction sender is not this allowance's spender" // interpreted as UTF8 string | vector<u8> | Value | |
| 2 | "EWrongApp" // interpreted as UTF8 string | vector<u8> | Value | |
| 3 | "Allowance is not bound to this app" // interpreted as UTF8 string | vector<u8> | Value | |
| 4 | "EExpired" // interpreted as UTF8 string | vector<u8> | Value | |
| 5 | "Allowance has expired" // interpreted as UTF8 string | vector<u8> | Value | |
| 6 | "EExceedsLifetimeCap" // interpreted as UTF8 string | vector<u8> | Value | |
| 7 | "Spend would exceed the lifetime cap" // interpreted as UTF8 string | vector<u8> | Value | |
| 8 | "EExceedsRateLimit" // interpreted as UTF8 string | vector<u8> | Value | |
| 9 | "Spend would exceed the current rate-limit window" // interpreted as UTF8 string | vector<u8> | Value | |
| 10 | "ENoLimit" // interpreted as UTF8 string | vector<u8> | Value | |
| 11 | "Allowance must have a lifetime cap or a rate limit" // interpreted as UTF8 string | vector<u8> | Value | |
| 12 | "EWrongAllowance" // interpreted as UTF8 string | vector<u8> | Value | |
| 13 | "Withdrawal was issued for a different allowance" // interpreted as UTF8 string | vector<u8> | Value | |
| 14 | "EBadRateLimit" // interpreted as UTF8 string | vector<u8> | Value | |
| 15 | "Rate limit needs a positive period and limit" // interpreted as UTF8 string | vector<u8> | Value | |
| 16 | "ENotStarted" // interpreted as UTF8 string | vector<u8> | Value | |
| 17 | "Allowance is not active yet; it has a future start timestamp" // interpreted as UTF8 string | vector<u8> | Value | |
| 18 | "EHasApp" // interpreted as UTF8 string | vector<u8> | Value | |
| 19 | "App-bound allowance: spend through `app_balance_spend`" // interpreted as UTF8 string | vector<u8> | Value | |
| 20 | "EWrongFunder" // interpreted as UTF8 string | vector<u8> | Value | |
| 21 | "Withdrawal debits a different address than this allowance's funder" // interpreted as UTF8 string | vector<u8> | Value | |
| 22 | "EWrongCap" // interpreted as UTF8 string | vector<u8> | Value | |
| 23 | "Cap does not match this allowance" // interpreted as UTF8 string | vector<u8> | Value | |
| 24 | "ENameTooLong" // interpreted as UTF8 string | vector<u8> | Value | |
| 25 | "Name exceeds the 128-byte limit" // interpreted as UTF8 string | vector<u8> | Value | |
| 26 | "EZeroLifetimeCap" // interpreted as UTF8 string | vector<u8> | Value | |
| 27 | "Lifetime cap must be greater than zero" // interpreted as UTF8 string | vector<u8> | Value | |
| 28 | "EBadTimeWindow" // interpreted as UTF8 string | vector<u8> | Value | |
| 29 | "Expiration must be after the start time" // interpreted as UTF8 string | vector<u8> | Value | |
| 30 | "ENoExpiration" // interpreted as UTF8 string | vector<u8> | Value | |
| 31 | "Allowance must have an expiration or a rate limit" // interpreted as UTF8 string | vector<u8> | Value | |
| 32 | "ENotEnabled" // interpreted as UTF8 string | vector<u8> | Value | |
| 33 | "Allowances are not enabled" // interpreted as UTF8 string | vector<u8> | Value | |
| 34 | "ESponsorWithdrawalNotEnabled" // interpreted as UTF8 string | vector<u8> | Value | |
| 35 | "Sponsor allowance withdrawals are not enabled" // interpreted as UTF8 string | vector<u8> | Value | |
| 36 | 128 | u64 | Value | new_settings |
| 37 | 86400000 | u64 | Value | civil_from_ms |
| 38 | "enable_allowances" // interpreted as UTF8 string | vector<u8> | Value | new_settings |