@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.
- package/LICENSE +22 -0
- package/README.md +67 -0
- package/dist/src/account.d.ts +64 -0
- package/dist/src/account.js +134 -0
- package/dist/src/admin.d.ts +47 -0
- package/dist/src/admin.js +104 -0
- package/dist/src/bcs.d.ts +20 -0
- package/dist/src/bcs.js +209 -0
- package/dist/src/client.d.ts +60 -0
- package/dist/src/client.js +59 -0
- package/dist/src/constants.d.ts +61 -0
- package/dist/src/constants.js +62 -0
- package/dist/src/fetch.d.ts +53 -0
- package/dist/src/fetch.js +187 -0
- package/dist/src/generated/bucket_v2_framework/account.d.ts +100 -0
- package/dist/src/generated/bucket_v2_framework/account.js +129 -0
- package/dist/src/generated/bucket_v2_framework/deps/std/type_name.d.ts +6 -0
- package/dist/src/generated/bucket_v2_framework/deps/std/type_name.js +19 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/balance.d.ts +10 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/balance.js +14 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/bucket_v2_framework/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/bucket_v2_framework/double.d.ts +382 -0
- package/dist/src/generated/bucket_v2_framework/double.js +466 -0
- package/dist/src/generated/bucket_v2_framework/float.d.ts +362 -0
- package/dist/src/generated/bucket_v2_framework/float.js +440 -0
- package/dist/src/generated/bucket_v2_framework/liability.d.ts +193 -0
- package/dist/src/generated/bucket_v2_framework/liability.js +205 -0
- package/dist/src/generated/bucket_v2_framework/linked_table.d.ts +384 -0
- package/dist/src/generated/bucket_v2_framework/linked_table.js +382 -0
- package/dist/src/generated/bucket_v2_framework/sheet.d.ts +344 -0
- package/dist/src/generated/bucket_v2_framework/sheet.js +344 -0
- package/dist/src/generated/utils/index.d.ts +30 -0
- package/dist/src/generated/utils/index.js +157 -0
- package/dist/src/generated/waterx_account/account.d.ts +1326 -0
- package/dist/src/generated/waterx_account/account.js +1487 -0
- package/dist/src/generated/waterx_account/deps/std/type_name.d.ts +6 -0
- package/dist/src/generated/waterx_account/deps/std/type_name.js +19 -0
- package/dist/src/generated/waterx_account/deps/sui/balance.d.ts +10 -0
- package/dist/src/generated/waterx_account/deps/sui/balance.js +14 -0
- package/dist/src/generated/waterx_account/deps/sui/table.d.ts +24 -0
- package/dist/src/generated/waterx_account/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_map.d.ts +36 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_map.js +27 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_account/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_account/direct_rule.d.ts +72 -0
- package/dist/src/generated/waterx_account/direct_rule.js +75 -0
- package/dist/src/generated/waterx_account/events.d.ts +30 -0
- package/dist/src/generated/waterx_account/events.js +145 -0
- package/dist/src/generated/waterx_account/version.d.ts +10 -0
- package/dist/src/generated/waterx_account/version.js +8 -0
- package/dist/src/generated/waterx_prediction/account_data.d.ts +321 -0
- package/dist/src/generated/waterx_prediction/account_data.js +399 -0
- package/dist/src/generated/waterx_prediction/admin.d.ts +5 -0
- package/dist/src/generated/waterx_prediction/admin.js +9 -0
- package/dist/src/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.d.ts +8 -0
- package/dist/src/generated/waterx_prediction/deps/bucket_v2_framework/linked_table.js +18 -0
- package/dist/src/generated/waterx_prediction/deps/sui/balance.d.ts +10 -0
- package/dist/src/generated/waterx_prediction/deps/sui/balance.js +14 -0
- package/dist/src/generated/waterx_prediction/deps/sui/table.d.ts +24 -0
- package/dist/src/generated/waterx_prediction/deps/sui/table.js +31 -0
- package/dist/src/generated/waterx_prediction/deps/sui/vec_set.d.ts +16 -0
- package/dist/src/generated/waterx_prediction/deps/sui/vec_set.js +19 -0
- package/dist/src/generated/waterx_prediction/events.d.ts +19 -0
- package/dist/src/generated/waterx_prediction/events.js +99 -0
- package/dist/src/generated/waterx_prediction/global_config.d.ts +68 -0
- package/dist/src/generated/waterx_prediction/global_config.js +83 -0
- package/dist/src/generated/waterx_prediction/order.d.ts +170 -0
- package/dist/src/generated/waterx_prediction/order.js +237 -0
- package/dist/src/generated/waterx_prediction/outcome.d.ts +58 -0
- package/dist/src/generated/waterx_prediction/outcome.js +73 -0
- package/dist/src/generated/waterx_prediction/position.d.ts +150 -0
- package/dist/src/generated/waterx_prediction/position.js +200 -0
- package/dist/src/generated/waterx_prediction/view.d.ts +353 -0
- package/dist/src/generated/waterx_prediction/view.js +426 -0
- package/dist/src/generated/waterx_prediction/waterx_prediction.d.ts +1520 -0
- package/dist/src/generated/waterx_prediction/waterx_prediction.js +1550 -0
- package/dist/src/index.d.ts +22 -0
- package/dist/src/index.js +17 -0
- package/dist/src/prediction.d.ts +81 -0
- package/dist/src/prediction.js +220 -0
- package/dist/src/types.d.ts +81 -0
- package/dist/src/types.js +1 -0
- package/dist/src/user/account.d.ts +2 -0
- package/dist/src/user/account.js +1 -0
- package/dist/src/user/admin.d.ts +4 -0
- package/dist/src/user/admin.js +2 -0
- package/dist/src/user/index.d.ts +4 -0
- package/dist/src/user/index.js +2 -0
- package/dist/src/user/keeper.d.ts +2 -0
- package/dist/src/user/keeper.js +1 -0
- package/dist/src/user/order.d.ts +2 -0
- package/dist/src/user/order.js +1 -0
- package/dist/src/user/position.d.ts +2 -0
- package/dist/src/user/position.js +1 -0
- package/dist/src/utils/bcs.d.ts +1 -0
- package/dist/src/utils/bcs.js +1 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.js +1 -0
- package/dist/src/utils.d.ts +29 -0
- package/dist/src/utils.js +170 -0
- package/package.json +62 -0
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/** Module for the record of Credit and Debt of certain entity */
|
|
5
|
+
import { MoveTuple, MoveStruct, type RawTransactionArgument } from '../utils/index.ts';
|
|
6
|
+
import { type BcsType } from '@mysten/sui/bcs';
|
|
7
|
+
import { type Transaction } from '@mysten/sui/transactions';
|
|
8
|
+
export declare const Entity: MoveTuple<readonly [MoveStruct<any, any>], "@bucket/framework::sheet::Entity">;
|
|
9
|
+
export declare const Sheet: MoveStruct<any, any>;
|
|
10
|
+
export declare const Loan: MoveStruct<any, any>;
|
|
11
|
+
export declare const Request: MoveStruct<any, any>;
|
|
12
|
+
export interface NewArguments<E extends BcsType<any>> {
|
|
13
|
+
_: RawTransactionArgument<E>;
|
|
14
|
+
}
|
|
15
|
+
export interface NewOptions<E extends BcsType<any>> {
|
|
16
|
+
package?: string;
|
|
17
|
+
arguments: NewArguments<E> | [
|
|
18
|
+
_: RawTransactionArgument<E>
|
|
19
|
+
];
|
|
20
|
+
typeArguments: [
|
|
21
|
+
string,
|
|
22
|
+
string
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
/** Public Funs */
|
|
26
|
+
export declare function _new<E extends BcsType<any>>(options: NewOptions<E>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
27
|
+
export interface LendArguments<L extends BcsType<any>> {
|
|
28
|
+
sheet: RawTransactionArgument<string>;
|
|
29
|
+
balance: RawTransactionArgument<string>;
|
|
30
|
+
LenderStamp: RawTransactionArgument<L>;
|
|
31
|
+
}
|
|
32
|
+
export interface LendOptions<L extends BcsType<any>> {
|
|
33
|
+
package?: string;
|
|
34
|
+
arguments: LendArguments<L> | [
|
|
35
|
+
sheet: RawTransactionArgument<string>,
|
|
36
|
+
balance: RawTransactionArgument<string>,
|
|
37
|
+
LenderStamp: RawTransactionArgument<L>
|
|
38
|
+
];
|
|
39
|
+
typeArguments: [
|
|
40
|
+
string,
|
|
41
|
+
string,
|
|
42
|
+
string
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
export declare function lend<L extends BcsType<any>>(options: LendOptions<L>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
46
|
+
export interface ReceiveArguments<R extends BcsType<any>> {
|
|
47
|
+
sheet: RawTransactionArgument<string>;
|
|
48
|
+
loan: RawTransactionArgument<string>;
|
|
49
|
+
ReceiverStamp: RawTransactionArgument<R>;
|
|
50
|
+
}
|
|
51
|
+
export interface ReceiveOptions<R extends BcsType<any>> {
|
|
52
|
+
package?: string;
|
|
53
|
+
arguments: ReceiveArguments<R> | [
|
|
54
|
+
sheet: RawTransactionArgument<string>,
|
|
55
|
+
loan: RawTransactionArgument<string>,
|
|
56
|
+
ReceiverStamp: RawTransactionArgument<R>
|
|
57
|
+
];
|
|
58
|
+
typeArguments: [
|
|
59
|
+
string,
|
|
60
|
+
string,
|
|
61
|
+
string
|
|
62
|
+
];
|
|
63
|
+
}
|
|
64
|
+
export declare function receive<R extends BcsType<any>>(options: ReceiveOptions<R>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
65
|
+
export interface RequestArguments<C extends BcsType<any>> {
|
|
66
|
+
requirement: RawTransactionArgument<number | bigint>;
|
|
67
|
+
checklist: RawTransactionArgument<Array<string> | null>;
|
|
68
|
+
CollectorStamp: RawTransactionArgument<C>;
|
|
69
|
+
}
|
|
70
|
+
export interface RequestOptions<C extends BcsType<any>> {
|
|
71
|
+
package?: string;
|
|
72
|
+
arguments: RequestArguments<C> | [
|
|
73
|
+
requirement: RawTransactionArgument<number | bigint>,
|
|
74
|
+
checklist: RawTransactionArgument<Array<string> | null>,
|
|
75
|
+
CollectorStamp: RawTransactionArgument<C>
|
|
76
|
+
];
|
|
77
|
+
typeArguments: [
|
|
78
|
+
string,
|
|
79
|
+
string
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
export declare function request<C extends BcsType<any>>(options: RequestOptions<C>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
83
|
+
export interface PayArguments<P extends BcsType<any>> {
|
|
84
|
+
sheet: RawTransactionArgument<string>;
|
|
85
|
+
req: RawTransactionArgument<string>;
|
|
86
|
+
balance: RawTransactionArgument<string>;
|
|
87
|
+
PayerStamp: RawTransactionArgument<P>;
|
|
88
|
+
}
|
|
89
|
+
export interface PayOptions<P extends BcsType<any>> {
|
|
90
|
+
package?: string;
|
|
91
|
+
arguments: PayArguments<P> | [
|
|
92
|
+
sheet: RawTransactionArgument<string>,
|
|
93
|
+
req: RawTransactionArgument<string>,
|
|
94
|
+
balance: RawTransactionArgument<string>,
|
|
95
|
+
PayerStamp: RawTransactionArgument<P>
|
|
96
|
+
];
|
|
97
|
+
typeArguments: [
|
|
98
|
+
string,
|
|
99
|
+
string,
|
|
100
|
+
string
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
export declare function pay<P extends BcsType<any>>(options: PayOptions<P>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
104
|
+
export interface CollectArguments<C extends BcsType<any>> {
|
|
105
|
+
sheet: RawTransactionArgument<string>;
|
|
106
|
+
req: RawTransactionArgument<string>;
|
|
107
|
+
Stamp: RawTransactionArgument<C>;
|
|
108
|
+
}
|
|
109
|
+
export interface CollectOptions<C extends BcsType<any>> {
|
|
110
|
+
package?: string;
|
|
111
|
+
arguments: CollectArguments<C> | [
|
|
112
|
+
sheet: RawTransactionArgument<string>,
|
|
113
|
+
req: RawTransactionArgument<string>,
|
|
114
|
+
Stamp: RawTransactionArgument<C>
|
|
115
|
+
];
|
|
116
|
+
typeArguments: [
|
|
117
|
+
string,
|
|
118
|
+
string
|
|
119
|
+
];
|
|
120
|
+
}
|
|
121
|
+
export declare function collect<C extends BcsType<any>>(options: CollectOptions<C>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
122
|
+
export interface AddDebtorArguments<E extends BcsType<any>> {
|
|
123
|
+
sheet: RawTransactionArgument<string>;
|
|
124
|
+
debtor: RawTransactionArgument<string>;
|
|
125
|
+
Stamp: RawTransactionArgument<E>;
|
|
126
|
+
}
|
|
127
|
+
export interface AddDebtorOptions<E extends BcsType<any>> {
|
|
128
|
+
package?: string;
|
|
129
|
+
arguments: AddDebtorArguments<E> | [
|
|
130
|
+
sheet: RawTransactionArgument<string>,
|
|
131
|
+
debtor: RawTransactionArgument<string>,
|
|
132
|
+
Stamp: RawTransactionArgument<E>
|
|
133
|
+
];
|
|
134
|
+
typeArguments: [
|
|
135
|
+
string,
|
|
136
|
+
string
|
|
137
|
+
];
|
|
138
|
+
}
|
|
139
|
+
export declare function addDebtor<E extends BcsType<any>>(options: AddDebtorOptions<E>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
140
|
+
export interface AddCreditorArguments<E extends BcsType<any>> {
|
|
141
|
+
sheet: RawTransactionArgument<string>;
|
|
142
|
+
creditor: RawTransactionArgument<string>;
|
|
143
|
+
Stamp: RawTransactionArgument<E>;
|
|
144
|
+
}
|
|
145
|
+
export interface AddCreditorOptions<E extends BcsType<any>> {
|
|
146
|
+
package?: string;
|
|
147
|
+
arguments: AddCreditorArguments<E> | [
|
|
148
|
+
sheet: RawTransactionArgument<string>,
|
|
149
|
+
creditor: RawTransactionArgument<string>,
|
|
150
|
+
Stamp: RawTransactionArgument<E>
|
|
151
|
+
];
|
|
152
|
+
typeArguments: [
|
|
153
|
+
string,
|
|
154
|
+
string
|
|
155
|
+
];
|
|
156
|
+
}
|
|
157
|
+
export declare function addCreditor<E extends BcsType<any>>(options: AddCreditorOptions<E>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
158
|
+
export interface BanArguments<E extends BcsType<any>> {
|
|
159
|
+
sheet: RawTransactionArgument<string>;
|
|
160
|
+
entity: RawTransactionArgument<string>;
|
|
161
|
+
Stamp: RawTransactionArgument<E>;
|
|
162
|
+
}
|
|
163
|
+
export interface BanOptions<E extends BcsType<any>> {
|
|
164
|
+
package?: string;
|
|
165
|
+
arguments: BanArguments<E> | [
|
|
166
|
+
sheet: RawTransactionArgument<string>,
|
|
167
|
+
entity: RawTransactionArgument<string>,
|
|
168
|
+
Stamp: RawTransactionArgument<E>
|
|
169
|
+
];
|
|
170
|
+
typeArguments: [
|
|
171
|
+
string,
|
|
172
|
+
string
|
|
173
|
+
];
|
|
174
|
+
}
|
|
175
|
+
export declare function ban<E extends BcsType<any>>(options: BanOptions<E>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
176
|
+
export interface UnbanArguments<E extends BcsType<any>> {
|
|
177
|
+
sheet: RawTransactionArgument<string>;
|
|
178
|
+
entity: RawTransactionArgument<string>;
|
|
179
|
+
Stamp: RawTransactionArgument<E>;
|
|
180
|
+
}
|
|
181
|
+
export interface UnbanOptions<E extends BcsType<any>> {
|
|
182
|
+
package?: string;
|
|
183
|
+
arguments: UnbanArguments<E> | [
|
|
184
|
+
sheet: RawTransactionArgument<string>,
|
|
185
|
+
entity: RawTransactionArgument<string>,
|
|
186
|
+
Stamp: RawTransactionArgument<E>
|
|
187
|
+
];
|
|
188
|
+
typeArguments: [
|
|
189
|
+
string,
|
|
190
|
+
string
|
|
191
|
+
];
|
|
192
|
+
}
|
|
193
|
+
export declare function unban<E extends BcsType<any>>(options: UnbanOptions<E>): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
194
|
+
export interface EntityOptions {
|
|
195
|
+
package?: string;
|
|
196
|
+
arguments?: [
|
|
197
|
+
];
|
|
198
|
+
typeArguments: [
|
|
199
|
+
string
|
|
200
|
+
];
|
|
201
|
+
}
|
|
202
|
+
/** Getter Funs */
|
|
203
|
+
export declare function entity(options: EntityOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
204
|
+
export interface CreditsArguments {
|
|
205
|
+
sheet: RawTransactionArgument<string>;
|
|
206
|
+
}
|
|
207
|
+
export interface CreditsOptions {
|
|
208
|
+
package?: string;
|
|
209
|
+
arguments: CreditsArguments | [
|
|
210
|
+
sheet: RawTransactionArgument<string>
|
|
211
|
+
];
|
|
212
|
+
typeArguments: [
|
|
213
|
+
string,
|
|
214
|
+
string
|
|
215
|
+
];
|
|
216
|
+
}
|
|
217
|
+
export declare function credits(options: CreditsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
218
|
+
export interface DebtsArguments {
|
|
219
|
+
sheet: RawTransactionArgument<string>;
|
|
220
|
+
}
|
|
221
|
+
export interface DebtsOptions {
|
|
222
|
+
package?: string;
|
|
223
|
+
arguments: DebtsArguments | [
|
|
224
|
+
sheet: RawTransactionArgument<string>
|
|
225
|
+
];
|
|
226
|
+
typeArguments: [
|
|
227
|
+
string,
|
|
228
|
+
string
|
|
229
|
+
];
|
|
230
|
+
}
|
|
231
|
+
export declare function debts(options: DebtsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
232
|
+
export interface BlacklistArguments {
|
|
233
|
+
sheet: RawTransactionArgument<string>;
|
|
234
|
+
}
|
|
235
|
+
export interface BlacklistOptions {
|
|
236
|
+
package?: string;
|
|
237
|
+
arguments: BlacklistArguments | [
|
|
238
|
+
sheet: RawTransactionArgument<string>
|
|
239
|
+
];
|
|
240
|
+
typeArguments: [
|
|
241
|
+
string,
|
|
242
|
+
string
|
|
243
|
+
];
|
|
244
|
+
}
|
|
245
|
+
export declare function blacklist(options: BlacklistOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
246
|
+
export interface TotalCreditArguments {
|
|
247
|
+
sheet: RawTransactionArgument<string>;
|
|
248
|
+
}
|
|
249
|
+
export interface TotalCreditOptions {
|
|
250
|
+
package?: string;
|
|
251
|
+
arguments: TotalCreditArguments | [
|
|
252
|
+
sheet: RawTransactionArgument<string>
|
|
253
|
+
];
|
|
254
|
+
typeArguments: [
|
|
255
|
+
string,
|
|
256
|
+
string
|
|
257
|
+
];
|
|
258
|
+
}
|
|
259
|
+
export declare function totalCredit(options: TotalCreditOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
260
|
+
export interface TotalDebtArguments {
|
|
261
|
+
sheet: RawTransactionArgument<string>;
|
|
262
|
+
}
|
|
263
|
+
export interface TotalDebtOptions {
|
|
264
|
+
package?: string;
|
|
265
|
+
arguments: TotalDebtArguments | [
|
|
266
|
+
sheet: RawTransactionArgument<string>
|
|
267
|
+
];
|
|
268
|
+
typeArguments: [
|
|
269
|
+
string,
|
|
270
|
+
string
|
|
271
|
+
];
|
|
272
|
+
}
|
|
273
|
+
export declare function totalDebt(options: TotalDebtOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
274
|
+
export interface LoanValueArguments {
|
|
275
|
+
loan: RawTransactionArgument<string>;
|
|
276
|
+
}
|
|
277
|
+
export interface LoanValueOptions {
|
|
278
|
+
package?: string;
|
|
279
|
+
arguments: LoanValueArguments | [
|
|
280
|
+
loan: RawTransactionArgument<string>
|
|
281
|
+
];
|
|
282
|
+
typeArguments: [
|
|
283
|
+
string,
|
|
284
|
+
string,
|
|
285
|
+
string
|
|
286
|
+
];
|
|
287
|
+
}
|
|
288
|
+
export declare function loanValue(options: LoanValueOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
289
|
+
export interface RequirementArguments {
|
|
290
|
+
req: RawTransactionArgument<string>;
|
|
291
|
+
}
|
|
292
|
+
export interface RequirementOptions {
|
|
293
|
+
package?: string;
|
|
294
|
+
arguments: RequirementArguments | [
|
|
295
|
+
req: RawTransactionArgument<string>
|
|
296
|
+
];
|
|
297
|
+
typeArguments: [
|
|
298
|
+
string,
|
|
299
|
+
string
|
|
300
|
+
];
|
|
301
|
+
}
|
|
302
|
+
export declare function requirement(options: RequirementOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
303
|
+
export interface BalanceArguments {
|
|
304
|
+
req: RawTransactionArgument<string>;
|
|
305
|
+
}
|
|
306
|
+
export interface BalanceOptions {
|
|
307
|
+
package?: string;
|
|
308
|
+
arguments: BalanceArguments | [
|
|
309
|
+
req: RawTransactionArgument<string>
|
|
310
|
+
];
|
|
311
|
+
typeArguments: [
|
|
312
|
+
string,
|
|
313
|
+
string
|
|
314
|
+
];
|
|
315
|
+
}
|
|
316
|
+
export declare function balance(options: BalanceOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
317
|
+
export interface ShortageArguments {
|
|
318
|
+
req: RawTransactionArgument<string>;
|
|
319
|
+
}
|
|
320
|
+
export interface ShortageOptions {
|
|
321
|
+
package?: string;
|
|
322
|
+
arguments: ShortageArguments | [
|
|
323
|
+
req: RawTransactionArgument<string>
|
|
324
|
+
];
|
|
325
|
+
typeArguments: [
|
|
326
|
+
string,
|
|
327
|
+
string
|
|
328
|
+
];
|
|
329
|
+
}
|
|
330
|
+
export declare function shortage(options: ShortageOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
331
|
+
export interface PayerDebtsArguments {
|
|
332
|
+
req: RawTransactionArgument<string>;
|
|
333
|
+
}
|
|
334
|
+
export interface PayerDebtsOptions {
|
|
335
|
+
package?: string;
|
|
336
|
+
arguments: PayerDebtsArguments | [
|
|
337
|
+
req: RawTransactionArgument<string>
|
|
338
|
+
];
|
|
339
|
+
typeArguments: [
|
|
340
|
+
string,
|
|
341
|
+
string
|
|
342
|
+
];
|
|
343
|
+
}
|
|
344
|
+
export declare function payerDebts(options: PayerDebtsOptions): (tx: Transaction) => import("@mysten/sui/transactions").TransactionResult;
|
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
/** Module for the record of Credit and Debt of certain entity */
|
|
5
|
+
import { MoveTuple, MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
6
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
7
|
+
import * as type_name from "./deps/std/type_name.js";
|
|
8
|
+
import * as vec_map from "./deps/sui/vec_map.js";
|
|
9
|
+
import * as liability from "./liability.js";
|
|
10
|
+
import * as vec_map_1 from "./deps/sui/vec_map.js";
|
|
11
|
+
import * as liability_1 from "./liability.js";
|
|
12
|
+
import * as vec_set from "./deps/sui/vec_set.js";
|
|
13
|
+
import * as balance_1 from "./deps/sui/balance.js";
|
|
14
|
+
import * as liability_2 from "./liability.js";
|
|
15
|
+
import * as balance_2 from "./deps/sui/balance.js";
|
|
16
|
+
import * as vec_map_2 from "./deps/sui/vec_map.js";
|
|
17
|
+
import * as liability_3 from "./liability.js";
|
|
18
|
+
const $moduleName = '@bucket/framework::sheet';
|
|
19
|
+
export const Entity = new MoveTuple({ name: `${$moduleName}::Entity`, fields: [type_name.TypeName] });
|
|
20
|
+
export const Sheet = new MoveStruct({ name: `${$moduleName}::Sheet<phantom CoinType, phantom SelfEntity>`, fields: {
|
|
21
|
+
credits: vec_map.VecMap(Entity, liability.Credit),
|
|
22
|
+
debts: vec_map_1.VecMap(Entity, liability_1.Debt),
|
|
23
|
+
blacklist: vec_set.VecSet(Entity)
|
|
24
|
+
} });
|
|
25
|
+
export const Loan = new MoveStruct({ name: `${$moduleName}::Loan<phantom CoinType, phantom Lender, phantom Receiver>`, fields: {
|
|
26
|
+
balance: balance_1.Balance,
|
|
27
|
+
debt: liability_2.Debt
|
|
28
|
+
} });
|
|
29
|
+
export const Request = new MoveStruct({ name: `${$moduleName}::Request<phantom CoinType, phantom Collector>`, fields: {
|
|
30
|
+
requirement: bcs.u64(),
|
|
31
|
+
balance: balance_2.Balance,
|
|
32
|
+
checklist: bcs.option(bcs.vector(Entity)),
|
|
33
|
+
payer_debts: vec_map_2.VecMap(Entity, liability_3.Debt)
|
|
34
|
+
} });
|
|
35
|
+
/** Public Funs */
|
|
36
|
+
export function _new(options) {
|
|
37
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
38
|
+
const argumentsTypes = [
|
|
39
|
+
`${options.typeArguments[1]}`
|
|
40
|
+
];
|
|
41
|
+
const parameterNames = ["_"];
|
|
42
|
+
return (tx) => tx.moveCall({
|
|
43
|
+
package: packageAddress,
|
|
44
|
+
module: 'sheet',
|
|
45
|
+
function: 'new',
|
|
46
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
47
|
+
typeArguments: options.typeArguments
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export function lend(options) {
|
|
51
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
52
|
+
const argumentsTypes = [
|
|
53
|
+
null,
|
|
54
|
+
null,
|
|
55
|
+
`${options.typeArguments[1]}`
|
|
56
|
+
];
|
|
57
|
+
const parameterNames = ["sheet", "balance", "LenderStamp"];
|
|
58
|
+
return (tx) => tx.moveCall({
|
|
59
|
+
package: packageAddress,
|
|
60
|
+
module: 'sheet',
|
|
61
|
+
function: 'lend',
|
|
62
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
63
|
+
typeArguments: options.typeArguments
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
export function receive(options) {
|
|
67
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
68
|
+
const argumentsTypes = [
|
|
69
|
+
null,
|
|
70
|
+
null,
|
|
71
|
+
`${options.typeArguments[2]}`
|
|
72
|
+
];
|
|
73
|
+
const parameterNames = ["sheet", "loan", "ReceiverStamp"];
|
|
74
|
+
return (tx) => tx.moveCall({
|
|
75
|
+
package: packageAddress,
|
|
76
|
+
module: 'sheet',
|
|
77
|
+
function: 'receive',
|
|
78
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
79
|
+
typeArguments: options.typeArguments
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
export function request(options) {
|
|
83
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
84
|
+
const argumentsTypes = [
|
|
85
|
+
'u64',
|
|
86
|
+
'0x1::option::Option<vector<null>>',
|
|
87
|
+
`${options.typeArguments[1]}`
|
|
88
|
+
];
|
|
89
|
+
const parameterNames = ["requirement", "checklist", "CollectorStamp"];
|
|
90
|
+
return (tx) => tx.moveCall({
|
|
91
|
+
package: packageAddress,
|
|
92
|
+
module: 'sheet',
|
|
93
|
+
function: 'request',
|
|
94
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
95
|
+
typeArguments: options.typeArguments
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
export function pay(options) {
|
|
99
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
100
|
+
const argumentsTypes = [
|
|
101
|
+
null,
|
|
102
|
+
null,
|
|
103
|
+
null,
|
|
104
|
+
`${options.typeArguments[2]}`
|
|
105
|
+
];
|
|
106
|
+
const parameterNames = ["sheet", "req", "balance", "PayerStamp"];
|
|
107
|
+
return (tx) => tx.moveCall({
|
|
108
|
+
package: packageAddress,
|
|
109
|
+
module: 'sheet',
|
|
110
|
+
function: 'pay',
|
|
111
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
112
|
+
typeArguments: options.typeArguments
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
export function collect(options) {
|
|
116
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
117
|
+
const argumentsTypes = [
|
|
118
|
+
null,
|
|
119
|
+
null,
|
|
120
|
+
`${options.typeArguments[1]}`
|
|
121
|
+
];
|
|
122
|
+
const parameterNames = ["sheet", "req", "Stamp"];
|
|
123
|
+
return (tx) => tx.moveCall({
|
|
124
|
+
package: packageAddress,
|
|
125
|
+
module: 'sheet',
|
|
126
|
+
function: 'collect',
|
|
127
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
128
|
+
typeArguments: options.typeArguments
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
export function addDebtor(options) {
|
|
132
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
133
|
+
const argumentsTypes = [
|
|
134
|
+
null,
|
|
135
|
+
null,
|
|
136
|
+
`${options.typeArguments[1]}`
|
|
137
|
+
];
|
|
138
|
+
const parameterNames = ["sheet", "debtor", "Stamp"];
|
|
139
|
+
return (tx) => tx.moveCall({
|
|
140
|
+
package: packageAddress,
|
|
141
|
+
module: 'sheet',
|
|
142
|
+
function: 'add_debtor',
|
|
143
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
144
|
+
typeArguments: options.typeArguments
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
export function addCreditor(options) {
|
|
148
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
149
|
+
const argumentsTypes = [
|
|
150
|
+
null,
|
|
151
|
+
null,
|
|
152
|
+
`${options.typeArguments[1]}`
|
|
153
|
+
];
|
|
154
|
+
const parameterNames = ["sheet", "creditor", "Stamp"];
|
|
155
|
+
return (tx) => tx.moveCall({
|
|
156
|
+
package: packageAddress,
|
|
157
|
+
module: 'sheet',
|
|
158
|
+
function: 'add_creditor',
|
|
159
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
160
|
+
typeArguments: options.typeArguments
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
export function ban(options) {
|
|
164
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
165
|
+
const argumentsTypes = [
|
|
166
|
+
null,
|
|
167
|
+
null,
|
|
168
|
+
`${options.typeArguments[1]}`
|
|
169
|
+
];
|
|
170
|
+
const parameterNames = ["sheet", "entity", "Stamp"];
|
|
171
|
+
return (tx) => tx.moveCall({
|
|
172
|
+
package: packageAddress,
|
|
173
|
+
module: 'sheet',
|
|
174
|
+
function: 'ban',
|
|
175
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
176
|
+
typeArguments: options.typeArguments
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
export function unban(options) {
|
|
180
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
181
|
+
const argumentsTypes = [
|
|
182
|
+
null,
|
|
183
|
+
null,
|
|
184
|
+
`${options.typeArguments[1]}`
|
|
185
|
+
];
|
|
186
|
+
const parameterNames = ["sheet", "entity", "Stamp"];
|
|
187
|
+
return (tx) => tx.moveCall({
|
|
188
|
+
package: packageAddress,
|
|
189
|
+
module: 'sheet',
|
|
190
|
+
function: 'unban',
|
|
191
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
192
|
+
typeArguments: options.typeArguments
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
/** Getter Funs */
|
|
196
|
+
export function entity(options) {
|
|
197
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
198
|
+
return (tx) => tx.moveCall({
|
|
199
|
+
package: packageAddress,
|
|
200
|
+
module: 'sheet',
|
|
201
|
+
function: 'entity',
|
|
202
|
+
typeArguments: options.typeArguments
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
export function credits(options) {
|
|
206
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
207
|
+
const argumentsTypes = [
|
|
208
|
+
null
|
|
209
|
+
];
|
|
210
|
+
const parameterNames = ["sheet"];
|
|
211
|
+
return (tx) => tx.moveCall({
|
|
212
|
+
package: packageAddress,
|
|
213
|
+
module: 'sheet',
|
|
214
|
+
function: 'credits',
|
|
215
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
216
|
+
typeArguments: options.typeArguments
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
export function debts(options) {
|
|
220
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
221
|
+
const argumentsTypes = [
|
|
222
|
+
null
|
|
223
|
+
];
|
|
224
|
+
const parameterNames = ["sheet"];
|
|
225
|
+
return (tx) => tx.moveCall({
|
|
226
|
+
package: packageAddress,
|
|
227
|
+
module: 'sheet',
|
|
228
|
+
function: 'debts',
|
|
229
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
230
|
+
typeArguments: options.typeArguments
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
export function blacklist(options) {
|
|
234
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
235
|
+
const argumentsTypes = [
|
|
236
|
+
null
|
|
237
|
+
];
|
|
238
|
+
const parameterNames = ["sheet"];
|
|
239
|
+
return (tx) => tx.moveCall({
|
|
240
|
+
package: packageAddress,
|
|
241
|
+
module: 'sheet',
|
|
242
|
+
function: 'blacklist',
|
|
243
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
244
|
+
typeArguments: options.typeArguments
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
export function totalCredit(options) {
|
|
248
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
249
|
+
const argumentsTypes = [
|
|
250
|
+
null
|
|
251
|
+
];
|
|
252
|
+
const parameterNames = ["sheet"];
|
|
253
|
+
return (tx) => tx.moveCall({
|
|
254
|
+
package: packageAddress,
|
|
255
|
+
module: 'sheet',
|
|
256
|
+
function: 'total_credit',
|
|
257
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
258
|
+
typeArguments: options.typeArguments
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
export function totalDebt(options) {
|
|
262
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
263
|
+
const argumentsTypes = [
|
|
264
|
+
null
|
|
265
|
+
];
|
|
266
|
+
const parameterNames = ["sheet"];
|
|
267
|
+
return (tx) => tx.moveCall({
|
|
268
|
+
package: packageAddress,
|
|
269
|
+
module: 'sheet',
|
|
270
|
+
function: 'total_debt',
|
|
271
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
272
|
+
typeArguments: options.typeArguments
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
export function loanValue(options) {
|
|
276
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
277
|
+
const argumentsTypes = [
|
|
278
|
+
null
|
|
279
|
+
];
|
|
280
|
+
const parameterNames = ["loan"];
|
|
281
|
+
return (tx) => tx.moveCall({
|
|
282
|
+
package: packageAddress,
|
|
283
|
+
module: 'sheet',
|
|
284
|
+
function: 'loan_value',
|
|
285
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
286
|
+
typeArguments: options.typeArguments
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
export function requirement(options) {
|
|
290
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
291
|
+
const argumentsTypes = [
|
|
292
|
+
null
|
|
293
|
+
];
|
|
294
|
+
const parameterNames = ["req"];
|
|
295
|
+
return (tx) => tx.moveCall({
|
|
296
|
+
package: packageAddress,
|
|
297
|
+
module: 'sheet',
|
|
298
|
+
function: 'requirement',
|
|
299
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
300
|
+
typeArguments: options.typeArguments
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
export function balance(options) {
|
|
304
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
305
|
+
const argumentsTypes = [
|
|
306
|
+
null
|
|
307
|
+
];
|
|
308
|
+
const parameterNames = ["req"];
|
|
309
|
+
return (tx) => tx.moveCall({
|
|
310
|
+
package: packageAddress,
|
|
311
|
+
module: 'sheet',
|
|
312
|
+
function: 'balance',
|
|
313
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
314
|
+
typeArguments: options.typeArguments
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
export function shortage(options) {
|
|
318
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
319
|
+
const argumentsTypes = [
|
|
320
|
+
null
|
|
321
|
+
];
|
|
322
|
+
const parameterNames = ["req"];
|
|
323
|
+
return (tx) => tx.moveCall({
|
|
324
|
+
package: packageAddress,
|
|
325
|
+
module: 'sheet',
|
|
326
|
+
function: 'shortage',
|
|
327
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
328
|
+
typeArguments: options.typeArguments
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
export function payerDebts(options) {
|
|
332
|
+
const packageAddress = options.package ?? '@bucket/framework';
|
|
333
|
+
const argumentsTypes = [
|
|
334
|
+
null
|
|
335
|
+
];
|
|
336
|
+
const parameterNames = ["req"];
|
|
337
|
+
return (tx) => tx.moveCall({
|
|
338
|
+
package: packageAddress,
|
|
339
|
+
module: 'sheet',
|
|
340
|
+
function: 'payer_debts',
|
|
341
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
342
|
+
typeArguments: options.typeArguments
|
|
343
|
+
});
|
|
344
|
+
}
|