@waterx/sdk 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +204 -0
- package/dist/src/client.d.ts +109 -0
- package/dist/src/client.js +197 -0
- package/dist/src/config.d.ts +229 -0
- package/dist/src/config.js +107 -0
- package/dist/src/constants.d.ts +64 -0
- package/dist/src/constants.js +71 -0
- package/dist/src/fetch.d.ts +144 -0
- package/dist/src/fetch.js +419 -0
- package/dist/src/generated/bucket_v2_framework/account.d.ts +107 -0
- package/dist/src/generated/bucket_v2_framework/account.js +129 -0
- package/dist/src/generated/bucket_v2_framework/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/bucket_v2_framework/deps/std/type_name.js +19 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/balance.js +14 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/bucket_v2_framework/double.d.ts +384 -0
- package/dist/src/generated/bucket_v2_framework/double.js +466 -0
- package/dist/src/generated/bucket_v2_framework/float.d.ts +364 -0
- package/dist/src/generated/bucket_v2_framework/float.js +440 -0
- package/dist/src/generated/bucket_v2_framework/liability.d.ts +197 -0
- package/dist/src/generated/bucket_v2_framework/liability.js +205 -0
- package/dist/src/generated/bucket_v2_framework/linked_table.d.ts +384 -0
- package/dist/src/generated/bucket_v2_framework/linked_table.js +382 -0
- package/dist/src/generated/bucket_v2_framework/sheet.d.ts +424 -0
- package/dist/src/generated/bucket_v2_framework/sheet.js +344 -0
- package/dist/src/generated/native_custody/custody_vault.d.ts +572 -0
- package/dist/src/generated/native_custody/custody_vault.js +483 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/liability.js +13 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/src/generated/native_custody/deps/bucket_v2_framework/sheet.js +18 -0
- package/dist/src/generated/native_custody/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/native_custody/deps/std/type_name.js +19 -0
- package/dist/src/generated/native_custody/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/native_custody/deps/sui/balance.js +14 -0
- package/dist/src/generated/native_custody/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/native_custody/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/native_custody/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/native_custody/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/native_custody/events.d.ts +36 -0
- package/dist/src/generated/native_custody/events.js +36 -0
- package/dist/src/generated/pyth_sponsor_rule/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/pyth_sponsor_rule/deps/sui/balance.js +14 -0
- package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.d.ts +68 -0
- package/dist/src/generated/pyth_sponsor_rule/pyth_sponsor_rule.js +74 -0
- package/dist/src/generated/utils/index.d.ts +30 -0
- package/dist/src/generated/utils/index.js +157 -0
- package/dist/src/generated/waterx_account/account.d.ts +1818 -0
- package/dist/src/generated/waterx_account/account.js +1723 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/liability.js +13 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/src/generated/waterx_account/deps/bucket_v2_framework/sheet.js +18 -0
- package/dist/src/generated/waterx_account/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_account/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_account/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/waterx_account/deps/sui/balance.js +14 -0
- package/dist/src/generated/waterx_account/deps/sui/object_table.d.ts +17 -0
- package/dist/src/generated/waterx_account/deps/sui/object_table.js +19 -0
- package/dist/src/generated/waterx_account/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_account/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_account/direct_rule.d.ts +77 -0
- package/dist/src/generated/waterx_account/direct_rule.js +78 -0
- package/dist/src/generated/waterx_account/events.d.ts +180 -0
- package/dist/src/generated/waterx_account/events.js +156 -0
- package/dist/src/generated/waterx_account/version.d.ts +10 -0
- package/dist/src/generated/waterx_account/version.js +8 -0
- package/dist/src/generated/waterx_credit/credit_registry.d.ts +708 -0
- package/dist/src/generated/waterx_credit/credit_registry.js +658 -0
- package/dist/src/generated/waterx_credit/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_credit/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_credit/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_credit/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_credit/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_credit/limited_supply.d.ts +107 -0
- package/dist/src/generated/waterx_credit/limited_supply.js +131 -0
- package/dist/src/generated/waterx_oracle/aggregator.d.ts +211 -0
- package/dist/src/generated/waterx_oracle/aggregator.js +213 -0
- package/dist/src/generated/waterx_oracle/collector.d.ts +119 -0
- package/dist/src/generated/waterx_oracle/collector.js +105 -0
- package/dist/src/generated/waterx_oracle/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/waterx_oracle/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/waterx_oracle/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_oracle/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_oracle/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_oracle/oracle.d.ts +298 -0
- package/dist/src/generated/waterx_oracle/oracle.js +323 -0
- package/dist/src/generated/waterx_oracle/version.d.ts +10 -0
- package/dist/src/generated/waterx_oracle/version.js +8 -0
- package/dist/src/generated/waterx_perp/account_data.d.ts +269 -0
- package/dist/src/generated/waterx_perp/account_data.js +284 -0
- package/dist/src/generated/waterx_perp/admin.d.ts +19 -0
- package/dist/src/generated/waterx_perp/admin.js +22 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/double.d.ts +8 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/double.js +10 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/float.d.ts +8 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/float.js +10 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/liability.d.ts +11 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/liability.js +13 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/linked_table.js +18 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.d.ts +49 -0
- package/dist/src/generated/waterx_perp/deps/bucket_v2_framework/sheet.js +18 -0
- package/dist/src/generated/waterx_perp/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_perp/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_perp/deps/sui/balance.d.ts +15 -0
- package/dist/src/generated/waterx_perp/deps/sui/balance.js +17 -0
- package/dist/src/generated/waterx_perp/deps/sui/coin.d.ts +14 -0
- package/dist/src/generated/waterx_perp/deps/sui/coin.js +15 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_perp/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_perp/events.d.ts +1283 -0
- package/dist/src/generated/waterx_perp/events.js +1018 -0
- package/dist/src/generated/waterx_perp/global_config.d.ts +775 -0
- package/dist/src/generated/waterx_perp/global_config.js +836 -0
- package/dist/src/generated/waterx_perp/keyed_big_vector.d.ts +553 -0
- package/dist/src/generated/waterx_perp/keyed_big_vector.js +554 -0
- package/dist/src/generated/waterx_perp/lp_pool.d.ts +1648 -0
- package/dist/src/generated/waterx_perp/lp_pool.js +1521 -0
- package/dist/src/generated/waterx_perp/market_config.d.ts +715 -0
- package/dist/src/generated/waterx_perp/market_config.js +780 -0
- package/dist/src/generated/waterx_perp/math.d.ts +63 -0
- package/dist/src/generated/waterx_perp/math.js +64 -0
- package/dist/src/generated/waterx_perp/memo.d.ts +251 -0
- package/dist/src/generated/waterx_perp/memo.js +323 -0
- package/dist/src/generated/waterx_perp/order_book.d.ts +290 -0
- package/dist/src/generated/waterx_perp/order_book.js +329 -0
- package/dist/src/generated/waterx_perp/position.d.ts +1005 -0
- package/dist/src/generated/waterx_perp/position.js +1103 -0
- package/dist/src/generated/waterx_perp/request.d.ts +544 -0
- package/dist/src/generated/waterx_perp/request.js +541 -0
- package/dist/src/generated/waterx_perp/response.d.ts +247 -0
- package/dist/src/generated/waterx_perp/response.js +280 -0
- package/dist/src/generated/waterx_perp/trading.d.ts +2821 -0
- package/dist/src/generated/waterx_perp/trading.js +2372 -0
- package/dist/src/generated/waterx_perp/version.d.ts +10 -0
- package/dist/src/generated/waterx_perp/version.js +8 -0
- package/dist/src/generated/waterx_perp/witness.d.ts +18 -0
- package/dist/src/generated/waterx_perp/witness.js +21 -0
- package/dist/src/generated/waterx_perp_view/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/waterx_perp_view/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_perp_view/view.d.ts +447 -0
- package/dist/src/generated/waterx_perp_view/view.js +414 -0
- package/dist/src/generated/waterx_pyth_rule/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_pyth_rule/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.d.ts +90 -0
- package/dist/src/generated/waterx_pyth_rule/pyth_rule.js +72 -0
- package/dist/src/generated/waterx_referral/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_referral/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_referral/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_referral/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_referral/referral_table.d.ts +171 -0
- package/dist/src/generated/waterx_referral/referral_table.js +192 -0
- package/dist/src/generated/waterx_staking/deps/bucket_v2_framework/double.d.ts +8 -0
- package/dist/src/generated/waterx_staking/deps/bucket_v2_framework/double.js +10 -0
- package/dist/src/generated/waterx_staking/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/waterx_staking/deps/sui/balance.js +14 -0
- package/dist/src/generated/waterx_staking/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/waterx_staking/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_staking/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_staking/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_staking/waterx_staking.d.ts +746 -0
- package/dist/src/generated/waterx_staking/waterx_staking.js +731 -0
- package/dist/src/generated/waterx_staking/witness.d.ts +16 -0
- package/dist/src/generated/waterx_staking/witness.js +18 -0
- package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/src/generated/withdrawal_queue/deps/bucket_v2_framework/linked_table.js +18 -0
- package/dist/src/generated/withdrawal_queue/deps/std/type_name.d.ts +17 -0
- package/dist/src/generated/withdrawal_queue/deps/std/type_name.js +19 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/balance.d.ts +12 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/balance.js +14 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/withdrawal_queue/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.d.ts +483 -0
- package/dist/src/generated/withdrawal_queue/withdrawal_queue.js +480 -0
- package/dist/src/generated/wlp/wlp.d.ts +28 -0
- package/dist/src/generated/wlp/wlp.js +32 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/table.d.ts +29 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/table.js +31 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/wormhole_bridge/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.d.ts +12 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/consumed_vaas.js +9 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.d.ts +14 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/emitter.js +16 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/set.d.ts +16 -0
- package/dist/src/generated/wormhole_bridge/deps/wormhole_sdk/set.js +15 -0
- package/dist/src/generated/wormhole_bridge/events.d.ts +32 -0
- package/dist/src/generated/wormhole_bridge/events.js +28 -0
- package/dist/src/generated/wormhole_bridge/wormhole_bridge.d.ts +498 -0
- package/dist/src/generated/wormhole_bridge/wormhole_bridge.js +494 -0
- package/dist/src/index.d.ts +28 -0
- package/dist/src/index.js +34 -0
- package/dist/src/tx-builders.d.ts +242 -0
- package/dist/src/tx-builders.js +320 -0
- package/dist/src/user/account.d.ts +129 -0
- package/dist/src/user/account.js +166 -0
- package/dist/src/user/credit.d.ts +135 -0
- package/dist/src/user/credit.js +255 -0
- package/dist/src/user/custody.d.ts +71 -0
- package/dist/src/user/custody.js +112 -0
- package/dist/src/user/index.d.ts +8 -0
- package/dist/src/user/index.js +8 -0
- package/dist/src/user/order.d.ts +89 -0
- package/dist/src/user/order.js +134 -0
- package/dist/src/user/referral.d.ts +21 -0
- package/dist/src/user/referral.js +41 -0
- package/dist/src/user/staking.d.ts +54 -0
- package/dist/src/user/staking.js +109 -0
- package/dist/src/user/trading.d.ts +119 -0
- package/dist/src/user/trading.js +262 -0
- package/dist/src/user/wlp.d.ts +58 -0
- package/dist/src/user/wlp.js +99 -0
- package/dist/src/utils/account-request.d.ts +9 -0
- package/dist/src/utils/account-request.js +17 -0
- package/dist/src/utils/config.d.ts +11 -0
- package/dist/src/utils/config.js +15 -0
- package/dist/src/utils/math.d.ts +201 -0
- package/dist/src/utils/math.js +343 -0
- package/dist/src/utils/pyth.d.ts +89 -0
- package/dist/src/utils/pyth.js +316 -0
- package/dist/src/utils/wormhole.d.ts +86 -0
- package/dist/src/utils/wormhole.js +154 -0
- package/package.json +66 -0
|
@@ -0,0 +1,1818 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/**
|
|
5
|
+
* Generalized multi-account framework for the WaterX ecosystem.
|
|
6
|
+
*
|
|
7
|
+
* Pure custody layer. Accounts hold per-T `Balance<T>` as dynamic fields keyed by
|
|
8
|
+
* `BalanceKey<T>()`, with a `VecMap<TypeName, u64>` mirror on each `Account` for
|
|
9
|
+
* fast enumeration. External flow in/out is mediated by hot-potato
|
|
10
|
+
* `DepositRequest<T>` / `WithdrawRequest<T>` that the framework issues; a
|
|
11
|
+
* registered policy module destroys the potato with its own witness and decides
|
|
12
|
+
* what final asset to put back into the account (e.g. a PSM policy turns
|
|
13
|
+
* `Coin<USDC>` into `Balance<USD>` and credits the account via `put<USD, P>`).
|
|
14
|
+
*
|
|
15
|
+
* Internal protocol ↔ account flow stays witness-gated via `take<T, P>` /
|
|
16
|
+
* `put<T, P>` with no policy registration involved — the protocol module's witness
|
|
17
|
+
* is the only authority needed, since only that module can construct a value of
|
|
18
|
+
* its witness type.
|
|
19
|
+
*
|
|
20
|
+
* Types of T:
|
|
21
|
+
*
|
|
22
|
+
* - Has registered deposit policy → `request_deposit<T>` works.
|
|
23
|
+
* - Has registered withdraw policy → `request_withdraw<T>` works.
|
|
24
|
+
* - Neither → "Parkable". Coins can sit on the account address via
|
|
25
|
+
* `transfer_coin<T>` or external `transfer::public_transfer`, but nothing the
|
|
26
|
+
* framework does will fold them into the account until a policy is registered
|
|
27
|
+
* (or owner drains via `receive_coin`).
|
|
28
|
+
*/
|
|
29
|
+
import { MoveStruct, MoveTuple, type RawTransactionArgument } from '../utils/index.ts';
|
|
30
|
+
import { type BcsType } from '@mysten/sui/bcs';
|
|
31
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
32
|
+
export declare const ACCOUNT: MoveStruct<{
|
|
33
|
+
dummy_field: BcsType<boolean, boolean, "bool">;
|
|
34
|
+
}, "@waterx/account::account::ACCOUNT">;
|
|
35
|
+
export declare const AdminCap: MoveStruct<{
|
|
36
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
37
|
+
}, "@waterx/account::account::AdminCap">;
|
|
38
|
+
export declare const WaterXAccount: MoveStruct<{
|
|
39
|
+
dummy_field: BcsType<boolean, boolean, "bool">;
|
|
40
|
+
}, "@waterx/account::account::WaterXAccount">;
|
|
41
|
+
export declare const AccountRegistry: MoveStruct<{
|
|
42
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
43
|
+
/**
|
|
44
|
+
* `ObjectTable` (not plain `Table`) so each `Account` retains a distinct on-chain
|
|
45
|
+
* address that off-chain callers can query directly via `getObject(account_id)`
|
|
46
|
+
* instead of walking dynamic-field handles on the registry UID.
|
|
47
|
+
*/
|
|
48
|
+
accounts: MoveStruct<{
|
|
49
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
50
|
+
size: BcsType<string, string | number | bigint, "u64">;
|
|
51
|
+
}, "0x2::object_table::ObjectTable<phantom K, phantom V>">;
|
|
52
|
+
owner_index: MoveStruct<{
|
|
53
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
54
|
+
size: BcsType<string, string | number | bigint, "u64">;
|
|
55
|
+
}, "0x2::table::Table<phantom K, phantom V>">;
|
|
56
|
+
/**
|
|
57
|
+
* Admin-managed whitelist of protocol witness types allowed to move funds
|
|
58
|
+
* (`take<T, P>` / `put<T, P>`) and mutate per-account protocol data
|
|
59
|
+
* (`new_data<P, D>` / `borrow_data_mut<P, D>` / `remove_data<P, D>`). For each
|
|
60
|
+
* whitelisted `P`, the value is the set of asset types `T` that protocol is
|
|
61
|
+
* allowed to draw via `take<T, P>` — admin opts each pair in via two phases:
|
|
62
|
+
* `whitelist_protocol<P>(registry, &AdminCap)` registers `P` with an empty asset
|
|
63
|
+
* set, then `allow_protocol_asset<P, T>(registry, &AdminCap)` adds each T.
|
|
64
|
+
*
|
|
65
|
+
* Gates:
|
|
66
|
+
*
|
|
67
|
+
* - `take<T, P>` requires both `P` whitelisted AND `T` in `protocol_whitelist[P]`
|
|
68
|
+
* (plus per-account auth on the caller).
|
|
69
|
+
* - `put<T, P>` requires only `P` whitelisted. The T-gate stays open even after
|
|
70
|
+
* `disallow_protocol_asset<P, T>`, so existing positions can always close.
|
|
71
|
+
* - `new_data<P, _>` / `borrow_data_mut<P, _>` / `remove_data<P, _>` require only
|
|
72
|
+
* `P` whitelisted.
|
|
73
|
+
*/
|
|
74
|
+
protocol_whitelist: MoveStruct<{
|
|
75
|
+
contents: BcsType<{
|
|
76
|
+
key: {
|
|
77
|
+
name: string;
|
|
78
|
+
};
|
|
79
|
+
value: {
|
|
80
|
+
[x: string]: unknown;
|
|
81
|
+
};
|
|
82
|
+
}[], Iterable<{
|
|
83
|
+
key: {
|
|
84
|
+
name: string;
|
|
85
|
+
};
|
|
86
|
+
value: {
|
|
87
|
+
[x: string]: unknown;
|
|
88
|
+
};
|
|
89
|
+
}> & {
|
|
90
|
+
length: number;
|
|
91
|
+
}, string>;
|
|
92
|
+
}, `0x2::vec_map::VecMap<std::type_name::TypeName, ${any}>`>;
|
|
93
|
+
/**
|
|
94
|
+
* `T → registered DepositPolicy witness TypeName`. Presence means
|
|
95
|
+
* `request_deposit<T>` / `request_deposit_from_receivings<T>` are permitted; only
|
|
96
|
+
* the module that defines the registered witness type can call
|
|
97
|
+
* `consume_deposit<T, P>` to unwrap the resulting `DepositRequest<T>`. Deposit
|
|
98
|
+
* policy registration is independent of `protocol_whitelist` — a policy can be the
|
|
99
|
+
* _consumer_ of a request without being allowed to `take`/`put`.
|
|
100
|
+
* `T → set of DepositPolicy witness TypeNames`. Multiple policies can be
|
|
101
|
+
* registered per T to support extension (a new policy added alongside the old) and
|
|
102
|
+
* migration (both coexist while consumers switch). `request_deposit<T>` requires
|
|
103
|
+
* the set to be non-empty; `consume_deposit<T, P>` requires P to be in the set.
|
|
104
|
+
*/
|
|
105
|
+
deposit_policies: MoveStruct<{
|
|
106
|
+
contents: BcsType<{
|
|
107
|
+
key: {
|
|
108
|
+
name: string;
|
|
109
|
+
};
|
|
110
|
+
value: {
|
|
111
|
+
[x: string]: unknown;
|
|
112
|
+
};
|
|
113
|
+
}[], Iterable<{
|
|
114
|
+
key: {
|
|
115
|
+
name: string;
|
|
116
|
+
};
|
|
117
|
+
value: {
|
|
118
|
+
[x: string]: unknown;
|
|
119
|
+
};
|
|
120
|
+
}> & {
|
|
121
|
+
length: number;
|
|
122
|
+
}, string>;
|
|
123
|
+
}, `0x2::vec_map::VecMap<std::type_name::TypeName, ${any}>`>;
|
|
124
|
+
/**
|
|
125
|
+
* `T → set of WithdrawPolicy witness TypeNames`. Symmetric to `deposit_policies`
|
|
126
|
+
* for `request_withdraw<T>` / `consume_withdraw`.
|
|
127
|
+
*/
|
|
128
|
+
withdraw_policies: MoveStruct<{
|
|
129
|
+
contents: BcsType<{
|
|
130
|
+
key: {
|
|
131
|
+
name: string;
|
|
132
|
+
};
|
|
133
|
+
value: {
|
|
134
|
+
[x: string]: unknown;
|
|
135
|
+
};
|
|
136
|
+
}[], Iterable<{
|
|
137
|
+
key: {
|
|
138
|
+
name: string;
|
|
139
|
+
};
|
|
140
|
+
value: {
|
|
141
|
+
[x: string]: unknown;
|
|
142
|
+
};
|
|
143
|
+
}> & {
|
|
144
|
+
length: number;
|
|
145
|
+
}, string>;
|
|
146
|
+
}, `0x2::vec_map::VecMap<std::type_name::TypeName, ${any}>`>;
|
|
147
|
+
/**
|
|
148
|
+
* Per-T aggregate of `Balance<T>` currently held inside accounts. Incremented in
|
|
149
|
+
* `put<T, P>`, decremented in `take<T, P>` and `request_withdraw<T>`. Does _not_
|
|
150
|
+
* include balance held by protocols (after `take`) or sitting in flight inside a
|
|
151
|
+
* `DepositRequest` / `WithdrawRequest` hot potato.
|
|
152
|
+
*/
|
|
153
|
+
balances: MoveStruct<{
|
|
154
|
+
contents: BcsType<{
|
|
155
|
+
key: {
|
|
156
|
+
name: string;
|
|
157
|
+
};
|
|
158
|
+
value: string;
|
|
159
|
+
}[], Iterable<{
|
|
160
|
+
key: {
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
163
|
+
value: string | number | bigint;
|
|
164
|
+
}> & {
|
|
165
|
+
length: number;
|
|
166
|
+
}, string>;
|
|
167
|
+
}, "0x2::vec_map::VecMap<std::type_name::TypeName, u64>">;
|
|
168
|
+
allowed_versions: MoveStruct<any, any>;
|
|
169
|
+
managers: MoveStruct<any, any>;
|
|
170
|
+
paused: BcsType<boolean, boolean, "bool">;
|
|
171
|
+
}, "@waterx/account::account::AccountRegistry">;
|
|
172
|
+
export declare const VaultKey: MoveTuple<readonly [BcsType<boolean, boolean, "bool">], "@waterx/account::account::VaultKey<phantom T>">;
|
|
173
|
+
export declare const Vault: MoveStruct<{
|
|
174
|
+
balance: MoveStruct<{
|
|
175
|
+
value: BcsType<string, string | number | bigint, "u64">;
|
|
176
|
+
}, "0x2::balance::Balance<phantom T>">;
|
|
177
|
+
sheet: MoveStruct<{
|
|
178
|
+
credits: MoveStruct<{
|
|
179
|
+
contents: BcsType<{
|
|
180
|
+
key: [{
|
|
181
|
+
name: string;
|
|
182
|
+
}];
|
|
183
|
+
value: {
|
|
184
|
+
value: string;
|
|
185
|
+
};
|
|
186
|
+
}[], Iterable<{
|
|
187
|
+
key: readonly [{
|
|
188
|
+
name: string;
|
|
189
|
+
}];
|
|
190
|
+
value: {
|
|
191
|
+
value: string | number | bigint;
|
|
192
|
+
};
|
|
193
|
+
}> & {
|
|
194
|
+
length: number;
|
|
195
|
+
}, string>;
|
|
196
|
+
}, "0x2::vec_map::VecMap<bucket_v2_framework::sheet::Entity, bucket_v2_framework::liability::Credit<phantom T>>">;
|
|
197
|
+
debts: MoveStruct<{
|
|
198
|
+
contents: BcsType<{
|
|
199
|
+
key: [{
|
|
200
|
+
name: string;
|
|
201
|
+
}];
|
|
202
|
+
value: {
|
|
203
|
+
value: string;
|
|
204
|
+
};
|
|
205
|
+
}[], Iterable<{
|
|
206
|
+
key: readonly [{
|
|
207
|
+
name: string;
|
|
208
|
+
}];
|
|
209
|
+
value: {
|
|
210
|
+
value: string | number | bigint;
|
|
211
|
+
};
|
|
212
|
+
}> & {
|
|
213
|
+
length: number;
|
|
214
|
+
}, string>;
|
|
215
|
+
}, "0x2::vec_map::VecMap<bucket_v2_framework::sheet::Entity, bucket_v2_framework::liability::Debt<phantom T>>">;
|
|
216
|
+
blacklist: MoveStruct<any, any>;
|
|
217
|
+
}, "bucket_v2_framework::sheet::Sheet<phantom CoinType, phantom SelfEntity>">;
|
|
218
|
+
}, "@waterx/account::account::Vault<phantom T>">;
|
|
219
|
+
export declare const ProtocolDataKey: MoveTuple<readonly [BcsType<boolean, boolean, "bool">], "@waterx/account::account::ProtocolDataKey<phantom PROTOCOL>">;
|
|
220
|
+
export declare const Delegate: MoveStruct<{
|
|
221
|
+
delegate_address: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
222
|
+
alias: BcsType<string, string, "string">;
|
|
223
|
+
/** Framework-level action bitmap (PERM_WITHDRAW etc). */
|
|
224
|
+
permissions: BcsType<number, number, "u32">;
|
|
225
|
+
/**
|
|
226
|
+
* Per-protocol bitmap. Missing key → delegate cannot drive that protocol. Each
|
|
227
|
+
* protocol's module interprets its own bits. Owner always has `PERM_ALL` per
|
|
228
|
+
* protocol regardless of this field.
|
|
229
|
+
*/
|
|
230
|
+
protocol_permissions: MoveStruct<{
|
|
231
|
+
contents: BcsType<{
|
|
232
|
+
key: {
|
|
233
|
+
name: string;
|
|
234
|
+
};
|
|
235
|
+
value: number;
|
|
236
|
+
}[], Iterable<{
|
|
237
|
+
key: {
|
|
238
|
+
name: string;
|
|
239
|
+
};
|
|
240
|
+
value: number;
|
|
241
|
+
}> & {
|
|
242
|
+
length: number;
|
|
243
|
+
}, string>;
|
|
244
|
+
}, "0x2::vec_map::VecMap<std::type_name::TypeName, u32>">;
|
|
245
|
+
expires_at_ms: BcsType<string | null, string | number | bigint | null | undefined, "Option<u64>">;
|
|
246
|
+
}, "@waterx/account::account::Delegate">;
|
|
247
|
+
export declare const Account: MoveStruct<{
|
|
248
|
+
id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
249
|
+
owner_address: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
250
|
+
alias: BcsType<string, string, "string">;
|
|
251
|
+
delegates: BcsType<{
|
|
252
|
+
delegate_address: string;
|
|
253
|
+
alias: string;
|
|
254
|
+
permissions: number;
|
|
255
|
+
protocol_permissions: {
|
|
256
|
+
contents: {
|
|
257
|
+
key: {
|
|
258
|
+
name: string;
|
|
259
|
+
};
|
|
260
|
+
value: number;
|
|
261
|
+
}[];
|
|
262
|
+
};
|
|
263
|
+
expires_at_ms: string | null;
|
|
264
|
+
}[], Iterable<{
|
|
265
|
+
delegate_address: string | Uint8Array<ArrayBufferLike>;
|
|
266
|
+
alias: string;
|
|
267
|
+
permissions: number;
|
|
268
|
+
protocol_permissions: {
|
|
269
|
+
contents: Iterable<{
|
|
270
|
+
key: {
|
|
271
|
+
name: string;
|
|
272
|
+
};
|
|
273
|
+
value: number;
|
|
274
|
+
}> & {
|
|
275
|
+
length: number;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
expires_at_ms: string | number | bigint | null | undefined;
|
|
279
|
+
}> & {
|
|
280
|
+
length: number;
|
|
281
|
+
}, string>;
|
|
282
|
+
/**
|
|
283
|
+
* Mirror of the per-T `Balance<T>` values stored as dynamic fields under
|
|
284
|
+
* `BalanceKey<T>()` on this UID. Always equals the matching stored balance's
|
|
285
|
+
* `value()`.
|
|
286
|
+
*/
|
|
287
|
+
balances: MoveStruct<{
|
|
288
|
+
contents: BcsType<{
|
|
289
|
+
key: {
|
|
290
|
+
name: string;
|
|
291
|
+
};
|
|
292
|
+
value: string;
|
|
293
|
+
}[], Iterable<{
|
|
294
|
+
key: {
|
|
295
|
+
name: string;
|
|
296
|
+
};
|
|
297
|
+
value: string | number | bigint;
|
|
298
|
+
}> & {
|
|
299
|
+
length: number;
|
|
300
|
+
}, string>;
|
|
301
|
+
}, "0x2::vec_map::VecMap<std::type_name::TypeName, u64>">;
|
|
302
|
+
}, "@waterx/account::account::Account">;
|
|
303
|
+
export declare const DepositRequest: MoveStruct<{
|
|
304
|
+
account_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
305
|
+
balance: MoveStruct<{
|
|
306
|
+
value: BcsType<string, string | number | bigint, "u64">;
|
|
307
|
+
}, "0x2::balance::Balance<phantom T>">;
|
|
308
|
+
extra_data: BcsType<number[], Iterable<number> & {
|
|
309
|
+
length: number;
|
|
310
|
+
}, string>;
|
|
311
|
+
}, "@waterx/account::account::DepositRequest<phantom T>">;
|
|
312
|
+
export declare const WithdrawRequest: MoveStruct<{
|
|
313
|
+
account_id: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
314
|
+
balance: MoveStruct<{
|
|
315
|
+
value: BcsType<string, string | number | bigint, "u64">;
|
|
316
|
+
}, "0x2::balance::Balance<phantom T>">;
|
|
317
|
+
recipient: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
318
|
+
extra_data: BcsType<number[], Iterable<number> & {
|
|
319
|
+
length: number;
|
|
320
|
+
}, string>;
|
|
321
|
+
}, "@waterx/account::account::WithdrawRequest<phantom T>">;
|
|
322
|
+
export declare const AccountKey: MoveStruct<{
|
|
323
|
+
owner: BcsType<string, string | Uint8Array<ArrayBufferLike>, "bytes[32]">;
|
|
324
|
+
index: BcsType<string, string | number | bigint, "u64">;
|
|
325
|
+
}, "@waterx/account::account::AccountKey">;
|
|
326
|
+
export interface PermNoneOptions {
|
|
327
|
+
package?: string;
|
|
328
|
+
arguments?: [
|
|
329
|
+
];
|
|
330
|
+
}
|
|
331
|
+
export declare function permNone(options?: PermNoneOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
332
|
+
export interface PermWithdrawOptions {
|
|
333
|
+
package?: string;
|
|
334
|
+
arguments?: [
|
|
335
|
+
];
|
|
336
|
+
}
|
|
337
|
+
export declare function permWithdraw(options?: PermWithdrawOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
338
|
+
export interface PermManageDelegatesOptions {
|
|
339
|
+
package?: string;
|
|
340
|
+
arguments?: [
|
|
341
|
+
];
|
|
342
|
+
}
|
|
343
|
+
export declare function permManageDelegates(options?: PermManageDelegatesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
344
|
+
export interface PermReceiveOptions {
|
|
345
|
+
package?: string;
|
|
346
|
+
arguments?: [
|
|
347
|
+
];
|
|
348
|
+
}
|
|
349
|
+
export declare function permReceive(options?: PermReceiveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
350
|
+
export interface PermAllOptions {
|
|
351
|
+
package?: string;
|
|
352
|
+
arguments?: [
|
|
353
|
+
];
|
|
354
|
+
}
|
|
355
|
+
export declare function permAll(options?: PermAllOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
356
|
+
export interface AliasMaxLengthOptions {
|
|
357
|
+
package?: string;
|
|
358
|
+
arguments?: [
|
|
359
|
+
];
|
|
360
|
+
}
|
|
361
|
+
export declare function aliasMaxLength(options?: AliasMaxLengthOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
362
|
+
export interface MaxAccountsPerOwnerOptions {
|
|
363
|
+
package?: string;
|
|
364
|
+
arguments?: [
|
|
365
|
+
];
|
|
366
|
+
}
|
|
367
|
+
export declare function maxAccountsPerOwner(options?: MaxAccountsPerOwnerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
368
|
+
export interface MaxDelegatesPerAccountOptions {
|
|
369
|
+
package?: string;
|
|
370
|
+
arguments?: [
|
|
371
|
+
];
|
|
372
|
+
}
|
|
373
|
+
export declare function maxDelegatesPerAccount(options?: MaxDelegatesPerAccountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
374
|
+
export interface MaxProtocolPermsPerDelegateOptions {
|
|
375
|
+
package?: string;
|
|
376
|
+
arguments?: [
|
|
377
|
+
];
|
|
378
|
+
}
|
|
379
|
+
export declare function maxProtocolPermsPerDelegate(options?: MaxProtocolPermsPerDelegateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
380
|
+
export interface AssertVersionArguments {
|
|
381
|
+
registry: RawTransactionArgument<string>;
|
|
382
|
+
}
|
|
383
|
+
export interface AssertVersionOptions {
|
|
384
|
+
package?: string;
|
|
385
|
+
arguments: AssertVersionArguments | [
|
|
386
|
+
registry: RawTransactionArgument<string>
|
|
387
|
+
];
|
|
388
|
+
}
|
|
389
|
+
export declare function assertVersion(options: AssertVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
390
|
+
export interface IsVersionAllowedArguments {
|
|
391
|
+
registry: RawTransactionArgument<string>;
|
|
392
|
+
v: RawTransactionArgument<number>;
|
|
393
|
+
}
|
|
394
|
+
export interface IsVersionAllowedOptions {
|
|
395
|
+
package?: string;
|
|
396
|
+
arguments: IsVersionAllowedArguments | [
|
|
397
|
+
registry: RawTransactionArgument<string>,
|
|
398
|
+
v: RawTransactionArgument<number>
|
|
399
|
+
];
|
|
400
|
+
}
|
|
401
|
+
export declare function isVersionAllowed(options: IsVersionAllowedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
402
|
+
export interface AllowVersionArguments {
|
|
403
|
+
registry: RawTransactionArgument<string>;
|
|
404
|
+
_: RawTransactionArgument<string>;
|
|
405
|
+
v: RawTransactionArgument<number>;
|
|
406
|
+
}
|
|
407
|
+
export interface AllowVersionOptions {
|
|
408
|
+
package?: string;
|
|
409
|
+
arguments: AllowVersionArguments | [
|
|
410
|
+
registry: RawTransactionArgument<string>,
|
|
411
|
+
_: RawTransactionArgument<string>,
|
|
412
|
+
v: RawTransactionArgument<number>
|
|
413
|
+
];
|
|
414
|
+
}
|
|
415
|
+
export declare function allowVersion(options: AllowVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
416
|
+
export interface DisallowVersionArguments {
|
|
417
|
+
registry: RawTransactionArgument<string>;
|
|
418
|
+
_: RawTransactionArgument<string>;
|
|
419
|
+
v: RawTransactionArgument<number>;
|
|
420
|
+
}
|
|
421
|
+
export interface DisallowVersionOptions {
|
|
422
|
+
package?: string;
|
|
423
|
+
arguments: DisallowVersionArguments | [
|
|
424
|
+
registry: RawTransactionArgument<string>,
|
|
425
|
+
_: RawTransactionArgument<string>,
|
|
426
|
+
v: RawTransactionArgument<number>
|
|
427
|
+
];
|
|
428
|
+
}
|
|
429
|
+
export declare function disallowVersion(options: DisallowVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
430
|
+
export interface IsPausedArguments {
|
|
431
|
+
registry: RawTransactionArgument<string>;
|
|
432
|
+
}
|
|
433
|
+
export interface IsPausedOptions {
|
|
434
|
+
package?: string;
|
|
435
|
+
arguments: IsPausedArguments | [
|
|
436
|
+
registry: RawTransactionArgument<string>
|
|
437
|
+
];
|
|
438
|
+
}
|
|
439
|
+
export declare function isPaused(options: IsPausedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
440
|
+
export interface AssertNotPausedArguments {
|
|
441
|
+
registry: RawTransactionArgument<string>;
|
|
442
|
+
}
|
|
443
|
+
export interface AssertNotPausedOptions {
|
|
444
|
+
package?: string;
|
|
445
|
+
arguments: AssertNotPausedArguments | [
|
|
446
|
+
registry: RawTransactionArgument<string>
|
|
447
|
+
];
|
|
448
|
+
}
|
|
449
|
+
export declare function assertNotPaused(options: AssertNotPausedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
450
|
+
export interface PauseArguments {
|
|
451
|
+
registry: RawTransactionArgument<string>;
|
|
452
|
+
managerRequest: RawTransactionArgument<string>;
|
|
453
|
+
}
|
|
454
|
+
export interface PauseOptions {
|
|
455
|
+
package?: string;
|
|
456
|
+
arguments: PauseArguments | [
|
|
457
|
+
registry: RawTransactionArgument<string>,
|
|
458
|
+
managerRequest: RawTransactionArgument<string>
|
|
459
|
+
];
|
|
460
|
+
}
|
|
461
|
+
export declare function pause(options: PauseOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
462
|
+
export interface UnpauseArguments {
|
|
463
|
+
registry: RawTransactionArgument<string>;
|
|
464
|
+
_: RawTransactionArgument<string>;
|
|
465
|
+
}
|
|
466
|
+
export interface UnpauseOptions {
|
|
467
|
+
package?: string;
|
|
468
|
+
arguments: UnpauseArguments | [
|
|
469
|
+
registry: RawTransactionArgument<string>,
|
|
470
|
+
_: RawTransactionArgument<string>
|
|
471
|
+
];
|
|
472
|
+
}
|
|
473
|
+
export declare function unpause(options: UnpauseOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
474
|
+
export interface IsManagerArguments {
|
|
475
|
+
registry: RawTransactionArgument<string>;
|
|
476
|
+
addr: RawTransactionArgument<string>;
|
|
477
|
+
}
|
|
478
|
+
export interface IsManagerOptions {
|
|
479
|
+
package?: string;
|
|
480
|
+
arguments: IsManagerArguments | [
|
|
481
|
+
registry: RawTransactionArgument<string>,
|
|
482
|
+
addr: RawTransactionArgument<string>
|
|
483
|
+
];
|
|
484
|
+
}
|
|
485
|
+
export declare function isManager(options: IsManagerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
486
|
+
export interface ManagersArguments {
|
|
487
|
+
registry: RawTransactionArgument<string>;
|
|
488
|
+
}
|
|
489
|
+
export interface ManagersOptions {
|
|
490
|
+
package?: string;
|
|
491
|
+
arguments: ManagersArguments | [
|
|
492
|
+
registry: RawTransactionArgument<string>
|
|
493
|
+
];
|
|
494
|
+
}
|
|
495
|
+
export declare function managers(options: ManagersOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
496
|
+
export interface AddManagerArguments {
|
|
497
|
+
registry: RawTransactionArgument<string>;
|
|
498
|
+
_: RawTransactionArgument<string>;
|
|
499
|
+
manager: RawTransactionArgument<string>;
|
|
500
|
+
}
|
|
501
|
+
export interface AddManagerOptions {
|
|
502
|
+
package?: string;
|
|
503
|
+
arguments: AddManagerArguments | [
|
|
504
|
+
registry: RawTransactionArgument<string>,
|
|
505
|
+
_: RawTransactionArgument<string>,
|
|
506
|
+
manager: RawTransactionArgument<string>
|
|
507
|
+
];
|
|
508
|
+
}
|
|
509
|
+
export declare function addManager(options: AddManagerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
510
|
+
export interface RemoveManagerArguments {
|
|
511
|
+
registry: RawTransactionArgument<string>;
|
|
512
|
+
_: RawTransactionArgument<string>;
|
|
513
|
+
manager: RawTransactionArgument<string>;
|
|
514
|
+
}
|
|
515
|
+
export interface RemoveManagerOptions {
|
|
516
|
+
package?: string;
|
|
517
|
+
arguments: RemoveManagerArguments | [
|
|
518
|
+
registry: RawTransactionArgument<string>,
|
|
519
|
+
_: RawTransactionArgument<string>,
|
|
520
|
+
manager: RawTransactionArgument<string>
|
|
521
|
+
];
|
|
522
|
+
}
|
|
523
|
+
export declare function removeManager(options: RemoveManagerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
524
|
+
export interface IsProtocolWhitelistedArguments {
|
|
525
|
+
registry: RawTransactionArgument<string>;
|
|
526
|
+
}
|
|
527
|
+
export interface IsProtocolWhitelistedOptions {
|
|
528
|
+
package?: string;
|
|
529
|
+
arguments: IsProtocolWhitelistedArguments | [
|
|
530
|
+
registry: RawTransactionArgument<string>
|
|
531
|
+
];
|
|
532
|
+
typeArguments: [
|
|
533
|
+
string
|
|
534
|
+
];
|
|
535
|
+
}
|
|
536
|
+
export declare function isProtocolWhitelisted(options: IsProtocolWhitelistedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
537
|
+
export interface IsProtocolAssetAllowedArguments {
|
|
538
|
+
registry: RawTransactionArgument<string>;
|
|
539
|
+
}
|
|
540
|
+
export interface IsProtocolAssetAllowedOptions {
|
|
541
|
+
package?: string;
|
|
542
|
+
arguments: IsProtocolAssetAllowedArguments | [
|
|
543
|
+
registry: RawTransactionArgument<string>
|
|
544
|
+
];
|
|
545
|
+
typeArguments: [
|
|
546
|
+
string,
|
|
547
|
+
string
|
|
548
|
+
];
|
|
549
|
+
}
|
|
550
|
+
export declare function isProtocolAssetAllowed(options: IsProtocolAssetAllowedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
551
|
+
export interface ProtocolWhitelistArguments {
|
|
552
|
+
registry: RawTransactionArgument<string>;
|
|
553
|
+
}
|
|
554
|
+
export interface ProtocolWhitelistOptions {
|
|
555
|
+
package?: string;
|
|
556
|
+
arguments: ProtocolWhitelistArguments | [
|
|
557
|
+
registry: RawTransactionArgument<string>
|
|
558
|
+
];
|
|
559
|
+
}
|
|
560
|
+
export declare function protocolWhitelist(options: ProtocolWhitelistOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
561
|
+
export interface WhitelistProtocolArguments {
|
|
562
|
+
registry: RawTransactionArgument<string>;
|
|
563
|
+
_: RawTransactionArgument<string>;
|
|
564
|
+
}
|
|
565
|
+
export interface WhitelistProtocolOptions {
|
|
566
|
+
package?: string;
|
|
567
|
+
arguments: WhitelistProtocolArguments | [
|
|
568
|
+
registry: RawTransactionArgument<string>,
|
|
569
|
+
_: RawTransactionArgument<string>
|
|
570
|
+
];
|
|
571
|
+
typeArguments: [
|
|
572
|
+
string
|
|
573
|
+
];
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Admin: register witness type `P` with an empty asset set. After this, admin must
|
|
577
|
+
* call `allow_protocol_asset<P, T>` for each T the protocol may draw. Strict —
|
|
578
|
+
* aborts if `P` is already listed.
|
|
579
|
+
*/
|
|
580
|
+
export declare function whitelistProtocol(options: WhitelistProtocolOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
581
|
+
export interface DelistProtocolArguments {
|
|
582
|
+
registry: RawTransactionArgument<string>;
|
|
583
|
+
_: RawTransactionArgument<string>;
|
|
584
|
+
}
|
|
585
|
+
export interface DelistProtocolOptions {
|
|
586
|
+
package?: string;
|
|
587
|
+
arguments: DelistProtocolArguments | [
|
|
588
|
+
registry: RawTransactionArgument<string>,
|
|
589
|
+
_: RawTransactionArgument<string>
|
|
590
|
+
];
|
|
591
|
+
typeArguments: [
|
|
592
|
+
string
|
|
593
|
+
];
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Admin: remove witness type `P` (and its entire asset set) from the protocol
|
|
597
|
+
* whitelist. After this, every `take<T, P>` / `put<T, P>` and witness-gated
|
|
598
|
+
* data-slot call aborts. Existing data slots and protocol-held balances are
|
|
599
|
+
* untouched — only future calls are blocked, so admin can pause a misbehaving
|
|
600
|
+
* protocol without stranding state on accounts.
|
|
601
|
+
*/
|
|
602
|
+
export declare function delistProtocol(options: DelistProtocolOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
603
|
+
export interface AllowProtocolAssetArguments {
|
|
604
|
+
registry: RawTransactionArgument<string>;
|
|
605
|
+
_: RawTransactionArgument<string>;
|
|
606
|
+
}
|
|
607
|
+
export interface AllowProtocolAssetOptions {
|
|
608
|
+
package?: string;
|
|
609
|
+
arguments: AllowProtocolAssetArguments | [
|
|
610
|
+
registry: RawTransactionArgument<string>,
|
|
611
|
+
_: RawTransactionArgument<string>
|
|
612
|
+
];
|
|
613
|
+
typeArguments: [
|
|
614
|
+
string,
|
|
615
|
+
string
|
|
616
|
+
];
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Admin: add asset type `T` to protocol `P`'s allowed-asset set. After this,
|
|
620
|
+
* `take<T, P>` is permitted (subject to per-account auth). Aborts if `P` is not
|
|
621
|
+
* whitelisted or if `T` is already in the set.
|
|
622
|
+
*/
|
|
623
|
+
export declare function allowProtocolAsset(options: AllowProtocolAssetOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
624
|
+
export interface DisallowProtocolAssetArguments {
|
|
625
|
+
registry: RawTransactionArgument<string>;
|
|
626
|
+
_: RawTransactionArgument<string>;
|
|
627
|
+
}
|
|
628
|
+
export interface DisallowProtocolAssetOptions {
|
|
629
|
+
package?: string;
|
|
630
|
+
arguments: DisallowProtocolAssetArguments | [
|
|
631
|
+
registry: RawTransactionArgument<string>,
|
|
632
|
+
_: RawTransactionArgument<string>
|
|
633
|
+
];
|
|
634
|
+
typeArguments: [
|
|
635
|
+
string,
|
|
636
|
+
string
|
|
637
|
+
];
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Admin: remove asset type `T` from protocol `P`'s allowed-asset set. Blocks
|
|
641
|
+
* future `take<T, P>` calls but `put<T, P>` on `T` stays open so existing
|
|
642
|
+
* positions can always close. Aborts if `P` is not whitelisted or if `T` is not in
|
|
643
|
+
* the set.
|
|
644
|
+
*/
|
|
645
|
+
export declare function disallowProtocolAsset(options: DisallowProtocolAssetOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
646
|
+
export interface IsDepositPolicyRegisteredArguments {
|
|
647
|
+
registry: RawTransactionArgument<string>;
|
|
648
|
+
}
|
|
649
|
+
export interface IsDepositPolicyRegisteredOptions {
|
|
650
|
+
package?: string;
|
|
651
|
+
arguments: IsDepositPolicyRegisteredArguments | [
|
|
652
|
+
registry: RawTransactionArgument<string>
|
|
653
|
+
];
|
|
654
|
+
typeArguments: [
|
|
655
|
+
string
|
|
656
|
+
];
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Returns true if `T` has at least one deposit policy registered. Used by
|
|
660
|
+
* `request_deposit<T>` to gate inflow and by `withdraw_from_funds<T>` to refuse
|
|
661
|
+
* policy-managed types.
|
|
662
|
+
*/
|
|
663
|
+
export declare function isDepositPolicyRegistered(options: IsDepositPolicyRegisteredOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
664
|
+
export interface IsWithdrawPolicyRegisteredArguments {
|
|
665
|
+
registry: RawTransactionArgument<string>;
|
|
666
|
+
}
|
|
667
|
+
export interface IsWithdrawPolicyRegisteredOptions {
|
|
668
|
+
package?: string;
|
|
669
|
+
arguments: IsWithdrawPolicyRegisteredArguments | [
|
|
670
|
+
registry: RawTransactionArgument<string>
|
|
671
|
+
];
|
|
672
|
+
typeArguments: [
|
|
673
|
+
string
|
|
674
|
+
];
|
|
675
|
+
}
|
|
676
|
+
/** Returns true if `T` has at least one withdraw policy registered. */
|
|
677
|
+
export declare function isWithdrawPolicyRegistered(options: IsWithdrawPolicyRegisteredOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
678
|
+
export interface IsDepositPolicyRegisteredForArguments {
|
|
679
|
+
registry: RawTransactionArgument<string>;
|
|
680
|
+
}
|
|
681
|
+
export interface IsDepositPolicyRegisteredForOptions {
|
|
682
|
+
package?: string;
|
|
683
|
+
arguments: IsDepositPolicyRegisteredForArguments | [
|
|
684
|
+
registry: RawTransactionArgument<string>
|
|
685
|
+
];
|
|
686
|
+
typeArguments: [
|
|
687
|
+
string,
|
|
688
|
+
string
|
|
689
|
+
];
|
|
690
|
+
}
|
|
691
|
+
/**
|
|
692
|
+
* Returns true if the specific witness `P` is one of T's registered deposit
|
|
693
|
+
* policies. `consume_deposit<T, P>` aborts `EPolicyMismatch` when this would
|
|
694
|
+
* return false.
|
|
695
|
+
*/
|
|
696
|
+
export declare function isDepositPolicyRegisteredFor(options: IsDepositPolicyRegisteredForOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
697
|
+
export interface IsWithdrawPolicyRegisteredForArguments {
|
|
698
|
+
registry: RawTransactionArgument<string>;
|
|
699
|
+
}
|
|
700
|
+
export interface IsWithdrawPolicyRegisteredForOptions {
|
|
701
|
+
package?: string;
|
|
702
|
+
arguments: IsWithdrawPolicyRegisteredForArguments | [
|
|
703
|
+
registry: RawTransactionArgument<string>
|
|
704
|
+
];
|
|
705
|
+
typeArguments: [
|
|
706
|
+
string,
|
|
707
|
+
string
|
|
708
|
+
];
|
|
709
|
+
}
|
|
710
|
+
export declare function isWithdrawPolicyRegisteredFor(options: IsWithdrawPolicyRegisteredForOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
711
|
+
export interface DepositPoliciesForArguments {
|
|
712
|
+
registry: RawTransactionArgument<string>;
|
|
713
|
+
}
|
|
714
|
+
export interface DepositPoliciesForOptions {
|
|
715
|
+
package?: string;
|
|
716
|
+
arguments: DepositPoliciesForArguments | [
|
|
717
|
+
registry: RawTransactionArgument<string>
|
|
718
|
+
];
|
|
719
|
+
typeArguments: [
|
|
720
|
+
string
|
|
721
|
+
];
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Returns the full set of deposit-policy witness typenames registered for `T`, as
|
|
725
|
+
* a `vector<TypeName>` copy (TypeName is `copy + drop + store`, so this is
|
|
726
|
+
* cheap). Aborts if T has no policies. Off-chain consumers wanting iteration
|
|
727
|
+
* without the copy should walk the full `deposit_policies()` map instead.
|
|
728
|
+
*/
|
|
729
|
+
export declare function depositPoliciesFor(options: DepositPoliciesForOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
730
|
+
export interface WithdrawPoliciesForArguments {
|
|
731
|
+
registry: RawTransactionArgument<string>;
|
|
732
|
+
}
|
|
733
|
+
export interface WithdrawPoliciesForOptions {
|
|
734
|
+
package?: string;
|
|
735
|
+
arguments: WithdrawPoliciesForArguments | [
|
|
736
|
+
registry: RawTransactionArgument<string>
|
|
737
|
+
];
|
|
738
|
+
typeArguments: [
|
|
739
|
+
string
|
|
740
|
+
];
|
|
741
|
+
}
|
|
742
|
+
export declare function withdrawPoliciesFor(options: WithdrawPoliciesForOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
743
|
+
export interface DepositPoliciesArguments {
|
|
744
|
+
registry: RawTransactionArgument<string>;
|
|
745
|
+
}
|
|
746
|
+
export interface DepositPoliciesOptions {
|
|
747
|
+
package?: string;
|
|
748
|
+
arguments: DepositPoliciesArguments | [
|
|
749
|
+
registry: RawTransactionArgument<string>
|
|
750
|
+
];
|
|
751
|
+
}
|
|
752
|
+
export declare function depositPolicies(options: DepositPoliciesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
753
|
+
export interface WithdrawPoliciesArguments {
|
|
754
|
+
registry: RawTransactionArgument<string>;
|
|
755
|
+
}
|
|
756
|
+
export interface WithdrawPoliciesOptions {
|
|
757
|
+
package?: string;
|
|
758
|
+
arguments: WithdrawPoliciesArguments | [
|
|
759
|
+
registry: RawTransactionArgument<string>
|
|
760
|
+
];
|
|
761
|
+
}
|
|
762
|
+
export declare function withdrawPolicies(options: WithdrawPoliciesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
763
|
+
export interface RegisterDepositPolicyArguments {
|
|
764
|
+
registry: RawTransactionArgument<string>;
|
|
765
|
+
_: RawTransactionArgument<string>;
|
|
766
|
+
}
|
|
767
|
+
export interface RegisterDepositPolicyOptions {
|
|
768
|
+
package?: string;
|
|
769
|
+
arguments: RegisterDepositPolicyArguments | [
|
|
770
|
+
registry: RawTransactionArgument<string>,
|
|
771
|
+
_: RawTransactionArgument<string>
|
|
772
|
+
];
|
|
773
|
+
typeArguments: [
|
|
774
|
+
string,
|
|
775
|
+
string
|
|
776
|
+
];
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Admin: register witness type `P` as a deposit policy for `T`. Multiple policies
|
|
780
|
+
* can coexist per T to support extension (a new module added alongside the old)
|
|
781
|
+
* and migration (consumers switch one at a time). Idempotent — adding an
|
|
782
|
+
* already-registered `(T, P)` pair is a silent no-op so admin can re-run deploy
|
|
783
|
+
* scripts safely.
|
|
784
|
+
*/
|
|
785
|
+
export declare function registerDepositPolicy(options: RegisterDepositPolicyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
786
|
+
export interface RegisterWithdrawPolicyArguments {
|
|
787
|
+
registry: RawTransactionArgument<string>;
|
|
788
|
+
_: RawTransactionArgument<string>;
|
|
789
|
+
}
|
|
790
|
+
export interface RegisterWithdrawPolicyOptions {
|
|
791
|
+
package?: string;
|
|
792
|
+
arguments: RegisterWithdrawPolicyArguments | [
|
|
793
|
+
registry: RawTransactionArgument<string>,
|
|
794
|
+
_: RawTransactionArgument<string>
|
|
795
|
+
];
|
|
796
|
+
typeArguments: [
|
|
797
|
+
string,
|
|
798
|
+
string
|
|
799
|
+
];
|
|
800
|
+
}
|
|
801
|
+
export declare function registerWithdrawPolicy(options: RegisterWithdrawPolicyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
802
|
+
export interface UnregisterDepositPolicyArguments {
|
|
803
|
+
registry: RawTransactionArgument<string>;
|
|
804
|
+
_: RawTransactionArgument<string>;
|
|
805
|
+
}
|
|
806
|
+
export interface UnregisterDepositPolicyOptions {
|
|
807
|
+
package?: string;
|
|
808
|
+
arguments: UnregisterDepositPolicyArguments | [
|
|
809
|
+
registry: RawTransactionArgument<string>,
|
|
810
|
+
_: RawTransactionArgument<string>
|
|
811
|
+
];
|
|
812
|
+
typeArguments: [
|
|
813
|
+
string,
|
|
814
|
+
string
|
|
815
|
+
];
|
|
816
|
+
}
|
|
817
|
+
/**
|
|
818
|
+
* Admin: remove `P` from T's deposit-policy set. Other registered policies for `T`
|
|
819
|
+
* keep working. If `P` is the last entry, the `T` key is cleaned up so
|
|
820
|
+
* `is_deposit_policy_registered<T>` returns false. Aborts if `(T, P)` isn't
|
|
821
|
+
* registered.
|
|
822
|
+
*/
|
|
823
|
+
export declare function unregisterDepositPolicy(options: UnregisterDepositPolicyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
824
|
+
export interface UnregisterWithdrawPolicyArguments {
|
|
825
|
+
registry: RawTransactionArgument<string>;
|
|
826
|
+
_: RawTransactionArgument<string>;
|
|
827
|
+
}
|
|
828
|
+
export interface UnregisterWithdrawPolicyOptions {
|
|
829
|
+
package?: string;
|
|
830
|
+
arguments: UnregisterWithdrawPolicyArguments | [
|
|
831
|
+
registry: RawTransactionArgument<string>,
|
|
832
|
+
_: RawTransactionArgument<string>
|
|
833
|
+
];
|
|
834
|
+
typeArguments: [
|
|
835
|
+
string,
|
|
836
|
+
string
|
|
837
|
+
];
|
|
838
|
+
}
|
|
839
|
+
export declare function unregisterWithdrawPolicy(options: UnregisterWithdrawPolicyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
840
|
+
export interface CreateAccountArguments {
|
|
841
|
+
registry: RawTransactionArgument<string>;
|
|
842
|
+
senderRequest: RawTransactionArgument<string>;
|
|
843
|
+
alias: RawTransactionArgument<string>;
|
|
844
|
+
}
|
|
845
|
+
export interface CreateAccountOptions {
|
|
846
|
+
package?: string;
|
|
847
|
+
arguments: CreateAccountArguments | [
|
|
848
|
+
registry: RawTransactionArgument<string>,
|
|
849
|
+
senderRequest: RawTransactionArgument<string>,
|
|
850
|
+
alias: RawTransactionArgument<string>
|
|
851
|
+
];
|
|
852
|
+
}
|
|
853
|
+
export declare function createAccount(options: CreateAccountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
854
|
+
export interface DeriveAccountAddressArguments {
|
|
855
|
+
registry: RawTransactionArgument<string>;
|
|
856
|
+
owner: RawTransactionArgument<string>;
|
|
857
|
+
index: RawTransactionArgument<number | bigint>;
|
|
858
|
+
}
|
|
859
|
+
export interface DeriveAccountAddressOptions {
|
|
860
|
+
package?: string;
|
|
861
|
+
arguments: DeriveAccountAddressArguments | [
|
|
862
|
+
registry: RawTransactionArgument<string>,
|
|
863
|
+
owner: RawTransactionArgument<string>,
|
|
864
|
+
index: RawTransactionArgument<number | bigint>
|
|
865
|
+
];
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* Off-chain view: compute the address a future `create_account` call will produce
|
|
869
|
+
* for `(owner, index)`. Mirrors `derived_object::derive_address` keyed on
|
|
870
|
+
* `AccountKey`. Useful for SDKs that want to address an account before it exists,
|
|
871
|
+
* or to discover all of an owner's accounts by iterating index from 0 up to
|
|
872
|
+
* `MAX_ACCOUNTS_PER_OWNER` and checking `has_account` against each derived
|
|
873
|
+
* address.
|
|
874
|
+
*/
|
|
875
|
+
export declare function deriveAccountAddress(options: DeriveAccountAddressOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
876
|
+
export interface SetAliasArguments {
|
|
877
|
+
registry: RawTransactionArgument<string>;
|
|
878
|
+
senderRequest: RawTransactionArgument<string>;
|
|
879
|
+
accountId: RawTransactionArgument<string>;
|
|
880
|
+
alias: RawTransactionArgument<string>;
|
|
881
|
+
}
|
|
882
|
+
export interface SetAliasOptions {
|
|
883
|
+
package?: string;
|
|
884
|
+
arguments: SetAliasArguments | [
|
|
885
|
+
registry: RawTransactionArgument<string>,
|
|
886
|
+
senderRequest: RawTransactionArgument<string>,
|
|
887
|
+
accountId: RawTransactionArgument<string>,
|
|
888
|
+
alias: RawTransactionArgument<string>
|
|
889
|
+
];
|
|
890
|
+
}
|
|
891
|
+
export declare function setAlias(options: SetAliasOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
892
|
+
export interface AddDelegateArguments {
|
|
893
|
+
registry: RawTransactionArgument<string>;
|
|
894
|
+
senderRequest: RawTransactionArgument<string>;
|
|
895
|
+
accountId: RawTransactionArgument<string>;
|
|
896
|
+
delegateAddress: RawTransactionArgument<string>;
|
|
897
|
+
alias: RawTransactionArgument<string>;
|
|
898
|
+
permissions: RawTransactionArgument<number>;
|
|
899
|
+
expiresAtMs: RawTransactionArgument<number | bigint | null>;
|
|
900
|
+
}
|
|
901
|
+
export interface AddDelegateOptions {
|
|
902
|
+
package?: string;
|
|
903
|
+
arguments: AddDelegateArguments | [
|
|
904
|
+
registry: RawTransactionArgument<string>,
|
|
905
|
+
senderRequest: RawTransactionArgument<string>,
|
|
906
|
+
accountId: RawTransactionArgument<string>,
|
|
907
|
+
delegateAddress: RawTransactionArgument<string>,
|
|
908
|
+
alias: RawTransactionArgument<string>,
|
|
909
|
+
permissions: RawTransactionArgument<number>,
|
|
910
|
+
expiresAtMs: RawTransactionArgument<number | bigint | null>
|
|
911
|
+
];
|
|
912
|
+
}
|
|
913
|
+
export declare function addDelegate(options: AddDelegateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
914
|
+
export interface RemoveDelegateArguments {
|
|
915
|
+
registry: RawTransactionArgument<string>;
|
|
916
|
+
senderRequest: RawTransactionArgument<string>;
|
|
917
|
+
accountId: RawTransactionArgument<string>;
|
|
918
|
+
delegateAddress: RawTransactionArgument<string>;
|
|
919
|
+
}
|
|
920
|
+
export interface RemoveDelegateOptions {
|
|
921
|
+
package?: string;
|
|
922
|
+
arguments: RemoveDelegateArguments | [
|
|
923
|
+
registry: RawTransactionArgument<string>,
|
|
924
|
+
senderRequest: RawTransactionArgument<string>,
|
|
925
|
+
accountId: RawTransactionArgument<string>,
|
|
926
|
+
delegateAddress: RawTransactionArgument<string>
|
|
927
|
+
];
|
|
928
|
+
}
|
|
929
|
+
/**
|
|
930
|
+
* Owner-only for live delegates; permissionless once the delegate has passed its
|
|
931
|
+
* `expires_at_ms`. Lets a keeper / bot prune dead entries without bothering the
|
|
932
|
+
* owner — an expired delegate carries no authority, so removing it is purely
|
|
933
|
+
* janitorial.
|
|
934
|
+
*/
|
|
935
|
+
export declare function removeDelegate(options: RemoveDelegateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
936
|
+
export interface UpdateDelegateArguments {
|
|
937
|
+
registry: RawTransactionArgument<string>;
|
|
938
|
+
senderRequest: RawTransactionArgument<string>;
|
|
939
|
+
accountId: RawTransactionArgument<string>;
|
|
940
|
+
delegateAddress: RawTransactionArgument<string>;
|
|
941
|
+
alias: RawTransactionArgument<string>;
|
|
942
|
+
permissions: RawTransactionArgument<number>;
|
|
943
|
+
expiresAtMs: RawTransactionArgument<number | bigint | null>;
|
|
944
|
+
}
|
|
945
|
+
export interface UpdateDelegateOptions {
|
|
946
|
+
package?: string;
|
|
947
|
+
arguments: UpdateDelegateArguments | [
|
|
948
|
+
registry: RawTransactionArgument<string>,
|
|
949
|
+
senderRequest: RawTransactionArgument<string>,
|
|
950
|
+
accountId: RawTransactionArgument<string>,
|
|
951
|
+
delegateAddress: RawTransactionArgument<string>,
|
|
952
|
+
alias: RawTransactionArgument<string>,
|
|
953
|
+
permissions: RawTransactionArgument<number>,
|
|
954
|
+
expiresAtMs: RawTransactionArgument<number | bigint | null>
|
|
955
|
+
];
|
|
956
|
+
}
|
|
957
|
+
export declare function updateDelegate(options: UpdateDelegateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
958
|
+
export interface SetDelegateProtocolPermissionArguments {
|
|
959
|
+
registry: RawTransactionArgument<string>;
|
|
960
|
+
senderRequest: RawTransactionArgument<string>;
|
|
961
|
+
accountId: RawTransactionArgument<string>;
|
|
962
|
+
delegateAddress: RawTransactionArgument<string>;
|
|
963
|
+
permissions: RawTransactionArgument<number>;
|
|
964
|
+
}
|
|
965
|
+
export interface SetDelegateProtocolPermissionOptions {
|
|
966
|
+
package?: string;
|
|
967
|
+
arguments: SetDelegateProtocolPermissionArguments | [
|
|
968
|
+
registry: RawTransactionArgument<string>,
|
|
969
|
+
senderRequest: RawTransactionArgument<string>,
|
|
970
|
+
accountId: RawTransactionArgument<string>,
|
|
971
|
+
delegateAddress: RawTransactionArgument<string>,
|
|
972
|
+
permissions: RawTransactionArgument<number>
|
|
973
|
+
];
|
|
974
|
+
typeArguments: [
|
|
975
|
+
string
|
|
976
|
+
];
|
|
977
|
+
}
|
|
978
|
+
export declare function setDelegateProtocolPermission(options: SetDelegateProtocolPermissionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
979
|
+
export interface UnsetDelegateProtocolPermissionArguments {
|
|
980
|
+
registry: RawTransactionArgument<string>;
|
|
981
|
+
senderRequest: RawTransactionArgument<string>;
|
|
982
|
+
accountId: RawTransactionArgument<string>;
|
|
983
|
+
delegateAddress: RawTransactionArgument<string>;
|
|
984
|
+
}
|
|
985
|
+
export interface UnsetDelegateProtocolPermissionOptions {
|
|
986
|
+
package?: string;
|
|
987
|
+
arguments: UnsetDelegateProtocolPermissionArguments | [
|
|
988
|
+
registry: RawTransactionArgument<string>,
|
|
989
|
+
senderRequest: RawTransactionArgument<string>,
|
|
990
|
+
accountId: RawTransactionArgument<string>,
|
|
991
|
+
delegateAddress: RawTransactionArgument<string>
|
|
992
|
+
];
|
|
993
|
+
typeArguments: [
|
|
994
|
+
string
|
|
995
|
+
];
|
|
996
|
+
}
|
|
997
|
+
export declare function unsetDelegateProtocolPermission(options: UnsetDelegateProtocolPermissionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
998
|
+
export interface RequestDepositArguments {
|
|
999
|
+
registry: RawTransactionArgument<string>;
|
|
1000
|
+
accountId: RawTransactionArgument<string>;
|
|
1001
|
+
coin: RawTransactionArgument<string>;
|
|
1002
|
+
extraData: RawTransactionArgument<number[]>;
|
|
1003
|
+
}
|
|
1004
|
+
export interface RequestDepositOptions {
|
|
1005
|
+
package?: string;
|
|
1006
|
+
arguments: RequestDepositArguments | [
|
|
1007
|
+
registry: RawTransactionArgument<string>,
|
|
1008
|
+
accountId: RawTransactionArgument<string>,
|
|
1009
|
+
coin: RawTransactionArgument<string>,
|
|
1010
|
+
extraData: RawTransactionArgument<number[]>
|
|
1011
|
+
];
|
|
1012
|
+
typeArguments: [
|
|
1013
|
+
string
|
|
1014
|
+
];
|
|
1015
|
+
}
|
|
1016
|
+
/**
|
|
1017
|
+
* Wraps an in-PTB `Coin<T>` into a `DepositRequest<T>` for the account.
|
|
1018
|
+
* Permissionless — anyone can pay into any account, since the policy (not the
|
|
1019
|
+
* framework) decides what the eventual credited asset is. `T` must have a
|
|
1020
|
+
* registered deposit policy; aborts otherwise.
|
|
1021
|
+
*/
|
|
1022
|
+
export declare function requestDeposit(options: RequestDepositOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1023
|
+
export interface RequestDepositFromReceivingsArguments {
|
|
1024
|
+
registry: RawTransactionArgument<string>;
|
|
1025
|
+
accountId: RawTransactionArgument<string>;
|
|
1026
|
+
receivings: RawTransactionArgument<string[]>;
|
|
1027
|
+
extraData: RawTransactionArgument<number[]>;
|
|
1028
|
+
}
|
|
1029
|
+
export interface RequestDepositFromReceivingsOptions {
|
|
1030
|
+
package?: string;
|
|
1031
|
+
arguments: RequestDepositFromReceivingsArguments | [
|
|
1032
|
+
registry: RawTransactionArgument<string>,
|
|
1033
|
+
accountId: RawTransactionArgument<string>,
|
|
1034
|
+
receivings: RawTransactionArgument<string[]>,
|
|
1035
|
+
extraData: RawTransactionArgument<number[]>
|
|
1036
|
+
];
|
|
1037
|
+
typeArguments: [
|
|
1038
|
+
string
|
|
1039
|
+
];
|
|
1040
|
+
}
|
|
1041
|
+
/**
|
|
1042
|
+
* Drains `Receiving<Coin<T>>` entries addressed to the account's UID into a single
|
|
1043
|
+
* merged `Coin<T>` and wraps it as a `DepositRequest<T>`. Used when a user (or
|
|
1044
|
+
* anyone) previously `transfer_coin`-ed a `Coin<T>` onto the account address and
|
|
1045
|
+
* now wants to fold it into custody. Permissionless for the same reason as
|
|
1046
|
+
* `request_deposit<T>`.
|
|
1047
|
+
*/
|
|
1048
|
+
export declare function requestDepositFromReceivings(options: RequestDepositFromReceivingsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1049
|
+
export interface RequestDepositFromFundsArguments {
|
|
1050
|
+
registry: RawTransactionArgument<string>;
|
|
1051
|
+
accountId: RawTransactionArgument<string>;
|
|
1052
|
+
accumulatorRoot: RawTransactionArgument<string>;
|
|
1053
|
+
extraData: RawTransactionArgument<number[]>;
|
|
1054
|
+
}
|
|
1055
|
+
export interface RequestDepositFromFundsOptions {
|
|
1056
|
+
package?: string;
|
|
1057
|
+
arguments: RequestDepositFromFundsArguments | [
|
|
1058
|
+
registry: RawTransactionArgument<string>,
|
|
1059
|
+
accountId: RawTransactionArgument<string>,
|
|
1060
|
+
accumulatorRoot: RawTransactionArgument<string>,
|
|
1061
|
+
extraData: RawTransactionArgument<number[]>
|
|
1062
|
+
];
|
|
1063
|
+
typeArguments: [
|
|
1064
|
+
string
|
|
1065
|
+
];
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* Drains every `Balance<T>` sitting at the account's UID-derived address in Sui's
|
|
1069
|
+
* native funds accumulator and wraps the total into a single `DepositRequest<T>`.
|
|
1070
|
+
* Useful for accounts that receive `Coin<T>` via `0x2::balance::send_funds<T>` (or
|
|
1071
|
+
* any path that lands T at `account_id.to_address()` directly) and want it folded
|
|
1072
|
+
* into framework custody through the deposit-policy pipeline.
|
|
1073
|
+
*
|
|
1074
|
+
* The total drained equals `settled_funds_value<T>(root, addr)` as of the last
|
|
1075
|
+
* consensus commit — within the writing PTB itself, that read returns the pre-tx
|
|
1076
|
+
* value, so SDKs should treat this as a between-tx drain. Permissionless
|
|
1077
|
+
* (crediting an account is always allowed), pause-free, requires `T` to have a
|
|
1078
|
+
* registered deposit policy. Returns a deposit request even when the address holds
|
|
1079
|
+
* zero T (the carried balance is `Balance::zero()` in that case) — callers can
|
|
1080
|
+
* short-circuit off-chain by checking `settled_funds_value` first.
|
|
1081
|
+
*/
|
|
1082
|
+
export declare function requestDepositFromFunds(options: RequestDepositFromFundsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1083
|
+
export interface ConsumeDepositArguments<P extends BcsType<any>> {
|
|
1084
|
+
registry: RawTransactionArgument<string>;
|
|
1085
|
+
req: RawTransactionArgument<string>;
|
|
1086
|
+
Witness: RawTransactionArgument<P>;
|
|
1087
|
+
}
|
|
1088
|
+
export interface ConsumeDepositOptions<P extends BcsType<any>> {
|
|
1089
|
+
package?: string;
|
|
1090
|
+
arguments: ConsumeDepositArguments<P> | [
|
|
1091
|
+
registry: RawTransactionArgument<string>,
|
|
1092
|
+
req: RawTransactionArgument<string>,
|
|
1093
|
+
Witness: RawTransactionArgument<P>
|
|
1094
|
+
];
|
|
1095
|
+
typeArguments: [
|
|
1096
|
+
string,
|
|
1097
|
+
string
|
|
1098
|
+
];
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* Policy-side unwrap. Verifies that `P` is the registered deposit policy for `T`,
|
|
1102
|
+
* then destructures the hot potato. The policy module is responsible for what
|
|
1103
|
+
* happens next — typically swap / convert `Balance<T>` to some `Balance<T_OUT>`
|
|
1104
|
+
* and call `put<T_OUT, P>` to credit the account.
|
|
1105
|
+
*/
|
|
1106
|
+
export declare function consumeDeposit<P extends BcsType<any>>(options: ConsumeDepositOptions<P>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1107
|
+
export interface RequestWithdrawArguments {
|
|
1108
|
+
registry: RawTransactionArgument<string>;
|
|
1109
|
+
senderRequest: RawTransactionArgument<string>;
|
|
1110
|
+
accountId: RawTransactionArgument<string>;
|
|
1111
|
+
amount: RawTransactionArgument<number | bigint>;
|
|
1112
|
+
recipient: RawTransactionArgument<string>;
|
|
1113
|
+
extraData: RawTransactionArgument<number[]>;
|
|
1114
|
+
}
|
|
1115
|
+
export interface RequestWithdrawOptions {
|
|
1116
|
+
package?: string;
|
|
1117
|
+
arguments: RequestWithdrawArguments | [
|
|
1118
|
+
registry: RawTransactionArgument<string>,
|
|
1119
|
+
senderRequest: RawTransactionArgument<string>,
|
|
1120
|
+
accountId: RawTransactionArgument<string>,
|
|
1121
|
+
amount: RawTransactionArgument<number | bigint>,
|
|
1122
|
+
recipient: RawTransactionArgument<string>,
|
|
1123
|
+
extraData: RawTransactionArgument<number[]>
|
|
1124
|
+
];
|
|
1125
|
+
typeArguments: [
|
|
1126
|
+
string
|
|
1127
|
+
];
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* Debits `amount` of the account's stored `Balance<T>` and packages it into a
|
|
1131
|
+
* `WithdrawRequest<T>` for the registered withdraw policy. Auth (`PERM_WITHDRAW`
|
|
1132
|
+
* on `T`'s account) and pause are checked here, not in `consume_withdraw`.
|
|
1133
|
+
*/
|
|
1134
|
+
export declare function requestWithdraw(options: RequestWithdrawOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1135
|
+
export interface ConsumeWithdrawArguments<P extends BcsType<any>> {
|
|
1136
|
+
registry: RawTransactionArgument<string>;
|
|
1137
|
+
req: RawTransactionArgument<string>;
|
|
1138
|
+
Witness: RawTransactionArgument<P>;
|
|
1139
|
+
}
|
|
1140
|
+
export interface ConsumeWithdrawOptions<P extends BcsType<any>> {
|
|
1141
|
+
package?: string;
|
|
1142
|
+
arguments: ConsumeWithdrawArguments<P> | [
|
|
1143
|
+
registry: RawTransactionArgument<string>,
|
|
1144
|
+
req: RawTransactionArgument<string>,
|
|
1145
|
+
Witness: RawTransactionArgument<P>
|
|
1146
|
+
];
|
|
1147
|
+
typeArguments: [
|
|
1148
|
+
string,
|
|
1149
|
+
string
|
|
1150
|
+
];
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* Policy-side unwrap. Verifies that `P` is the registered withdraw policy for `T`,
|
|
1154
|
+
* then destructures the hot potato. The policy module decides what to do with the
|
|
1155
|
+
* `Balance<T>` (transfer to `recipient` as `Coin<T>`, swap to another asset and
|
|
1156
|
+
* transfer, queue for later settlement, etc.).
|
|
1157
|
+
*/
|
|
1158
|
+
export declare function consumeWithdraw<P extends BcsType<any>>(options: ConsumeWithdrawOptions<P>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1159
|
+
export interface TransferCoinArguments {
|
|
1160
|
+
registry: RawTransactionArgument<string>;
|
|
1161
|
+
accountId: RawTransactionArgument<string>;
|
|
1162
|
+
coin: RawTransactionArgument<string>;
|
|
1163
|
+
}
|
|
1164
|
+
export interface TransferCoinOptions {
|
|
1165
|
+
package?: string;
|
|
1166
|
+
arguments: TransferCoinArguments | [
|
|
1167
|
+
registry: RawTransactionArgument<string>,
|
|
1168
|
+
accountId: RawTransactionArgument<string>,
|
|
1169
|
+
coin: RawTransactionArgument<string>
|
|
1170
|
+
];
|
|
1171
|
+
typeArguments: [
|
|
1172
|
+
string
|
|
1173
|
+
];
|
|
1174
|
+
}
|
|
1175
|
+
/**
|
|
1176
|
+
* TTOs a `Coin<T>` to the account's UID address. The coin sits there until someone
|
|
1177
|
+
* calls `request_deposit_from_receivings<T>` (which requires a registered deposit
|
|
1178
|
+
* policy that then folds the coin into the account's stored balance) or
|
|
1179
|
+
* `receive<Coin<T>>` (owner / `PERM_RECEIVE` delegate, no policy needed). Useful
|
|
1180
|
+
* for async / cross-PTB deposits and for routing protocol payouts (e.g. reward
|
|
1181
|
+
* claims) into an account when `T` has no deposit policy.
|
|
1182
|
+
*/
|
|
1183
|
+
export declare function transferCoin(options: TransferCoinOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1184
|
+
export interface ReceiveArguments {
|
|
1185
|
+
registry: RawTransactionArgument<string>;
|
|
1186
|
+
senderRequest: RawTransactionArgument<string>;
|
|
1187
|
+
accountId: RawTransactionArgument<string>;
|
|
1188
|
+
receiving: RawTransactionArgument<string>;
|
|
1189
|
+
}
|
|
1190
|
+
export interface ReceiveOptions {
|
|
1191
|
+
package?: string;
|
|
1192
|
+
arguments: ReceiveArguments | [
|
|
1193
|
+
registry: RawTransactionArgument<string>,
|
|
1194
|
+
senderRequest: RawTransactionArgument<string>,
|
|
1195
|
+
accountId: RawTransactionArgument<string>,
|
|
1196
|
+
receiving: RawTransactionArgument<string>
|
|
1197
|
+
];
|
|
1198
|
+
typeArguments: [
|
|
1199
|
+
string
|
|
1200
|
+
];
|
|
1201
|
+
}
|
|
1202
|
+
/**
|
|
1203
|
+
* Account-owner drain of a TTO'd object on the account's UID. Generic over
|
|
1204
|
+
* `T: key + store` — works for NFTs, reward objects, or `Coin<X>` where `X` has no
|
|
1205
|
+
* registered deposit policy.
|
|
1206
|
+
*
|
|
1207
|
+
* **Policy-managed Coin<X> is rejected.** If `T == Coin<X>` and `X` has a deposit
|
|
1208
|
+
* policy registered, this aborts `EUseRequestDepositInstead` to keep policy-routed
|
|
1209
|
+
* inflow on the deposit-policy pipeline — bypassing via `receive` would skip the
|
|
1210
|
+
* conversion / authorization the policy is supposed to enforce. Use
|
|
1211
|
+
* `request_deposit_from_receivings<X>` or `request_deposit_from_funds<X>` for
|
|
1212
|
+
* inflow when X has a deposit policy.
|
|
1213
|
+
*
|
|
1214
|
+
* Auth: account owner or a `PERM_RECEIVE` delegate (kept separate from
|
|
1215
|
+
* `PERM_WITHDRAW` so reward-collection rights don't imply balance-drain rights).
|
|
1216
|
+
* Returns the received object to the caller's PTB.
|
|
1217
|
+
*/
|
|
1218
|
+
export declare function receive(options: ReceiveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1219
|
+
export interface WithdrawFromFundsArguments {
|
|
1220
|
+
registry: RawTransactionArgument<string>;
|
|
1221
|
+
senderRequest: RawTransactionArgument<string>;
|
|
1222
|
+
accountId: RawTransactionArgument<string>;
|
|
1223
|
+
accumulatorRoot: RawTransactionArgument<string>;
|
|
1224
|
+
}
|
|
1225
|
+
export interface WithdrawFromFundsOptions {
|
|
1226
|
+
package?: string;
|
|
1227
|
+
arguments: WithdrawFromFundsArguments | [
|
|
1228
|
+
registry: RawTransactionArgument<string>,
|
|
1229
|
+
senderRequest: RawTransactionArgument<string>,
|
|
1230
|
+
accountId: RawTransactionArgument<string>,
|
|
1231
|
+
accumulatorRoot: RawTransactionArgument<string>
|
|
1232
|
+
];
|
|
1233
|
+
typeArguments: [
|
|
1234
|
+
string
|
|
1235
|
+
];
|
|
1236
|
+
}
|
|
1237
|
+
/**
|
|
1238
|
+
* Drains every `Balance<T>` sitting at the account's UID-derived address in Sui's
|
|
1239
|
+
* native funds accumulator and returns it directly as a `Balance<T>`. Symmetric to
|
|
1240
|
+
* `request_deposit_from_funds<T>`, but explicitly for `T` that has **no**
|
|
1241
|
+
* registered deposit policy — policy-managed inflow must route through the
|
|
1242
|
+
* deposit-policy pipeline instead. The intent is to let owners (or `PERM_WITHDRAW`
|
|
1243
|
+
* delegates) pull policy-less inflow (reward tokens TTO'd via `send_funds`,
|
|
1244
|
+
* miscellaneous `Balance<T>` the SDK parked at the address) straight out.
|
|
1245
|
+
*
|
|
1246
|
+
* Auth: same as `request_withdraw<T>` — `PERM_WITHDRAW` or owner. Aborts
|
|
1247
|
+
* `EUseRequestDepositInstead` if `T` has a deposit policy registered. Pause-gated.
|
|
1248
|
+
* Returns `Balance::zero<T>()` when the address holds no T.
|
|
1249
|
+
*/
|
|
1250
|
+
export declare function withdrawFromFunds(options: WithdrawFromFundsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1251
|
+
export interface TakeArguments<P extends BcsType<any>> {
|
|
1252
|
+
registry: RawTransactionArgument<string>;
|
|
1253
|
+
senderRequest: RawTransactionArgument<string>;
|
|
1254
|
+
accountId: RawTransactionArgument<string>;
|
|
1255
|
+
amount: RawTransactionArgument<number | bigint>;
|
|
1256
|
+
Witness: RawTransactionArgument<P>;
|
|
1257
|
+
}
|
|
1258
|
+
export interface TakeOptions<P extends BcsType<any>> {
|
|
1259
|
+
package?: string;
|
|
1260
|
+
arguments: TakeArguments<P> | [
|
|
1261
|
+
registry: RawTransactionArgument<string>,
|
|
1262
|
+
senderRequest: RawTransactionArgument<string>,
|
|
1263
|
+
accountId: RawTransactionArgument<string>,
|
|
1264
|
+
amount: RawTransactionArgument<number | bigint>,
|
|
1265
|
+
Witness: RawTransactionArgument<P>
|
|
1266
|
+
];
|
|
1267
|
+
typeArguments: [
|
|
1268
|
+
string,
|
|
1269
|
+
string
|
|
1270
|
+
];
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* Splits `amount` of `Balance<T>` off `account_id` for protocol `P` to use. Three
|
|
1274
|
+
* gates compose:
|
|
1275
|
+
*
|
|
1276
|
+
* 1. **Witness privacy.** Only the module that defines `P` can produce a value of
|
|
1277
|
+
* `P`, so only that module can call `take<T, P>`.
|
|
1278
|
+
* 2. **Protocol whitelist.** `P` must be in `protocol_whitelist` (admin-managed).
|
|
1279
|
+
* Stops any deployed module that happens to own a `drop` witness from draining
|
|
1280
|
+
* accounts.
|
|
1281
|
+
* 3. **Per-account auth.** `sender_request.address()` must be the account's owner
|
|
1282
|
+
* OR a non-expired delegate — even a legitimate whitelisted protocol cannot
|
|
1283
|
+
* move funds out of an account that doesn't know the caller. This mirrors EOA
|
|
1284
|
+
* semantics: the account never pays out without the owner (or a delegated key)
|
|
1285
|
+
* signing. Per-action bit semantics on `protocol_permissions[P]` remain the
|
|
1286
|
+
* protocol's responsibility on top of this.
|
|
1287
|
+
*
|
|
1288
|
+
* No deposit/withdraw policy is consulted — `take` / `put` are the
|
|
1289
|
+
* protocol↔account flow and orthogonal to the external deposit/withdraw path that
|
|
1290
|
+
* policies own.
|
|
1291
|
+
*/
|
|
1292
|
+
export declare function take<P extends BcsType<any>>(options: TakeOptions<P>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1293
|
+
export interface PutArguments<P extends BcsType<any>> {
|
|
1294
|
+
registry: RawTransactionArgument<string>;
|
|
1295
|
+
accountId: RawTransactionArgument<string>;
|
|
1296
|
+
bal: RawTransactionArgument<string>;
|
|
1297
|
+
Witness: RawTransactionArgument<P>;
|
|
1298
|
+
}
|
|
1299
|
+
export interface PutOptions<P extends BcsType<any>> {
|
|
1300
|
+
package?: string;
|
|
1301
|
+
arguments: PutArguments<P> | [
|
|
1302
|
+
registry: RawTransactionArgument<string>,
|
|
1303
|
+
accountId: RawTransactionArgument<string>,
|
|
1304
|
+
bal: RawTransactionArgument<string>,
|
|
1305
|
+
Witness: RawTransactionArgument<P>
|
|
1306
|
+
];
|
|
1307
|
+
typeArguments: [
|
|
1308
|
+
string,
|
|
1309
|
+
string
|
|
1310
|
+
];
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
* Joins `bal` into `account_id`'s stored `Balance<T>`. Symmetric to `take<T, P>`.
|
|
1314
|
+
* Zero-value balances are silently destroyed.
|
|
1315
|
+
*/
|
|
1316
|
+
export declare function put<P extends BcsType<any>>(options: PutOptions<P>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1317
|
+
export interface HasAccountArguments {
|
|
1318
|
+
registry: RawTransactionArgument<string>;
|
|
1319
|
+
accountId: RawTransactionArgument<string>;
|
|
1320
|
+
}
|
|
1321
|
+
export interface HasAccountOptions {
|
|
1322
|
+
package?: string;
|
|
1323
|
+
arguments: HasAccountArguments | [
|
|
1324
|
+
registry: RawTransactionArgument<string>,
|
|
1325
|
+
accountId: RawTransactionArgument<string>
|
|
1326
|
+
];
|
|
1327
|
+
}
|
|
1328
|
+
export declare function hasAccount(options: HasAccountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1329
|
+
export interface IsAccountAuthorizedArguments {
|
|
1330
|
+
registry: RawTransactionArgument<string>;
|
|
1331
|
+
accountId: RawTransactionArgument<string>;
|
|
1332
|
+
addr: RawTransactionArgument<string>;
|
|
1333
|
+
nowMs: RawTransactionArgument<number | bigint>;
|
|
1334
|
+
}
|
|
1335
|
+
export interface IsAccountAuthorizedOptions {
|
|
1336
|
+
package?: string;
|
|
1337
|
+
arguments: IsAccountAuthorizedArguments | [
|
|
1338
|
+
registry: RawTransactionArgument<string>,
|
|
1339
|
+
accountId: RawTransactionArgument<string>,
|
|
1340
|
+
addr: RawTransactionArgument<string>,
|
|
1341
|
+
nowMs: RawTransactionArgument<number | bigint>
|
|
1342
|
+
];
|
|
1343
|
+
}
|
|
1344
|
+
/**
|
|
1345
|
+
* Returns `true` when `addr` is the account's owner or a non-expired delegate,
|
|
1346
|
+
* regardless of permission bits. The framework's "is this address known to the
|
|
1347
|
+
* account?" gate — per-action bit semantics are the protocol's responsibility on
|
|
1348
|
+
* top of this.
|
|
1349
|
+
*/
|
|
1350
|
+
export declare function isAccountAuthorized(options: IsAccountAuthorizedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1351
|
+
export interface AccountCountArguments {
|
|
1352
|
+
registry: RawTransactionArgument<string>;
|
|
1353
|
+
owner: RawTransactionArgument<string>;
|
|
1354
|
+
}
|
|
1355
|
+
export interface AccountCountOptions {
|
|
1356
|
+
package?: string;
|
|
1357
|
+
arguments: AccountCountArguments | [
|
|
1358
|
+
registry: RawTransactionArgument<string>,
|
|
1359
|
+
owner: RawTransactionArgument<string>
|
|
1360
|
+
];
|
|
1361
|
+
}
|
|
1362
|
+
export declare function accountCount(options: AccountCountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1363
|
+
export interface AccountIdsArguments {
|
|
1364
|
+
registry: RawTransactionArgument<string>;
|
|
1365
|
+
owner: RawTransactionArgument<string>;
|
|
1366
|
+
}
|
|
1367
|
+
export interface AccountIdsOptions {
|
|
1368
|
+
package?: string;
|
|
1369
|
+
arguments: AccountIdsArguments | [
|
|
1370
|
+
registry: RawTransactionArgument<string>,
|
|
1371
|
+
owner: RawTransactionArgument<string>
|
|
1372
|
+
];
|
|
1373
|
+
}
|
|
1374
|
+
export declare function accountIds(options: AccountIdsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1375
|
+
export interface EffectivePermissionsArguments {
|
|
1376
|
+
registry: RawTransactionArgument<string>;
|
|
1377
|
+
accountId: RawTransactionArgument<string>;
|
|
1378
|
+
addr: RawTransactionArgument<string>;
|
|
1379
|
+
nowMs: RawTransactionArgument<number | bigint>;
|
|
1380
|
+
}
|
|
1381
|
+
export interface EffectivePermissionsOptions {
|
|
1382
|
+
package?: string;
|
|
1383
|
+
arguments: EffectivePermissionsArguments | [
|
|
1384
|
+
registry: RawTransactionArgument<string>,
|
|
1385
|
+
accountId: RawTransactionArgument<string>,
|
|
1386
|
+
addr: RawTransactionArgument<string>,
|
|
1387
|
+
nowMs: RawTransactionArgument<number | bigint>
|
|
1388
|
+
];
|
|
1389
|
+
}
|
|
1390
|
+
/**
|
|
1391
|
+
* Framework-level effective permissions (used by `request_withdraw`). Owner →
|
|
1392
|
+
* `PERM_ALL`. Delegate → its `permissions` bitmap unless expired. Stranger →
|
|
1393
|
+
* `PERM_NONE`.
|
|
1394
|
+
*/
|
|
1395
|
+
export declare function effectivePermissions(options: EffectivePermissionsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1396
|
+
export interface HasPermissionArguments {
|
|
1397
|
+
registry: RawTransactionArgument<string>;
|
|
1398
|
+
accountId: RawTransactionArgument<string>;
|
|
1399
|
+
addr: RawTransactionArgument<string>;
|
|
1400
|
+
permission: RawTransactionArgument<number>;
|
|
1401
|
+
nowMs: RawTransactionArgument<number | bigint>;
|
|
1402
|
+
}
|
|
1403
|
+
export interface HasPermissionOptions {
|
|
1404
|
+
package?: string;
|
|
1405
|
+
arguments: HasPermissionArguments | [
|
|
1406
|
+
registry: RawTransactionArgument<string>,
|
|
1407
|
+
accountId: RawTransactionArgument<string>,
|
|
1408
|
+
addr: RawTransactionArgument<string>,
|
|
1409
|
+
permission: RawTransactionArgument<number>,
|
|
1410
|
+
nowMs: RawTransactionArgument<number | bigint>
|
|
1411
|
+
];
|
|
1412
|
+
}
|
|
1413
|
+
export declare function hasPermission(options: HasPermissionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1414
|
+
export interface EffectiveProtocolPermissionsArguments {
|
|
1415
|
+
registry: RawTransactionArgument<string>;
|
|
1416
|
+
accountId: RawTransactionArgument<string>;
|
|
1417
|
+
addr: RawTransactionArgument<string>;
|
|
1418
|
+
nowMs: RawTransactionArgument<number | bigint>;
|
|
1419
|
+
}
|
|
1420
|
+
export interface EffectiveProtocolPermissionsOptions {
|
|
1421
|
+
package?: string;
|
|
1422
|
+
arguments: EffectiveProtocolPermissionsArguments | [
|
|
1423
|
+
registry: RawTransactionArgument<string>,
|
|
1424
|
+
accountId: RawTransactionArgument<string>,
|
|
1425
|
+
addr: RawTransactionArgument<string>,
|
|
1426
|
+
nowMs: RawTransactionArgument<number | bigint>
|
|
1427
|
+
];
|
|
1428
|
+
typeArguments: [
|
|
1429
|
+
string
|
|
1430
|
+
];
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1433
|
+
* Per-protocol effective permissions (used by protocol modules). Owner →
|
|
1434
|
+
* `PERM_ALL` for any protocol. Delegate → the bitmap stored at
|
|
1435
|
+
* `protocol_permissions[TypeName(PROTOCOL)]`, or `PERM_NONE` if absent or expired.
|
|
1436
|
+
* Stranger → `PERM_NONE`.
|
|
1437
|
+
*/
|
|
1438
|
+
export declare function effectiveProtocolPermissions(options: EffectiveProtocolPermissionsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1439
|
+
export interface HasProtocolPermissionArguments {
|
|
1440
|
+
registry: RawTransactionArgument<string>;
|
|
1441
|
+
accountId: RawTransactionArgument<string>;
|
|
1442
|
+
addr: RawTransactionArgument<string>;
|
|
1443
|
+
permission: RawTransactionArgument<number>;
|
|
1444
|
+
nowMs: RawTransactionArgument<number | bigint>;
|
|
1445
|
+
}
|
|
1446
|
+
export interface HasProtocolPermissionOptions {
|
|
1447
|
+
package?: string;
|
|
1448
|
+
arguments: HasProtocolPermissionArguments | [
|
|
1449
|
+
registry: RawTransactionArgument<string>,
|
|
1450
|
+
accountId: RawTransactionArgument<string>,
|
|
1451
|
+
addr: RawTransactionArgument<string>,
|
|
1452
|
+
permission: RawTransactionArgument<number>,
|
|
1453
|
+
nowMs: RawTransactionArgument<number | bigint>
|
|
1454
|
+
];
|
|
1455
|
+
typeArguments: [
|
|
1456
|
+
string
|
|
1457
|
+
];
|
|
1458
|
+
}
|
|
1459
|
+
export declare function hasProtocolPermission(options: HasProtocolPermissionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1460
|
+
export interface AccountBalanceArguments {
|
|
1461
|
+
registry: RawTransactionArgument<string>;
|
|
1462
|
+
accountId: RawTransactionArgument<string>;
|
|
1463
|
+
}
|
|
1464
|
+
export interface AccountBalanceOptions {
|
|
1465
|
+
package?: string;
|
|
1466
|
+
arguments: AccountBalanceArguments | [
|
|
1467
|
+
registry: RawTransactionArgument<string>,
|
|
1468
|
+
accountId: RawTransactionArgument<string>
|
|
1469
|
+
];
|
|
1470
|
+
typeArguments: [
|
|
1471
|
+
string
|
|
1472
|
+
];
|
|
1473
|
+
}
|
|
1474
|
+
export declare function accountBalance(options: AccountBalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1475
|
+
export interface AccountBalancesArguments {
|
|
1476
|
+
registry: RawTransactionArgument<string>;
|
|
1477
|
+
accountId: RawTransactionArgument<string>;
|
|
1478
|
+
}
|
|
1479
|
+
export interface AccountBalancesOptions {
|
|
1480
|
+
package?: string;
|
|
1481
|
+
arguments: AccountBalancesArguments | [
|
|
1482
|
+
registry: RawTransactionArgument<string>,
|
|
1483
|
+
accountId: RawTransactionArgument<string>
|
|
1484
|
+
];
|
|
1485
|
+
}
|
|
1486
|
+
export declare function accountBalances(options: AccountBalancesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1487
|
+
export interface BalanceArguments {
|
|
1488
|
+
registry: RawTransactionArgument<string>;
|
|
1489
|
+
}
|
|
1490
|
+
export interface BalanceOptions {
|
|
1491
|
+
package?: string;
|
|
1492
|
+
arguments: BalanceArguments | [
|
|
1493
|
+
registry: RawTransactionArgument<string>
|
|
1494
|
+
];
|
|
1495
|
+
typeArguments: [
|
|
1496
|
+
string
|
|
1497
|
+
];
|
|
1498
|
+
}
|
|
1499
|
+
/**
|
|
1500
|
+
* Total `Balance<T>` currently held across all accounts. Counter; not derived from
|
|
1501
|
+
* iterating accounts. Excludes balance held by protocols (after `take`) and
|
|
1502
|
+
* balance sitting in hot-potato requests in flight.
|
|
1503
|
+
*/
|
|
1504
|
+
export declare function balance(options: BalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1505
|
+
export interface AccountOwnerArguments {
|
|
1506
|
+
account: RawTransactionArgument<string>;
|
|
1507
|
+
}
|
|
1508
|
+
export interface AccountOwnerOptions {
|
|
1509
|
+
package?: string;
|
|
1510
|
+
arguments: AccountOwnerArguments | [
|
|
1511
|
+
account: RawTransactionArgument<string>
|
|
1512
|
+
];
|
|
1513
|
+
}
|
|
1514
|
+
export declare function accountOwner(options: AccountOwnerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1515
|
+
export interface AccountAliasArguments {
|
|
1516
|
+
account: RawTransactionArgument<string>;
|
|
1517
|
+
}
|
|
1518
|
+
export interface AccountAliasOptions {
|
|
1519
|
+
package?: string;
|
|
1520
|
+
arguments: AccountAliasArguments | [
|
|
1521
|
+
account: RawTransactionArgument<string>
|
|
1522
|
+
];
|
|
1523
|
+
}
|
|
1524
|
+
export declare function accountAlias(options: AccountAliasOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1525
|
+
export interface AccountIdArguments {
|
|
1526
|
+
account: RawTransactionArgument<string>;
|
|
1527
|
+
}
|
|
1528
|
+
export interface AccountIdOptions {
|
|
1529
|
+
package?: string;
|
|
1530
|
+
arguments: AccountIdArguments | [
|
|
1531
|
+
account: RawTransactionArgument<string>
|
|
1532
|
+
];
|
|
1533
|
+
}
|
|
1534
|
+
export declare function accountId(options: AccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1535
|
+
export interface AccountAddressArguments {
|
|
1536
|
+
account: RawTransactionArgument<string>;
|
|
1537
|
+
}
|
|
1538
|
+
export interface AccountAddressOptions {
|
|
1539
|
+
package?: string;
|
|
1540
|
+
arguments: AccountAddressArguments | [
|
|
1541
|
+
account: RawTransactionArgument<string>
|
|
1542
|
+
];
|
|
1543
|
+
}
|
|
1544
|
+
export declare function accountAddress(options: AccountAddressOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1545
|
+
export interface AccountDelegatesArguments {
|
|
1546
|
+
account: RawTransactionArgument<string>;
|
|
1547
|
+
}
|
|
1548
|
+
export interface AccountDelegatesOptions {
|
|
1549
|
+
package?: string;
|
|
1550
|
+
arguments: AccountDelegatesArguments | [
|
|
1551
|
+
account: RawTransactionArgument<string>
|
|
1552
|
+
];
|
|
1553
|
+
}
|
|
1554
|
+
export declare function accountDelegates(options: AccountDelegatesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1555
|
+
export interface AccountBalancesFieldArguments {
|
|
1556
|
+
account: RawTransactionArgument<string>;
|
|
1557
|
+
}
|
|
1558
|
+
export interface AccountBalancesFieldOptions {
|
|
1559
|
+
package?: string;
|
|
1560
|
+
arguments: AccountBalancesFieldArguments | [
|
|
1561
|
+
account: RawTransactionArgument<string>
|
|
1562
|
+
];
|
|
1563
|
+
}
|
|
1564
|
+
export declare function accountBalancesField(options: AccountBalancesFieldOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1565
|
+
export interface DelegateAddressArguments {
|
|
1566
|
+
delegate: RawTransactionArgument<string>;
|
|
1567
|
+
}
|
|
1568
|
+
export interface DelegateAddressOptions {
|
|
1569
|
+
package?: string;
|
|
1570
|
+
arguments: DelegateAddressArguments | [
|
|
1571
|
+
delegate: RawTransactionArgument<string>
|
|
1572
|
+
];
|
|
1573
|
+
}
|
|
1574
|
+
export declare function delegateAddress(options: DelegateAddressOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1575
|
+
export interface DelegateAliasArguments {
|
|
1576
|
+
delegate: RawTransactionArgument<string>;
|
|
1577
|
+
}
|
|
1578
|
+
export interface DelegateAliasOptions {
|
|
1579
|
+
package?: string;
|
|
1580
|
+
arguments: DelegateAliasArguments | [
|
|
1581
|
+
delegate: RawTransactionArgument<string>
|
|
1582
|
+
];
|
|
1583
|
+
}
|
|
1584
|
+
export declare function delegateAlias(options: DelegateAliasOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1585
|
+
export interface DelegatePermissionsArguments {
|
|
1586
|
+
delegate: RawTransactionArgument<string>;
|
|
1587
|
+
}
|
|
1588
|
+
export interface DelegatePermissionsOptions {
|
|
1589
|
+
package?: string;
|
|
1590
|
+
arguments: DelegatePermissionsArguments | [
|
|
1591
|
+
delegate: RawTransactionArgument<string>
|
|
1592
|
+
];
|
|
1593
|
+
}
|
|
1594
|
+
export declare function delegatePermissions(options: DelegatePermissionsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1595
|
+
export interface DelegateProtocolPermissionsArguments {
|
|
1596
|
+
delegate: RawTransactionArgument<string>;
|
|
1597
|
+
}
|
|
1598
|
+
export interface DelegateProtocolPermissionsOptions {
|
|
1599
|
+
package?: string;
|
|
1600
|
+
arguments: DelegateProtocolPermissionsArguments | [
|
|
1601
|
+
delegate: RawTransactionArgument<string>
|
|
1602
|
+
];
|
|
1603
|
+
}
|
|
1604
|
+
export declare function delegateProtocolPermissions(options: DelegateProtocolPermissionsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1605
|
+
export interface DelegateExpiresAtMsArguments {
|
|
1606
|
+
delegate: RawTransactionArgument<string>;
|
|
1607
|
+
}
|
|
1608
|
+
export interface DelegateExpiresAtMsOptions {
|
|
1609
|
+
package?: string;
|
|
1610
|
+
arguments: DelegateExpiresAtMsArguments | [
|
|
1611
|
+
delegate: RawTransactionArgument<string>
|
|
1612
|
+
];
|
|
1613
|
+
}
|
|
1614
|
+
export declare function delegateExpiresAtMs(options: DelegateExpiresAtMsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1615
|
+
export interface DepositRequestAccountIdArguments {
|
|
1616
|
+
r: RawTransactionArgument<string>;
|
|
1617
|
+
}
|
|
1618
|
+
export interface DepositRequestAccountIdOptions {
|
|
1619
|
+
package?: string;
|
|
1620
|
+
arguments: DepositRequestAccountIdArguments | [
|
|
1621
|
+
r: RawTransactionArgument<string>
|
|
1622
|
+
];
|
|
1623
|
+
typeArguments: [
|
|
1624
|
+
string
|
|
1625
|
+
];
|
|
1626
|
+
}
|
|
1627
|
+
export declare function depositRequestAccountId(options: DepositRequestAccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1628
|
+
export interface DepositRequestBalanceArguments {
|
|
1629
|
+
r: RawTransactionArgument<string>;
|
|
1630
|
+
}
|
|
1631
|
+
export interface DepositRequestBalanceOptions {
|
|
1632
|
+
package?: string;
|
|
1633
|
+
arguments: DepositRequestBalanceArguments | [
|
|
1634
|
+
r: RawTransactionArgument<string>
|
|
1635
|
+
];
|
|
1636
|
+
typeArguments: [
|
|
1637
|
+
string
|
|
1638
|
+
];
|
|
1639
|
+
}
|
|
1640
|
+
export declare function depositRequestBalance(options: DepositRequestBalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1641
|
+
export interface DepositRequestAmountArguments {
|
|
1642
|
+
r: RawTransactionArgument<string>;
|
|
1643
|
+
}
|
|
1644
|
+
export interface DepositRequestAmountOptions {
|
|
1645
|
+
package?: string;
|
|
1646
|
+
arguments: DepositRequestAmountArguments | [
|
|
1647
|
+
r: RawTransactionArgument<string>
|
|
1648
|
+
];
|
|
1649
|
+
typeArguments: [
|
|
1650
|
+
string
|
|
1651
|
+
];
|
|
1652
|
+
}
|
|
1653
|
+
export declare function depositRequestAmount(options: DepositRequestAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1654
|
+
export interface DepositRequestExtraDataArguments {
|
|
1655
|
+
r: RawTransactionArgument<string>;
|
|
1656
|
+
}
|
|
1657
|
+
export interface DepositRequestExtraDataOptions {
|
|
1658
|
+
package?: string;
|
|
1659
|
+
arguments: DepositRequestExtraDataArguments | [
|
|
1660
|
+
r: RawTransactionArgument<string>
|
|
1661
|
+
];
|
|
1662
|
+
typeArguments: [
|
|
1663
|
+
string
|
|
1664
|
+
];
|
|
1665
|
+
}
|
|
1666
|
+
export declare function depositRequestExtraData(options: DepositRequestExtraDataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1667
|
+
export interface WithdrawRequestAccountIdArguments {
|
|
1668
|
+
r: RawTransactionArgument<string>;
|
|
1669
|
+
}
|
|
1670
|
+
export interface WithdrawRequestAccountIdOptions {
|
|
1671
|
+
package?: string;
|
|
1672
|
+
arguments: WithdrawRequestAccountIdArguments | [
|
|
1673
|
+
r: RawTransactionArgument<string>
|
|
1674
|
+
];
|
|
1675
|
+
typeArguments: [
|
|
1676
|
+
string
|
|
1677
|
+
];
|
|
1678
|
+
}
|
|
1679
|
+
export declare function withdrawRequestAccountId(options: WithdrawRequestAccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1680
|
+
export interface WithdrawRequestBalanceArguments {
|
|
1681
|
+
r: RawTransactionArgument<string>;
|
|
1682
|
+
}
|
|
1683
|
+
export interface WithdrawRequestBalanceOptions {
|
|
1684
|
+
package?: string;
|
|
1685
|
+
arguments: WithdrawRequestBalanceArguments | [
|
|
1686
|
+
r: RawTransactionArgument<string>
|
|
1687
|
+
];
|
|
1688
|
+
typeArguments: [
|
|
1689
|
+
string
|
|
1690
|
+
];
|
|
1691
|
+
}
|
|
1692
|
+
export declare function withdrawRequestBalance(options: WithdrawRequestBalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1693
|
+
export interface WithdrawRequestAmountArguments {
|
|
1694
|
+
r: RawTransactionArgument<string>;
|
|
1695
|
+
}
|
|
1696
|
+
export interface WithdrawRequestAmountOptions {
|
|
1697
|
+
package?: string;
|
|
1698
|
+
arguments: WithdrawRequestAmountArguments | [
|
|
1699
|
+
r: RawTransactionArgument<string>
|
|
1700
|
+
];
|
|
1701
|
+
typeArguments: [
|
|
1702
|
+
string
|
|
1703
|
+
];
|
|
1704
|
+
}
|
|
1705
|
+
export declare function withdrawRequestAmount(options: WithdrawRequestAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1706
|
+
export interface WithdrawRequestRecipientArguments {
|
|
1707
|
+
r: RawTransactionArgument<string>;
|
|
1708
|
+
}
|
|
1709
|
+
export interface WithdrawRequestRecipientOptions {
|
|
1710
|
+
package?: string;
|
|
1711
|
+
arguments: WithdrawRequestRecipientArguments | [
|
|
1712
|
+
r: RawTransactionArgument<string>
|
|
1713
|
+
];
|
|
1714
|
+
typeArguments: [
|
|
1715
|
+
string
|
|
1716
|
+
];
|
|
1717
|
+
}
|
|
1718
|
+
export declare function withdrawRequestRecipient(options: WithdrawRequestRecipientOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1719
|
+
export interface WithdrawRequestExtraDataArguments {
|
|
1720
|
+
r: RawTransactionArgument<string>;
|
|
1721
|
+
}
|
|
1722
|
+
export interface WithdrawRequestExtraDataOptions {
|
|
1723
|
+
package?: string;
|
|
1724
|
+
arguments: WithdrawRequestExtraDataArguments | [
|
|
1725
|
+
r: RawTransactionArgument<string>
|
|
1726
|
+
];
|
|
1727
|
+
typeArguments: [
|
|
1728
|
+
string
|
|
1729
|
+
];
|
|
1730
|
+
}
|
|
1731
|
+
export declare function withdrawRequestExtraData(options: WithdrawRequestExtraDataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1732
|
+
export interface NewDataArguments<PROTOCOL extends BcsType<any>, ProtocolData extends BcsType<any>> {
|
|
1733
|
+
registry: RawTransactionArgument<string>;
|
|
1734
|
+
accountId: RawTransactionArgument<string>;
|
|
1735
|
+
Witness: RawTransactionArgument<PROTOCOL>;
|
|
1736
|
+
data: RawTransactionArgument<ProtocolData>;
|
|
1737
|
+
}
|
|
1738
|
+
export interface NewDataOptions<PROTOCOL extends BcsType<any>, ProtocolData extends BcsType<any>> {
|
|
1739
|
+
package?: string;
|
|
1740
|
+
arguments: NewDataArguments<PROTOCOL, ProtocolData> | [
|
|
1741
|
+
registry: RawTransactionArgument<string>,
|
|
1742
|
+
accountId: RawTransactionArgument<string>,
|
|
1743
|
+
Witness: RawTransactionArgument<PROTOCOL>,
|
|
1744
|
+
data: RawTransactionArgument<ProtocolData>
|
|
1745
|
+
];
|
|
1746
|
+
typeArguments: [
|
|
1747
|
+
string,
|
|
1748
|
+
string
|
|
1749
|
+
];
|
|
1750
|
+
}
|
|
1751
|
+
export declare function newData<PROTOCOL extends BcsType<any>, ProtocolData extends BcsType<any>>(options: NewDataOptions<PROTOCOL, ProtocolData>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1752
|
+
export interface BorrowDataArguments {
|
|
1753
|
+
registry: RawTransactionArgument<string>;
|
|
1754
|
+
accountId: RawTransactionArgument<string>;
|
|
1755
|
+
}
|
|
1756
|
+
export interface BorrowDataOptions {
|
|
1757
|
+
package?: string;
|
|
1758
|
+
arguments: BorrowDataArguments | [
|
|
1759
|
+
registry: RawTransactionArgument<string>,
|
|
1760
|
+
accountId: RawTransactionArgument<string>
|
|
1761
|
+
];
|
|
1762
|
+
typeArguments: [
|
|
1763
|
+
string,
|
|
1764
|
+
string
|
|
1765
|
+
];
|
|
1766
|
+
}
|
|
1767
|
+
export declare function borrowData(options: BorrowDataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1768
|
+
export interface BorrowDataMutArguments<PROTOCOL extends BcsType<any>> {
|
|
1769
|
+
registry: RawTransactionArgument<string>;
|
|
1770
|
+
accountId: RawTransactionArgument<string>;
|
|
1771
|
+
Witness: RawTransactionArgument<PROTOCOL>;
|
|
1772
|
+
}
|
|
1773
|
+
export interface BorrowDataMutOptions<PROTOCOL extends BcsType<any>> {
|
|
1774
|
+
package?: string;
|
|
1775
|
+
arguments: BorrowDataMutArguments<PROTOCOL> | [
|
|
1776
|
+
registry: RawTransactionArgument<string>,
|
|
1777
|
+
accountId: RawTransactionArgument<string>,
|
|
1778
|
+
Witness: RawTransactionArgument<PROTOCOL>
|
|
1779
|
+
];
|
|
1780
|
+
typeArguments: [
|
|
1781
|
+
string,
|
|
1782
|
+
string
|
|
1783
|
+
];
|
|
1784
|
+
}
|
|
1785
|
+
export declare function borrowDataMut<PROTOCOL extends BcsType<any>>(options: BorrowDataMutOptions<PROTOCOL>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1786
|
+
export interface HasDataArguments {
|
|
1787
|
+
registry: RawTransactionArgument<string>;
|
|
1788
|
+
accountId: RawTransactionArgument<string>;
|
|
1789
|
+
}
|
|
1790
|
+
export interface HasDataOptions {
|
|
1791
|
+
package?: string;
|
|
1792
|
+
arguments: HasDataArguments | [
|
|
1793
|
+
registry: RawTransactionArgument<string>,
|
|
1794
|
+
accountId: RawTransactionArgument<string>
|
|
1795
|
+
];
|
|
1796
|
+
typeArguments: [
|
|
1797
|
+
string
|
|
1798
|
+
];
|
|
1799
|
+
}
|
|
1800
|
+
export declare function hasData(options: HasDataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
1801
|
+
export interface RemoveDataArguments<PROTOCOL extends BcsType<any>> {
|
|
1802
|
+
registry: RawTransactionArgument<string>;
|
|
1803
|
+
accountId: RawTransactionArgument<string>;
|
|
1804
|
+
Witness: RawTransactionArgument<PROTOCOL>;
|
|
1805
|
+
}
|
|
1806
|
+
export interface RemoveDataOptions<PROTOCOL extends BcsType<any>> {
|
|
1807
|
+
package?: string;
|
|
1808
|
+
arguments: RemoveDataArguments<PROTOCOL> | [
|
|
1809
|
+
registry: RawTransactionArgument<string>,
|
|
1810
|
+
accountId: RawTransactionArgument<string>,
|
|
1811
|
+
Witness: RawTransactionArgument<PROTOCOL>
|
|
1812
|
+
];
|
|
1813
|
+
typeArguments: [
|
|
1814
|
+
string,
|
|
1815
|
+
string
|
|
1816
|
+
];
|
|
1817
|
+
}
|
|
1818
|
+
export declare function removeData<PROTOCOL extends BcsType<any>>(options: RemoveDataOptions<PROTOCOL>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|