@typus/typus-perp-sdk 1.1.32-codegen-exp7 → 1.1.32-codegen-exp9

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 (43) hide show
  1. package/dist/src/client.js +34 -3
  2. package/dist/src/fetch.d.ts +2 -2
  3. package/dist/src/fetch.js +42 -40
  4. package/dist/src/generated/typus_perp/admin.d.ts +158 -1
  5. package/dist/src/generated/typus_perp/admin.js +211 -0
  6. package/dist/src/generated/typus_perp/competition.d.ts +39 -1
  7. package/dist/src/generated/typus_perp/competition.js +46 -0
  8. package/dist/src/generated/typus_perp/deps/sui/table.d.ts +31 -0
  9. package/dist/src/generated/typus_perp/{tlp.js → deps/sui/table.js} +28 -13
  10. package/dist/src/generated/typus_perp/deps/typus_framework/vault.d.ts +0 -8
  11. package/dist/src/generated/typus_perp/deps/typus_framework/vault.js +3 -11
  12. package/dist/src/generated/typus_perp/error.d.ts +443 -0
  13. package/dist/src/generated/typus_perp/error.js +788 -0
  14. package/dist/src/generated/typus_perp/escrow.d.ts +51 -1
  15. package/dist/src/generated/typus_perp/escrow.js +63 -0
  16. package/dist/src/generated/typus_perp/lp_pool.d.ts +2 -476
  17. package/dist/src/generated/typus_perp/lp_pool.js +19 -492
  18. package/dist/src/generated/typus_perp/position.d.ts +1016 -1
  19. package/dist/src/generated/typus_perp/position.js +1187 -0
  20. package/dist/src/generated/typus_perp/profit_vault.d.ts +272 -0
  21. package/dist/src/generated/typus_perp/profit_vault.js +321 -0
  22. package/dist/src/generated/typus_perp/symbol.d.ts +30 -1
  23. package/dist/src/generated/typus_perp/symbol.js +42 -0
  24. package/dist/src/generated/typus_perp/trading.d.ts +56 -418
  25. package/dist/src/generated/typus_perp/trading.js +124 -552
  26. package/dist/src/generated/typus_perp/treasury_caps.d.ts +32 -1
  27. package/dist/src/generated/typus_perp/treasury_caps.js +40 -0
  28. package/dist/src/generated/typus_perp/user_account.d.ts +107 -1
  29. package/dist/src/generated/typus_perp/user_account.js +149 -0
  30. package/dist/src/generated/typus_stake_pool/admin.d.ts +9 -25
  31. package/dist/src/generated/typus_stake_pool/admin.js +11 -36
  32. package/dist/src/generated/typus_stake_pool/stake_pool.d.ts +56 -4
  33. package/dist/src/generated/typus_stake_pool/stake_pool.js +68 -4
  34. package/dist/src/generated/utils/index.js +3 -0
  35. package/dist/src/grpc/graphql.d.ts +6 -6
  36. package/dist/src/index.d.ts +0 -2
  37. package/dist/src/index.js +13 -19
  38. package/dist/src/user/order.js +1 -6
  39. package/dist/src/user/orderWithBidReceipt.js +3 -3
  40. package/package.json +2 -2
  41. package/dist/src/generated/typus_perp/lending.d.ts +0 -47
  42. package/dist/src/generated/typus_perp/lending.js +0 -50
  43. package/dist/src/generated/typus_perp/tlp.d.ts +0 -13
