@waterx/predict-sdk 0.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.
Files changed (105) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +67 -0
  3. package/dist/src/account.d.ts +64 -0
  4. package/dist/src/account.js +134 -0
  5. package/dist/src/admin.d.ts +47 -0
  6. package/dist/src/admin.js +104 -0
  7. package/dist/src/bcs.d.ts +20 -0
  8. package/dist/src/bcs.js +209 -0
  9. package/dist/src/client.d.ts +60 -0
  10. package/dist/src/client.js +59 -0
  11. package/dist/src/constants.d.ts +61 -0
  12. package/dist/src/constants.js +62 -0
  13. package/dist/src/fetch.d.ts +53 -0
  14. package/dist/src/fetch.js +187 -0
  15. package/dist/src/generated/bucket_v2_framework/account.d.ts +100 -0
  16. package/dist/src/generated/bucket_v2_framework/account.js +129 -0
  17. package/dist/src/generated/bucket_v2_framework/deps/std/type_name.d.ts +6 -0
  18. package/dist/src/generated/bucket_v2_framework/deps/std/type_name.js +19 -0
  19. package/dist/src/generated/bucket_v2_framework/deps/sui/balance.d.ts +10 -0
  20. package/dist/src/generated/bucket_v2_framework/deps/sui/balance.js +14 -0
  21. package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.d.ts +36 -0
  22. package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.js +27 -0
  23. package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.d.ts +16 -0
  24. package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.js +19 -0
  25. package/dist/src/generated/bucket_v2_framework/double.d.ts +382 -0
  26. package/dist/src/generated/bucket_v2_framework/double.js +466 -0
  27. package/dist/src/generated/bucket_v2_framework/float.d.ts +362 -0
  28. package/dist/src/generated/bucket_v2_framework/float.js +440 -0
  29. package/dist/src/generated/bucket_v2_framework/liability.d.ts +193 -0
  30. package/dist/src/generated/bucket_v2_framework/liability.js +205 -0
  31. package/dist/src/generated/bucket_v2_framework/linked_table.d.ts +384 -0
  32. package/dist/src/generated/bucket_v2_framework/linked_table.js +382 -0
  33. package/dist/src/generated/bucket_v2_framework/sheet.d.ts +344 -0
  34. package/dist/src/generated/bucket_v2_framework/sheet.js +344 -0
  35. package/dist/src/generated/utils/index.d.ts +30 -0
  36. package/dist/src/generated/utils/index.js +157 -0
  37. package/dist/src/generated/waterx_account/account.d.ts +1326 -0
  38. package/dist/src/generated/waterx_account/account.js +1487 -0
  39. package/dist/src/generated/waterx_account/deps/std/type_name.d.ts +6 -0
  40. package/dist/src/generated/waterx_account/deps/std/type_name.js +19 -0
  41. package/dist/src/generated/waterx_account/deps/sui/balance.d.ts +10 -0
  42. package/dist/src/generated/waterx_account/deps/sui/balance.js +14 -0
  43. package/dist/src/generated/waterx_account/deps/sui/table.d.ts +24 -0
  44. package/dist/src/generated/waterx_account/deps/sui/table.js +31 -0
  45. package/dist/src/generated/waterx_account/deps/sui/vec_map.d.ts +36 -0
  46. package/dist/src/generated/waterx_account/deps/sui/vec_map.js +27 -0
  47. package/dist/src/generated/waterx_account/deps/sui/vec_set.d.ts +16 -0
  48. package/dist/src/generated/waterx_account/deps/sui/vec_set.js +19 -0
  49. package/dist/src/generated/waterx_account/direct_rule.d.ts +72 -0
  50. package/dist/src/generated/waterx_account/direct_rule.js +75 -0
  51. package/dist/src/generated/waterx_account/events.d.ts +30 -0
  52. package/dist/src/generated/waterx_account/events.js +145 -0
  53. package/dist/src/generated/waterx_account/version.d.ts +10 -0
  54. package/dist/src/generated/waterx_account/version.js +8 -0
  55. package/dist/src/generated/waterx_prediction/account_data.d.ts +321 -0
  56. package/dist/src/generated/waterx_prediction/account_data.js +399 -0
  57. package/dist/src/generated/waterx_prediction/admin.d.ts +5 -0
  58. package/dist/src/generated/waterx_prediction/admin.js +9 -0
  59. package/dist/src/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.d.ts +8 -0
  60. package/dist/src/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.js +18 -0
  61. package/dist/src/generated/waterx_prediction/deps/sui/balance.d.ts +10 -0
  62. package/dist/src/generated/waterx_prediction/deps/sui/balance.js +14 -0
  63. package/dist/src/generated/waterx_prediction/deps/sui/table.d.ts +24 -0
  64. package/dist/src/generated/waterx_prediction/deps/sui/table.js +31 -0
  65. package/dist/src/generated/waterx_prediction/deps/sui/vec_set.d.ts +16 -0
  66. package/dist/src/generated/waterx_prediction/deps/sui/vec_set.js +19 -0
  67. package/dist/src/generated/waterx_prediction/events.d.ts +19 -0
  68. package/dist/src/generated/waterx_prediction/events.js +99 -0
  69. package/dist/src/generated/waterx_prediction/global_config.d.ts +68 -0
  70. package/dist/src/generated/waterx_prediction/global_config.js +83 -0
  71. package/dist/src/generated/waterx_prediction/order.d.ts +170 -0
  72. package/dist/src/generated/waterx_prediction/order.js +237 -0
  73. package/dist/src/generated/waterx_prediction/outcome.d.ts +58 -0
  74. package/dist/src/generated/waterx_prediction/outcome.js +73 -0
  75. package/dist/src/generated/waterx_prediction/position.d.ts +150 -0
  76. package/dist/src/generated/waterx_prediction/position.js +200 -0
  77. package/dist/src/generated/waterx_prediction/view.d.ts +353 -0
  78. package/dist/src/generated/waterx_prediction/view.js +426 -0
  79. package/dist/src/generated/waterx_prediction/waterx_prediction.d.ts +1520 -0
  80. package/dist/src/generated/waterx_prediction/waterx_prediction.js +1550 -0
  81. package/dist/src/index.d.ts +22 -0
  82. package/dist/src/index.js +17 -0
  83. package/dist/src/prediction.d.ts +81 -0
  84. package/dist/src/prediction.js +220 -0
  85. package/dist/src/types.d.ts +81 -0
  86. package/dist/src/types.js +1 -0
  87. package/dist/src/user/account.d.ts +2 -0
  88. package/dist/src/user/account.js +1 -0
  89. package/dist/src/user/admin.d.ts +4 -0
  90. package/dist/src/user/admin.js +2 -0
  91. package/dist/src/user/index.d.ts +4 -0
  92. package/dist/src/user/index.js +2 -0
  93. package/dist/src/user/keeper.d.ts +2 -0
  94. package/dist/src/user/keeper.js +1 -0
  95. package/dist/src/user/order.d.ts +2 -0
  96. package/dist/src/user/order.js +1 -0
  97. package/dist/src/user/position.d.ts +2 -0
  98. package/dist/src/user/position.js +1 -0
  99. package/dist/src/utils/bcs.d.ts +1 -0
  100. package/dist/src/utils/bcs.js +1 -0
  101. package/dist/src/utils/index.d.ts +1 -0
  102. package/dist/src/utils/index.js +1 -0
  103. package/dist/src/utils.d.ts +29 -0
  104. package/dist/src/utils.js +170 -0
  105. package/package.json +62 -0
