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