@@ -0,0 +1,788 @@
1
+ "use strict";
2
+ /**************************************************************
3
+ * THIS FILE IS GENERATED AND SHOULD NOT BE MANUALLY MODIFIED *
4
+ **************************************************************/
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.poolInactive = poolInactive;
7
+ exports.poolAlreadyActive = poolAlreadyActive;
8
+ exports.tokenPoolInactive = tokenPoolInactive;
9
+ exports.tokenPoolAlreadyActive = tokenPoolAlreadyActive;
10
+ exports.lpTokenTypeMismatched = lpTokenTypeMismatched;
11
+ exports.liquidityTokenNotExisted = liquidityTokenNotExisted;
12
+ exports.depositAmountInsufficient = depositAmountInsufficient;
13
+ exports.oracleMismatched = oracleMismatched;
14
+ exports.insufficientAmountForMintFee = insufficientAmountForMintFee;
15
+ exports.zeroTotalSupply = zeroTotalSupply;
16
+ exports.tvlNotYetUpdated = tvlNotYetUpdated;
17
+ exports.liquidityNotEnough = liquidityNotEnough;
18
+ exports.reachMaxCapacity = reachMaxCapacity;
19
+ exports.reachSlippageThreshold = reachSlippageThreshold;
20
+ exports.frictionTooLarge = frictionTooLarge;
21
+ exports.invalidTokenType = invalidTokenType;
22
+ exports.deactivatingSharesAlreadyExisted = deactivatingSharesAlreadyExisted;
23
+ exports.userDeactivatingSharesNotExisted = userDeactivatingSharesNotExisted;
24
+ exports.liquidityTokenExisted = liquidityTokenExisted;
25
+ exports.invalidConfigRange = invalidConfigRange;
26
+ exports.poolIndexMismatched = poolIndexMismatched;
27
+ exports.reserveBookkeepingError = reserveBookkeepingError;
28
+ exports.rebalanceProcessFieldMismatched = rebalanceProcessFieldMismatched;
29
+ exports.exceedRebalanceCostThreshold = exceedRebalanceCostThreshold;
30
+ exports.processShouldRemovePosition = processShouldRemovePosition;
31
+ exports.processShouldRemoveOrder = processShouldRemoveOrder;
32
+ exports.processShouldSwap = processShouldSwap;
33
+ exports.processShouldRepayLiquidity = processShouldRepayLiquidity;
34
+ exports.unsupportedProcessStatusCode = unsupportedProcessStatusCode;
35
+ exports.zeroPrice = zeroPrice;
36
+ exports.authorityAlreadyExisted = authorityAlreadyExisted;
37
+ exports.authorityDoestNotExist = authorityDoestNotExist;
38
+ exports.authorityEmpty = authorityEmpty;
39
+ exports.invalidVersion = invalidVersion;
40
+ exports.unauthorized = unauthorized;
41
+ exports.notReduceOnlyExecution = notReduceOnlyExecution;
42
+ exports.wrongCollateralType = wrongCollateralType;
43
+ exports.invalidBidReceiptsInput = invalidBidReceiptsInput;
44
+ exports.depositTokenMismatched = depositTokenMismatched;
45
+ exports.linkedOrderIdNotExisted = linkedOrderIdNotExisted;
46
+ exports.portfolioIndexMismatched = portfolioIndexMismatched;
47
+ exports.notOptionCollateralOrder = notOptionCollateralOrder;
48
+ exports.notOptionCollateralPosition = notOptionCollateralPosition;
49
+ exports.notTokenCollateralPosition = notTokenCollateralPosition;
50
+ exports.tooManyLinkedOrders = tooManyLinkedOrders;
51
+ exports.tradingSymbolExisted = tradingSymbolExisted;
52
+ exports.tradingSymbolNotExisted = tradingSymbolNotExisted;
53
+ exports.marketsInactive = marketsInactive;
54
+ exports.tradingSymbolInactive = tradingSymbolInactive;
55
+ exports.activeTradingSymbol = activeTradingSymbol;
56
+ exports.orderNotFound = orderNotFound;
57
+ exports.unsupportedOrderTypeTag = unsupportedOrderTypeTag;
58
+ exports.exceedMaxLeverage = exceedMaxLeverage;
59
+ exports.collateralTokenTypeMismatched = collateralTokenTypeMismatched;
60
+ exports.bidReceiptHasBeenExpired = bidReceiptHasBeenExpired;
61
+ exports.bidReceiptNotExpired = bidReceiptNotExpired;
62
+ exports.bidReceiptNotItm = bidReceiptNotItm;
63
+ exports.invalidOrderSide = invalidOrderSide;
64
+ exports.invalidOrderSize = invalidOrderSize;
65
+ exports.addSizeNotAllowed = addSizeNotAllowed;
66
+ exports.baseTokenMismatched = baseTokenMismatched;
67
+ exports.userMismatched = userMismatched;
68
+ exports.tokenCollateralNotEnough = tokenCollateralNotEnough;
69
+ exports.optionCollateralNotEnough = optionCollateralNotEnough;
70
+ exports.remainingCollateralNotEnough = remainingCollateralNotEnough;
71
+ exports.reachMaxSingleOrderReserveUsage = reachMaxSingleOrderReserveUsage;
72
+ exports.optionCollateralOrderNotFilled = optionCollateralOrderNotFilled;
73
+ exports.orderNotFilledImmediately = orderNotFilledImmediately;
74
+ exports.lpPoolReserveNotEnough = lpPoolReserveNotEnough;
75
+ exports.perpPositionLosses = perpPositionLosses;
76
+ exports.invalidTradingFeeConfig = invalidTradingFeeConfig;
77
+ exports.orderOrPositionSizeNotZero = orderOrPositionSizeNotZero;
78
+ exports.balanceNotEnoughForPayingFee = balanceNotEnoughForPayingFee;
79
+ exports.positionIdNeededWithReduceOnlyOrder = positionIdNeededWithReduceOnlyOrder;
80
+ exports.auctionNotYetEnded = auctionNotYetEnded;
81
+ exports.bidTokenMismatched = bidTokenMismatched;
82
+ exports.exceedMaxOpenInterest = exceedMaxOpenInterest;
83
+ exports.invalidOrderPrice = invalidOrderPrice;
84
+ exports.invalidUserAccount = invalidUserAccount;
85
+ exports.notUserAccountOwner = notUserAccountOwner;
86
+ exports.noBalance = noBalance;
87
+ exports.notUserAccountCap = notUserAccountCap;
88
+ exports.notEmptySymbols = notEmptySymbols;
89
+ exports.invalidBoostBpArrayLength = invalidBoostBpArrayLength;
90
+ exports.invalidIdx = invalidIdx;
91
+ exports.whitelistAlreadyExisted = whitelistAlreadyExisted;
92
+ exports.whitelistNotExisted = whitelistNotExisted;
93
+ function poolInactive(options = {}) {
94
+ const packageAddress = options.package ?? "@typus/perp";
95
+ return (tx) => tx.moveCall({
96
+ package: packageAddress,
97
+ module: "error",
98
+ function: "pool_inactive",
99
+ });
100
+ }
101
+ function poolAlreadyActive(options = {}) {
102
+ const packageAddress = options.package ?? "@typus/perp";
103
+ return (tx) => tx.moveCall({
104
+ package: packageAddress,
105
+ module: "error",
106
+ function: "pool_already_active",
107
+ });
108
+ }
109
+ function tokenPoolInactive(options = {}) {
110
+ const packageAddress = options.package ?? "@typus/perp";
111
+ return (tx) => tx.moveCall({
112
+ package: packageAddress,
113
+ module: "error",
114
+ function: "token_pool_inactive",
115
+ });
116
+ }
117
+ function tokenPoolAlreadyActive(options = {}) {
118
+ const packageAddress = options.package ?? "@typus/perp";
119
+ return (tx) => tx.moveCall({
120
+ package: packageAddress,
121
+ module: "error",
122
+ function: "token_pool_already_active",
123
+ });
124
+ }
125
+ function lpTokenTypeMismatched(options = {}) {
126
+ const packageAddress = options.package ?? "@typus/perp";
127
+ return (tx) => tx.moveCall({
128
+ package: packageAddress,
129
+ module: "error",
130
+ function: "lp_token_type_mismatched",
131
+ });
132
+ }
133
+ function liquidityTokenNotExisted(options = {}) {
134
+ const packageAddress = options.package ?? "@typus/perp";
135
+ return (tx) => tx.moveCall({
136
+ package: packageAddress,
137
+ module: "error",
138
+ function: "liquidity_token_not_existed",
139
+ });
140
+ }
141
+ function depositAmountInsufficient(options = {}) {
142
+ const packageAddress = options.package ?? "@typus/perp";
143
+ return (tx) => tx.moveCall({
144
+ package: packageAddress,
145
+ module: "error",
146
+ function: "deposit_amount_insufficient",
147
+ });
148
+ }
149
+ function oracleMismatched(options = {}) {
150
+ const packageAddress = options.package ?? "@typus/perp";
151
+ return (tx) => tx.moveCall({
152
+ package: packageAddress,
153
+ module: "error",
154
+ function: "oracle_mismatched",
155
+ });
156
+ }
157
+ function insufficientAmountForMintFee(options = {}) {
158
+ const packageAddress = options.package ?? "@typus/perp";
159
+ return (tx) => tx.moveCall({
160
+ package: packageAddress,
161
+ module: "error",
162
+ function: "insufficient_amount_for_mint_fee",
163
+ });
164
+ }
165
+ function zeroTotalSupply(options = {}) {
166
+ const packageAddress = options.package ?? "@typus/perp";
167
+ return (tx) => tx.moveCall({
168
+ package: packageAddress,
169
+ module: "error",
170
+ function: "zero_total_supply",
171
+ });
172
+ }
173
+ function tvlNotYetUpdated(options = {}) {
174
+ const packageAddress = options.package ?? "@typus/perp";
175
+ return (tx) => tx.moveCall({
176
+ package: packageAddress,
177
+ module: "error",
178
+ function: "tvl_not_yet_updated",
179
+ });
180
+ }
181
+ function liquidityNotEnough(options = {}) {
182
+ const packageAddress = options.package ?? "@typus/perp";
183
+ return (tx) => tx.moveCall({
184
+ package: packageAddress,
185
+ module: "error",
186
+ function: "liquidity_not_enough",
187
+ });
188
+ }
189
+ function reachMaxCapacity(options = {}) {
190
+ const packageAddress = options.package ?? "@typus/perp";
191
+ return (tx) => tx.moveCall({
192
+ package: packageAddress,
193
+ module: "error",
194
+ function: "reach_max_capacity",
195
+ });
196
+ }
197
+ function reachSlippageThreshold(options = {}) {
198
+ const packageAddress = options.package ?? "@typus/perp";
199
+ return (tx) => tx.moveCall({
200
+ package: packageAddress,
201
+ module: "error",
202
+ function: "reach_slippage_threshold",
203
+ });
204
+ }
205
+ function frictionTooLarge(options = {}) {
206
+ const packageAddress = options.package ?? "@typus/perp";
207
+ return (tx) => tx.moveCall({
208
+ package: packageAddress,
209
+ module: "error",
210
+ function: "friction_too_large",
211
+ });
212
+ }
213
+ function invalidTokenType(options = {}) {
214
+ const packageAddress = options.package ?? "@typus/perp";
215
+ return (tx) => tx.moveCall({
216
+ package: packageAddress,
217
+ module: "error",
218
+ function: "invalid_token_type",
219
+ });
220
+ }
221
+ function deactivatingSharesAlreadyExisted(options = {}) {
222
+ const packageAddress = options.package ?? "@typus/perp";
223
+ return (tx) => tx.moveCall({
224
+ package: packageAddress,
225
+ module: "error",
226
+ function: "deactivating_shares_already_existed",
227
+ });
228
+ }
229
+ function userDeactivatingSharesNotExisted(options = {}) {
230
+ const packageAddress = options.package ?? "@typus/perp";
231
+ return (tx) => tx.moveCall({
232
+ package: packageAddress,
233
+ module: "error",
234
+ function: "user_deactivating_shares_not_existed",
235
+ });
236
+ }
237
+ function liquidityTokenExisted(options = {}) {
238
+ const packageAddress = options.package ?? "@typus/perp";
239
+ return (tx) => tx.moveCall({
240
+ package: packageAddress,
241
+ module: "error",
242
+ function: "liquidity_token_existed",
243
+ });
244
+ }
245
+ function invalidConfigRange(options = {}) {
246
+ const packageAddress = options.package ?? "@typus/perp";
247
+ return (tx) => tx.moveCall({
248
+ package: packageAddress,
249
+ module: "error",
250
+ function: "invalid_config_range",
251
+ });
252
+ }
253
+ function poolIndexMismatched(options = {}) {
254
+ const packageAddress = options.package ?? "@typus/perp";
255
+ return (tx) => tx.moveCall({
256
+ package: packageAddress,
257
+ module: "error",
258
+ function: "pool_index_mismatched",
259
+ });
260
+ }
261
+ function reserveBookkeepingError(options = {}) {
262
+ const packageAddress = options.package ?? "@typus/perp";
263
+ return (tx) => tx.moveCall({
264
+ package: packageAddress,
265
+ module: "error",
266
+ function: "reserve_bookkeeping_error",
267
+ });
268
+ }
269
+ function rebalanceProcessFieldMismatched(options = {}) {
270
+ const packageAddress = options.package ?? "@typus/perp";
271
+ return (tx) => tx.moveCall({
272
+ package: packageAddress,
273
+ module: "error",
274
+ function: "rebalance_process_field_mismatched",
275
+ });
276
+ }
277
+ function exceedRebalanceCostThreshold(options = {}) {
278
+ const packageAddress = options.package ?? "@typus/perp";
279
+ return (tx) => tx.moveCall({
280
+ package: packageAddress,
281
+ module: "error",
282
+ function: "exceed_rebalance_cost_threshold",
283
+ });
284
+ }
285
+ function processShouldRemovePosition(options = {}) {
286
+ const packageAddress = options.package ?? "@typus/perp";
287
+ return (tx) => tx.moveCall({
288
+ package: packageAddress,
289
+ module: "error",
290
+ function: "process_should_remove_position",
291
+ });
292
+ }
293
+ function processShouldRemoveOrder(options = {}) {
294
+ const packageAddress = options.package ?? "@typus/perp";
295
+ return (tx) => tx.moveCall({
296
+ package: packageAddress,
297
+ module: "error",
298
+ function: "process_should_remove_order",
299
+ });
300
+ }
301
+ function processShouldSwap(options = {}) {
302
+ const packageAddress = options.package ?? "@typus/perp";
303
+ return (tx) => tx.moveCall({
304
+ package: packageAddress,
305
+ module: "error",
306
+ function: "process_should_swap",
307
+ });
308
+ }
309
+ function processShouldRepayLiquidity(options = {}) {
310
+ const packageAddress = options.package ?? "@typus/perp";
311
+ return (tx) => tx.moveCall({
312
+ package: packageAddress,
313
+ module: "error",
314
+ function: "process_should_repay_liquidity",
315
+ });
316
+ }
317
+ function unsupportedProcessStatusCode(options = {}) {
318
+ const packageAddress = options.package ?? "@typus/perp";
319
+ return (tx) => tx.moveCall({
320
+ package: packageAddress,
321
+ module: "error",
322
+ function: "unsupported_process_status_code",
323
+ });
324
+ }
325
+ function zeroPrice(options = {}) {
326
+ const packageAddress = options.package ?? "@typus/perp";
327
+ return (tx) => tx.moveCall({
328
+ package: packageAddress,
329
+ module: "error",
330
+ function: "zero_price",
331
+ });
332
+ }
333
+ function authorityAlreadyExisted(options = {}) {
334
+ const packageAddress = options.package ?? "@typus/perp";
335
+ return (tx) => tx.moveCall({
336
+ package: packageAddress,
337
+ module: "error",
338
+ function: "authority_already_existed",
339
+ });
340
+ }
341
+ function authorityDoestNotExist(options = {}) {
342
+ const packageAddress = options.package ?? "@typus/perp";
343
+ return (tx) => tx.moveCall({
344
+ package: packageAddress,
345
+ module: "error",
346
+ function: "authority_doest_not_exist",
347
+ });
348
+ }
349
+ function authorityEmpty(options = {}) {
350
+ const packageAddress = options.package ?? "@typus/perp";
351
+ return (tx) => tx.moveCall({
352
+ package: packageAddress,
353
+ module: "error",
354
+ function: "authority_empty",
355
+ });
356
+ }
357
+ function invalidVersion(options = {}) {
358
+ const packageAddress = options.package ?? "@typus/perp";
359
+ return (tx) => tx.moveCall({
360
+ package: packageAddress,
361
+ module: "error",
362
+ function: "invalid_version",
363
+ });
364
+ }
365
+ function unauthorized(options = {}) {
366
+ const packageAddress = options.package ?? "@typus/perp";
367
+ return (tx) => tx.moveCall({
368
+ package: packageAddress,
369
+ module: "error",
370
+ function: "unauthorized",
371
+ });
372
+ }
373
+ function notReduceOnlyExecution(options = {}) {
374
+ const packageAddress = options.package ?? "@typus/perp";
375
+ return (tx) => tx.moveCall({
376
+ package: packageAddress,
377
+ module: "error",
378
+ function: "not_reduce_only_execution",
379
+ });
380
+ }
381
+ function wrongCollateralType(options = {}) {
382
+ const packageAddress = options.package ?? "@typus/perp";
383
+ return (tx) => tx.moveCall({
384
+ package: packageAddress,
385
+ module: "error",
386
+ function: "wrong_collateral_type",
387
+ });
388
+ }
389
+ function invalidBidReceiptsInput(options = {}) {
390
+ const packageAddress = options.package ?? "@typus/perp";
391
+ return (tx) => tx.moveCall({
392
+ package: packageAddress,
393
+ module: "error",
394
+ function: "invalid_bid_receipts_input",
395
+ });
396
+ }
397
+ function depositTokenMismatched(options = {}) {
398
+ const packageAddress = options.package ?? "@typus/perp";
399
+ return (tx) => tx.moveCall({
400
+ package: packageAddress,
401
+ module: "error",
402
+ function: "deposit_token_mismatched",
403
+ });
404
+ }
405
+ function linkedOrderIdNotExisted(options = {}) {
406
+ const packageAddress = options.package ?? "@typus/perp";
407
+ return (tx) => tx.moveCall({
408
+ package: packageAddress,
409
+ module: "error",
410
+ function: "linked_order_id_not_existed",
411
+ });
412
+ }
413
+ function portfolioIndexMismatched(options = {}) {
414
+ const packageAddress = options.package ?? "@typus/perp";
415
+ return (tx) => tx.moveCall({
416
+ package: packageAddress,
417
+ module: "error",
418
+ function: "portfolio_index_mismatched",
419
+ });
420
+ }
421
+ function notOptionCollateralOrder(options = {}) {
422
+ const packageAddress = options.package ?? "@typus/perp";
423
+ return (tx) => tx.moveCall({
424
+ package: packageAddress,
425
+ module: "error",
426
+ function: "not_option_collateral_order",
427
+ });
428
+ }
429
+ function notOptionCollateralPosition(options = {}) {
430
+ const packageAddress = options.package ?? "@typus/perp";
431
+ return (tx) => tx.moveCall({
432
+ package: packageAddress,
433
+ module: "error",
434
+ function: "not_option_collateral_position",
435
+ });
436
+ }
437
+ function notTokenCollateralPosition(options = {}) {
438
+ const packageAddress = options.package ?? "@typus/perp";
439
+ return (tx) => tx.moveCall({
440
+ package: packageAddress,
441
+ module: "error",
442
+ function: "not_token_collateral_position",
443
+ });
444
+ }
445
+ function tooManyLinkedOrders(options = {}) {
446
+ const packageAddress = options.package ?? "@typus/perp";
447
+ return (tx) => tx.moveCall({
448
+ package: packageAddress,
449
+ module: "error",
450
+ function: "too_many_linked_orders",
451
+ });
452
+ }
453
+ function tradingSymbolExisted(options = {}) {
454
+ const packageAddress = options.package ?? "@typus/perp";
455
+ return (tx) => tx.moveCall({
456
+ package: packageAddress,
457
+ module: "error",
458
+ function: "trading_symbol_existed",
459
+ });
460
+ }
461
+ function tradingSymbolNotExisted(options = {}) {
462
+ const packageAddress = options.package ?? "@typus/perp";
463
+ return (tx) => tx.moveCall({
464
+ package: packageAddress,
465
+ module: "error",
466
+ function: "trading_symbol_not_existed",
467
+ });
468
+ }
469
+ function marketsInactive(options = {}) {
470
+ const packageAddress = options.package ?? "@typus/perp";
471
+ return (tx) => tx.moveCall({
472
+ package: packageAddress,
473
+ module: "error",
474
+ function: "markets_inactive",
475
+ });
476
+ }
477
+ function tradingSymbolInactive(options = {}) {
478
+ const packageAddress = options.package ?? "@typus/perp";
479
+ return (tx) => tx.moveCall({
480
+ package: packageAddress,
481
+ module: "error",
482
+ function: "trading_symbol_inactive",
483
+ });
484
+ }
485
+ function activeTradingSymbol(options = {}) {
486
+ const packageAddress = options.package ?? "@typus/perp";
487
+ return (tx) => tx.moveCall({
488
+ package: packageAddress,
489
+ module: "error",
490
+ function: "active_trading_symbol",
491
+ });
492
+ }
493
+ function orderNotFound(options = {}) {
494
+ const packageAddress = options.package ?? "@typus/perp";
495
+ return (tx) => tx.moveCall({
496
+ package: packageAddress,
497
+ module: "error",
498
+ function: "order_not_found",
499
+ });
500
+ }
501
+ function unsupportedOrderTypeTag(options = {}) {
502
+ const packageAddress = options.package ?? "@typus/perp";
503
+ return (tx) => tx.moveCall({
504
+ package: packageAddress,
505
+ module: "error",
506
+ function: "unsupported_order_type_tag",
507
+ });
508
+ }
509
+ function exceedMaxLeverage(options = {}) {
510
+ const packageAddress = options.package ?? "@typus/perp";
511
+ return (tx) => tx.moveCall({
512
+ package: packageAddress,
513
+ module: "error",
514
+ function: "exceed_max_leverage",
515
+ });
516
+ }
517
+ function collateralTokenTypeMismatched(options = {}) {
518
+ const packageAddress = options.package ?? "@typus/perp";
519
+ return (tx) => tx.moveCall({
520
+ package: packageAddress,
521
+ module: "error",
522
+ function: "collateral_token_type_mismatched",
523
+ });
524
+ }
525
+ function bidReceiptHasBeenExpired(options = {}) {
526
+ const packageAddress = options.package ?? "@typus/perp";
527
+ return (tx) => tx.moveCall({
528
+ package: packageAddress,
529
+ module: "error",
530
+ function: "bid_receipt_has_been_expired",
531
+ });
532
+ }
533
+ function bidReceiptNotExpired(options = {}) {
534
+ const packageAddress = options.package ?? "@typus/perp";
535
+ return (tx) => tx.moveCall({
536
+ package: packageAddress,
537
+ module: "error",
538
+ function: "bid_receipt_not_expired",
539
+ });
540
+ }
541
+ function bidReceiptNotItm(options = {}) {
542
+ const packageAddress = options.package ?? "@typus/perp";
543
+ return (tx) => tx.moveCall({
544
+ package: packageAddress,
545
+ module: "error",
546
+ function: "bid_receipt_not_itm",
547
+ });
548
+ }
549
+ function invalidOrderSide(options = {}) {
550
+ const packageAddress = options.package ?? "@typus/perp";
551
+ return (tx) => tx.moveCall({
552
+ package: packageAddress,
553
+ module: "error",
554
+ function: "invalid_order_side",
555
+ });
556
+ }
557
+ function invalidOrderSize(options = {}) {
558
+ const packageAddress = options.package ?? "@typus/perp";
559
+ return (tx) => tx.moveCall({
560
+ package: packageAddress,
561
+ module: "error",
562
+ function: "invalid_order_size",
563
+ });
564
+ }
565
+ function addSizeNotAllowed(options = {}) {
566
+ const packageAddress = options.package ?? "@typus/perp";
567
+ return (tx) => tx.moveCall({
568
+ package: packageAddress,
569
+ module: "error",
570
+ function: "add_size_not_allowed",
571
+ });
572
+ }
573
+ function baseTokenMismatched(options = {}) {
574
+ const packageAddress = options.package ?? "@typus/perp";
575
+ return (tx) => tx.moveCall({
576
+ package: packageAddress,
577
+ module: "error",
578
+ function: "base_token_mismatched",
579
+ });
580
+ }
581
+ function userMismatched(options = {}) {
582
+ const packageAddress = options.package ?? "@typus/perp";
583
+ return (tx) => tx.moveCall({
584
+ package: packageAddress,
585
+ module: "error",
586
+ function: "user_mismatched",
587
+ });
588
+ }
589
+ function tokenCollateralNotEnough(options = {}) {
590
+ const packageAddress = options.package ?? "@typus/perp";
591
+ return (tx) => tx.moveCall({
592
+ package: packageAddress,
593
+ module: "error",
594
+ function: "token_collateral_not_enough",
595
+ });
596
+ }
597
+ function optionCollateralNotEnough(options = {}) {
598
+ const packageAddress = options.package ?? "@typus/perp";
599
+ return (tx) => tx.moveCall({
600
+ package: packageAddress,
601
+ module: "error",
602
+ function: "option_collateral_not_enough",
603
+ });
604
+ }
605
+ function remainingCollateralNotEnough(options = {}) {
606
+ const packageAddress = options.package ?? "@typus/perp";
607
+ return (tx) => tx.moveCall({
608
+ package: packageAddress,
609
+ module: "error",
610
+ function: "remaining_collateral_not_enough",
611
+ });
612
+ }
613
+ function reachMaxSingleOrderReserveUsage(options = {}) {
614
+ const packageAddress = options.package ?? "@typus/perp";
615
+ return (tx) => tx.moveCall({
616
+ package: packageAddress,
617
+ module: "error",
618
+ function: "reach_max_single_order_reserve_usage",
619
+ });
620
+ }
621
+ function optionCollateralOrderNotFilled(options = {}) {
622
+ const packageAddress = options.package ?? "@typus/perp";
623
+ return (tx) => tx.moveCall({
624
+ package: packageAddress,
625
+ module: "error",
626
+ function: "option_collateral_order_not_filled",
627
+ });
628
+ }
629
+ function orderNotFilledImmediately(options = {}) {
630
+ const packageAddress = options.package ?? "@typus/perp";
631
+ return (tx) => tx.moveCall({
632
+ package: packageAddress,
633
+ module: "error",
634
+ function: "order_not_filled_immediately",
635
+ });
636
+ }
637
+ function lpPoolReserveNotEnough(options = {}) {
638
+ const packageAddress = options.package ?? "@typus/perp";
639
+ return (tx) => tx.moveCall({
640
+ package: packageAddress,
641
+ module: "error",
642
+ function: "lp_pool_reserve_not_enough",
643
+ });
644
+ }
645
+ function perpPositionLosses(options = {}) {
646
+ const packageAddress = options.package ?? "@typus/perp";
647
+ return (tx) => tx.moveCall({
648
+ package: packageAddress,
649
+ module: "error",
650
+ function: "perp_position_losses",
651
+ });
652
+ }
653
+ function invalidTradingFeeConfig(options = {}) {
654
+ const packageAddress = options.package ?? "@typus/perp";
655
+ return (tx) => tx.moveCall({
656
+ package: packageAddress,
657
+ module: "error",
658
+ function: "invalid_trading_fee_config",
659
+ });
660
+ }
661
+ function orderOrPositionSizeNotZero(options = {}) {
662
+ const packageAddress = options.package ?? "@typus/perp";
663
+ return (tx) => tx.moveCall({
664
+ package: packageAddress,
665
+ module: "error",
666
+ function: "order_or_position_size_not_zero",
667
+ });
668
+ }
669
+ function balanceNotEnoughForPayingFee(options = {}) {
670
+ const packageAddress = options.package ?? "@typus/perp";
671
+ return (tx) => tx.moveCall({
672
+ package: packageAddress,
673
+ module: "error",
674
+ function: "balance_not_enough_for_paying_fee",
675
+ });
676
+ }
677
+ function positionIdNeededWithReduceOnlyOrder(options = {}) {
678
+ const packageAddress = options.package ?? "@typus/perp";
679
+ return (tx) => tx.moveCall({
680
+ package: packageAddress,
681
+ module: "error",
682
+ function: "position_id_needed_with_reduce_only_order",
683
+ });
684
+ }
685
+ function auctionNotYetEnded(options = {}) {
686
+ const packageAddress = options.package ?? "@typus/perp";
687
+ return (tx) => tx.moveCall({
688
+ package: packageAddress,
689
+ module: "error",
690
+ function: "auction_not_yet_ended",
691
+ });
692
+ }
693
+ function bidTokenMismatched(options = {}) {
694
+ const packageAddress = options.package ?? "@typus/perp";
695
+ return (tx) => tx.moveCall({
696
+ package: packageAddress,
697
+ module: "error",
698
+ function: "bid_token_mismatched",
699
+ });
700
+ }
701
+ function exceedMaxOpenInterest(options = {}) {
702
+ const packageAddress = options.package ?? "@typus/perp";
703
+ return (tx) => tx.moveCall({
704
+ package: packageAddress,
705
+ module: "error",
706
+ function: "exceed_max_open_interest",
707
+ });
708
+ }
709
+ function invalidOrderPrice(options = {}) {
710
+ const packageAddress = options.package ?? "@typus/perp";
711
+ return (tx) => tx.moveCall({
712
+ package: packageAddress,
713
+ module: "error",
714
+ function: "invalid_order_price",
715
+ });
716
+ }
717
+ function invalidUserAccount(options = {}) {
718
+ const packageAddress = options.package ?? "@typus/perp";
719
+ return (tx) => tx.moveCall({
720
+ package: packageAddress,
721
+ module: "error",
722
+ function: "invalid_user_account",
723
+ });
724
+ }
725
+ function notUserAccountOwner(options = {}) {
726
+ const packageAddress = options.package ?? "@typus/perp";
727
+ return (tx) => tx.moveCall({
728
+ package: packageAddress,
729
+ module: "error",
730
+ function: "not_user_account_owner",
731
+ });
732
+ }
733
+ function noBalance(options = {}) {
734
+ const packageAddress = options.package ?? "@typus/perp";
735
+ return (tx) => tx.moveCall({
736
+ package: packageAddress,
737
+ module: "error",
738
+ function: "no_balance",
739
+ });
740
+ }
741
+ function notUserAccountCap(options = {}) {
742
+ const packageAddress = options.package ?? "@typus/perp";
743
+ return (tx) => tx.moveCall({
744
+ package: packageAddress,
745
+ module: "error",
746
+ function: "not_user_account_cap",
747
+ });
748
+ }
749
+ function notEmptySymbols(options = {}) {
750
+ const packageAddress = options.package ?? "@typus/perp";
751
+ return (tx) => tx.moveCall({
752
+ package: packageAddress,
753
+ module: "error",
754
+ function: "not_empty_symbols",
755
+ });
756
+ }
757
+ function invalidBoostBpArrayLength(options = {}) {
758
+ const packageAddress = options.package ?? "@typus/perp";
759
+ return (tx) => tx.moveCall({
760
+ package: packageAddress,
761
+ module: "error",
762
+ function: "invalid_boost_bp_array_length",
763
+ });
764
+ }
765
+ function invalidIdx(options = {}) {
766
+ const packageAddress = options.package ?? "@typus/perp";
767
+ return (tx) => tx.moveCall({
768
+ package: packageAddress,
769
+ module: "error",
770
+ function: "invalid_idx",
771
+ });
772
+ }
773
+ function whitelistAlreadyExisted(options = {}) {
774
+ const packageAddress = options.package ?? "@typus/perp";
775
+ return (tx) => tx.moveCall({
776
+ package: packageAddress,
777
+ module: "error",
778
+ function: "whitelist_already_existed",
779
+ });
780
+ }
781
+ function whitelistNotExisted(options = {}) {
782
+ const packageAddress = options.package ?? "@typus/perp";
783
+ return (tx) => tx.moveCall({
784
+ package: packageAddress,
785
+ module: "error",
786
+ function: "whitelist_not_existed",
787
+ });
788
+ }