@nightlylabs/dex-sdk 0.1.31 → 0.1.32
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/dist/index.cjs +46 -96
- package/dist/index.d.cts +1 -10
- package/dist/index.d.ts +1 -10
- package/dist/index.js +46 -96
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -65,7 +65,7 @@ var import_uuid = require("uuid");
|
|
|
65
65
|
|
|
66
66
|
// generated_types/addApiKey.ts
|
|
67
67
|
var ABI = {
|
|
68
|
-
"address": "
|
|
68
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
69
69
|
"name": "add_api_key",
|
|
70
70
|
"friends": [],
|
|
71
71
|
"exposed_functions": [
|
|
@@ -90,7 +90,7 @@ var addApiKey_default = ABI;
|
|
|
90
90
|
|
|
91
91
|
// generated_types/cancelAllPerpOrders.ts
|
|
92
92
|
var ABI2 = {
|
|
93
|
-
"address": "
|
|
93
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
94
94
|
"name": "cancel_all_perp_orders",
|
|
95
95
|
"friends": [],
|
|
96
96
|
"exposed_functions": [
|
|
@@ -113,7 +113,7 @@ var cancelAllPerpOrders_default = ABI2;
|
|
|
113
113
|
|
|
114
114
|
// generated_types/cancelPerpOrders.ts
|
|
115
115
|
var ABI3 = {
|
|
116
|
-
"address": "
|
|
116
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
117
117
|
"name": "cancel_perp_orders",
|
|
118
118
|
"friends": [],
|
|
119
119
|
"exposed_functions": [
|
|
@@ -138,7 +138,7 @@ var cancelPerpOrders_default = ABI3;
|
|
|
138
138
|
|
|
139
139
|
// generated_types/createUser.ts
|
|
140
140
|
var ABI4 = {
|
|
141
|
-
"address": "
|
|
141
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
142
142
|
"name": "create_user",
|
|
143
143
|
"friends": [],
|
|
144
144
|
"exposed_functions": [
|
|
@@ -163,7 +163,7 @@ var createUser_default = ABI4;
|
|
|
163
163
|
|
|
164
164
|
// generated_types/depositToVault.ts
|
|
165
165
|
var ABI5 = {
|
|
166
|
-
"address": "
|
|
166
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
167
167
|
"name": "deposit_to_vault",
|
|
168
168
|
"friends": [],
|
|
169
169
|
"exposed_functions": [
|
|
@@ -188,7 +188,7 @@ var depositToVault_default = ABI5;
|
|
|
188
188
|
|
|
189
189
|
// generated_types/depositToken.ts
|
|
190
190
|
var ABI6 = {
|
|
191
|
-
"address": "
|
|
191
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
192
192
|
"name": "deposit_token",
|
|
193
193
|
"friends": [],
|
|
194
194
|
"exposed_functions": [
|
|
@@ -213,7 +213,7 @@ var depositToken_default = ABI6;
|
|
|
213
213
|
|
|
214
214
|
// generated_types/lendToken.ts
|
|
215
215
|
var ABI7 = {
|
|
216
|
-
"address": "
|
|
216
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
217
217
|
"name": "lend_token",
|
|
218
218
|
"friends": [],
|
|
219
219
|
"exposed_functions": [
|
|
@@ -239,7 +239,7 @@ var lendToken_default = ABI7;
|
|
|
239
239
|
|
|
240
240
|
// generated_types/placePerpLimitOrder.ts
|
|
241
241
|
var ABI8 = {
|
|
242
|
-
"address": "
|
|
242
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
243
243
|
"name": "place_perp_limit_order",
|
|
244
244
|
"friends": [],
|
|
245
245
|
"exposed_functions": [
|
|
@@ -268,7 +268,7 @@ var placePerpLimitOrder_default = ABI8;
|
|
|
268
268
|
|
|
269
269
|
// generated_types/changePerpOrderPrice.ts
|
|
270
270
|
var ABI9 = {
|
|
271
|
-
"address": "
|
|
271
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
272
272
|
"name": "change_perp_order_price",
|
|
273
273
|
"friends": [],
|
|
274
274
|
"exposed_functions": [
|
|
@@ -295,7 +295,7 @@ var changePerpOrderPrice_default = ABI9;
|
|
|
295
295
|
|
|
296
296
|
// generated_types/placePerpMarketOrder.ts
|
|
297
297
|
var ABI10 = {
|
|
298
|
-
"address": "
|
|
298
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
299
299
|
"name": "place_perp_market_order",
|
|
300
300
|
"friends": [],
|
|
301
301
|
"exposed_functions": [
|
|
@@ -323,7 +323,7 @@ var placePerpMarketOrder_default = ABI10;
|
|
|
323
323
|
|
|
324
324
|
// generated_types/redeemToken.ts
|
|
325
325
|
var ABI11 = {
|
|
326
|
-
"address": "
|
|
326
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
327
327
|
"name": "redeem_token",
|
|
328
328
|
"friends": [],
|
|
329
329
|
"exposed_functions": [
|
|
@@ -349,7 +349,7 @@ var redeemToken_default = ABI11;
|
|
|
349
349
|
|
|
350
350
|
// generated_types/removeApiKey.ts
|
|
351
351
|
var ABI12 = {
|
|
352
|
-
"address": "
|
|
352
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
353
353
|
"name": "remove_api_key",
|
|
354
354
|
"friends": [],
|
|
355
355
|
"exposed_functions": [
|
|
@@ -373,7 +373,7 @@ var removeApiKey_default = ABI12;
|
|
|
373
373
|
|
|
374
374
|
// generated_types/setAliasName.ts
|
|
375
375
|
var ABI13 = {
|
|
376
|
-
"address": "
|
|
376
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
377
377
|
"name": "set_alias_name",
|
|
378
378
|
"friends": [],
|
|
379
379
|
"exposed_functions": [
|
|
@@ -397,7 +397,7 @@ var setAliasName_default = ABI13;
|
|
|
397
397
|
|
|
398
398
|
// generated_types/setAutolend.ts
|
|
399
399
|
var ABI14 = {
|
|
400
|
-
"address": "
|
|
400
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
401
401
|
"name": "set_autolend",
|
|
402
402
|
"friends": [],
|
|
403
403
|
"exposed_functions": [
|
|
@@ -421,7 +421,7 @@ var setAutolend_default = ABI14;
|
|
|
421
421
|
|
|
422
422
|
// generated_types/claimReferralFees.ts
|
|
423
423
|
var ABI15 = {
|
|
424
|
-
"address": "
|
|
424
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
425
425
|
"name": "claim_referral_fees",
|
|
426
426
|
"friends": [],
|
|
427
427
|
"exposed_functions": [
|
|
@@ -445,7 +445,7 @@ var claimReferralFees_default = ABI15;
|
|
|
445
445
|
|
|
446
446
|
// generated_types/transferToUser.ts
|
|
447
447
|
var ABI16 = {
|
|
448
|
-
"address": "
|
|
448
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
449
449
|
"name": "transfer_to_user",
|
|
450
450
|
"friends": [],
|
|
451
451
|
"exposed_functions": [
|
|
@@ -470,37 +470,9 @@ var ABI16 = {
|
|
|
470
470
|
};
|
|
471
471
|
var transferToUser_default = ABI16;
|
|
472
472
|
|
|
473
|
-
// generated_types/withdrawToken.ts
|
|
474
|
-
var ABI17 = {
|
|
475
|
-
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
476
|
-
"name": "withdraw_token",
|
|
477
|
-
"friends": [],
|
|
478
|
-
"exposed_functions": [
|
|
479
|
-
{
|
|
480
|
-
"name": "withdraw_token",
|
|
481
|
-
"visibility": "public",
|
|
482
|
-
"is_entry": true,
|
|
483
|
-
"is_view": false,
|
|
484
|
-
"generic_type_params": [],
|
|
485
|
-
"params": [
|
|
486
|
-
"&signer",
|
|
487
|
-
"u64",
|
|
488
|
-
"u64",
|
|
489
|
-
"0x1::object::Object<0x1::fungible_asset::Metadata>",
|
|
490
|
-
"bool",
|
|
491
|
-
"bool",
|
|
492
|
-
"address"
|
|
493
|
-
],
|
|
494
|
-
"return": []
|
|
495
|
-
}
|
|
496
|
-
],
|
|
497
|
-
"structs": []
|
|
498
|
-
};
|
|
499
|
-
var withdrawToken_default = ABI17;
|
|
500
|
-
|
|
501
473
|
// generated_types/placeMultiplePerpOrders.ts
|
|
502
|
-
var
|
|
503
|
-
"address": "
|
|
474
|
+
var ABI17 = {
|
|
475
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
504
476
|
"name": "place_multiple_perp_orders",
|
|
505
477
|
"friends": [],
|
|
506
478
|
"exposed_functions": [
|
|
@@ -525,11 +497,11 @@ var ABI18 = {
|
|
|
525
497
|
],
|
|
526
498
|
"structs": []
|
|
527
499
|
};
|
|
528
|
-
var placeMultiplePerpOrders_default =
|
|
500
|
+
var placeMultiplePerpOrders_default = ABI17;
|
|
529
501
|
|
|
530
502
|
// generated_types/claimKickbackFee.ts
|
|
531
|
-
var
|
|
532
|
-
"address": "
|
|
503
|
+
var ABI18 = {
|
|
504
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
533
505
|
"name": "claim_kickback_fee",
|
|
534
506
|
"friends": [],
|
|
535
507
|
"exposed_functions": [
|
|
@@ -548,11 +520,11 @@ var ABI19 = {
|
|
|
548
520
|
],
|
|
549
521
|
"structs": []
|
|
550
522
|
};
|
|
551
|
-
var claimKickbackFee_default =
|
|
523
|
+
var claimKickbackFee_default = ABI18;
|
|
552
524
|
|
|
553
525
|
// generated_types/replaceMultipleOrders.ts
|
|
554
|
-
var
|
|
555
|
-
"address": "
|
|
526
|
+
var ABI19 = {
|
|
527
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
556
528
|
"name": "replace_multiple_orders",
|
|
557
529
|
"friends": [],
|
|
558
530
|
"exposed_functions": [
|
|
@@ -576,11 +548,11 @@ var ABI20 = {
|
|
|
576
548
|
],
|
|
577
549
|
"structs": []
|
|
578
550
|
};
|
|
579
|
-
var replaceMultipleOrders_default =
|
|
551
|
+
var replaceMultipleOrders_default = ABI19;
|
|
580
552
|
|
|
581
553
|
// generated_types/claimDeposit.ts
|
|
582
|
-
var
|
|
583
|
-
"address": "
|
|
554
|
+
var ABI20 = {
|
|
555
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
584
556
|
"name": "claim_deposit",
|
|
585
557
|
"friends": [],
|
|
586
558
|
"exposed_functions": [
|
|
@@ -600,11 +572,11 @@ var ABI21 = {
|
|
|
600
572
|
],
|
|
601
573
|
"structs": []
|
|
602
574
|
};
|
|
603
|
-
var claimDeposit_default =
|
|
575
|
+
var claimDeposit_default = ABI20;
|
|
604
576
|
|
|
605
577
|
// generated_types/removeApiKeySigner.ts
|
|
606
|
-
var
|
|
607
|
-
"address": "
|
|
578
|
+
var ABI21 = {
|
|
579
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
608
580
|
"name": "remove_api_key_signer",
|
|
609
581
|
"friends": [],
|
|
610
582
|
"exposed_functions": [
|
|
@@ -624,11 +596,11 @@ var ABI22 = {
|
|
|
624
596
|
],
|
|
625
597
|
"structs": []
|
|
626
598
|
};
|
|
627
|
-
var removeApiKeySigner_default =
|
|
599
|
+
var removeApiKeySigner_default = ABI21;
|
|
628
600
|
|
|
629
601
|
// generated_types/setReferralCode.ts
|
|
630
|
-
var
|
|
631
|
-
"address": "
|
|
602
|
+
var ABI22 = {
|
|
603
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
632
604
|
"name": "set_referral_code",
|
|
633
605
|
"friends": [],
|
|
634
606
|
"exposed_functions": [
|
|
@@ -648,11 +620,11 @@ var ABI23 = {
|
|
|
648
620
|
],
|
|
649
621
|
"structs": []
|
|
650
622
|
};
|
|
651
|
-
var setReferralCode_default =
|
|
623
|
+
var setReferralCode_default = ABI22;
|
|
652
624
|
|
|
653
625
|
// generated_types/tokenizeUserVaultInvestment.ts
|
|
654
|
-
var
|
|
655
|
-
"address": "
|
|
626
|
+
var ABI23 = {
|
|
627
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
656
628
|
"name": "tokenize_user_vault_investment",
|
|
657
629
|
"friends": [],
|
|
658
630
|
"exposed_functions": [
|
|
@@ -672,11 +644,11 @@ var ABI24 = {
|
|
|
672
644
|
],
|
|
673
645
|
"structs": []
|
|
674
646
|
};
|
|
675
|
-
var tokenizeUserVaultInvestment_default =
|
|
647
|
+
var tokenizeUserVaultInvestment_default = ABI23;
|
|
676
648
|
|
|
677
649
|
// generated_types/addCredits.ts
|
|
678
|
-
var
|
|
679
|
-
"address": "
|
|
650
|
+
var ABI24 = {
|
|
651
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
680
652
|
"name": "add_credits",
|
|
681
653
|
"friends": [],
|
|
682
654
|
"exposed_functions": [
|
|
@@ -696,7 +668,7 @@ var ABI25 = {
|
|
|
696
668
|
],
|
|
697
669
|
"structs": []
|
|
698
670
|
};
|
|
699
|
-
var addCredits_default =
|
|
671
|
+
var addCredits_default = ABI24;
|
|
700
672
|
|
|
701
673
|
// generated_types/typeshareTypes.ts
|
|
702
674
|
var ChartInterval = /* @__PURE__ */ ((ChartInterval2) => {
|
|
@@ -807,8 +779,8 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
807
779
|
})(UserStatus || {});
|
|
808
780
|
|
|
809
781
|
// generated_types/withdrawFromVault.ts
|
|
810
|
-
var
|
|
811
|
-
"address": "
|
|
782
|
+
var ABI25 = {
|
|
783
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
812
784
|
"name": "withdraw_from_vault",
|
|
813
785
|
"friends": [],
|
|
814
786
|
"exposed_functions": [
|
|
@@ -830,7 +802,7 @@ var ABI26 = {
|
|
|
830
802
|
],
|
|
831
803
|
"structs": []
|
|
832
804
|
};
|
|
833
|
-
var withdrawFromVault_default =
|
|
805
|
+
var withdrawFromVault_default = ABI25;
|
|
834
806
|
|
|
835
807
|
// src/utils.ts
|
|
836
808
|
var import_ts_sdk = require("@aptos-labs/ts-sdk");
|
|
@@ -2085,28 +2057,6 @@ var Client = class _Client {
|
|
|
2085
2057
|
});
|
|
2086
2058
|
return await this.createAndSubmitTransaction(aptosPayload);
|
|
2087
2059
|
}
|
|
2088
|
-
async withdrawToken(params) {
|
|
2089
|
-
const aptosPayload = await (0, import_ts_sdk2.generateTransactionPayload)({
|
|
2090
|
-
aptosConfig: this._aptos.config,
|
|
2091
|
-
abi: parseEntryFunctionAbi({
|
|
2092
|
-
moduleAbi: withdrawToken_default,
|
|
2093
|
-
functionName: withdrawToken_default.name,
|
|
2094
|
-
moduleAddress: withdrawToken_default.address,
|
|
2095
|
-
moduleName: withdrawToken_default.name
|
|
2096
|
-
}),
|
|
2097
|
-
function: `${withdrawToken_default.address}::${withdrawToken_default.name}::withdraw_token`,
|
|
2098
|
-
typeArguments: [],
|
|
2099
|
-
functionArguments: [
|
|
2100
|
-
params.userId,
|
|
2101
|
-
params.amount,
|
|
2102
|
-
params.tokenAddress,
|
|
2103
|
-
params.max,
|
|
2104
|
-
params.borrow,
|
|
2105
|
-
params.recipient
|
|
2106
|
-
]
|
|
2107
|
-
});
|
|
2108
|
-
return await this.createAndSubmitTransaction(aptosPayload);
|
|
2109
|
-
}
|
|
2110
2060
|
async replaceMultipleOrders(params) {
|
|
2111
2061
|
const isBids = params.orders.map((order) => order.isBid);
|
|
2112
2062
|
const prices = params.orders.map((order) => order.price);
|
|
@@ -2228,8 +2178,8 @@ function parseEntryFunctionAbi(args) {
|
|
|
2228
2178
|
}
|
|
2229
2179
|
|
|
2230
2180
|
// generated_types/faucetEntrypoints.ts
|
|
2231
|
-
var
|
|
2232
|
-
"address": "
|
|
2181
|
+
var ABI26 = {
|
|
2182
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
2233
2183
|
"name": "faucet_entrypoints",
|
|
2234
2184
|
"friends": [],
|
|
2235
2185
|
"exposed_functions": [
|
|
@@ -2260,7 +2210,7 @@ var ABI27 = {
|
|
|
2260
2210
|
],
|
|
2261
2211
|
"structs": []
|
|
2262
2212
|
};
|
|
2263
|
-
var faucetEntrypoints_default =
|
|
2213
|
+
var faucetEntrypoints_default = ABI26;
|
|
2264
2214
|
|
|
2265
2215
|
// src/testFaucet.ts
|
|
2266
2216
|
var import_ts_sdk3 = require("@aptos-labs/ts-sdk");
|
package/dist/index.d.cts
CHANGED
|
@@ -1310,14 +1310,6 @@ interface TransferToUserParams {
|
|
|
1310
1310
|
borrow: boolean;
|
|
1311
1311
|
recipient: string;
|
|
1312
1312
|
}
|
|
1313
|
-
interface WithdrawTokenParams {
|
|
1314
|
-
userId: string;
|
|
1315
|
-
tokenAddress: Address;
|
|
1316
|
-
amount: string;
|
|
1317
|
-
borrow: boolean;
|
|
1318
|
-
max: boolean;
|
|
1319
|
-
recipient: Address;
|
|
1320
|
-
}
|
|
1321
1313
|
interface IGetChartCandlesInRange {
|
|
1322
1314
|
marketName: string;
|
|
1323
1315
|
interval: ChartInterval;
|
|
@@ -1523,7 +1515,6 @@ declare class Client {
|
|
|
1523
1515
|
claimReferralFees(params: ClaimReferralFeesParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1524
1516
|
claimKickbackFee(params: ClaimKickbackFeeParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1525
1517
|
transferToUser(params: TransferToUserParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1526
|
-
withdrawToken(params: WithdrawTokenParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1527
1518
|
replaceMultipleOrders(params: ReplaceMultipleOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1528
1519
|
placeMultiplePerpOrders(params: PlaceMultiplePerpOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1529
1520
|
claimDeposit(params: ClaimDepositParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
@@ -1605,4 +1596,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1605
1596
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1606
1597
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1607
1598
|
|
|
1608
|
-
export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type
|
|
1599
|
+
export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
package/dist/index.d.ts
CHANGED
|
@@ -1310,14 +1310,6 @@ interface TransferToUserParams {
|
|
|
1310
1310
|
borrow: boolean;
|
|
1311
1311
|
recipient: string;
|
|
1312
1312
|
}
|
|
1313
|
-
interface WithdrawTokenParams {
|
|
1314
|
-
userId: string;
|
|
1315
|
-
tokenAddress: Address;
|
|
1316
|
-
amount: string;
|
|
1317
|
-
borrow: boolean;
|
|
1318
|
-
max: boolean;
|
|
1319
|
-
recipient: Address;
|
|
1320
|
-
}
|
|
1321
1313
|
interface IGetChartCandlesInRange {
|
|
1322
1314
|
marketName: string;
|
|
1323
1315
|
interval: ChartInterval;
|
|
@@ -1523,7 +1515,6 @@ declare class Client {
|
|
|
1523
1515
|
claimReferralFees(params: ClaimReferralFeesParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1524
1516
|
claimKickbackFee(params: ClaimKickbackFeeParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1525
1517
|
transferToUser(params: TransferToUserParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1526
|
-
withdrawToken(params: WithdrawTokenParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1527
1518
|
replaceMultipleOrders(params: ReplaceMultipleOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1528
1519
|
placeMultiplePerpOrders(params: PlaceMultiplePerpOrdersParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
1529
1520
|
claimDeposit(params: ClaimDepositParams): Promise<SubmitSponsoredTransactionResponse>;
|
|
@@ -1605,4 +1596,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1605
1596
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1606
1597
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1607
1598
|
|
|
1608
|
-
export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type
|
|
1599
|
+
export { type AddApiCreditsParams, type AddApiKey, type AddApiKeyParams, type Address, AdminEndpoints, type ApiCreditsChange, type ApiStatus, type BalanceChange, BaseEndpoints, type Borrow, type BorrowLendUpdate, type BorrowLending, type BorrowLendingAggregatedData, type BorrowLendingHistoricalData, type CancelAllPerpOrdersParams, type CancelPerpOrdersParams, type CanceledPerpOrders, type ChangePerpOrderPriceParams, type ChartCandle, ChartInterval, type CheckReferralCodeRequest, type CheckReferralCodeResponse, type ClaimDepositParams, type ClaimKickbackFeeParams, type ClaimReferralFee, type ClaimReferralFeesParams, type ClaimUserKickbackFee, type ClaimedKickback, type ClaimedReferralKickback, Client, type Content, type CreateUserParams, type Deposit, type DepositToVaultParams, type DepositTokenParams, EndpointsV1, type ErrorResponse, type ExchangeConfig, ExchangeProxies, type FeeData, type FeeTier, type Fees, type FundingCheckpoint, type FundingPayment, type FundingRate, GLOBAL_DENOMINATOR, type GetBorrowLendingAggregatedStatsRequest, type GetBorrowLendingAggregatedStatsResponse, type GetBorrowLendingDataResponse, type GetBorrowLendingHistoricalDataRequest, type GetBorrowLendingHistoricalDataResponse, type GetChartCandlesInRangeRequest, type GetChartCandlesInRangeResponse, type GetIndexPriceHistoryRequest, type GetIndexPriceHistoryResponse, type GetIndexerStatusResponse, type GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetServicesStatusResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserAggregatedVaultStatsRequest, type GetUserAggregatedVaultStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserLiquidationsHistoryRequest, type GetUserLiquidationsHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserVaultDepositsRequest, type GetUserVaultDepositsResponse, type GetUserVaultWithdrawsRequest, type GetUserVaultWithdrawsResponse, type GetUserVolumeForReferralRequest, type GetUserVolumeForReferralResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type GetVaultDepositsRequest, type GetVaultDepositsResponse, type GetVaultHistoricalDataRequest, type GetVaultHistoricalDataResponse, type GetVaultWithdrawalsRequest, type GetVaultWithdrawalsResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalLiquidation, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalVaultDeposit, type HistoricalVaultWithdraw, type HistoricalWithdraw, type IGetChartCandlesInRange, type IndexPriceHistory, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, type NodeStatus, type OracleUpdate, type OracleUpdates, type Order, type OrderFills, OrderSide, OrderStatus, OrderType, type OrderbookUpdate, type PaginationCursor, type PerpFill, type PerpMarketData, type PerpOrder, type PerpOrderBookData, type PerpOrderData, type PerpOrderDataForMarket, type PerpPosition, type PerpTrade, type PerpetualMarketConfigEntry, type PerpetualMarketStatus, type PlaceMultiplePerpOrdersParams, type PlacePerpLimitOrder, type PlacePerpMarketOrder, type PlacePerpOrderParams, type PriceIndex, type RedeemTokenParams, type Referral, type ReferralUpdate, type RemoveApiKey, type RemoveApiKeyParams, type RemoveApiKeySignerParams, type RepayBorrow, type ReplaceMultipleOrdersParams, type SetAlias, type SetAliasNameParams, type SetAutoLend, type SetAutolendParams, type SetReferralCodeParams, type SetReferralParamsRequest, type SetReferralParamsResponse, SpotMarketStatus, Status, type StatusResponse, type SubServiceStatus, type SubmitSponsoredTransactionRequest, type SubmitSponsoredTransactionResponse, TestFaucet, type TimeResponse, type TokenAggregatedStats, type TokenConfigEntry, type TokenizeUserVaultInvestmentParams, type Topic, type Trade, TradeRole, type TradesUpdate, TransferAction, type TransferToUserParams, type TxParams, type UpdateUserFeeTier, type User, type UserAggregatedReferralStats, type UserAggregatedStats, type UserAggregatedVaultStats, type UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultDeposit, type VaultHistoricalData, type VaultInvestment, type VaultWithdraw, type Withdraw, type WithdrawFromVaultParams, type WithdrawLend, type WsBorrowLendUpdate, type WsCommand, type WsFill, type WsMessage, type WsOracleUpdates, type WsPerpMarketUpdates, type WsUserUpdates, generateApiKey, getRandomId, getTopicFromCommand, getTopicFromMessage, nowInMiliseconds, parseEntryFunctionAbi, sleep, toSystemValue };
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { v4 as uuidv4 } from "uuid";
|
|
|
15
15
|
|
|
16
16
|
// generated_types/addApiKey.ts
|
|
17
17
|
var ABI = {
|
|
18
|
-
"address": "
|
|
18
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
19
19
|
"name": "add_api_key",
|
|
20
20
|
"friends": [],
|
|
21
21
|
"exposed_functions": [
|
|
@@ -40,7 +40,7 @@ var addApiKey_default = ABI;
|
|
|
40
40
|
|
|
41
41
|
// generated_types/cancelAllPerpOrders.ts
|
|
42
42
|
var ABI2 = {
|
|
43
|
-
"address": "
|
|
43
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
44
44
|
"name": "cancel_all_perp_orders",
|
|
45
45
|
"friends": [],
|
|
46
46
|
"exposed_functions": [
|
|
@@ -63,7 +63,7 @@ var cancelAllPerpOrders_default = ABI2;
|
|
|
63
63
|
|
|
64
64
|
// generated_types/cancelPerpOrders.ts
|
|
65
65
|
var ABI3 = {
|
|
66
|
-
"address": "
|
|
66
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
67
67
|
"name": "cancel_perp_orders",
|
|
68
68
|
"friends": [],
|
|
69
69
|
"exposed_functions": [
|
|
@@ -88,7 +88,7 @@ var cancelPerpOrders_default = ABI3;
|
|
|
88
88
|
|
|
89
89
|
// generated_types/createUser.ts
|
|
90
90
|
var ABI4 = {
|
|
91
|
-
"address": "
|
|
91
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
92
92
|
"name": "create_user",
|
|
93
93
|
"friends": [],
|
|
94
94
|
"exposed_functions": [
|
|
@@ -113,7 +113,7 @@ var createUser_default = ABI4;
|
|
|
113
113
|
|
|
114
114
|
// generated_types/depositToVault.ts
|
|
115
115
|
var ABI5 = {
|
|
116
|
-
"address": "
|
|
116
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
117
117
|
"name": "deposit_to_vault",
|
|
118
118
|
"friends": [],
|
|
119
119
|
"exposed_functions": [
|
|
@@ -138,7 +138,7 @@ var depositToVault_default = ABI5;
|
|
|
138
138
|
|
|
139
139
|
// generated_types/depositToken.ts
|
|
140
140
|
var ABI6 = {
|
|
141
|
-
"address": "
|
|
141
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
142
142
|
"name": "deposit_token",
|
|
143
143
|
"friends": [],
|
|
144
144
|
"exposed_functions": [
|
|
@@ -163,7 +163,7 @@ var depositToken_default = ABI6;
|
|
|
163
163
|
|
|
164
164
|
// generated_types/lendToken.ts
|
|
165
165
|
var ABI7 = {
|
|
166
|
-
"address": "
|
|
166
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
167
167
|
"name": "lend_token",
|
|
168
168
|
"friends": [],
|
|
169
169
|
"exposed_functions": [
|
|
@@ -189,7 +189,7 @@ var lendToken_default = ABI7;
|
|
|
189
189
|
|
|
190
190
|
// generated_types/placePerpLimitOrder.ts
|
|
191
191
|
var ABI8 = {
|
|
192
|
-
"address": "
|
|
192
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
193
193
|
"name": "place_perp_limit_order",
|
|
194
194
|
"friends": [],
|
|
195
195
|
"exposed_functions": [
|
|
@@ -218,7 +218,7 @@ var placePerpLimitOrder_default = ABI8;
|
|
|
218
218
|
|
|
219
219
|
// generated_types/changePerpOrderPrice.ts
|
|
220
220
|
var ABI9 = {
|
|
221
|
-
"address": "
|
|
221
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
222
222
|
"name": "change_perp_order_price",
|
|
223
223
|
"friends": [],
|
|
224
224
|
"exposed_functions": [
|
|
@@ -245,7 +245,7 @@ var changePerpOrderPrice_default = ABI9;
|
|
|
245
245
|
|
|
246
246
|
// generated_types/placePerpMarketOrder.ts
|
|
247
247
|
var ABI10 = {
|
|
248
|
-
"address": "
|
|
248
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
249
249
|
"name": "place_perp_market_order",
|
|
250
250
|
"friends": [],
|
|
251
251
|
"exposed_functions": [
|
|
@@ -273,7 +273,7 @@ var placePerpMarketOrder_default = ABI10;
|
|
|
273
273
|
|
|
274
274
|
// generated_types/redeemToken.ts
|
|
275
275
|
var ABI11 = {
|
|
276
|
-
"address": "
|
|
276
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
277
277
|
"name": "redeem_token",
|
|
278
278
|
"friends": [],
|
|
279
279
|
"exposed_functions": [
|
|
@@ -299,7 +299,7 @@ var redeemToken_default = ABI11;
|
|
|
299
299
|
|
|
300
300
|
// generated_types/removeApiKey.ts
|
|
301
301
|
var ABI12 = {
|
|
302
|
-
"address": "
|
|
302
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
303
303
|
"name": "remove_api_key",
|
|
304
304
|
"friends": [],
|
|
305
305
|
"exposed_functions": [
|
|
@@ -323,7 +323,7 @@ var removeApiKey_default = ABI12;
|
|
|
323
323
|
|
|
324
324
|
// generated_types/setAliasName.ts
|
|
325
325
|
var ABI13 = {
|
|
326
|
-
"address": "
|
|
326
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
327
327
|
"name": "set_alias_name",
|
|
328
328
|
"friends": [],
|
|
329
329
|
"exposed_functions": [
|
|
@@ -347,7 +347,7 @@ var setAliasName_default = ABI13;
|
|
|
347
347
|
|
|
348
348
|
// generated_types/setAutolend.ts
|
|
349
349
|
var ABI14 = {
|
|
350
|
-
"address": "
|
|
350
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
351
351
|
"name": "set_autolend",
|
|
352
352
|
"friends": [],
|
|
353
353
|
"exposed_functions": [
|
|
@@ -371,7 +371,7 @@ var setAutolend_default = ABI14;
|
|
|
371
371
|
|
|
372
372
|
// generated_types/claimReferralFees.ts
|
|
373
373
|
var ABI15 = {
|
|
374
|
-
"address": "
|
|
374
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
375
375
|
"name": "claim_referral_fees",
|
|
376
376
|
"friends": [],
|
|
377
377
|
"exposed_functions": [
|
|
@@ -395,7 +395,7 @@ var claimReferralFees_default = ABI15;
|
|
|
395
395
|
|
|
396
396
|
// generated_types/transferToUser.ts
|
|
397
397
|
var ABI16 = {
|
|
398
|
-
"address": "
|
|
398
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
399
399
|
"name": "transfer_to_user",
|
|
400
400
|
"friends": [],
|
|
401
401
|
"exposed_functions": [
|
|
@@ -420,37 +420,9 @@ var ABI16 = {
|
|
|
420
420
|
};
|
|
421
421
|
var transferToUser_default = ABI16;
|
|
422
422
|
|
|
423
|
-
// generated_types/withdrawToken.ts
|
|
424
|
-
var ABI17 = {
|
|
425
|
-
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
426
|
-
"name": "withdraw_token",
|
|
427
|
-
"friends": [],
|
|
428
|
-
"exposed_functions": [
|
|
429
|
-
{
|
|
430
|
-
"name": "withdraw_token",
|
|
431
|
-
"visibility": "public",
|
|
432
|
-
"is_entry": true,
|
|
433
|
-
"is_view": false,
|
|
434
|
-
"generic_type_params": [],
|
|
435
|
-
"params": [
|
|
436
|
-
"&signer",
|
|
437
|
-
"u64",
|
|
438
|
-
"u64",
|
|
439
|
-
"0x1::object::Object<0x1::fungible_asset::Metadata>",
|
|
440
|
-
"bool",
|
|
441
|
-
"bool",
|
|
442
|
-
"address"
|
|
443
|
-
],
|
|
444
|
-
"return": []
|
|
445
|
-
}
|
|
446
|
-
],
|
|
447
|
-
"structs": []
|
|
448
|
-
};
|
|
449
|
-
var withdrawToken_default = ABI17;
|
|
450
|
-
|
|
451
423
|
// generated_types/placeMultiplePerpOrders.ts
|
|
452
|
-
var
|
|
453
|
-
"address": "
|
|
424
|
+
var ABI17 = {
|
|
425
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
454
426
|
"name": "place_multiple_perp_orders",
|
|
455
427
|
"friends": [],
|
|
456
428
|
"exposed_functions": [
|
|
@@ -475,11 +447,11 @@ var ABI18 = {
|
|
|
475
447
|
],
|
|
476
448
|
"structs": []
|
|
477
449
|
};
|
|
478
|
-
var placeMultiplePerpOrders_default =
|
|
450
|
+
var placeMultiplePerpOrders_default = ABI17;
|
|
479
451
|
|
|
480
452
|
// generated_types/claimKickbackFee.ts
|
|
481
|
-
var
|
|
482
|
-
"address": "
|
|
453
|
+
var ABI18 = {
|
|
454
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
483
455
|
"name": "claim_kickback_fee",
|
|
484
456
|
"friends": [],
|
|
485
457
|
"exposed_functions": [
|
|
@@ -498,11 +470,11 @@ var ABI19 = {
|
|
|
498
470
|
],
|
|
499
471
|
"structs": []
|
|
500
472
|
};
|
|
501
|
-
var claimKickbackFee_default =
|
|
473
|
+
var claimKickbackFee_default = ABI18;
|
|
502
474
|
|
|
503
475
|
// generated_types/replaceMultipleOrders.ts
|
|
504
|
-
var
|
|
505
|
-
"address": "
|
|
476
|
+
var ABI19 = {
|
|
477
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
506
478
|
"name": "replace_multiple_orders",
|
|
507
479
|
"friends": [],
|
|
508
480
|
"exposed_functions": [
|
|
@@ -526,11 +498,11 @@ var ABI20 = {
|
|
|
526
498
|
],
|
|
527
499
|
"structs": []
|
|
528
500
|
};
|
|
529
|
-
var replaceMultipleOrders_default =
|
|
501
|
+
var replaceMultipleOrders_default = ABI19;
|
|
530
502
|
|
|
531
503
|
// generated_types/claimDeposit.ts
|
|
532
|
-
var
|
|
533
|
-
"address": "
|
|
504
|
+
var ABI20 = {
|
|
505
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
534
506
|
"name": "claim_deposit",
|
|
535
507
|
"friends": [],
|
|
536
508
|
"exposed_functions": [
|
|
@@ -550,11 +522,11 @@ var ABI21 = {
|
|
|
550
522
|
],
|
|
551
523
|
"structs": []
|
|
552
524
|
};
|
|
553
|
-
var claimDeposit_default =
|
|
525
|
+
var claimDeposit_default = ABI20;
|
|
554
526
|
|
|
555
527
|
// generated_types/removeApiKeySigner.ts
|
|
556
|
-
var
|
|
557
|
-
"address": "
|
|
528
|
+
var ABI21 = {
|
|
529
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
558
530
|
"name": "remove_api_key_signer",
|
|
559
531
|
"friends": [],
|
|
560
532
|
"exposed_functions": [
|
|
@@ -574,11 +546,11 @@ var ABI22 = {
|
|
|
574
546
|
],
|
|
575
547
|
"structs": []
|
|
576
548
|
};
|
|
577
|
-
var removeApiKeySigner_default =
|
|
549
|
+
var removeApiKeySigner_default = ABI21;
|
|
578
550
|
|
|
579
551
|
// generated_types/setReferralCode.ts
|
|
580
|
-
var
|
|
581
|
-
"address": "
|
|
552
|
+
var ABI22 = {
|
|
553
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
582
554
|
"name": "set_referral_code",
|
|
583
555
|
"friends": [],
|
|
584
556
|
"exposed_functions": [
|
|
@@ -598,11 +570,11 @@ var ABI23 = {
|
|
|
598
570
|
],
|
|
599
571
|
"structs": []
|
|
600
572
|
};
|
|
601
|
-
var setReferralCode_default =
|
|
573
|
+
var setReferralCode_default = ABI22;
|
|
602
574
|
|
|
603
575
|
// generated_types/tokenizeUserVaultInvestment.ts
|
|
604
|
-
var
|
|
605
|
-
"address": "
|
|
576
|
+
var ABI23 = {
|
|
577
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
606
578
|
"name": "tokenize_user_vault_investment",
|
|
607
579
|
"friends": [],
|
|
608
580
|
"exposed_functions": [
|
|
@@ -622,11 +594,11 @@ var ABI24 = {
|
|
|
622
594
|
],
|
|
623
595
|
"structs": []
|
|
624
596
|
};
|
|
625
|
-
var tokenizeUserVaultInvestment_default =
|
|
597
|
+
var tokenizeUserVaultInvestment_default = ABI23;
|
|
626
598
|
|
|
627
599
|
// generated_types/addCredits.ts
|
|
628
|
-
var
|
|
629
|
-
"address": "
|
|
600
|
+
var ABI24 = {
|
|
601
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
630
602
|
"name": "add_credits",
|
|
631
603
|
"friends": [],
|
|
632
604
|
"exposed_functions": [
|
|
@@ -646,7 +618,7 @@ var ABI25 = {
|
|
|
646
618
|
],
|
|
647
619
|
"structs": []
|
|
648
620
|
};
|
|
649
|
-
var addCredits_default =
|
|
621
|
+
var addCredits_default = ABI24;
|
|
650
622
|
|
|
651
623
|
// generated_types/typeshareTypes.ts
|
|
652
624
|
var ChartInterval = /* @__PURE__ */ ((ChartInterval2) => {
|
|
@@ -757,8 +729,8 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
757
729
|
})(UserStatus || {});
|
|
758
730
|
|
|
759
731
|
// generated_types/withdrawFromVault.ts
|
|
760
|
-
var
|
|
761
|
-
"address": "
|
|
732
|
+
var ABI25 = {
|
|
733
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
762
734
|
"name": "withdraw_from_vault",
|
|
763
735
|
"friends": [],
|
|
764
736
|
"exposed_functions": [
|
|
@@ -780,7 +752,7 @@ var ABI26 = {
|
|
|
780
752
|
],
|
|
781
753
|
"structs": []
|
|
782
754
|
};
|
|
783
|
-
var withdrawFromVault_default =
|
|
755
|
+
var withdrawFromVault_default = ABI25;
|
|
784
756
|
|
|
785
757
|
// src/utils.ts
|
|
786
758
|
import { Account } from "@aptos-labs/ts-sdk";
|
|
@@ -2035,28 +2007,6 @@ var Client = class _Client {
|
|
|
2035
2007
|
});
|
|
2036
2008
|
return await this.createAndSubmitTransaction(aptosPayload);
|
|
2037
2009
|
}
|
|
2038
|
-
async withdrawToken(params) {
|
|
2039
|
-
const aptosPayload = await generateTransactionPayload({
|
|
2040
|
-
aptosConfig: this._aptos.config,
|
|
2041
|
-
abi: parseEntryFunctionAbi({
|
|
2042
|
-
moduleAbi: withdrawToken_default,
|
|
2043
|
-
functionName: withdrawToken_default.name,
|
|
2044
|
-
moduleAddress: withdrawToken_default.address,
|
|
2045
|
-
moduleName: withdrawToken_default.name
|
|
2046
|
-
}),
|
|
2047
|
-
function: `${withdrawToken_default.address}::${withdrawToken_default.name}::withdraw_token`,
|
|
2048
|
-
typeArguments: [],
|
|
2049
|
-
functionArguments: [
|
|
2050
|
-
params.userId,
|
|
2051
|
-
params.amount,
|
|
2052
|
-
params.tokenAddress,
|
|
2053
|
-
params.max,
|
|
2054
|
-
params.borrow,
|
|
2055
|
-
params.recipient
|
|
2056
|
-
]
|
|
2057
|
-
});
|
|
2058
|
-
return await this.createAndSubmitTransaction(aptosPayload);
|
|
2059
|
-
}
|
|
2060
2010
|
async replaceMultipleOrders(params) {
|
|
2061
2011
|
const isBids = params.orders.map((order) => order.isBid);
|
|
2062
2012
|
const prices = params.orders.map((order) => order.price);
|
|
@@ -2178,8 +2128,8 @@ function parseEntryFunctionAbi(args) {
|
|
|
2178
2128
|
}
|
|
2179
2129
|
|
|
2180
2130
|
// generated_types/faucetEntrypoints.ts
|
|
2181
|
-
var
|
|
2182
|
-
"address": "
|
|
2131
|
+
var ABI26 = {
|
|
2132
|
+
"address": "0x707dd314fcea1586b4b0ee58a660b8a85ccffe17ac3daefafe4d40a54fa2357e",
|
|
2183
2133
|
"name": "faucet_entrypoints",
|
|
2184
2134
|
"friends": [],
|
|
2185
2135
|
"exposed_functions": [
|
|
@@ -2210,7 +2160,7 @@ var ABI27 = {
|
|
|
2210
2160
|
],
|
|
2211
2161
|
"structs": []
|
|
2212
2162
|
};
|
|
2213
|
-
var faucetEntrypoints_default =
|
|
2163
|
+
var faucetEntrypoints_default = ABI26;
|
|
2214
2164
|
|
|
2215
2165
|
// src/testFaucet.ts
|
|
2216
2166
|
import {
|