@nightlylabs/dex-sdk 0.1.26 → 0.1.28
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 +31 -26
- package/dist/index.d.cts +41 -17
- package/dist/index.d.ts +41 -17
- package/dist/index.js +31 -26
- 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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
449
449
|
"name": "transfer_to_user",
|
|
450
450
|
"friends": [],
|
|
451
451
|
"exposed_functions": [
|
|
@@ -472,7 +472,7 @@ var transferToUser_default = ABI16;
|
|
|
472
472
|
|
|
473
473
|
// generated_types/placeMultiplePerpOrders.ts
|
|
474
474
|
var ABI17 = {
|
|
475
|
-
"address": "
|
|
475
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
476
476
|
"name": "place_multiple_perp_orders",
|
|
477
477
|
"friends": [],
|
|
478
478
|
"exposed_functions": [
|
|
@@ -501,7 +501,7 @@ var placeMultiplePerpOrders_default = ABI17;
|
|
|
501
501
|
|
|
502
502
|
// generated_types/claimKickbackFee.ts
|
|
503
503
|
var ABI18 = {
|
|
504
|
-
"address": "
|
|
504
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
505
505
|
"name": "claim_kickback_fee",
|
|
506
506
|
"friends": [],
|
|
507
507
|
"exposed_functions": [
|
|
@@ -524,7 +524,7 @@ var claimKickbackFee_default = ABI18;
|
|
|
524
524
|
|
|
525
525
|
// generated_types/replaceMultipleOrders.ts
|
|
526
526
|
var ABI19 = {
|
|
527
|
-
"address": "
|
|
527
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
528
528
|
"name": "replace_multiple_orders",
|
|
529
529
|
"friends": [],
|
|
530
530
|
"exposed_functions": [
|
|
@@ -552,7 +552,7 @@ var replaceMultipleOrders_default = ABI19;
|
|
|
552
552
|
|
|
553
553
|
// generated_types/claimDeposit.ts
|
|
554
554
|
var ABI20 = {
|
|
555
|
-
"address": "
|
|
555
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
556
556
|
"name": "claim_deposit",
|
|
557
557
|
"friends": [],
|
|
558
558
|
"exposed_functions": [
|
|
@@ -576,7 +576,7 @@ var claimDeposit_default = ABI20;
|
|
|
576
576
|
|
|
577
577
|
// generated_types/removeApiKeySigner.ts
|
|
578
578
|
var ABI21 = {
|
|
579
|
-
"address": "
|
|
579
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
580
580
|
"name": "remove_api_key_signer",
|
|
581
581
|
"friends": [],
|
|
582
582
|
"exposed_functions": [
|
|
@@ -600,7 +600,7 @@ var removeApiKeySigner_default = ABI21;
|
|
|
600
600
|
|
|
601
601
|
// generated_types/setReferralCode.ts
|
|
602
602
|
var ABI22 = {
|
|
603
|
-
"address": "
|
|
603
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
604
604
|
"name": "set_referral_code",
|
|
605
605
|
"friends": [],
|
|
606
606
|
"exposed_functions": [
|
|
@@ -624,7 +624,7 @@ var setReferralCode_default = ABI22;
|
|
|
624
624
|
|
|
625
625
|
// generated_types/tokenizeUserVaultInvestment.ts
|
|
626
626
|
var ABI23 = {
|
|
627
|
-
"address": "
|
|
627
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
628
628
|
"name": "tokenize_user_vault_investment",
|
|
629
629
|
"friends": [],
|
|
630
630
|
"exposed_functions": [
|
|
@@ -648,7 +648,7 @@ var tokenizeUserVaultInvestment_default = ABI23;
|
|
|
648
648
|
|
|
649
649
|
// generated_types/addCredits.ts
|
|
650
650
|
var ABI24 = {
|
|
651
|
-
"address": "
|
|
651
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
652
652
|
"name": "add_credits",
|
|
653
653
|
"friends": [],
|
|
654
654
|
"exposed_functions": [
|
|
@@ -757,6 +757,7 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
|
|
|
757
757
|
EndpointsV12["GetIndexerStatus"] = "/v1/get_indexer_status";
|
|
758
758
|
EndpointsV12["GetVaultWithdrawals"] = "/v1/get_vault_withdrawals";
|
|
759
759
|
EndpointsV12["GetVaultDeposits"] = "/v1/get_vault_deposits";
|
|
760
|
+
EndpointsV12["GetUserVolumeForReferral"] = "/v1/get_required_volume_for_referral";
|
|
760
761
|
return EndpointsV12;
|
|
761
762
|
})(EndpointsV1 || {});
|
|
762
763
|
var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
|
|
@@ -779,7 +780,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
779
780
|
|
|
780
781
|
// generated_types/withdrawFromVault.ts
|
|
781
782
|
var ABI25 = {
|
|
782
|
-
"address": "
|
|
783
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
783
784
|
"name": "withdraw_from_vault",
|
|
784
785
|
"friends": [],
|
|
785
786
|
"exposed_functions": [
|
|
@@ -1447,6 +1448,10 @@ var Client = class _Client {
|
|
|
1447
1448
|
const response = await this.sendGetJson("/v1/get_vault_withdrawals" /* GetVaultWithdrawals */, request);
|
|
1448
1449
|
return response;
|
|
1449
1450
|
};
|
|
1451
|
+
this.getUserRequiredVolumeForReferral = async (request) => {
|
|
1452
|
+
const response = await this.sendGetJson("/v1/get_required_volume_for_referral" /* GetUserVolumeForReferral */, request);
|
|
1453
|
+
return response;
|
|
1454
|
+
};
|
|
1450
1455
|
// Meta
|
|
1451
1456
|
this.getTime = async () => {
|
|
1452
1457
|
const response = await this.sendGetJson("/time" /* Time */);
|
|
@@ -2174,7 +2179,7 @@ function parseEntryFunctionAbi(args) {
|
|
|
2174
2179
|
|
|
2175
2180
|
// generated_types/faucetEntrypoints.ts
|
|
2176
2181
|
var ABI26 = {
|
|
2177
|
-
"address": "
|
|
2182
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
2178
2183
|
"name": "faucet_entrypoints",
|
|
2179
2184
|
"friends": [],
|
|
2180
2185
|
"exposed_functions": [
|
package/dist/index.d.cts
CHANGED
|
@@ -715,13 +715,6 @@ interface GetUserVaultDepositsRequest {
|
|
|
715
715
|
newerTimestampMs?: string;
|
|
716
716
|
paginationCursor?: PaginationCursor;
|
|
717
717
|
}
|
|
718
|
-
interface HistoricalVaultDeposit {
|
|
719
|
-
vaultId: string;
|
|
720
|
-
usdDepositAmount: string;
|
|
721
|
-
sharesReceived: string;
|
|
722
|
-
tokensReceived: string;
|
|
723
|
-
timestamp: string;
|
|
724
|
-
}
|
|
725
718
|
interface GetUserVaultDepositsResponse {
|
|
726
719
|
vaultDeposits: HistoricalVaultDeposit[];
|
|
727
720
|
paginationCursor?: PaginationCursor;
|
|
@@ -733,18 +726,17 @@ interface GetUserVaultWithdrawsRequest {
|
|
|
733
726
|
newerTimestampMs?: string;
|
|
734
727
|
paginationCursor?: PaginationCursor;
|
|
735
728
|
}
|
|
736
|
-
interface HistoricalVaultWithdraw {
|
|
737
|
-
userId: string;
|
|
738
|
-
vaultId: string;
|
|
739
|
-
usdWithdrawAmount: string;
|
|
740
|
-
sharesReceived: string;
|
|
741
|
-
tokensReceived: string;
|
|
742
|
-
timestamp: string;
|
|
743
|
-
}
|
|
744
729
|
interface GetUserVaultWithdrawsResponse {
|
|
745
730
|
vaultWithdraws: HistoricalVaultWithdraw[];
|
|
746
731
|
paginationCursor?: PaginationCursor;
|
|
747
732
|
}
|
|
733
|
+
interface GetUserVolumeForReferralRequest {
|
|
734
|
+
userId: string;
|
|
735
|
+
}
|
|
736
|
+
interface GetUserVolumeForReferralResponse {
|
|
737
|
+
requiredVolume: string;
|
|
738
|
+
userVolume: string;
|
|
739
|
+
}
|
|
748
740
|
interface GetUserWithdrawalsRequest {
|
|
749
741
|
userId: string;
|
|
750
742
|
paginationCursor?: PaginationCursor;
|
|
@@ -804,6 +796,36 @@ interface GetVaultWithdrawalsResponse {
|
|
|
804
796
|
vaultWithdrawals: HistoricalVaultWithdraw[];
|
|
805
797
|
paginationCursor?: PaginationCursor;
|
|
806
798
|
}
|
|
799
|
+
interface HistoricalVaultDeposit {
|
|
800
|
+
userId: string;
|
|
801
|
+
vaultId: string;
|
|
802
|
+
usdDepositAmount: string;
|
|
803
|
+
sharesReceived: string;
|
|
804
|
+
tokensReceived: string;
|
|
805
|
+
timestamp: string;
|
|
806
|
+
}
|
|
807
|
+
interface HistoricalVaultDeposit {
|
|
808
|
+
vaultId: string;
|
|
809
|
+
usdDepositAmount: string;
|
|
810
|
+
sharesReceived: string;
|
|
811
|
+
tokensReceived: string;
|
|
812
|
+
timestamp: string;
|
|
813
|
+
}
|
|
814
|
+
interface HistoricalVaultWithdraw {
|
|
815
|
+
userId: string;
|
|
816
|
+
vaultId: string;
|
|
817
|
+
usdWithdrawAmount: string;
|
|
818
|
+
sharesReceived: string;
|
|
819
|
+
tokensReceived: string;
|
|
820
|
+
timestamp: string;
|
|
821
|
+
}
|
|
822
|
+
interface HistoricalVaultWithdraw {
|
|
823
|
+
vaultId: string;
|
|
824
|
+
usdAmount: string;
|
|
825
|
+
burntShares: string;
|
|
826
|
+
burntTokens: string;
|
|
827
|
+
timestamp: string;
|
|
828
|
+
}
|
|
807
829
|
interface Lend {
|
|
808
830
|
userId: string;
|
|
809
831
|
tokenAddress: string;
|
|
@@ -1019,7 +1041,8 @@ declare enum EndpointsV1 {
|
|
|
1019
1041
|
GetUserLiquidations = "/v1/get_user_liquidations",
|
|
1020
1042
|
GetIndexerStatus = "/v1/get_indexer_status",
|
|
1021
1043
|
GetVaultWithdrawals = "/v1/get_vault_withdrawals",
|
|
1022
|
-
GetVaultDeposits = "/v1/get_vault_deposits"
|
|
1044
|
+
GetVaultDeposits = "/v1/get_vault_deposits",
|
|
1045
|
+
GetUserVolumeForReferral = "/v1/get_required_volume_for_referral"
|
|
1023
1046
|
}
|
|
1024
1047
|
declare enum SpotMarketStatus {
|
|
1025
1048
|
Halted = "halted",
|
|
@@ -1555,6 +1578,7 @@ declare class Client {
|
|
|
1555
1578
|
getIndexerStatus: () => Promise<GetIndexerStatusResponse>;
|
|
1556
1579
|
getVaultHistoricalDeposits: (request: GetVaultDepositsRequest) => Promise<GetVaultDepositsResponse>;
|
|
1557
1580
|
getVaultWithdrawals: (request: GetVaultWithdrawalsRequest) => Promise<GetVaultWithdrawalsResponse>;
|
|
1581
|
+
getUserRequiredVolumeForReferral: (request: GetUserVolumeForReferralRequest) => Promise<GetUserVolumeForReferralResponse>;
|
|
1558
1582
|
getTime: () => Promise<string>;
|
|
1559
1583
|
}
|
|
1560
1584
|
|
|
@@ -1586,4 +1610,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1586
1610
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1587
1611
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1588
1612
|
|
|
1589
|
-
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 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 };
|
|
1613
|
+
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
|
@@ -715,13 +715,6 @@ interface GetUserVaultDepositsRequest {
|
|
|
715
715
|
newerTimestampMs?: string;
|
|
716
716
|
paginationCursor?: PaginationCursor;
|
|
717
717
|
}
|
|
718
|
-
interface HistoricalVaultDeposit {
|
|
719
|
-
vaultId: string;
|
|
720
|
-
usdDepositAmount: string;
|
|
721
|
-
sharesReceived: string;
|
|
722
|
-
tokensReceived: string;
|
|
723
|
-
timestamp: string;
|
|
724
|
-
}
|
|
725
718
|
interface GetUserVaultDepositsResponse {
|
|
726
719
|
vaultDeposits: HistoricalVaultDeposit[];
|
|
727
720
|
paginationCursor?: PaginationCursor;
|
|
@@ -733,18 +726,17 @@ interface GetUserVaultWithdrawsRequest {
|
|
|
733
726
|
newerTimestampMs?: string;
|
|
734
727
|
paginationCursor?: PaginationCursor;
|
|
735
728
|
}
|
|
736
|
-
interface HistoricalVaultWithdraw {
|
|
737
|
-
userId: string;
|
|
738
|
-
vaultId: string;
|
|
739
|
-
usdWithdrawAmount: string;
|
|
740
|
-
sharesReceived: string;
|
|
741
|
-
tokensReceived: string;
|
|
742
|
-
timestamp: string;
|
|
743
|
-
}
|
|
744
729
|
interface GetUserVaultWithdrawsResponse {
|
|
745
730
|
vaultWithdraws: HistoricalVaultWithdraw[];
|
|
746
731
|
paginationCursor?: PaginationCursor;
|
|
747
732
|
}
|
|
733
|
+
interface GetUserVolumeForReferralRequest {
|
|
734
|
+
userId: string;
|
|
735
|
+
}
|
|
736
|
+
interface GetUserVolumeForReferralResponse {
|
|
737
|
+
requiredVolume: string;
|
|
738
|
+
userVolume: string;
|
|
739
|
+
}
|
|
748
740
|
interface GetUserWithdrawalsRequest {
|
|
749
741
|
userId: string;
|
|
750
742
|
paginationCursor?: PaginationCursor;
|
|
@@ -804,6 +796,36 @@ interface GetVaultWithdrawalsResponse {
|
|
|
804
796
|
vaultWithdrawals: HistoricalVaultWithdraw[];
|
|
805
797
|
paginationCursor?: PaginationCursor;
|
|
806
798
|
}
|
|
799
|
+
interface HistoricalVaultDeposit {
|
|
800
|
+
userId: string;
|
|
801
|
+
vaultId: string;
|
|
802
|
+
usdDepositAmount: string;
|
|
803
|
+
sharesReceived: string;
|
|
804
|
+
tokensReceived: string;
|
|
805
|
+
timestamp: string;
|
|
806
|
+
}
|
|
807
|
+
interface HistoricalVaultDeposit {
|
|
808
|
+
vaultId: string;
|
|
809
|
+
usdDepositAmount: string;
|
|
810
|
+
sharesReceived: string;
|
|
811
|
+
tokensReceived: string;
|
|
812
|
+
timestamp: string;
|
|
813
|
+
}
|
|
814
|
+
interface HistoricalVaultWithdraw {
|
|
815
|
+
userId: string;
|
|
816
|
+
vaultId: string;
|
|
817
|
+
usdWithdrawAmount: string;
|
|
818
|
+
sharesReceived: string;
|
|
819
|
+
tokensReceived: string;
|
|
820
|
+
timestamp: string;
|
|
821
|
+
}
|
|
822
|
+
interface HistoricalVaultWithdraw {
|
|
823
|
+
vaultId: string;
|
|
824
|
+
usdAmount: string;
|
|
825
|
+
burntShares: string;
|
|
826
|
+
burntTokens: string;
|
|
827
|
+
timestamp: string;
|
|
828
|
+
}
|
|
807
829
|
interface Lend {
|
|
808
830
|
userId: string;
|
|
809
831
|
tokenAddress: string;
|
|
@@ -1019,7 +1041,8 @@ declare enum EndpointsV1 {
|
|
|
1019
1041
|
GetUserLiquidations = "/v1/get_user_liquidations",
|
|
1020
1042
|
GetIndexerStatus = "/v1/get_indexer_status",
|
|
1021
1043
|
GetVaultWithdrawals = "/v1/get_vault_withdrawals",
|
|
1022
|
-
GetVaultDeposits = "/v1/get_vault_deposits"
|
|
1044
|
+
GetVaultDeposits = "/v1/get_vault_deposits",
|
|
1045
|
+
GetUserVolumeForReferral = "/v1/get_required_volume_for_referral"
|
|
1023
1046
|
}
|
|
1024
1047
|
declare enum SpotMarketStatus {
|
|
1025
1048
|
Halted = "halted",
|
|
@@ -1555,6 +1578,7 @@ declare class Client {
|
|
|
1555
1578
|
getIndexerStatus: () => Promise<GetIndexerStatusResponse>;
|
|
1556
1579
|
getVaultHistoricalDeposits: (request: GetVaultDepositsRequest) => Promise<GetVaultDepositsResponse>;
|
|
1557
1580
|
getVaultWithdrawals: (request: GetVaultWithdrawalsRequest) => Promise<GetVaultWithdrawalsResponse>;
|
|
1581
|
+
getUserRequiredVolumeForReferral: (request: GetUserVolumeForReferralRequest) => Promise<GetUserVolumeForReferralResponse>;
|
|
1558
1582
|
getTime: () => Promise<string>;
|
|
1559
1583
|
}
|
|
1560
1584
|
|
|
@@ -1586,4 +1610,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
|
|
|
1586
1610
|
declare const getTopicFromCommand: (data: WsCommand) => string;
|
|
1587
1611
|
declare const getTopicFromMessage: (data: WsMessage) => string;
|
|
1588
1612
|
|
|
1589
|
-
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 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 };
|
|
1613
|
+
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
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": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
399
399
|
"name": "transfer_to_user",
|
|
400
400
|
"friends": [],
|
|
401
401
|
"exposed_functions": [
|
|
@@ -422,7 +422,7 @@ var transferToUser_default = ABI16;
|
|
|
422
422
|
|
|
423
423
|
// generated_types/placeMultiplePerpOrders.ts
|
|
424
424
|
var ABI17 = {
|
|
425
|
-
"address": "
|
|
425
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
426
426
|
"name": "place_multiple_perp_orders",
|
|
427
427
|
"friends": [],
|
|
428
428
|
"exposed_functions": [
|
|
@@ -451,7 +451,7 @@ var placeMultiplePerpOrders_default = ABI17;
|
|
|
451
451
|
|
|
452
452
|
// generated_types/claimKickbackFee.ts
|
|
453
453
|
var ABI18 = {
|
|
454
|
-
"address": "
|
|
454
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
455
455
|
"name": "claim_kickback_fee",
|
|
456
456
|
"friends": [],
|
|
457
457
|
"exposed_functions": [
|
|
@@ -474,7 +474,7 @@ var claimKickbackFee_default = ABI18;
|
|
|
474
474
|
|
|
475
475
|
// generated_types/replaceMultipleOrders.ts
|
|
476
476
|
var ABI19 = {
|
|
477
|
-
"address": "
|
|
477
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
478
478
|
"name": "replace_multiple_orders",
|
|
479
479
|
"friends": [],
|
|
480
480
|
"exposed_functions": [
|
|
@@ -502,7 +502,7 @@ var replaceMultipleOrders_default = ABI19;
|
|
|
502
502
|
|
|
503
503
|
// generated_types/claimDeposit.ts
|
|
504
504
|
var ABI20 = {
|
|
505
|
-
"address": "
|
|
505
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
506
506
|
"name": "claim_deposit",
|
|
507
507
|
"friends": [],
|
|
508
508
|
"exposed_functions": [
|
|
@@ -526,7 +526,7 @@ var claimDeposit_default = ABI20;
|
|
|
526
526
|
|
|
527
527
|
// generated_types/removeApiKeySigner.ts
|
|
528
528
|
var ABI21 = {
|
|
529
|
-
"address": "
|
|
529
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
530
530
|
"name": "remove_api_key_signer",
|
|
531
531
|
"friends": [],
|
|
532
532
|
"exposed_functions": [
|
|
@@ -550,7 +550,7 @@ var removeApiKeySigner_default = ABI21;
|
|
|
550
550
|
|
|
551
551
|
// generated_types/setReferralCode.ts
|
|
552
552
|
var ABI22 = {
|
|
553
|
-
"address": "
|
|
553
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
554
554
|
"name": "set_referral_code",
|
|
555
555
|
"friends": [],
|
|
556
556
|
"exposed_functions": [
|
|
@@ -574,7 +574,7 @@ var setReferralCode_default = ABI22;
|
|
|
574
574
|
|
|
575
575
|
// generated_types/tokenizeUserVaultInvestment.ts
|
|
576
576
|
var ABI23 = {
|
|
577
|
-
"address": "
|
|
577
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
578
578
|
"name": "tokenize_user_vault_investment",
|
|
579
579
|
"friends": [],
|
|
580
580
|
"exposed_functions": [
|
|
@@ -598,7 +598,7 @@ var tokenizeUserVaultInvestment_default = ABI23;
|
|
|
598
598
|
|
|
599
599
|
// generated_types/addCredits.ts
|
|
600
600
|
var ABI24 = {
|
|
601
|
-
"address": "
|
|
601
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
602
602
|
"name": "add_credits",
|
|
603
603
|
"friends": [],
|
|
604
604
|
"exposed_functions": [
|
|
@@ -707,6 +707,7 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
|
|
|
707
707
|
EndpointsV12["GetIndexerStatus"] = "/v1/get_indexer_status";
|
|
708
708
|
EndpointsV12["GetVaultWithdrawals"] = "/v1/get_vault_withdrawals";
|
|
709
709
|
EndpointsV12["GetVaultDeposits"] = "/v1/get_vault_deposits";
|
|
710
|
+
EndpointsV12["GetUserVolumeForReferral"] = "/v1/get_required_volume_for_referral";
|
|
710
711
|
return EndpointsV12;
|
|
711
712
|
})(EndpointsV1 || {});
|
|
712
713
|
var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
|
|
@@ -729,7 +730,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
|
|
|
729
730
|
|
|
730
731
|
// generated_types/withdrawFromVault.ts
|
|
731
732
|
var ABI25 = {
|
|
732
|
-
"address": "
|
|
733
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
733
734
|
"name": "withdraw_from_vault",
|
|
734
735
|
"friends": [],
|
|
735
736
|
"exposed_functions": [
|
|
@@ -1397,6 +1398,10 @@ var Client = class _Client {
|
|
|
1397
1398
|
const response = await this.sendGetJson("/v1/get_vault_withdrawals" /* GetVaultWithdrawals */, request);
|
|
1398
1399
|
return response;
|
|
1399
1400
|
};
|
|
1401
|
+
this.getUserRequiredVolumeForReferral = async (request) => {
|
|
1402
|
+
const response = await this.sendGetJson("/v1/get_required_volume_for_referral" /* GetUserVolumeForReferral */, request);
|
|
1403
|
+
return response;
|
|
1404
|
+
};
|
|
1400
1405
|
// Meta
|
|
1401
1406
|
this.getTime = async () => {
|
|
1402
1407
|
const response = await this.sendGetJson("/time" /* Time */);
|
|
@@ -2124,7 +2129,7 @@ function parseEntryFunctionAbi(args) {
|
|
|
2124
2129
|
|
|
2125
2130
|
// generated_types/faucetEntrypoints.ts
|
|
2126
2131
|
var ABI26 = {
|
|
2127
|
-
"address": "
|
|
2132
|
+
"address": "0x3fc2d923fdca24e86b8393f89a58d76963f22032e40e1781df33bb16e4513db5",
|
|
2128
2133
|
"name": "faucet_entrypoints",
|
|
2129
2134
|
"friends": [],
|
|
2130
2135
|
"exposed_functions": [
|