@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,426 @@
|
|
|
1
|
+
/**************************************************************
|
|
2
|
+
* THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
|
|
3
|
+
**************************************************************/
|
|
4
|
+
import { MoveStruct, normalizeMoveArguments } from "../utils/index.js";
|
|
5
|
+
import { bcs } from '@mysten/sui/bcs';
|
|
6
|
+
import * as order_1 from "./order.js";
|
|
7
|
+
import * as position_1 from "./position.js";
|
|
8
|
+
import * as position_2 from "./position.js";
|
|
9
|
+
import * as position_3 from "./position.js";
|
|
10
|
+
import * as outcome from "./outcome.js";
|
|
11
|
+
const $moduleName = '@waterx/prediction::view';
|
|
12
|
+
export const RegistryView = new MoveStruct({ name: `${$moduleName}::RegistryView`, fields: {
|
|
13
|
+
balance: bcs.u64(),
|
|
14
|
+
min_reserve: bcs.u64(),
|
|
15
|
+
order_cancel_cooldown_ms: bcs.u64(),
|
|
16
|
+
next_order_id: bcs.u64(),
|
|
17
|
+
order_count: bcs.u64(),
|
|
18
|
+
position_count: bcs.u64(),
|
|
19
|
+
unresolved_market_count: bcs.u64(),
|
|
20
|
+
resolved_market_count: bcs.u64()
|
|
21
|
+
} });
|
|
22
|
+
export const OrderView = new MoveStruct({ name: `${$moduleName}::OrderView`, fields: {
|
|
23
|
+
order_id: bcs.u64(),
|
|
24
|
+
kind: order_1.OrderKind,
|
|
25
|
+
account_id: bcs.Address,
|
|
26
|
+
market_id: bcs.vector(bcs.u8()),
|
|
27
|
+
selection: position_1.Selection,
|
|
28
|
+
position_id: bcs.option(bcs.u64()),
|
|
29
|
+
max_spend: bcs.u64(),
|
|
30
|
+
min_shares: bcs.u64(),
|
|
31
|
+
price_cap: bcs.u64(),
|
|
32
|
+
min_proceeds: bcs.u64(),
|
|
33
|
+
expiry_ts: bcs.u64(),
|
|
34
|
+
self_cancel_after_ts: bcs.u64(),
|
|
35
|
+
by_admin: bcs.bool()
|
|
36
|
+
} });
|
|
37
|
+
export const PositionView = new MoveStruct({ name: `${$moduleName}::PositionView`, fields: {
|
|
38
|
+
position_id: bcs.u64(),
|
|
39
|
+
account_id: bcs.Address,
|
|
40
|
+
market_id: bcs.vector(bcs.u8()),
|
|
41
|
+
selection: position_2.Selection,
|
|
42
|
+
status: position_3.Status,
|
|
43
|
+
filled_shares: bcs.u64(),
|
|
44
|
+
filled_cost: bcs.u64(),
|
|
45
|
+
payout: bcs.u64(),
|
|
46
|
+
close_order_id: bcs.option(bcs.u64()),
|
|
47
|
+
close_min_proceeds: bcs.u64(),
|
|
48
|
+
close_expiry_ts: bcs.u64(),
|
|
49
|
+
close_self_cancel_after_ts: bcs.u64()
|
|
50
|
+
} });
|
|
51
|
+
export const MarketView = new MoveStruct({ name: `${$moduleName}::MarketView`, fields: {
|
|
52
|
+
market_key: bcs.u64(),
|
|
53
|
+
market_id: bcs.vector(bcs.u8()),
|
|
54
|
+
resolved: bcs.bool(),
|
|
55
|
+
paused: bcs.bool(),
|
|
56
|
+
outcome: bcs.option(outcome.Outcome),
|
|
57
|
+
unclaimed_count: bcs.u64()
|
|
58
|
+
} });
|
|
59
|
+
export const AccountDataView = new MoveStruct({ name: `${$moduleName}::AccountDataView`, fields: {
|
|
60
|
+
account_id: bcs.Address,
|
|
61
|
+
has_data: bcs.bool(),
|
|
62
|
+
order_count: bcs.u64(),
|
|
63
|
+
position_count: bcs.u64(),
|
|
64
|
+
order_front: bcs.option(bcs.u64()),
|
|
65
|
+
order_back: bcs.option(bcs.u64()),
|
|
66
|
+
position_front: bcs.option(bcs.u64()),
|
|
67
|
+
position_back: bcs.option(bcs.u64())
|
|
68
|
+
} });
|
|
69
|
+
export function registry(options) {
|
|
70
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
71
|
+
const argumentsTypes = [
|
|
72
|
+
null
|
|
73
|
+
];
|
|
74
|
+
const parameterNames = ["marketRegistry"];
|
|
75
|
+
return (tx) => tx.moveCall({
|
|
76
|
+
package: packageAddress,
|
|
77
|
+
module: 'view',
|
|
78
|
+
function: 'registry',
|
|
79
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
80
|
+
typeArguments: options.typeArguments
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
export function order(options) {
|
|
84
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
85
|
+
const argumentsTypes = [
|
|
86
|
+
null,
|
|
87
|
+
'u64'
|
|
88
|
+
];
|
|
89
|
+
const parameterNames = ["marketRegistry", "orderId"];
|
|
90
|
+
return (tx) => tx.moveCall({
|
|
91
|
+
package: packageAddress,
|
|
92
|
+
module: 'view',
|
|
93
|
+
function: 'order',
|
|
94
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
95
|
+
typeArguments: options.typeArguments
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
export function position(options) {
|
|
99
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
100
|
+
const argumentsTypes = [
|
|
101
|
+
null,
|
|
102
|
+
'u64'
|
|
103
|
+
];
|
|
104
|
+
const parameterNames = ["marketRegistry", "positionId"];
|
|
105
|
+
return (tx) => tx.moveCall({
|
|
106
|
+
package: packageAddress,
|
|
107
|
+
module: 'view',
|
|
108
|
+
function: 'position',
|
|
109
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
110
|
+
typeArguments: options.typeArguments
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
export function marketById(options) {
|
|
114
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
115
|
+
const argumentsTypes = [
|
|
116
|
+
null,
|
|
117
|
+
'vector<u8>'
|
|
118
|
+
];
|
|
119
|
+
const parameterNames = ["marketRegistry", "marketId"];
|
|
120
|
+
return (tx) => tx.moveCall({
|
|
121
|
+
package: packageAddress,
|
|
122
|
+
module: 'view',
|
|
123
|
+
function: 'market_by_id',
|
|
124
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
125
|
+
typeArguments: options.typeArguments
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
export function marketByKey(options) {
|
|
129
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
130
|
+
const argumentsTypes = [
|
|
131
|
+
null,
|
|
132
|
+
'u64'
|
|
133
|
+
];
|
|
134
|
+
const parameterNames = ["marketRegistry", "marketKey"];
|
|
135
|
+
return (tx) => tx.moveCall({
|
|
136
|
+
package: packageAddress,
|
|
137
|
+
module: 'view',
|
|
138
|
+
function: 'market_by_key',
|
|
139
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
140
|
+
typeArguments: options.typeArguments
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
export function orderCursor(options) {
|
|
144
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
145
|
+
const argumentsTypes = [
|
|
146
|
+
null
|
|
147
|
+
];
|
|
148
|
+
const parameterNames = ["marketRegistry"];
|
|
149
|
+
return (tx) => tx.moveCall({
|
|
150
|
+
package: packageAddress,
|
|
151
|
+
module: 'view',
|
|
152
|
+
function: 'order_cursor',
|
|
153
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
154
|
+
typeArguments: options.typeArguments
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
export function positionCursor(options) {
|
|
158
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
159
|
+
const argumentsTypes = [
|
|
160
|
+
null
|
|
161
|
+
];
|
|
162
|
+
const parameterNames = ["marketRegistry"];
|
|
163
|
+
return (tx) => tx.moveCall({
|
|
164
|
+
package: packageAddress,
|
|
165
|
+
module: 'view',
|
|
166
|
+
function: 'position_cursor',
|
|
167
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
168
|
+
typeArguments: options.typeArguments
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
export function unresolvedMarketCursor(options) {
|
|
172
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
173
|
+
const argumentsTypes = [
|
|
174
|
+
null
|
|
175
|
+
];
|
|
176
|
+
const parameterNames = ["marketRegistry"];
|
|
177
|
+
return (tx) => tx.moveCall({
|
|
178
|
+
package: packageAddress,
|
|
179
|
+
module: 'view',
|
|
180
|
+
function: 'unresolved_market_cursor',
|
|
181
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
182
|
+
typeArguments: options.typeArguments
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
export function resolvedMarketCursor(options) {
|
|
186
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
187
|
+
const argumentsTypes = [
|
|
188
|
+
null
|
|
189
|
+
];
|
|
190
|
+
const parameterNames = ["marketRegistry"];
|
|
191
|
+
return (tx) => tx.moveCall({
|
|
192
|
+
package: packageAddress,
|
|
193
|
+
module: 'view',
|
|
194
|
+
function: 'resolved_market_cursor',
|
|
195
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
196
|
+
typeArguments: options.typeArguments
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
export function account(options) {
|
|
200
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
201
|
+
const argumentsTypes = [
|
|
202
|
+
null,
|
|
203
|
+
'0x2::object::ID'
|
|
204
|
+
];
|
|
205
|
+
const parameterNames = ["wxaRegistry", "accountId"];
|
|
206
|
+
return (tx) => tx.moveCall({
|
|
207
|
+
package: packageAddress,
|
|
208
|
+
module: 'view',
|
|
209
|
+
function: 'account',
|
|
210
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
export function accountOrderCursor(options) {
|
|
214
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
215
|
+
const argumentsTypes = [
|
|
216
|
+
null,
|
|
217
|
+
'0x2::object::ID'
|
|
218
|
+
];
|
|
219
|
+
const parameterNames = ["wxaRegistry", "accountId"];
|
|
220
|
+
return (tx) => tx.moveCall({
|
|
221
|
+
package: packageAddress,
|
|
222
|
+
module: 'view',
|
|
223
|
+
function: 'account_order_cursor',
|
|
224
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
export function accountPositionCursor(options) {
|
|
228
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
229
|
+
const argumentsTypes = [
|
|
230
|
+
null,
|
|
231
|
+
'0x2::object::ID'
|
|
232
|
+
];
|
|
233
|
+
const parameterNames = ["wxaRegistry", "accountId"];
|
|
234
|
+
return (tx) => tx.moveCall({
|
|
235
|
+
package: packageAddress,
|
|
236
|
+
module: 'view',
|
|
237
|
+
function: 'account_position_cursor',
|
|
238
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
export function accountOrderIds(options) {
|
|
242
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
243
|
+
const argumentsTypes = [
|
|
244
|
+
null,
|
|
245
|
+
'0x2::object::ID',
|
|
246
|
+
'u64'
|
|
247
|
+
];
|
|
248
|
+
const parameterNames = ["wxaRegistry", "accountId", "marketKey"];
|
|
249
|
+
return (tx) => tx.moveCall({
|
|
250
|
+
package: packageAddress,
|
|
251
|
+
module: 'view',
|
|
252
|
+
function: 'account_order_ids',
|
|
253
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
export function accountPositionIds(options) {
|
|
257
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
258
|
+
const argumentsTypes = [
|
|
259
|
+
null,
|
|
260
|
+
'0x2::object::ID',
|
|
261
|
+
'u64'
|
|
262
|
+
];
|
|
263
|
+
const parameterNames = ["wxaRegistry", "accountId", "marketKey"];
|
|
264
|
+
return (tx) => tx.moveCall({
|
|
265
|
+
package: packageAddress,
|
|
266
|
+
module: 'view',
|
|
267
|
+
function: 'account_position_ids',
|
|
268
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
export function accountOrderIdsByMarketId(options) {
|
|
272
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
273
|
+
const argumentsTypes = [
|
|
274
|
+
null,
|
|
275
|
+
null,
|
|
276
|
+
'0x2::object::ID',
|
|
277
|
+
'vector<u8>'
|
|
278
|
+
];
|
|
279
|
+
const parameterNames = ["marketRegistry", "wxaRegistry", "accountId", "marketId"];
|
|
280
|
+
return (tx) => tx.moveCall({
|
|
281
|
+
package: packageAddress,
|
|
282
|
+
module: 'view',
|
|
283
|
+
function: 'account_order_ids_by_market_id',
|
|
284
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
285
|
+
typeArguments: options.typeArguments
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
export function accountPositionIdsByMarketId(options) {
|
|
289
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
290
|
+
const argumentsTypes = [
|
|
291
|
+
null,
|
|
292
|
+
null,
|
|
293
|
+
'0x2::object::ID',
|
|
294
|
+
'vector<u8>'
|
|
295
|
+
];
|
|
296
|
+
const parameterNames = ["marketRegistry", "wxaRegistry", "accountId", "marketId"];
|
|
297
|
+
return (tx) => tx.moveCall({
|
|
298
|
+
package: packageAddress,
|
|
299
|
+
module: 'view',
|
|
300
|
+
function: 'account_position_ids_by_market_id',
|
|
301
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
302
|
+
typeArguments: options.typeArguments
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
export function accountMarketOrderCursor(options) {
|
|
306
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
307
|
+
const argumentsTypes = [
|
|
308
|
+
null,
|
|
309
|
+
'0x2::object::ID',
|
|
310
|
+
'u64'
|
|
311
|
+
];
|
|
312
|
+
const parameterNames = ["wxaRegistry", "accountId", "marketKey"];
|
|
313
|
+
return (tx) => tx.moveCall({
|
|
314
|
+
package: packageAddress,
|
|
315
|
+
module: 'view',
|
|
316
|
+
function: 'account_market_order_cursor',
|
|
317
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
export function accountMarketPositionCursor(options) {
|
|
321
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
322
|
+
const argumentsTypes = [
|
|
323
|
+
null,
|
|
324
|
+
'0x2::object::ID',
|
|
325
|
+
'u64'
|
|
326
|
+
];
|
|
327
|
+
const parameterNames = ["wxaRegistry", "accountId", "marketKey"];
|
|
328
|
+
return (tx) => tx.moveCall({
|
|
329
|
+
package: packageAddress,
|
|
330
|
+
module: 'view',
|
|
331
|
+
function: 'account_market_position_cursor',
|
|
332
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
export function accountOrderNext(options) {
|
|
336
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
337
|
+
const argumentsTypes = [
|
|
338
|
+
null,
|
|
339
|
+
'0x2::object::ID',
|
|
340
|
+
'u64'
|
|
341
|
+
];
|
|
342
|
+
const parameterNames = ["wxaRegistry", "accountId", "orderId"];
|
|
343
|
+
return (tx) => tx.moveCall({
|
|
344
|
+
package: packageAddress,
|
|
345
|
+
module: 'view',
|
|
346
|
+
function: 'account_order_next',
|
|
347
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
export function accountPositionNext(options) {
|
|
351
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
352
|
+
const argumentsTypes = [
|
|
353
|
+
null,
|
|
354
|
+
'0x2::object::ID',
|
|
355
|
+
'u64'
|
|
356
|
+
];
|
|
357
|
+
const parameterNames = ["wxaRegistry", "accountId", "positionId"];
|
|
358
|
+
return (tx) => tx.moveCall({
|
|
359
|
+
package: packageAddress,
|
|
360
|
+
module: 'view',
|
|
361
|
+
function: 'account_position_next',
|
|
362
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
export function accountMarketOrderNext(options) {
|
|
366
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
367
|
+
const argumentsTypes = [
|
|
368
|
+
null,
|
|
369
|
+
'0x2::object::ID',
|
|
370
|
+
'u64',
|
|
371
|
+
'u64'
|
|
372
|
+
];
|
|
373
|
+
const parameterNames = ["wxaRegistry", "accountId", "marketKey", "orderId"];
|
|
374
|
+
return (tx) => tx.moveCall({
|
|
375
|
+
package: packageAddress,
|
|
376
|
+
module: 'view',
|
|
377
|
+
function: 'account_market_order_next',
|
|
378
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
export function accountMarketPositionNext(options) {
|
|
382
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
383
|
+
const argumentsTypes = [
|
|
384
|
+
null,
|
|
385
|
+
'0x2::object::ID',
|
|
386
|
+
'u64',
|
|
387
|
+
'u64'
|
|
388
|
+
];
|
|
389
|
+
const parameterNames = ["wxaRegistry", "accountId", "marketKey", "positionId"];
|
|
390
|
+
return (tx) => tx.moveCall({
|
|
391
|
+
package: packageAddress,
|
|
392
|
+
module: 'view',
|
|
393
|
+
function: 'account_market_position_next',
|
|
394
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
export function accountOrderMarketKey(options) {
|
|
398
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
399
|
+
const argumentsTypes = [
|
|
400
|
+
null,
|
|
401
|
+
'0x2::object::ID',
|
|
402
|
+
'u64'
|
|
403
|
+
];
|
|
404
|
+
const parameterNames = ["wxaRegistry", "accountId", "orderId"];
|
|
405
|
+
return (tx) => tx.moveCall({
|
|
406
|
+
package: packageAddress,
|
|
407
|
+
module: 'view',
|
|
408
|
+
function: 'account_order_market_key',
|
|
409
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
export function accountPositionMarketKey(options) {
|
|
413
|
+
const packageAddress = options.package ?? '@waterx/prediction';
|
|
414
|
+
const argumentsTypes = [
|
|
415
|
+
null,
|
|
416
|
+
'0x2::object::ID',
|
|
417
|
+
'u64'
|
|
418
|
+
];
|
|
419
|
+
const parameterNames = ["wxaRegistry", "accountId", "positionId"];
|
|
420
|
+
return (tx) => tx.moveCall({
|
|
421
|
+
package: packageAddress,
|
|
422
|
+
module: 'view',
|
|
423
|
+
function: 'account_position_market_key',
|
|
424
|
+
arguments: normalizeMoveArguments(options.arguments, argumentsTypes, parameterNames),
|
|
425
|
+
});
|
|
426
|
+
}
|