@nightlylabs/dex-sdk 0.1.11 → 0.1.13

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 CHANGED
@@ -65,7 +65,7 @@ var import_uuid = require("uuid");
65
65
 
66
66
  // generated_types/addApiKey.ts
67
67
  var ABI = {
68
- "address": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
68
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
93
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
116
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
141
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
166
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
191
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
216
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
242
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
271
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
298
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
326
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
352
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
376
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
400
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
424
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
448
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
475
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
504
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
527
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
555
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
579
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
603
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
627
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
651
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
652
652
  "name": "add_credits",
653
653
  "friends": [],
654
654
  "exposed_functions": [
@@ -747,6 +747,11 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
747
747
  EndpointsV12["GetTokensStats"] = "/v1/get_tokens_stats";
748
748
  EndpointsV12["GetTokensAggregatedStats"] = "/v1/get_tokens_aggregated_stats";
749
749
  EndpointsV12["CheckReferralCode"] = "/v1/check_referral_code";
750
+ EndpointsV12["GetUserVaultDeposits"] = "/v1/get_user_vault_deposits";
751
+ EndpointsV12["GetUserVaultWithdrawals"] = "/v1/get_user_vault_withdrawals";
752
+ EndpointsV12["GetVaultHistoricalData"] = "/v1/get_vault_historical_data";
753
+ EndpointsV12["GetIndexPriceHistory"] = "/v1/get_index_price_history";
754
+ EndpointsV12["ServicesStatus"] = "/v1/services_status";
750
755
  return EndpointsV12;
751
756
  })(EndpointsV1 || {});
752
757
  var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
@@ -769,7 +774,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
769
774
 
770
775
  // generated_types/withdrawFromVault.ts
771
776
  var ABI25 = {
772
- "address": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
777
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
773
778
  "name": "withdraw_from_vault",
774
779
  "friends": [],
775
780
  "exposed_functions": [
@@ -908,6 +913,10 @@ var getTopicFromMessage = (data) => {
908
913
  return data.content.userId;
909
914
  case "ApiCreditsChange":
910
915
  return data.content.userId;
916
+ case "VaultDeposit":
917
+ return data.content.userId;
918
+ case "VaultWithdraw":
919
+ return data.content.userId;
911
920
  }
912
921
  };
913
922
 
@@ -1374,6 +1383,34 @@ var Client = class _Client {
1374
1383
  const response = await this.sendGetJson("/v1/check_referral_code" /* CheckReferralCode */, request);
1375
1384
  return response;
1376
1385
  };
1386
+ this.getServicesStatus = async () => {
1387
+ const response = await this.sendGetJson(
1388
+ "/v1/services_status" /* ServicesStatus */
1389
+ );
1390
+ return response;
1391
+ };
1392
+ this.getUserVaultDeposits = async (request) => {
1393
+ const response = await this.sendGetJson("/v1/get_user_vault_deposits" /* GetUserVaultDeposits */, request);
1394
+ return response;
1395
+ };
1396
+ this.getUserVaultWithdraws = async (request) => {
1397
+ const response = await this.sendGetJson("/v1/get_user_vault_withdrawals" /* GetUserVaultWithdrawals */, request);
1398
+ return response;
1399
+ };
1400
+ this.getVaultHistoricalData = async (request) => {
1401
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1402
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1403
+ }
1404
+ const response = await this.sendGetJson("/v1/get_vault_historical_data" /* GetVaultHistoricalData */, request);
1405
+ return response;
1406
+ };
1407
+ this.getHistoricalIndexPrices = async (request) => {
1408
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1409
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1410
+ }
1411
+ const response = await this.sendGetJson("/v1/get_index_price_history" /* GetIndexPriceHistory */, request);
1412
+ return response;
1413
+ };
1377
1414
  // Meta