@@ -0,0 +1,1326 @@
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<USDX>` and credits the account via `put<USDX, 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<any, any>;
33
+ export declare const AdminCap: MoveStruct<any, any>;
34
+ export declare const AccountRegistry: MoveStruct<any, any>;
35
+ export declare const BalanceKey: MoveTuple<readonly [BcsType<boolean, boolean, "bool">], "@waterx/account::account::BalanceKey<phantom T>">;
36
+ export declare const ProtocolDataKey: MoveTuple<readonly [BcsType<boolean, boolean, "bool">], "@waterx/account::account::ProtocolDataKey<phantom PROTOCOL>">;
37
+ export declare const Delegate: MoveStruct<any, any>;
38
+ export declare const Account: MoveStruct<any, any>;
39
+ export declare const DepositRequest: MoveStruct<any, any>;
40
+ export declare const WithdrawRequest: MoveStruct<any, any>;
41
+ export interface PermNoneOptions {
42
+ package?: string;
43
+ arguments?: [
44
+ ];
45
+ }
46
+ export declare function permNone(options?: PermNoneOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
47
+ export interface PermWithdrawOptions {
48
+ package?: string;
49
+ arguments?: [
50
+ ];
51
+ }
52
+ export declare function permWithdraw(options?: PermWithdrawOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
53
+ export interface PermManageDelegatesOptions {
54
+ package?: string;
55
+ arguments?: [
56
+ ];
57
+ }
58
+ export declare function permManageDelegates(options?: PermManageDelegatesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
59
+ export interface PermReceiveOptions {
60
+ package?: string;
61
+ arguments?: [
62
+ ];
63
+ }
64
+ export declare function permReceive(options?: PermReceiveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
65
+ export interface PermAllOptions {
66
+ package?: string;
67
+ arguments?: [
68
+ ];
69
+ }
70
+ export declare function permAll(options?: PermAllOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
71
+ export interface AliasMaxLengthOptions {
72
+ package?: string;
73
+ arguments?: [
74
+ ];
75
+ }
76
+ export declare function aliasMaxLength(options?: AliasMaxLengthOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
77
+ export interface MaxAccountsPerOwnerOptions {
78
+ package?: string;
79
+ arguments?: [
80
+ ];
81
+ }
82
+ export declare function maxAccountsPerOwner(options?: MaxAccountsPerOwnerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
83
+ export interface MaxDelegatesPerAccountOptions {
84
+ package?: string;
85
+ arguments?: [
86
+ ];
87
+ }
88
+ export declare function maxDelegatesPerAccount(options?: MaxDelegatesPerAccountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
89
+ export interface MaxProtocolPermsPerDelegateOptions {
90
+ package?: string;
91
+ arguments?: [
92
+ ];
93
+ }
94
+ export declare function maxProtocolPermsPerDelegate(options?: MaxProtocolPermsPerDelegateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
95
+ export interface AssertVersionArguments {
96
+ registry: RawTransactionArgument<string>;
97
+ }
98
+ export interface AssertVersionOptions {
99
+ package?: string;
100
+ arguments: AssertVersionArguments | [
101
+ registry: RawTransactionArgument<string>
102
+ ];
103
+ }
104
+ export declare function assertVersion(options: AssertVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
105
+ export interface IsVersionAllowedArguments {
106
+ registry: RawTransactionArgument<string>;
107
+ v: RawTransactionArgument<number>;
108
+ }
109
+ export interface IsVersionAllowedOptions {
110
+ package?: string;
111
+ arguments: IsVersionAllowedArguments | [
112
+ registry: RawTransactionArgument<string>,
113
+ v: RawTransactionArgument<number>
114
+ ];
115
+ }
116
+ export declare function isVersionAllowed(options: IsVersionAllowedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
117
+ export interface AllowVersionArguments {
118
+ registry: RawTransactionArgument<string>;
119
+ _: RawTransactionArgument<string>;
120
+ v: RawTransactionArgument<number>;
121
+ }
122
+ export interface AllowVersionOptions {
123
+ package?: string;
124
+ arguments: AllowVersionArguments | [
125
+ registry: RawTransactionArgument<string>,
126
+ _: RawTransactionArgument<string>,
127
+ v: RawTransactionArgument<number>
128
+ ];
129
+ }
130
+ export declare function allowVersion(options: AllowVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
131
+ export interface DisallowVersionArguments {
132
+ registry: RawTransactionArgument<string>;
133
+ _: RawTransactionArgument<string>;
134
+ v: RawTransactionArgument<number>;
135
+ }
136
+ export interface DisallowVersionOptions {
137
+ package?: string;
138
+ arguments: DisallowVersionArguments | [
139
+ registry: RawTransactionArgument<string>,
140
+ _: RawTransactionArgument<string>,
141
+ v: RawTransactionArgument<number>
142
+ ];
143
+ }
144
+ export declare function disallowVersion(options: DisallowVersionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
145
+ export interface IsPausedArguments {
146
+ registry: RawTransactionArgument<string>;
147
+ }
148
+ export interface IsPausedOptions {
149
+ package?: string;
150
+ arguments: IsPausedArguments | [
151
+ registry: RawTransactionArgument<string>
152
+ ];
153
+ }
154
+ export declare function isPaused(options: IsPausedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
155
+ export interface AssertNotPausedArguments {
156
+ registry: RawTransactionArgument<string>;
157
+ }
158
+ export interface AssertNotPausedOptions {
159
+ package?: string;
160
+ arguments: AssertNotPausedArguments | [
161
+ registry: RawTransactionArgument<string>
162
+ ];
163
+ }
164
+ export declare function assertNotPaused(options: AssertNotPausedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
165
+ export interface PauseArguments {
166
+ registry: RawTransactionArgument<string>;
167
+ managerRequest: RawTransactionArgument<string>;
168
+ }
169
+ export interface PauseOptions {
170
+ package?: string;
171
+ arguments: PauseArguments | [
172
+ registry: RawTransactionArgument<string>,
173
+ managerRequest: RawTransactionArgument<string>
174
+ ];
175
+ }
176
+ export declare function pause(options: PauseOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
177
+ export interface UnpauseArguments {
178
+ registry: RawTransactionArgument<string>;
179
+ _: RawTransactionArgument<string>;
180
+ }
181
+ export interface UnpauseOptions {
182
+ package?: string;
183
+ arguments: UnpauseArguments | [
184
+ registry: RawTransactionArgument<string>,
185
+ _: RawTransactionArgument<string>
186
+ ];
187
+ }
188
+ export declare function unpause(options: UnpauseOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
189
+ export interface IsManagerArguments {
190
+ registry: RawTransactionArgument<string>;
191
+ addr: RawTransactionArgument<string>;
192
+ }
193
+ export interface IsManagerOptions {
194
+ package?: string;
195
+ arguments: IsManagerArguments | [
196
+ registry: RawTransactionArgument<string>,
197
+ addr: RawTransactionArgument<string>
198
+ ];
199
+ }
200
+ export declare function isManager(options: IsManagerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
201
+ export interface ManagersArguments {
202
+ registry: RawTransactionArgument<string>;
203
+ }
204
+ export interface ManagersOptions {
205
+ package?: string;
206
+ arguments: ManagersArguments | [
207
+ registry: RawTransactionArgument<string>
208
+ ];
209
+ }
210
+ export declare function managers(options: ManagersOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
211
+ export interface AddManagerArguments {
212
+ registry: RawTransactionArgument<string>;
213
+ _: RawTransactionArgument<string>;
214
+ manager: RawTransactionArgument<string>;
215
+ }
216
+ export interface AddManagerOptions {
217
+ package?: string;
218
+ arguments: AddManagerArguments | [
219
+ registry: RawTransactionArgument<string>,
220
+ _: RawTransactionArgument<string>,
221
+ manager: RawTransactionArgument<string>
222
+ ];
223
+ }
224
+ export declare function addManager(options: AddManagerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
225
+ export interface RemoveManagerArguments {
226
+ registry: RawTransactionArgument<string>;
227
+ _: RawTransactionArgument<string>;
228
+ manager: RawTransactionArgument<string>;
229
+ }
230
+ export interface RemoveManagerOptions {
231
+ package?: string;
232
+ arguments: RemoveManagerArguments | [
233
+ registry: RawTransactionArgument<string>,
234
+ _: RawTransactionArgument<string>,
235
+ manager: RawTransactionArgument<string>
236
+ ];
237
+ }
238
+ export declare function removeManager(options: RemoveManagerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
239
+ export interface IsProtocolWhitelistedArguments {
240
+ registry: RawTransactionArgument<string>;
241
+ }
242
+ export interface IsProtocolWhitelistedOptions {
243
+ package?: string;
244
+ arguments: IsProtocolWhitelistedArguments | [
245
+ registry: RawTransactionArgument<string>
246
+ ];
247
+ typeArguments: [
248
+ string
249
+ ];
250
+ }
251
+ export declare function isProtocolWhitelisted(options: IsProtocolWhitelistedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
252
+ export interface ProtocolWhitelistArguments {
253
+ registry: RawTransactionArgument<string>;
254
+ }
255
+ export interface ProtocolWhitelistOptions {
256
+ package?: string;
257
+ arguments: ProtocolWhitelistArguments | [
258
+ registry: RawTransactionArgument<string>
259
+ ];
260
+ }
261
+ export declare function protocolWhitelist(options: ProtocolWhitelistOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
262
+ export interface WhitelistProtocolArguments {
263
+ registry: RawTransactionArgument<string>;
264
+ _: RawTransactionArgument<string>;
265
+ }
266
+ export interface WhitelistProtocolOptions {
267
+ package?: string;
268
+ arguments: WhitelistProtocolArguments | [
269
+ registry: RawTransactionArgument<string>,
270
+ _: RawTransactionArgument<string>
271
+ ];
272
+ typeArguments: [
273
+ string
274
+ ];
275
+ }
276
+ /**
277
+ * Admin: add witness type `P` to the protocol whitelist. Only modules whose
278
+ * witness type is whitelisted can call `take` / `put` and the witness-gated
279
+ * data-slot helpers. Strict — aborts if `P` is already listed.
280
+ */
281
+ export declare function whitelistProtocol(options: WhitelistProtocolOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
282
+ export interface DelistProtocolArguments {
283
+ registry: RawTransactionArgument<string>;
284
+ _: RawTransactionArgument<string>;
285
+ }
286
+ export interface DelistProtocolOptions {
287
+ package?: string;
288
+ arguments: DelistProtocolArguments | [
289
+ registry: RawTransactionArgument<string>,
290
+ _: RawTransactionArgument<string>
291
+ ];
292
+ typeArguments: [
293
+ string
294
+ ];
295
+ }
296
+ /**
297
+ * Admin: remove witness type `P` from the protocol whitelist. After this, every
298
+ * `take<T, P>` / `put<T, P>` and witness-gated data-slot call aborts. Existing
299
+ * data slots and protocol-held balances are untouched — only future calls are
300
+ * blocked, so admin can pause a misbehaving protocol without stranding state on
301
+ * accounts.
302
+ */
303
+ export declare function delistProtocol(options: DelistProtocolOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
304
+ export interface IsDepositPolicyRegisteredArguments {
305
+ registry: RawTransactionArgument<string>;
306
+ }
307
+ export interface IsDepositPolicyRegisteredOptions {
308
+ package?: string;
309
+ arguments: IsDepositPolicyRegisteredArguments | [
310
+ registry: RawTransactionArgument<string>
311
+ ];
312
+ typeArguments: [
313
+ string
314
+ ];
315
+ }
316
+ export declare function isDepositPolicyRegistered(options: IsDepositPolicyRegisteredOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
317
+ export interface IsWithdrawPolicyRegisteredArguments {
318
+ registry: RawTransactionArgument<string>;
319
+ }
320
+ export interface IsWithdrawPolicyRegisteredOptions {
321
+ package?: string;
322
+ arguments: IsWithdrawPolicyRegisteredArguments | [
323
+ registry: RawTransactionArgument<string>
324
+ ];
325
+ typeArguments: [
326
+ string
327
+ ];
328
+ }
329
+ export declare function isWithdrawPolicyRegistered(options: IsWithdrawPolicyRegisteredOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
330
+ export interface DepositPolicyArguments {
331
+ registry: RawTransactionArgument<string>;
332
+ }
333
+ export interface DepositPolicyOptions {
334
+ package?: string;
335
+ arguments: DepositPolicyArguments | [
336
+ registry: RawTransactionArgument<string>
337
+ ];
338
+ typeArguments: [
339
+ string
340
+ ];
341
+ }
342
+ export declare function depositPolicy(options: DepositPolicyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
343
+ export interface WithdrawPolicyArguments {
344
+ registry: RawTransactionArgument<string>;
345
+ }
346
+ export interface WithdrawPolicyOptions {
347
+ package?: string;
348
+ arguments: WithdrawPolicyArguments | [
349
+ registry: RawTransactionArgument<string>
350
+ ];
351
+ typeArguments: [
352
+ string
353
+ ];
354
+ }
355
+ export declare function withdrawPolicy(options: WithdrawPolicyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
356
+ export interface DepositPoliciesArguments {
357
+ registry: RawTransactionArgument<string>;
358
+ }
359
+ export interface DepositPoliciesOptions {
360
+ package?: string;
361
+ arguments: DepositPoliciesArguments | [
362
+ registry: RawTransactionArgument<string>
363
+ ];
364
+ }
365
+ export declare function depositPolicies(options: DepositPoliciesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
366
+ export interface WithdrawPoliciesArguments {
367
+ registry: RawTransactionArgument<string>;
368
+ }
369
+ export interface WithdrawPoliciesOptions {
370
+ package?: string;
371
+ arguments: WithdrawPoliciesArguments | [
372
+ registry: RawTransactionArgument<string>
373
+ ];
374
+ }
375
+ export declare function withdrawPolicies(options: WithdrawPoliciesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
376
+ export interface RegisterDepositPolicyArguments {
377
+ registry: RawTransactionArgument<string>;
378
+ _: RawTransactionArgument<string>;
379
+ }
380
+ export interface RegisterDepositPolicyOptions {
381
+ package?: string;
382
+ arguments: RegisterDepositPolicyArguments | [
383
+ registry: RawTransactionArgument<string>,
384
+ _: RawTransactionArgument<string>
385
+ ];
386
+ typeArguments: [
387
+ string,
388
+ string
389
+ ];
390
+ }
391
+ /**
392
+ * Admin: register witness type `P` as the deposit policy for `T`. Only the module
393
+ * that defines `P` can construct one, so this binds `T`'s deposit flow exclusively
394
+ * to that module. Aborts if `T` is already registered — admin must
395
+ * `unregister_deposit_policy<T>` first to swap.
396
+ */
397
+ export declare function registerDepositPolicy(options: RegisterDepositPolicyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
398
+ export interface RegisterWithdrawPolicyArguments {
399
+ registry: RawTransactionArgument<string>;
400
+ _: RawTransactionArgument<string>;
401
+ }
402
+ export interface RegisterWithdrawPolicyOptions {
403
+ package?: string;
404
+ arguments: RegisterWithdrawPolicyArguments | [
405
+ registry: RawTransactionArgument<string>,
406
+ _: RawTransactionArgument<string>
407
+ ];
408
+ typeArguments: [
409
+ string,
410
+ string
411
+ ];
412
+ }
413
+ export declare function registerWithdrawPolicy(options: RegisterWithdrawPolicyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
414
+ export interface UnregisterDepositPolicyArguments {
415
+ registry: RawTransactionArgument<string>;
416
+ _: RawTransactionArgument<string>;
417
+ }
418
+ export interface UnregisterDepositPolicyOptions {
419
+ package?: string;
420
+ arguments: UnregisterDepositPolicyArguments | [
421
+ registry: RawTransactionArgument<string>,
422
+ _: RawTransactionArgument<string>
423
+ ];
424
+ typeArguments: [
425
+ string
426
+ ];
427
+ }
428
+ /**
429
+ * Admin: remove the deposit policy for `T`. Existing `Balance<T>` on accounts is
430
+ * unaffected; only new `request_deposit<T>` is blocked.
431
+ */
432
+ export declare function unregisterDepositPolicy(options: UnregisterDepositPolicyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
433
+ export interface UnregisterWithdrawPolicyArguments {
434
+ registry: RawTransactionArgument<string>;
435
+ _: RawTransactionArgument<string>;
436
+ }
437
+ export interface UnregisterWithdrawPolicyOptions {
438
+ package?: string;
439
+ arguments: UnregisterWithdrawPolicyArguments | [
440
+ registry: RawTransactionArgument<string>,
441
+ _: RawTransactionArgument<string>
442
+ ];
443
+ typeArguments: [
444
+ string
445
+ ];
446
+ }
447
+ export declare function unregisterWithdrawPolicy(options: UnregisterWithdrawPolicyOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
448
+ export interface CreateAccountArguments {
449
+ registry: RawTransactionArgument<string>;
450
+ senderRequest: RawTransactionArgument<string>;
451
+ alias: RawTransactionArgument<string>;
452
+ }
453
+ export interface CreateAccountOptions {
454
+ package?: string;
455
+ arguments: CreateAccountArguments | [
456
+ registry: RawTransactionArgument<string>,
457
+ senderRequest: RawTransactionArgument<string>,
458
+ alias: RawTransactionArgument<string>
459
+ ];
460
+ }
461
+ export declare function createAccount(options: CreateAccountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
462
+ export interface SetAliasArguments {
463
+ registry: RawTransactionArgument<string>;
464
+ senderRequest: RawTransactionArgument<string>;
465
+ accountId: RawTransactionArgument<string>;
466
+ alias: RawTransactionArgument<string>;
467
+ }
468
+ export interface SetAliasOptions {
469
+ package?: string;
470
+ arguments: SetAliasArguments | [
471
+ registry: RawTransactionArgument<string>,
472
+ senderRequest: RawTransactionArgument<string>,
473
+ accountId: RawTransactionArgument<string>,
474
+ alias: RawTransactionArgument<string>
475
+ ];
476
+ }
477
+ export declare function setAlias(options: SetAliasOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
478
+ export interface AddDelegateArguments {
479
+ registry: RawTransactionArgument<string>;
480
+ senderRequest: RawTransactionArgument<string>;
481
+ accountId: RawTransactionArgument<string>;
482
+ delegateAddress: RawTransactionArgument<string>;
483
+ alias: RawTransactionArgument<string>;
484
+ permissions: RawTransactionArgument<number>;
485
+ expiresAtMs: RawTransactionArgument<number | bigint | null>;
486
+ }
487
+ export interface AddDelegateOptions {
488
+ package?: string;
489
+ arguments: AddDelegateArguments | [
490
+ registry: RawTransactionArgument<string>,
491
+ senderRequest: RawTransactionArgument<string>,
492
+ accountId: RawTransactionArgument<string>,
493
+ delegateAddress: RawTransactionArgument<string>,
494
+ alias: RawTransactionArgument<string>,
495
+ permissions: RawTransactionArgument<number>,
496
+ expiresAtMs: RawTransactionArgument<number | bigint | null>
497
+ ];
498
+ }
499
+ export declare function addDelegate(options: AddDelegateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
500
+ export interface RemoveDelegateArguments {
501
+ registry: RawTransactionArgument<string>;
502
+ senderRequest: RawTransactionArgument<string>;
503
+ accountId: RawTransactionArgument<string>;
504
+ delegateAddress: RawTransactionArgument<string>;
505
+ }
506
+ export interface RemoveDelegateOptions {
507
+ package?: string;
508
+ arguments: RemoveDelegateArguments | [
509
+ registry: RawTransactionArgument<string>,
510
+ senderRequest: RawTransactionArgument<string>,
511
+ accountId: RawTransactionArgument<string>,
512
+ delegateAddress: RawTransactionArgument<string>
513
+ ];
514
+ }
515
+ export declare function removeDelegate(options: RemoveDelegateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
516
+ export interface UpdateDelegateArguments {
517
+ registry: RawTransactionArgument<string>;
518
+ senderRequest: RawTransactionArgument<string>;
519
+ accountId: RawTransactionArgument<string>;
520
+ delegateAddress: RawTransactionArgument<string>;
521
+ alias: RawTransactionArgument<string>;
522
+ permissions: RawTransactionArgument<number>;
523
+ expiresAtMs: RawTransactionArgument<number | bigint | null>;
524
+ }
525
+ export interface UpdateDelegateOptions {
526
+ package?: string;
527
+ arguments: UpdateDelegateArguments | [
528
+ registry: RawTransactionArgument<string>,
529
+ senderRequest: RawTransactionArgument<string>,
530
+ accountId: RawTransactionArgument<string>,
531
+ delegateAddress: RawTransactionArgument<string>,
532
+ alias: RawTransactionArgument<string>,
533
+ permissions: RawTransactionArgument<number>,
534
+ expiresAtMs: RawTransactionArgument<number | bigint | null>
535
+ ];
536
+ }
537
+ export declare function updateDelegate(options: UpdateDelegateOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
538
+ export interface SetDelegateProtocolPermissionArguments {
539
+ registry: RawTransactionArgument<string>;
540
+ senderRequest: RawTransactionArgument<string>;
541
+ accountId: RawTransactionArgument<string>;
542
+ delegateAddress: RawTransactionArgument<string>;
543
+ permissions: RawTransactionArgument<number>;
544
+ }
545
+ export interface SetDelegateProtocolPermissionOptions {
546
+ package?: string;
547
+ arguments: SetDelegateProtocolPermissionArguments | [
548
+ registry: RawTransactionArgument<string>,
549
+ senderRequest: RawTransactionArgument<string>,
550
+ accountId: RawTransactionArgument<string>,
551
+ delegateAddress: RawTransactionArgument<string>,
552
+ permissions: RawTransactionArgument<number>
553
+ ];
554
+ typeArguments: [
555
+ string
556
+ ];
557
+ }
558
+ export declare function setDelegateProtocolPermission(options: SetDelegateProtocolPermissionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
559
+ export interface UnsetDelegateProtocolPermissionArguments {
560
+ registry: RawTransactionArgument<string>;
561
+ senderRequest: RawTransactionArgument<string>;
562
+ accountId: RawTransactionArgument<string>;
563
+ delegateAddress: RawTransactionArgument<string>;
564
+ }
565
+ export interface UnsetDelegateProtocolPermissionOptions {
566
+ package?: string;
567
+ arguments: UnsetDelegateProtocolPermissionArguments | [
568
+ registry: RawTransactionArgument<string>,
569
+ senderRequest: RawTransactionArgument<string>,
570
+ accountId: RawTransactionArgument<string>,
571
+ delegateAddress: RawTransactionArgument<string>
572
+ ];
573
+ typeArguments: [
574
+ string
575
+ ];
576
+ }
577
+ export declare function unsetDelegateProtocolPermission(options: UnsetDelegateProtocolPermissionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
578
+ export interface RequestDepositArguments {
579
+ registry: RawTransactionArgument<string>;
580
+ accountId: RawTransactionArgument<string>;
581
+ coin: RawTransactionArgument<string>;
582
+ extraData: RawTransactionArgument<Array<number>>;
583
+ }
584
+ export interface RequestDepositOptions {
585
+ package?: string;
586
+ arguments: RequestDepositArguments | [
587
+ registry: RawTransactionArgument<string>,
588
+ accountId: RawTransactionArgument<string>,
589
+ coin: RawTransactionArgument<string>,
590
+ extraData: RawTransactionArgument<Array<number>>
591
+ ];
592
+ typeArguments: [
593
+ string
594
+ ];
595
+ }
596
+ /**
597
+ * Wraps an in-PTB `Coin<T>` into a `DepositRequest<T>` for the account.
598
+ * Permissionless — anyone can pay into any account, since the policy (not the
599
+ * framework) decides what the eventual credited asset is. `T` must have a
600
+ * registered deposit policy; aborts otherwise.
601
+ */
602
+ export declare function requestDeposit(options: RequestDepositOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
603
+ export interface RequestDepositFromReceivingsArguments {
604
+ registry: RawTransactionArgument<string>;
605
+ accountId: RawTransactionArgument<string>;
606
+ receivings: RawTransactionArgument<Array<string>>;
607
+ extraData: RawTransactionArgument<Array<number>>;
608
+ }
609
+ export interface RequestDepositFromReceivingsOptions {
610
+ package?: string;
611
+ arguments: RequestDepositFromReceivingsArguments | [
612
+ registry: RawTransactionArgument<string>,
613
+ accountId: RawTransactionArgument<string>,
614
+ receivings: RawTransactionArgument<Array<string>>,
615
+ extraData: RawTransactionArgument<Array<number>>
616
+ ];
617
+ typeArguments: [
618
+ string
619
+ ];
620
+ }
621
+ /**
622
+ * Drains `Receiving<Coin<T>>` entries addressed to the account's UID into a single
623
+ * merged `Coin<T>` and wraps it as a `DepositRequest<T>`. Used when a user (or
624
+ * anyone) previously `transfer_coin`-ed a `Coin<T>` onto the account address and
625
+ * now wants to fold it into custody. Permissionless for the same reason as
626
+ * `request_deposit<T>`.
627
+ */
628
+ export declare function requestDepositFromReceivings(options: RequestDepositFromReceivingsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
629
+ export interface ConsumeDepositArguments<P extends BcsType<any>> {
630
+ registry: RawTransactionArgument<string>;
631
+ req: RawTransactionArgument<string>;
632
+ Witness: RawTransactionArgument<P>;
633
+ }
634
+ export interface ConsumeDepositOptions<P extends BcsType<any>> {
635
+ package?: string;
636
+ arguments: ConsumeDepositArguments<P> | [
637
+ registry: RawTransactionArgument<string>,
638
+ req: RawTransactionArgument<string>,
639
+ Witness: RawTransactionArgument<P>
640
+ ];
641
+ typeArguments: [
642
+ string,
643
+ string
644
+ ];
645
+ }
646
+ /**
647
+ * Policy-side unwrap. Verifies that `P` is the registered deposit policy for `T`,
648
+ * then destructures the hot potato. The policy module is responsible for what
649
+ * happens next — typically swap / convert `Balance<T>` to some `Balance<T_OUT>`
650
+ * and call `put<T_OUT, P>` to credit the account.
651
+ */
652
+ export declare function consumeDeposit<P extends BcsType<any>>(options: ConsumeDepositOptions<P>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
653
+ export interface RequestWithdrawArguments {
654
+ registry: RawTransactionArgument<string>;
655
+ senderRequest: RawTransactionArgument<string>;
656
+ accountId: RawTransactionArgument<string>;
657
+ amount: RawTransactionArgument<number | bigint>;
658
+ recipient: RawTransactionArgument<string>;
659
+ extraData: RawTransactionArgument<Array<number>>;
660
+ }
661
+ export interface RequestWithdrawOptions {
662
+ package?: string;
663
+ arguments: RequestWithdrawArguments | [
664
+ registry: RawTransactionArgument<string>,
665
+ senderRequest: RawTransactionArgument<string>,
666
+ accountId: RawTransactionArgument<string>,
667
+ amount: RawTransactionArgument<number | bigint>,
668
+ recipient: RawTransactionArgument<string>,
669
+ extraData: RawTransactionArgument<Array<number>>
670
+ ];
671
+ typeArguments: [
672
+ string
673
+ ];
674
+ }
675
+ /**
676
+ * Debits `amount` of the account's stored `Balance<T>` and packages it into a
677
+ * `WithdrawRequest<T>` for the registered withdraw policy. Auth (`PERM_WITHDRAW`
678
+ * on `T`'s account) and pause are checked here, not in `consume_withdraw`.
679
+ */
680
+ export declare function requestWithdraw(options: RequestWithdrawOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
681
+ export interface ConsumeWithdrawArguments<P extends BcsType<any>> {
682
+ registry: RawTransactionArgument<string>;
683
+ req: RawTransactionArgument<string>;
684
+ Witness: RawTransactionArgument<P>;
685
+ }
686
+ export interface ConsumeWithdrawOptions<P extends BcsType<any>> {
687
+ package?: string;
688
+ arguments: ConsumeWithdrawArguments<P> | [
689
+ registry: RawTransactionArgument<string>,
690
+ req: RawTransactionArgument<string>,
691
+ Witness: RawTransactionArgument<P>
692
+ ];
693
+ typeArguments: [
694
+ string,
695
+ string
696
+ ];
697
+ }
698
+ /**
699
+ * Policy-side unwrap. Verifies that `P` is the registered withdraw policy for `T`,
700
+ * then destructures the hot potato. The policy module decides what to do with the
701
+ * `Balance<T>` (transfer to `recipient` as `Coin<T>`, swap to another asset and
702
+ * transfer, queue for later settlement, etc.).
703
+ */
704
+ export declare function consumeWithdraw<P extends BcsType<any>>(options: ConsumeWithdrawOptions<P>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
705
+ export interface TransferCoinArguments {
706
+ registry: RawTransactionArgument<string>;
707
+ accountId: RawTransactionArgument<string>;
708
+ coin: RawTransactionArgument<string>;
709
+ }
710
+ export interface TransferCoinOptions {
711
+ package?: string;
712
+ arguments: TransferCoinArguments | [
713
+ registry: RawTransactionArgument<string>,
714
+ accountId: RawTransactionArgument<string>,
715
+ coin: RawTransactionArgument<string>
716
+ ];
717
+ typeArguments: [
718
+ string
719
+ ];
720
+ }
721
+ /**
722
+ * TTOs a `Coin<T>` to the account's UID address. The coin sits there until someone
723
+ * calls `request_deposit_from_receivings<T>` (which requires a registered deposit
724
+ * policy that then folds the coin into the account's stored balance) or
725
+ * `receive<Coin<T>>` (owner / `PERM_RECEIVE` delegate, no policy needed). Useful
726
+ * for async / cross-PTB deposits and for routing protocol payouts (e.g. reward
727
+ * claims) into an account when `T` has no deposit policy.
728
+ */
729
+ export declare function transferCoin(options: TransferCoinOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
730
+ export interface ReceiveArguments {
731
+ registry: RawTransactionArgument<string>;
732
+ senderRequest: RawTransactionArgument<string>;
733
+ accountId: RawTransactionArgument<string>;
734
+ receiving: RawTransactionArgument<string>;
735
+ }
736
+ export interface ReceiveOptions {
737
+ package?: string;
738
+ arguments: ReceiveArguments | [
739
+ registry: RawTransactionArgument<string>,
740
+ senderRequest: RawTransactionArgument<string>,
741
+ accountId: RawTransactionArgument<string>,
742
+ receiving: RawTransactionArgument<string>
743
+ ];
744
+ typeArguments: [
745
+ string
746
+ ];
747
+ }
748
+ /**
749
+ * Account-owner drain of a TTO'd object on the account's UID. Generic over
750
+ * `T: key + store` — works for `Coin<X>`, NFTs, or any other transferable object
751
+ * externally transferred to the account address. Auth: account owner or a
752
+ * `PERM_RECEIVE` delegate (kept separate from `PERM_WITHDRAW` so reward-collection
753
+ * rights don't imply balance-drain rights). Returns the received object to the
754
+ * caller's PTB. Bypasses the deposit-policy flow — use this for tokens / objects
755
+ * that have no registered deposit policy (e.g. reward coins TTO'd via
756
+ * `transfer_coin` from a protocol's claim path).
757
+ */
758
+ export declare function receive(options: ReceiveOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
759
+ export interface TakeArguments<P extends BcsType<any>> {
760
+ registry: RawTransactionArgument<string>;
761
+ senderRequest: RawTransactionArgument<string>;
762
+ accountId: RawTransactionArgument<string>;
763
+ amount: RawTransactionArgument<number | bigint>;
764
+ Witness: RawTransactionArgument<P>;
765
+ }
766
+ export interface TakeOptions<P extends BcsType<any>> {
767
+ package?: string;
768
+ arguments: TakeArguments<P> | [
769
+ registry: RawTransactionArgument<string>,
770
+ senderRequest: RawTransactionArgument<string>,
771
+ accountId: RawTransactionArgument<string>,
772
+ amount: RawTransactionArgument<number | bigint>,
773
+ Witness: RawTransactionArgument<P>
774
+ ];
775
+ typeArguments: [
776
+ string,
777
+ string
778
+ ];
779
+ }
780
+ /**
781
+ * Splits `amount` of `Balance<T>` off `account_id` for protocol `P` to use. Three
782
+ * gates compose:
783
+ *
784
+ * 1. **Witness privacy.** Only the module that defines `P` can produce a value of
785
+ * `P`, so only that module can call `take<T, P>`.
786
+ * 2. **Protocol whitelist.** `P` must be in `protocol_whitelist` (admin-managed).
787
+ * Stops any deployed module that happens to own a `drop` witness from draining
788
+ * accounts.
789
+ * 3. **Per-account auth.** `sender_request.address()` must be the account's owner
790
+ * OR a non-expired delegate — even a legitimate whitelisted protocol cannot
791
+ * move funds out of an account that doesn't know the caller. This mirrors EOA
792
+ * semantics: the account never pays out without the owner (or a delegated key)
793
+ * signing. Per-action bit semantics on `protocol_permissions[P]` remain the
794
+ * protocol's responsibility on top of this.
795
+ *
796
+ * No deposit/withdraw policy is consulted — `take` / `put` are the
797
+ * protocol↔account flow and orthogonal to the external deposit/withdraw path that
798
+ * policies own.
799
+ */
800
+ export declare function take<P extends BcsType<any>>(options: TakeOptions<P>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
801
+ export interface PutArguments<P extends BcsType<any>> {
802
+ registry: RawTransactionArgument<string>;
803
+ accountId: RawTransactionArgument<string>;
804
+ bal: RawTransactionArgument<string>;
805
+ Witness: RawTransactionArgument<P>;
806
+ }
807
+ export interface PutOptions<P extends BcsType<any>> {
808
+ package?: string;
809
+ arguments: PutArguments<P> | [
810
+ registry: RawTransactionArgument<string>,
811
+ accountId: RawTransactionArgument<string>,
812
+ bal: RawTransactionArgument<string>,
813
+ Witness: RawTransactionArgument<P>
814
+ ];
815
+ typeArguments: [
816
+ string,
817
+ string
818
+ ];
819
+ }
820
+ /**
821
+ * Joins `bal` into `account_id`'s stored `Balance<T>`. Symmetric to `take<T, P>`.
822
+ * Zero-value balances are silently destroyed.
823
+ */
824
+ export declare function put<P extends BcsType<any>>(options: PutOptions<P>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
825
+ export interface HasAccountArguments {
826
+ registry: RawTransactionArgument<string>;
827
+ accountId: RawTransactionArgument<string>;
828
+ }
829
+ export interface HasAccountOptions {
830
+ package?: string;
831
+ arguments: HasAccountArguments | [
832
+ registry: RawTransactionArgument<string>,
833
+ accountId: RawTransactionArgument<string>
834
+ ];
835
+ }
836
+ export declare function hasAccount(options: HasAccountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
837
+ export interface IsAccountAuthorizedArguments {
838
+ registry: RawTransactionArgument<string>;
839
+ accountId: RawTransactionArgument<string>;
840
+ addr: RawTransactionArgument<string>;
841
+ nowMs: RawTransactionArgument<number | bigint>;
842
+ }
843
+ export interface IsAccountAuthorizedOptions {
844
+ package?: string;
845
+ arguments: IsAccountAuthorizedArguments | [
846
+ registry: RawTransactionArgument<string>,
847
+ accountId: RawTransactionArgument<string>,
848
+ addr: RawTransactionArgument<string>,
849
+ nowMs: RawTransactionArgument<number | bigint>
850
+ ];
851
+ }
852
+ /**
853
+ * Returns `true` when `addr` is the account's owner or a non-expired delegate,
854
+ * regardless of permission bits. The framework's "is this address known to the
855
+ * account?" gate — per-action bit semantics are the protocol's responsibility on
856
+ * top of this.
857
+ */
858
+ export declare function isAccountAuthorized(options: IsAccountAuthorizedOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
859
+ export interface AccountCountArguments {
860
+ registry: RawTransactionArgument<string>;
861
+ owner: RawTransactionArgument<string>;
862
+ }
863
+ export interface AccountCountOptions {
864
+ package?: string;
865
+ arguments: AccountCountArguments | [
866
+ registry: RawTransactionArgument<string>,
867
+ owner: RawTransactionArgument<string>
868
+ ];
869
+ }
870
+ export declare function accountCount(options: AccountCountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
871
+ export interface AccountIdsArguments {
872
+ registry: RawTransactionArgument<string>;
873
+ owner: RawTransactionArgument<string>;
874
+ }
875
+ export interface AccountIdsOptions {
876
+ package?: string;
877
+ arguments: AccountIdsArguments | [
878
+ registry: RawTransactionArgument<string>,
879
+ owner: RawTransactionArgument<string>
880
+ ];
881
+ }
882
+ export declare function accountIds(options: AccountIdsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
883
+ export interface EffectivePermissionsArguments {
884
+ registry: RawTransactionArgument<string>;
885
+ accountId: RawTransactionArgument<string>;
886
+ addr: RawTransactionArgument<string>;
887
+ nowMs: RawTransactionArgument<number | bigint>;
888
+ }
889
+ export interface EffectivePermissionsOptions {
890
+ package?: string;
891
+ arguments: EffectivePermissionsArguments | [
892
+ registry: RawTransactionArgument<string>,
893
+ accountId: RawTransactionArgument<string>,
894
+ addr: RawTransactionArgument<string>,
895
+ nowMs: RawTransactionArgument<number | bigint>
896
+ ];
897
+ }
898
+ /**
899
+ * Framework-level effective permissions (used by `request_withdraw`). Owner →
900
+ * `PERM_ALL`. Delegate → its `permissions` bitmap unless expired. Stranger →
901
+ * `PERM_NONE`.
902
+ */
903
+ export declare function effectivePermissions(options: EffectivePermissionsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
904
+ export interface HasPermissionArguments {
905
+ registry: RawTransactionArgument<string>;
906
+ accountId: RawTransactionArgument<string>;
907
+ addr: RawTransactionArgument<string>;
908
+ permission: RawTransactionArgument<number>;
909
+ nowMs: RawTransactionArgument<number | bigint>;
910
+ }
911
+ export interface HasPermissionOptions {
912
+ package?: string;
913
+ arguments: HasPermissionArguments | [
914
+ registry: RawTransactionArgument<string>,
915
+ accountId: RawTransactionArgument<string>,
916
+ addr: RawTransactionArgument<string>,
917
+ permission: RawTransactionArgument<number>,
918
+ nowMs: RawTransactionArgument<number | bigint>
919
+ ];
920
+ }
921
+ export declare function hasPermission(options: HasPermissionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
922
+ export interface EffectiveProtocolPermissionsArguments {
923
+ registry: RawTransactionArgument<string>;
924
+ accountId: RawTransactionArgument<string>;
925
+ addr: RawTransactionArgument<string>;
926
+ nowMs: RawTransactionArgument<number | bigint>;
927
+ }
928
+ export interface EffectiveProtocolPermissionsOptions {
929
+ package?: string;
930
+ arguments: EffectiveProtocolPermissionsArguments | [
931
+ registry: RawTransactionArgument<string>,
932
+ accountId: RawTransactionArgument<string>,
933
+ addr: RawTransactionArgument<string>,
934
+ nowMs: RawTransactionArgument<number | bigint>
935
+ ];
936
+ typeArguments: [
937
+ string
938
+ ];
939
+ }
940
+ /**
941
+ * Per-protocol effective permissions (used by protocol modules). Owner →
942
+ * `PERM_ALL` for any protocol. Delegate → the bitmap stored at
943
+ * `protocol_permissions[TypeName(PROTOCOL)]`, or `PERM_NONE` if absent or expired.
944
+ * Stranger → `PERM_NONE`.
945
+ */
946
+ export declare function effectiveProtocolPermissions(options: EffectiveProtocolPermissionsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
947
+ export interface HasProtocolPermissionArguments {
948
+ registry: RawTransactionArgument<string>;
949
+ accountId: RawTransactionArgument<string>;
950
+ addr: RawTransactionArgument<string>;
951
+ permission: RawTransactionArgument<number>;
952
+ nowMs: RawTransactionArgument<number | bigint>;
953
+ }
954
+ export interface HasProtocolPermissionOptions {
955
+ package?: string;
956
+ arguments: HasProtocolPermissionArguments | [
957
+ registry: RawTransactionArgument<string>,
958
+ accountId: RawTransactionArgument<string>,
959
+ addr: RawTransactionArgument<string>,
960
+ permission: RawTransactionArgument<number>,
961
+ nowMs: RawTransactionArgument<number | bigint>
962
+ ];
963
+ typeArguments: [
964
+ string
965
+ ];
966
+ }
967
+ export declare function hasProtocolPermission(options: HasProtocolPermissionOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
968
+ export interface AccountBalanceArguments {
969
+ registry: RawTransactionArgument<string>;
970
+ accountId: RawTransactionArgument<string>;
971
+ }
972
+ export interface AccountBalanceOptions {
973
+ package?: string;
974
+ arguments: AccountBalanceArguments | [
975
+ registry: RawTransactionArgument<string>,
976
+ accountId: RawTransactionArgument<string>
977
+ ];
978
+ typeArguments: [
979
+ string
980
+ ];
981
+ }
982
+ export declare function accountBalance(options: AccountBalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
983
+ export interface AccountBalancesArguments {
984
+ registry: RawTransactionArgument<string>;
985
+ accountId: RawTransactionArgument<string>;
986
+ }
987
+ export interface AccountBalancesOptions {
988
+ package?: string;
989
+ arguments: AccountBalancesArguments | [
990
+ registry: RawTransactionArgument<string>,
991
+ accountId: RawTransactionArgument<string>
992
+ ];
993
+ }
994
+ export declare function accountBalances(options: AccountBalancesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
995
+ export interface BalanceArguments {
996
+ registry: RawTransactionArgument<string>;
997
+ }
998
+ export interface BalanceOptions {
999
+ package?: string;
1000
+ arguments: BalanceArguments | [
1001
+ registry: RawTransactionArgument<string>
1002
+ ];
1003
+ typeArguments: [
1004
+ string
1005
+ ];
1006
+ }
1007
+ /**
1008
+ * Total `Balance<T>` currently held across all accounts. Counter; not derived from
1009
+ * iterating accounts. Excludes balance held by protocols (after `take`) and
1010
+ * balance sitting in hot-potato requests in flight.
1011
+ */
1012
+ export declare function balance(options: BalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1013
+ export interface AccountOwnerArguments {
1014
+ account: RawTransactionArgument<string>;
1015
+ }
1016
+ export interface AccountOwnerOptions {
1017
+ package?: string;
1018
+ arguments: AccountOwnerArguments | [
1019
+ account: RawTransactionArgument<string>
1020
+ ];
1021
+ }
1022
+ export declare function accountOwner(options: AccountOwnerOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1023
+ export interface AccountAliasArguments {
1024
+ account: RawTransactionArgument<string>;
1025
+ }
1026
+ export interface AccountAliasOptions {
1027
+ package?: string;
1028
+ arguments: AccountAliasArguments | [
1029
+ account: RawTransactionArgument<string>
1030
+ ];
1031
+ }
1032
+ export declare function accountAlias(options: AccountAliasOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1033
+ export interface AccountIdArguments {
1034
+ account: RawTransactionArgument<string>;
1035
+ }
1036
+ export interface AccountIdOptions {
1037
+ package?: string;
1038
+ arguments: AccountIdArguments | [
1039
+ account: RawTransactionArgument<string>
1040
+ ];
1041
+ }
1042
+ export declare function accountId(options: AccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1043
+ export interface AccountAddressArguments {
1044
+ account: RawTransactionArgument<string>;
1045
+ }
1046
+ export interface AccountAddressOptions {
1047
+ package?: string;
1048
+ arguments: AccountAddressArguments | [
1049
+ account: RawTransactionArgument<string>
1050
+ ];
1051
+ }
1052
+ export declare function accountAddress(options: AccountAddressOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1053
+ export interface AccountDelegatesArguments {
1054
+ account: RawTransactionArgument<string>;
1055
+ }
1056
+ export interface AccountDelegatesOptions {
1057
+ package?: string;
1058
+ arguments: AccountDelegatesArguments | [
1059
+ account: RawTransactionArgument<string>
1060
+ ];
1061
+ }
1062
+ export declare function accountDelegates(options: AccountDelegatesOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1063
+ export interface AccountBalancesFieldArguments {
1064
+ account: RawTransactionArgument<string>;
1065
+ }
1066
+ export interface AccountBalancesFieldOptions {
1067
+ package?: string;
1068
+ arguments: AccountBalancesFieldArguments | [
1069
+ account: RawTransactionArgument<string>
1070
+ ];
1071
+ }
1072
+ export declare function accountBalancesField(options: AccountBalancesFieldOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1073
+ export interface DelegateAddressArguments {
1074
+ delegate: RawTransactionArgument<string>;
1075
+ }
1076
+ export interface DelegateAddressOptions {
1077
+ package?: string;
1078
+ arguments: DelegateAddressArguments | [
1079
+ delegate: RawTransactionArgument<string>
1080
+ ];
1081
+ }
1082
+ export declare function delegateAddress(options: DelegateAddressOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1083
+ export interface DelegateAliasArguments {
1084
+ delegate: RawTransactionArgument<string>;
1085
+ }
1086
+ export interface DelegateAliasOptions {
1087
+ package?: string;
1088
+ arguments: DelegateAliasArguments | [
1089
+ delegate: RawTransactionArgument<string>
1090
+ ];
1091
+ }
1092
+ export declare function delegateAlias(options: DelegateAliasOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1093
+ export interface DelegatePermissionsArguments {
1094
+ delegate: RawTransactionArgument<string>;
1095
+ }
1096
+ export interface DelegatePermissionsOptions {
1097
+ package?: string;
1098
+ arguments: DelegatePermissionsArguments | [
1099
+ delegate: RawTransactionArgument<string>
1100
+ ];
1101
+ }
1102
+ export declare function delegatePermissions(options: DelegatePermissionsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1103
+ export interface DelegateProtocolPermissionsArguments {
1104
+ delegate: RawTransactionArgument<string>;
1105
+ }
1106
+ export interface DelegateProtocolPermissionsOptions {
1107
+ package?: string;
1108
+ arguments: DelegateProtocolPermissionsArguments | [
1109
+ delegate: RawTransactionArgument<string>
1110
+ ];
1111
+ }
1112
+ export declare function delegateProtocolPermissions(options: DelegateProtocolPermissionsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1113
+ export interface DelegateExpiresAtMsArguments {
1114
+ delegate: RawTransactionArgument<string>;
1115
+ }
1116
+ export interface DelegateExpiresAtMsOptions {
1117
+ package?: string;
1118
+ arguments: DelegateExpiresAtMsArguments | [
1119
+ delegate: RawTransactionArgument<string>
1120
+ ];
1121
+ }
1122
+ export declare function delegateExpiresAtMs(options: DelegateExpiresAtMsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1123
+ export interface DepositRequestAccountIdArguments {
1124
+ r: RawTransactionArgument<string>;
1125
+ }
1126
+ export interface DepositRequestAccountIdOptions {
1127
+ package?: string;
1128
+ arguments: DepositRequestAccountIdArguments | [
1129
+ r: RawTransactionArgument<string>
1130
+ ];
1131
+ typeArguments: [
1132
+ string
1133
+ ];
1134
+ }
1135
+ export declare function depositRequestAccountId(options: DepositRequestAccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1136
+ export interface DepositRequestBalanceArguments {
1137
+ r: RawTransactionArgument<string>;
1138
+ }
1139
+ export interface DepositRequestBalanceOptions {
1140
+ package?: string;
1141
+ arguments: DepositRequestBalanceArguments | [
1142
+ r: RawTransactionArgument<string>
1143
+ ];
1144
+ typeArguments: [
1145
+ string
1146
+ ];
1147
+ }
1148
+ export declare function depositRequestBalance(options: DepositRequestBalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1149
+ export interface DepositRequestAmountArguments {
1150
+ r: RawTransactionArgument<string>;
1151
+ }
1152
+ export interface DepositRequestAmountOptions {
1153
+ package?: string;
1154
+ arguments: DepositRequestAmountArguments | [
1155
+ r: RawTransactionArgument<string>
1156
+ ];
1157
+ typeArguments: [
1158
+ string
1159
+ ];
1160
+ }
1161
+ export declare function depositRequestAmount(options: DepositRequestAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1162
+ export interface DepositRequestExtraDataArguments {
1163
+ r: RawTransactionArgument<string>;
1164
+ }
1165
+ export interface DepositRequestExtraDataOptions {
1166
+ package?: string;
1167
+ arguments: DepositRequestExtraDataArguments | [
1168
+ r: RawTransactionArgument<string>
1169
+ ];
1170
+ typeArguments: [
1171
+ string
1172
+ ];
1173
+ }
1174
+ export declare function depositRequestExtraData(options: DepositRequestExtraDataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1175
+ export interface WithdrawRequestAccountIdArguments {
1176
+ r: RawTransactionArgument<string>;
1177
+ }
1178
+ export interface WithdrawRequestAccountIdOptions {
1179
+ package?: string;
1180
+ arguments: WithdrawRequestAccountIdArguments | [
1181
+ r: RawTransactionArgument<string>
1182
+ ];
1183
+ typeArguments: [
1184
+ string
1185
+ ];
1186
+ }
1187
+ export declare function withdrawRequestAccountId(options: WithdrawRequestAccountIdOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1188
+ export interface WithdrawRequestBalanceArguments {
1189
+ r: RawTransactionArgument<string>;
1190
+ }
1191
+ export interface WithdrawRequestBalanceOptions {
1192
+ package?: string;
1193
+ arguments: WithdrawRequestBalanceArguments | [
1194
+ r: RawTransactionArgument<string>
1195
+ ];
1196
+ typeArguments: [
1197
+ string
1198
+ ];
1199
+ }
1200
+ export declare function withdrawRequestBalance(options: WithdrawRequestBalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1201
+ export interface WithdrawRequestAmountArguments {
1202
+ r: RawTransactionArgument<string>;
1203
+ }
1204
+ export interface WithdrawRequestAmountOptions {
1205
+ package?: string;
1206
+ arguments: WithdrawRequestAmountArguments | [
1207
+ r: RawTransactionArgument<string>
1208
+ ];
1209
+ typeArguments: [
1210
+ string
1211
+ ];
1212
+ }
1213
+ export declare function withdrawRequestAmount(options: WithdrawRequestAmountOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1214
+ export interface WithdrawRequestRecipientArguments {
1215
+ r: RawTransactionArgument<string>;
1216
+ }
1217
+ export interface WithdrawRequestRecipientOptions {
1218
+ package?: string;
1219
+ arguments: WithdrawRequestRecipientArguments | [
1220
+ r: RawTransactionArgument<string>
1221
+ ];
1222
+ typeArguments: [
1223
+ string
1224
+ ];
1225
+ }
1226
+ export declare function withdrawRequestRecipient(options: WithdrawRequestRecipientOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1227
+ export interface WithdrawRequestExtraDataArguments {
1228
+ r: RawTransactionArgument<string>;
1229
+ }
1230
+ export interface WithdrawRequestExtraDataOptions {
1231
+ package?: string;
1232
+ arguments: WithdrawRequestExtraDataArguments | [
1233
+ r: RawTransactionArgument<string>
1234
+ ];
1235
+ typeArguments: [
1236
+ string
1237
+ ];
1238
+ }
1239
+ export declare function withdrawRequestExtraData(options: WithdrawRequestExtraDataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1240
+ export interface NewDataArguments<PROTOCOL extends BcsType<any>, ProtocolData extends BcsType<any>> {
1241
+ registry: RawTransactionArgument<string>;
1242
+ accountId: RawTransactionArgument<string>;
1243
+ Witness: RawTransactionArgument<PROTOCOL>;
1244
+ data: RawTransactionArgument<ProtocolData>;
1245
+ }
1246
+ export interface NewDataOptions<PROTOCOL extends BcsType<any>, ProtocolData extends BcsType<any>> {
1247
+ package?: string;
1248
+ arguments: NewDataArguments<PROTOCOL, ProtocolData> | [
1249
+ registry: RawTransactionArgument<string>,
1250
+ accountId: RawTransactionArgument<string>,
1251
+ Witness: RawTransactionArgument<PROTOCOL>,
1252
+ data: RawTransactionArgument<ProtocolData>
1253
+ ];
1254
+ typeArguments: [
1255
+ string,
1256
+ string
1257
+ ];
1258
+ }
1259
+ export declare function newData<PROTOCOL extends BcsType<any>, ProtocolData extends BcsType<any>>(options: NewDataOptions<PROTOCOL, ProtocolData>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1260
+ export interface BorrowDataArguments {
1261
+ registry: RawTransactionArgument<string>;
1262
+ accountId: RawTransactionArgument<string>;
1263
+ }
1264
+ export interface BorrowDataOptions {
1265
+ package?: string;
1266
+ arguments: BorrowDataArguments | [
1267
+ registry: RawTransactionArgument<string>,
1268
+ accountId: RawTransactionArgument<string>
1269
+ ];
1270
+ typeArguments: [
1271
+ string,
1272
+ string
1273
+ ];
1274
+ }
1275
+ export declare function borrowData(options: BorrowDataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1276
+ export interface BorrowDataMutArguments<PROTOCOL extends BcsType<any>> {
1277
+ registry: RawTransactionArgument<string>;
1278
+ accountId: RawTransactionArgument<string>;
1279
+ Witness: RawTransactionArgument<PROTOCOL>;
1280
+ }
1281
+ export interface BorrowDataMutOptions<PROTOCOL extends BcsType<any>> {
1282
+ package?: string;
1283
+ arguments: BorrowDataMutArguments<PROTOCOL> | [
1284
+ registry: RawTransactionArgument<string>,
1285
+ accountId: RawTransactionArgument<string>,
1286
+ Witness: RawTransactionArgument<PROTOCOL>
1287
+ ];
1288
+ typeArguments: [
1289
+ string,
1290
+ string
1291
+ ];
1292
+ }
1293
+ export declare function borrowDataMut<PROTOCOL extends BcsType<any>>(options: BorrowDataMutOptions<PROTOCOL>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1294
+ export interface HasDataArguments {
1295
+ registry: RawTransactionArgument<string>;
1296
+ accountId: RawTransactionArgument<string>;
1297
+ }
1298
+ export interface HasDataOptions {
1299
+ package?: string;
1300
+ arguments: HasDataArguments | [
1301
+ registry: RawTransactionArgument<string>,
1302
+ accountId: RawTransactionArgument<string>
1303
+ ];
1304
+ typeArguments: [
1305
+ string
1306
+ ];
1307
+ }
1308
+ export declare function hasData(options: HasDataOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
1309
+ export interface RemoveDataArguments<PROTOCOL extends BcsType<any>> {
1310
+ registry: RawTransactionArgument<string>;
1311
+ accountId: RawTransactionArgument<string>;
1312
+ Witness: RawTransactionArgument<PROTOCOL>;
1313
+ }
1314
+ export interface RemoveDataOptions<PROTOCOL extends BcsType<any>> {
1315
+ package?: string;
1316
+ arguments: RemoveDataArguments<PROTOCOL> | [
1317
+ registry: RawTransactionArgument<string>,
1318
+ accountId: RawTransactionArgument<string>,
1319
+ Witness: RawTransactionArgument<PROTOCOL>
1320
+ ];
1321
+ typeArguments: [
1322
+ string,
1323
+ string
1324
+ ];
1325
+ }
1326
+ export declare function removeData<PROTOCOL extends BcsType<any>>(options: RemoveDataOptions<PROTOCOL>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;