1378
1415
  this.getTime = async () => {
1379
1416
  const response = await this.sendGetJson("/time" /* Time */);
@@ -2101,7 +2138,7 @@ function parseEntryFunctionAbi(args) {
2101
2138
 
2102
2139
  // generated_types/faucetEntrypoints.ts
2103
2140
  var ABI26 = {
2104
- "address": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
2141
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
2105
2142
  "name": "faucet_entrypoints",
2106
2143
  "friends": [],
2107
2144
  "exposed_functions": [
package/dist/index.d.cts CHANGED
@@ -135,6 +135,7 @@ interface TokenConfigEntry {
135
135
  contractAddress: string;
136
136
  enabled: boolean;
137
137
  tokenDecimals: number;
138
+ vaultId?: string;
138
139
  }
139
140
  interface MarginStep {
140
141
  initialMarginRatio: string;
@@ -247,6 +248,21 @@ interface GetChartCandlesInRangeResponse {
247
248
  chartCandles: ChartCandle[];
248
249
  paginationCursor?: PaginationCursor;
249
250
  }
251
+ interface GetIndexPriceHistoryRequest {
252
+ priceIndex: string;
253
+ olderTimestampMs?: string;
254
+ newerTimestampMs?: string;
255
+ paginationCursor?: PaginationCursor;
256
+ }
257
+ interface IndexPriceHistory {
258
+ priceIndex: string;
259
+ price: string;
260
+ timestamp: string;
261
+ }
262
+ interface GetIndexPriceHistoryResponse {
263
+ prices: IndexPriceHistory[];
264
+ paginationCursor?: PaginationCursor;
265
+ }
250
266
  interface GetPerpMarketsDataRequest {
251
267
  markets: string[];
252
268
  }
@@ -370,6 +386,25 @@ interface PriceIndex {
370
386
  interface GetPriceIndexesResponse {
371
387
  prices: Record<string, PriceIndex>;
372
388
  }
389
+ interface NodeStatus {
390
+ nodeName: string;
391
+ lastProcessedBlock: string;
392
+ lastBlockProcessedAt: string;
393
+ lastProcessedBlockProducedAt: string;
394
+ lastUpdateTimestamp: string;
395
+ }
396
+ interface SubServiceStatus {
397
+ serviceName: string;
398
+ lastSuccessTxAt: string;
399
+ lastFailedTxAt: string;
400
+ lastSuccessTxHash: string;
401
+ lastFailedTxHash: string;
402
+ lastUpdateTimestamp: string;
403
+ }
404
+ interface GetServicesStatusResponse {
405
+ nodeStatus: NodeStatus[];
406
+ subServicesStatus: SubServiceStatus[];
407
+ }
373
408
  interface GetTokenAggregatedStatsRequest {
374
409
  tokenAddress: string[];
375
410
  }
@@ -480,10 +515,6 @@ interface PerpPosition {
480
515
  entryPrice: string;
481
516
  fundingCheckpoint: FundingCheckpoint;
482
517
  }
483
- interface VaultInvestment {
484
- sharesAmount: string;
485
- sharePrice: string;
486
- }
487
518
  interface Referral {
488
519
  masterCode: string;
489
520
  slaveKickback: string;
@@ -494,7 +525,8 @@ interface Vault {
494
525
  totalShares: string;
495
526
  minDeposit: string;
496
527
  withdrawFee: string;
497
- profitShare: string;
528
+ tokenAddress: string;
529
+ holders: string;
498
530
  }
499
531
  interface User {
500
532
  userId: string;
@@ -627,6 +659,36 @@ interface GetUserTransferHistoryResponse {
627
659
  transfers: HistoricalUserTransfer[];
628
660
  paginationCursor?: PaginationCursor;
629
661
  }
662
+ interface GetUserVaultDepositsRequest {
663
+ userId: string;
664
+ vaultId?: string;
665
+ olderTimestampMs?: string;
666
+ newerTimestampMs?: string;
667
+ paginationCursor?: PaginationCursor;
668
+ }
669
+ interface GetUserVaultDepositsResponse {
670
+ vaultDeposits: HistoricalVaultDeposit[];
671
+ paginationCursor?: PaginationCursor;
672
+ }
673
+ interface GetUserVaultWithdrawsRequest {
674
+ userId: string;
675
+ vaultId?: string;
676
+ olderTimestampMs?: string;
677
+ newerTimestampMs?: string;
678
+ paginationCursor?: PaginationCursor;
679
+ }
680
+ interface HistoricalVaultWithdraw {
681
+ userId: string;
682
+ vaultId: string;
683
+ usdWithdrawAmount: string;
684
+ sharesReceived: string;
685
+ tokensReceived: string;
686
+ timestamp: string;
687
+ }
688
+ interface GetUserVaultWithdrawsResponse {
689
+ vaultWithdraws: HistoricalVaultWithdraw[];
690
+ paginationCursor?: PaginationCursor;
691
+ }
630
692
  interface GetUserWithdrawalsRequest {
631
693
  userId: string;
632
694
  paginationCursor?: PaginationCursor;
@@ -648,6 +710,49 @@ interface GetUsersByAddressRequest {
648
710
  interface GetUsersByAddressResponse {
649
711
  users: User[];
650
712
  }
713
+ interface GetVaultDepositsRequest {
714
+ vaultId: string;
715
+ olderTimestampMs?: string;
716
+ newerTimestampMs?: string;
717
+ paginationCursor?: PaginationCursor;
718
+ }
719
+ interface GetVaultDepositsResponse {
720
+ vaultDeposits: HistoricalVaultDeposit[];
721
+ paginationCursor?: PaginationCursor;
722
+ }
723
+ interface GetVaultHistoricalDataRequest {
724
+ vaultId: string;
725
+ olderTimestampMs?: string;
726
+ newerTimestampMs?: string;
727
+ paginationCursor?: PaginationCursor;
728
+ }
729
+ interface VaultHistoricalData {
730
+ vaultId: string;
731
+ totalShares: string;
732
+ minDeposit: string;
733
+ tokenAddress?: string;
734
+ holders: string;
735
+ timestamp: string;
736
+ }
737
+ interface GetVaultHistoricalDataResponse {
738
+ data: VaultHistoricalData[];
739
+ paginationCursor?: PaginationCursor;
740
+ }
741
+ interface HistoricalVaultDeposit {
742
+ userId: string;
743
+ vaultId: string;
744
+ usdDepositAmount: string;
745
+ sharesReceived: string;
746
+ tokensReceived: string;
747
+ timestamp: string;
748
+ }
749
+ interface HistoricalVaultDeposit {
750
+ vaultId: string;
751
+ usdDepositAmount: string;
752
+ sharesReceived: string;
753
+ tokensReceived: string;
754
+ timestamp: string;
755
+ }
651
756
  interface Lend {
652
757
  userId: string;
653
758
  tokenAddress: string;
@@ -786,6 +891,17 @@ interface UserTransfer {
786
891
  tokenAddress: string;
787
892
  amount: string;
788
893
  }
894
+ interface VaultDeposit {
895
+ userId: string;
896
+ usdAmount: string;
897
+ }
898
+ interface VaultInvestment {
899
+ sharesAmount: string;
900
+ }
901
+ interface VaultWithdraw {
902
+ userId: string;
903
+ usdAmount: string;
904
+ }
789
905
  interface Withdraw {
790
906
  userId: string;
791
907
  tokenAddress: string;
@@ -837,7 +953,12 @@ declare enum EndpointsV1 {
837
953
  GetBorrowLendAggregatedData = "/v1/get_borrow_lend_aggregated_data",
838
954
  GetTokensStats = "/v1/get_tokens_stats",
839
955
  GetTokensAggregatedStats = "/v1/get_tokens_aggregated_stats",
840
- CheckReferralCode = "/v1/check_referral_code"
956
+ CheckReferralCode = "/v1/check_referral_code",
957
+ GetUserVaultDeposits = "/v1/get_user_vault_deposits",
958
+ GetUserVaultWithdrawals = "/v1/get_user_vault_withdrawals",
959
+ GetVaultHistoricalData = "/v1/get_vault_historical_data",
960
+ GetIndexPriceHistory = "/v1/get_index_price_history",
961
+ ServicesStatus = "/v1/services_status"
841
962
  }
842
963
  declare enum SpotMarketStatus {
843
964
  Halted = "halted",
@@ -1008,6 +1129,12 @@ type WsMessage = {
1008
1129
  } | {
1009
1130
  type: "ApiCreditsChange";
1010
1131
  content: ApiCreditsChange;
1132
+ } | {
1133
+ type: "VaultDeposit";
1134
+ content: VaultDeposit;
1135
+ } | {
1136
+ type: "VaultWithdraw";
1137
+ content: VaultWithdraw;
1011
1138
  };
1012
1139
 
1013
1140
  type Address = `0x${string}`;
@@ -1162,7 +1289,7 @@ type WsOracleUpdates = Extract<WsMessage, {
1162
1289
  type: 'OracleUpdates';
1163
1290
  }>;
1164
1291
  type WsUserUpdates = Extract<WsMessage, {
1165
- type: 'BalanceChange' | 'Deposit' | 'Withdraw' | 'WithdrawLend' | 'Lend' | 'Borrow' | 'RepayBorrow' | 'PlacePerpLimitOrder' | 'PlacePerpMarketOrder' | 'CanceledPerpOrders' | 'OrderFills' | 'SetAutoLend' | 'SetAlias' | 'AddApiKey' | 'RemoveApiKey' | 'ClaimReferralFee' | 'ClaimUserKickbackFee' | 'UpdateUserFeeTier' | 'UserTransferSent' | 'UserTransferReceived' | 'ReferralUpdate' | 'ApiCreditsChange';
1292
+ type: 'BalanceChange' | 'Deposit' | 'Withdraw' | 'WithdrawLend' | 'Lend' | 'Borrow' | 'RepayBorrow' | 'PlacePerpLimitOrder' | 'PlacePerpMarketOrder' | 'CanceledPerpOrders' | 'OrderFills' | 'SetAutoLend' | 'SetAlias' | 'AddApiKey' | 'RemoveApiKey' | 'ClaimReferralFee' | 'ClaimUserKickbackFee' | 'UpdateUserFeeTier' | 'UserTransferSent' | 'UserTransferReceived' | 'ReferralUpdate' | 'ApiCreditsChange' | 'VaultDeposit' | 'VaultWithdraw';
1166
1293
  }>;
1167
1294
  type WsPerpMarketUpdates = Extract<WsMessage, {
1168
1295
  type: 'OrderbookUpdate' | 'TradesUpdate' | 'MarketStatusChange';
@@ -1357,6 +1484,11 @@ declare class Client {
1357
1484
  getTokenStats: (request: GetTokenStatsHistoryRequest) => Promise<GetTokenStatsHistoryResponse>;
1358
1485
  getTokenAggregatedStats: (request: GetTokenAggregatedStatsRequest) => Promise<GetTokenAggregatedStatsResponse>;
1359
1486
  checkReferralCode: (request: CheckReferralCodeRequest) => Promise<CheckReferralCodeResponse>;
1487
+ getServicesStatus: () => Promise<GetServicesStatusResponse>;
1488
+ getUserVaultDeposits: (request: GetUserDepositsRequest) => Promise<GetUserVaultDepositsResponse>;
1489
+ getUserVaultWithdraws: (request: GetUserWithdrawalsRequest) => Promise<GetUserWithdrawalsResponse>;
1490
+ getVaultHistoricalData: (request: GetVaultHistoricalDataRequest) => Promise<GetVaultHistoricalDataResponse>;
1491
+ getHistoricalIndexPrices: (request: GetIndexPriceHistoryRequest) => Promise<GetIndexPriceHistoryResponse>;
1360
1492
  getTime: () => Promise<string>;
1361
1493
  }
1362
1494
 
@@ -1388,4 +1520,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
1388
1520
  declare const getTopicFromCommand: (data: WsCommand) => string;
1389
1521
  declare const getTopicFromMessage: (data: WsMessage) => string;
1390
1522
 
1391
- 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 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 GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalWithdraw, type IGetChartCandlesInRange, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, 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, SpotMarketStatus, Status, type StatusResponse, 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 UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultInvestment, 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 };
1523
+ 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 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 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 GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, 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 HistoricalDeposit, type HistoricalFunding, 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, 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 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
@@ -135,6 +135,7 @@ interface TokenConfigEntry {
135
135
  contractAddress: string;
136
136
  enabled: boolean;
137
137
  tokenDecimals: number;
138
+ vaultId?: string;
138
139
  }
139
140
  interface MarginStep {
140
141
  initialMarginRatio: string;
@@ -247,6 +248,21 @@ interface GetChartCandlesInRangeResponse {
247
248
  chartCandles: ChartCandle[];
248
249
  paginationCursor?: PaginationCursor;
249
250
  }
251
+ interface GetIndexPriceHistoryRequest {
252
+ priceIndex: string;
253
+ olderTimestampMs?: string;
254
+ newerTimestampMs?: string;
255
+ paginationCursor?: PaginationCursor;
256
+ }
257
+ interface IndexPriceHistory {
258
+ priceIndex: string;
259
+ price: string;
260
+ timestamp: string;
261
+ }
262
+ interface GetIndexPriceHistoryResponse {
263
+ prices: IndexPriceHistory[];
264
+ paginationCursor?: PaginationCursor;
265
+ }
250
266
  interface GetPerpMarketsDataRequest {
251
267
  markets: string[];
252
268
  }
@@ -370,6 +386,25 @@ interface PriceIndex {
370
386
  interface GetPriceIndexesResponse {
371
387
  prices: Record<string, PriceIndex>;
372
388
  }
389
+ interface NodeStatus {
390
+ nodeName: string;
391
+ lastProcessedBlock: string;
392
+ lastBlockProcessedAt: string;
393
+ lastProcessedBlockProducedAt: string;
394
+ lastUpdateTimestamp: string;
395
+ }
396
+ interface SubServiceStatus {
397
+ serviceName: string;
398
+ lastSuccessTxAt: string;
399
+ lastFailedTxAt: string;
400
+ lastSuccessTxHash: string;
401
+ lastFailedTxHash: string;
402
+ lastUpdateTimestamp: string;
403
+ }
404
+ interface GetServicesStatusResponse {
405
+ nodeStatus: NodeStatus[];
406
+ subServicesStatus: SubServiceStatus[];
407
+ }
373
408
  interface GetTokenAggregatedStatsRequest {
374
409
  tokenAddress: string[];
375
410
  }
@@ -480,10 +515,6 @@ interface PerpPosition {
480
515
  entryPrice: string;
481
516
  fundingCheckpoint: FundingCheckpoint;
482
517
  }
483
- interface VaultInvestment {
484
- sharesAmount: string;
485
- sharePrice: string;
486
- }
487
518
  interface Referral {
488
519
  masterCode: string;
489
520
  slaveKickback: string;
@@ -494,7 +525,8 @@ interface Vault {
494
525
  totalShares: string;
495
526
  minDeposit: string;
496
527
  withdrawFee: string;
497
- profitShare: string;
528
+ tokenAddress: string;
529
+ holders: string;
498
530
  }
499
531
  interface User {
500
532
  userId: string;
@@ -627,6 +659,36 @@ interface GetUserTransferHistoryResponse {
627
659
  transfers: HistoricalUserTransfer[];
628
660
  paginationCursor?: PaginationCursor;
629
661
  }
662
+ interface GetUserVaultDepositsRequest {
663
+ userId: string;
664
+ vaultId?: string;
665
+ olderTimestampMs?: string;
666
+ newerTimestampMs?: string;
667
+ paginationCursor?: PaginationCursor;
668
+ }
669
+ interface GetUserVaultDepositsResponse {
670
+ vaultDeposits: HistoricalVaultDeposit[];
671
+ paginationCursor?: PaginationCursor;
672
+ }
673
+ interface GetUserVaultWithdrawsRequest {
674
+ userId: string;
675
+ vaultId?: string;
676
+ olderTimestampMs?: string;
677
+ newerTimestampMs?: string;
678
+ paginationCursor?: PaginationCursor;
679
+ }
680
+ interface HistoricalVaultWithdraw {
681
+ userId: string;
682
+ vaultId: string;
683
+ usdWithdrawAmount: string;
684
+ sharesReceived: string;
685
+ tokensReceived: string;
686
+ timestamp: string;
687
+ }
688
+ interface GetUserVaultWithdrawsResponse {
689
+ vaultWithdraws: HistoricalVaultWithdraw[];
690
+ paginationCursor?: PaginationCursor;
691
+ }
630
692
  interface GetUserWithdrawalsRequest {
631
693
  userId: string;
632
694
  paginationCursor?: PaginationCursor;
@@ -648,6 +710,49 @@ interface GetUsersByAddressRequest {
648
710
  interface GetUsersByAddressResponse {
649
711
  users: User[];
650
712
  }
713
+ interface GetVaultDepositsRequest {
714
+ vaultId: string;
715
+ olderTimestampMs?: string;
716
+ newerTimestampMs?: string;
717
+ paginationCursor?: PaginationCursor;
718
+ }
719
+ interface GetVaultDepositsResponse {
720
+ vaultDeposits: HistoricalVaultDeposit[];
721
+ paginationCursor?: PaginationCursor;
722
+ }
723
+ interface GetVaultHistoricalDataRequest {
724
+ vaultId: string;
725
+ olderTimestampMs?: string;
726
+ newerTimestampMs?: string;
727
+ paginationCursor?: PaginationCursor;
728
+ }
729
+ interface VaultHistoricalData {
730
+ vaultId: string;
731
+ totalShares: string;
732
+ minDeposit: string;
733
+ tokenAddress?: string;
734
+ holders: string;
735
+ timestamp: string;
736
+ }
737
+ interface GetVaultHistoricalDataResponse {
738
+ data: VaultHistoricalData[];
739
+ paginationCursor?: PaginationCursor;
740
+ }
741
+ interface HistoricalVaultDeposit {
742
+ userId: string;
743
+ vaultId: string;
744
+ usdDepositAmount: string;
745
+ sharesReceived: string;
746
+ tokensReceived: string;
747
+ timestamp: string;
748
+ }
749
+ interface HistoricalVaultDeposit {
750
+ vaultId: string;
751
+ usdDepositAmount: string;
752
+ sharesReceived: string;
753
+ tokensReceived: string;
754
+ timestamp: string;
755
+ }
651
756
  interface Lend {
652
757
  userId: string;
653
758
  tokenAddress: string;
@@ -786,6 +891,17 @@ interface UserTransfer {
786
891
  tokenAddress: string;
787
892
  amount: string;
788
893
  }
894
+ interface VaultDeposit {
895
+ userId: string;
896
+ usdAmount: string;
897
+ }
898
+ interface VaultInvestment {
899
+ sharesAmount: string;
900
+ }
901
+ interface VaultWithdraw {
902
+ userId: string;
903
+ usdAmount: string;
904
+ }
789
905
  interface Withdraw {
790
906
  userId: string;
791
907
  tokenAddress: string;
@@ -837,7 +953,12 @@ declare enum EndpointsV1 {
837
953
  GetBorrowLendAggregatedData = "/v1/get_borrow_lend_aggregated_data",
838
954
  GetTokensStats = "/v1/get_tokens_stats",
839
955
  GetTokensAggregatedStats = "/v1/get_tokens_aggregated_stats",
840
- CheckReferralCode = "/v1/check_referral_code"
956
+ CheckReferralCode = "/v1/check_referral_code",
957
+ GetUserVaultDeposits = "/v1/get_user_vault_deposits",
958
+ GetUserVaultWithdrawals = "/v1/get_user_vault_withdrawals",
959
+ GetVaultHistoricalData = "/v1/get_vault_historical_data",
960
+ GetIndexPriceHistory = "/v1/get_index_price_history",
961
+ ServicesStatus = "/v1/services_status"
841
962
  }
842
963
  declare enum SpotMarketStatus {
843
964
  Halted = "halted",
@@ -1008,6 +1129,12 @@ type WsMessage = {
1008
1129
  } | {
1009
1130
  type: "ApiCreditsChange";
1010
1131
  content: ApiCreditsChange;
1132
+ } | {
1133
+ type: "VaultDeposit";
1134
+ content: VaultDeposit;
1135
+ } | {
1136
+ type: "VaultWithdraw";
1137
+ content: VaultWithdraw;
1011
1138
  };
1012
1139
 
1013
1140
  type Address = `0x${string}`;
@@ -1162,7 +1289,7 @@ type WsOracleUpdates = Extract<WsMessage, {
1162
1289
  type: 'OracleUpdates';
1163
1290
  }>;
1164
1291
  type WsUserUpdates = Extract<WsMessage, {
1165
- type: 'BalanceChange' | 'Deposit' | 'Withdraw' | 'WithdrawLend' | 'Lend' | 'Borrow' | 'RepayBorrow' | 'PlacePerpLimitOrder' | 'PlacePerpMarketOrder' | 'CanceledPerpOrders' | 'OrderFills' | 'SetAutoLend' | 'SetAlias' | 'AddApiKey' | 'RemoveApiKey' | 'ClaimReferralFee' | 'ClaimUserKickbackFee' | 'UpdateUserFeeTier' | 'UserTransferSent' | 'UserTransferReceived' | 'ReferralUpdate' | 'ApiCreditsChange';
1292
+ type: 'BalanceChange' | 'Deposit' | 'Withdraw' | 'WithdrawLend' | 'Lend' | 'Borrow' | 'RepayBorrow' | 'PlacePerpLimitOrder' | 'PlacePerpMarketOrder' | 'CanceledPerpOrders' | 'OrderFills' | 'SetAutoLend' | 'SetAlias' | 'AddApiKey' | 'RemoveApiKey' | 'ClaimReferralFee' | 'ClaimUserKickbackFee' | 'UpdateUserFeeTier' | 'UserTransferSent' | 'UserTransferReceived' | 'ReferralUpdate' | 'ApiCreditsChange' | 'VaultDeposit' | 'VaultWithdraw';
1166
1293
  }>;
1167
1294
  type WsPerpMarketUpdates = Extract<WsMessage, {
1168
1295
  type: 'OrderbookUpdate' | 'TradesUpdate' | 'MarketStatusChange';
@@ -1357,6 +1484,11 @@ declare class Client {
1357
1484
  getTokenStats: (request: GetTokenStatsHistoryRequest) => Promise<GetTokenStatsHistoryResponse>;
1358
1485
  getTokenAggregatedStats: (request: GetTokenAggregatedStatsRequest) => Promise<GetTokenAggregatedStatsResponse>;
1359
1486
  checkReferralCode: (request: CheckReferralCodeRequest) => Promise<CheckReferralCodeResponse>;
1487
+ getServicesStatus: () => Promise<GetServicesStatusResponse>;
1488
+ getUserVaultDeposits: (request: GetUserDepositsRequest) => Promise<GetUserVaultDepositsResponse>;
1489
+ getUserVaultWithdraws: (request: GetUserWithdrawalsRequest) => Promise<GetUserWithdrawalsResponse>;
1490
+ getVaultHistoricalData: (request: GetVaultHistoricalDataRequest) => Promise<GetVaultHistoricalDataResponse>;
1491
+ getHistoricalIndexPrices: (request: GetIndexPriceHistoryRequest) => Promise<GetIndexPriceHistoryResponse>;
1360
1492
  getTime: () => Promise<string>;
1361
1493
  }
1362
1494
 
@@ -1388,4 +1520,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
1388
1520
  declare const getTopicFromCommand: (data: WsCommand) => string;
1389
1521
  declare const getTopicFromMessage: (data: WsMessage) => string;
1390
1522
 
1391
- 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 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 GetPerpMarketsDataRequest, type GetPerpMarketsDataResponse, type GetPerpOrderBookDataRequest, type GetPerpOrderBookDataResponse, type GetPerpRecentTradesRequest, type GetPerpRecentTradesResponse, type GetPerpUserFillsRequest, type GetPerpUserFillsResponse, type GetPerpUserOrdersRequest, type GetPerpUserOrdersResponse, type GetPerpetualMarketsConfigResponse, type GetPriceIndexesResponse, type GetTokenAggregatedStatsRequest, type GetTokenAggregatedStatsResponse, type GetTokenStatsHistoryRequest, type GetTokenStatsHistoryResponse, type GetTokensConfigResponse, type GetUserAggregatedReferralStatsRequest, type GetUserAggregatedReferralStatsResponse, type GetUserAggregatedStatsRequest, type GetUserAggregatedStatsResponse, type GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, type GetUserPortfolioValueRequest, type GetUserPortfolioValueResponse, type GetUserReferralStatsHistoryRequest, type GetUserReferralStatsHistoryResponse, type GetUserTradeStatsHistoryRequest, type GetUserTradeStatsHistoryResponse, type GetUserTransferHistoryRequest, type GetUserTransferHistoryResponse, type GetUserWithdrawalsRequest, type GetUserWithdrawalsResponse, type GetUsersByAddressRequest, type GetUsersByAddressResponse, type HistoricalDeposit, type HistoricalFunding, type HistoricalReferralStats, type HistoricalTokenStats, type HistoricalTradeStats, type HistoricalUserTransfer, type HistoricalWithdraw, type IGetChartCandlesInRange, type Lend, type LendTokenParams, type MarginStep, type MarketStatusChange, Network, 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, SpotMarketStatus, Status, type StatusResponse, 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 UserPortfolioValue, UserStatus, type UserTransfer, type UtilizationCurve, type Vault, type VaultInvestment, 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 };
1523
+ 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 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 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 GetUserClaimedKickbackHistoryRequest, type GetUserClaimedKickbackHistoryResponse, type GetUserClaimedReferralKickbackHistoryRequest, type GetUserClaimedReferralKickbackHistoryResponse, type GetUserDataRequest, type GetUserDataResponse, type GetUserDepositsRequest, type GetUserDepositsResponse, type GetUserFundingHistoryRequest, type GetUserFundingHistoryResponse, 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 HistoricalDeposit, type HistoricalFunding, 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, 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 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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
18
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
43
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
66
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
91
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
116
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
141
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
166
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
192
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
221
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
248
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
276
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
302
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
326
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
350
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
374
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
398
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
425
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
454
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
477
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
505
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
529
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
553
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
577
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
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": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
601
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
602
602
  "name": "add_credits",
603
603
  "friends": [],
604
604
  "exposed_functions": [
@@ -697,6 +697,11 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
697
697
  EndpointsV12["GetTokensStats"] = "/v1/get_tokens_stats";
698
698
  EndpointsV12["GetTokensAggregatedStats"] = "/v1/get_tokens_aggregated_stats";
699
699
  EndpointsV12["CheckReferralCode"] = "/v1/check_referral_code";
700
+ EndpointsV12["GetUserVaultDeposits"] = "/v1/get_user_vault_deposits";
701
+ EndpointsV12["GetUserVaultWithdrawals"] = "/v1/get_user_vault_withdrawals";
702
+ EndpointsV12["GetVaultHistoricalData"] = "/v1/get_vault_historical_data";
703
+ EndpointsV12["GetIndexPriceHistory"] = "/v1/get_index_price_history";
704
+ EndpointsV12["ServicesStatus"] = "/v1/services_status";
700
705
  return EndpointsV12;
701
706
  })(EndpointsV1 || {});
702
707
  var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
@@ -719,7 +724,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
719
724
 
720
725
  // generated_types/withdrawFromVault.ts
721
726
  var ABI25 = {
722
- "address": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
727
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
723
728
  "name": "withdraw_from_vault",
724
729
  "friends": [],
725
730
  "exposed_functions": [
@@ -858,6 +863,10 @@ var getTopicFromMessage = (data) => {
858
863
  return data.content.userId;
859
864
  case "ApiCreditsChange":
860
865
  return data.content.userId;
866
+ case "VaultDeposit":
867
+ return data.content.userId;
868
+ case "VaultWithdraw":
869
+ return data.content.userId;
861
870
  }
862
871
  };
863
872
 
@@ -1324,6 +1333,34 @@ var Client = class _Client {
1324
1333
  const response = await this.sendGetJson("/v1/check_referral_code" /* CheckReferralCode */, request);
1325
1334
  return response;
1326
1335
  };
1336
+ this.getServicesStatus = async () => {
1337
+ const response = await this.sendGetJson(
1338
+ "/v1/services_status" /* ServicesStatus */
1339
+ );
1340
+ return response;
1341
+ };
1342
+ this.getUserVaultDeposits = async (request) => {
1343
+ const response = await this.sendGetJson("/v1/get_user_vault_deposits" /* GetUserVaultDeposits */, request);
1344
+ return response;
1345
+ };
1346
+ this.getUserVaultWithdraws = async (request) => {
1347
+ const response = await this.sendGetJson("/v1/get_user_vault_withdrawals" /* GetUserVaultWithdrawals */, request);
1348
+ return response;
1349
+ };
1350
+ this.getVaultHistoricalData = async (request) => {
1351
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1352
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1353
+ }
1354
+ const response = await this.sendGetJson("/v1/get_vault_historical_data" /* GetVaultHistoricalData */, request);
1355
+ return response;
1356
+ };
1357
+ this.getHistoricalIndexPrices = async (request) => {
1358
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1359
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1360
+ }
1361
+ const response = await this.sendGetJson("/v1/get_index_price_history" /* GetIndexPriceHistory */, request);
1362
+ return response;
1363
+ };
1327
1364
  // Meta
1328
1365
  this.getTime = async () => {
1329
1366
  const response = await this.sendGetJson("/time" /* Time */);
@@ -2051,7 +2088,7 @@ function parseEntryFunctionAbi(args) {
2051
2088
 
2052
2089
  // generated_types/faucetEntrypoints.ts
2053
2090
  var ABI26 = {
2054
- "address": "0x6ac8eaec4672e0cc197c3f71f6bff00b5950c8d88ab115db9d083895028233b0",
2091
+ "address": "0xc976b48a17316804bd6ab691cc3baff256c03c26d8fac6e946e3b17f2f013a36",
2055
2092
  "name": "faucet_entrypoints",
2056
2093
  "friends": [],
2057
2094
  "exposed_functions": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nightlylabs/dex-sdk",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {