@nightlylabs/dex-sdk 0.1.22 → 0.1.24

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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
68
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
93
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
116
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
141
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
166
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
191
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
216
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
242
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
271
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
298
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
326
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
352
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
376
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
400
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
424
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
448
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
475
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
504
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
527
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
555
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
579
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
603
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
627
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
651
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
652
652
  "name": "add_credits",
653
653
  "friends": [],
654
654
  "exposed_functions": [
@@ -754,6 +754,9 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
754
754
  EndpointsV12["ServicesStatus"] = "/v1/services_status";
755
755
  EndpointsV12["GetUserAggregatedVaultStats"] = "/v1/get_user_aggregated_vault_stats";
756
756
  EndpointsV12["GetUserLiquidations"] = "/v1/get_user_liquidations";
757
+ EndpointsV12["GetIndexerStatus"] = "/v1/get_indexer_status";
758
+ EndpointsV12["GetVaultWithdrawals"] = "/v1/get_vault_withdrawals";
759
+ EndpointsV12["GetVaultDeposits"] = "/v1/get_vault_deposits";
757
760
  return EndpointsV12;
758
761
  })(EndpointsV1 || {});
759
762
  var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
@@ -776,7 +779,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
776
779
 
777
780
  // generated_types/withdrawFromVault.ts
778
781
  var ABI25 = {
779
- "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
782
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
780
783
  "name": "withdraw_from_vault",
781
784
  "friends": [],
782
785
  "exposed_functions": [
@@ -1424,6 +1427,26 @@ var Client = class _Client {
1424
1427
  const response = await this.sendGetJson("/v1/get_user_aggregated_vault_stats" /* GetUserAggregatedVaultStats */, request);
1425
1428
  return response;
1426
1429
  };
1430
+ this.getIndexerStatus = async () => {
1431
+ const response = await this.sendGetJson(
1432
+ "/v1/get_indexer_status" /* GetIndexerStatus */
1433
+ );
1434
+ return response;
1435
+ };
1436
+ this.getVaultHistoricalDeposits = async (request) => {
1437
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1438
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1439
+ }
1440
+ const response = await this.sendGetJson("/v1/get_vault_deposits" /* GetVaultDeposits */, request);
1441
+ return response;
1442
+ };
1443
+ this.getVaultWithdrawals = async (request) => {
1444
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1445
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1446
+ }
1447
+ const response = await this.sendGetJson("/v1/get_vault_withdrawals" /* GetVaultWithdrawals */, request);
1448
+ return response;
1449
+ };
1427
1450
  // Meta
1428
1451
  this.getTime = async () => {
1429
1452
  const response = await this.sendGetJson("/time" /* Time */);
@@ -2151,7 +2174,7 @@ function parseEntryFunctionAbi(args) {
2151
2174
 
2152
2175
  // generated_types/faucetEntrypoints.ts
2153
2176
  var ABI26 = {
2154
- "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
2177
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
2155
2178
  "name": "faucet_entrypoints",
2156
2179
  "friends": [],
2157
2180
  "exposed_functions": [
package/dist/index.d.cts CHANGED
@@ -268,6 +268,13 @@ interface GetIndexPriceHistoryResponse {
268
268
  prices: IndexPriceHistory[];
269
269
  paginationCursor?: PaginationCursor;
270
270
  }
271
+ interface GetIndexerStatusResponse {
272
+ lastProcessedBlock: string;
273
+ lastBlockProducedAt: string;
274
+ lastBlockUpdate: string;
275
+ lastProcessorUpdate: string;
276
+ lastSeenBlock: string;
277
+ }
271
278
  interface GetPerpMarketsDataRequest {
272
279
  markets: string[];
273
280
  }
@@ -708,6 +715,13 @@ interface GetUserVaultDepositsRequest {
708
715
  newerTimestampMs?: string;
709
716
  paginationCursor?: PaginationCursor;
710
717
  }
718
+ interface HistoricalVaultDeposit {
719
+ vaultId: string;
720
+ usdDepositAmount: string;
721
+ sharesReceived: string;
722
+ tokensReceived: string;
723
+ timestamp: string;
724
+ }
711
725
  interface GetUserVaultDepositsResponse {
712
726
  vaultDeposits: HistoricalVaultDeposit[];
713
727
  paginationCursor?: PaginationCursor;
@@ -780,20 +794,15 @@ interface GetVaultHistoricalDataResponse {
780
794
  data: VaultHistoricalData[];
781
795
  paginationCursor?: PaginationCursor;
782
796
  }
783
- interface HistoricalVaultDeposit {
784
- userId: string;
797
+ interface GetVaultWithdrawalsRequest {
785
798
  vaultId: string;
786
- usdDepositAmount: string;
787
- sharesReceived: string;
788
- tokensReceived: string;
789
- timestamp: string;
799
+ olderTimestampMs?: string;
800
+ newerTimestampMs?: string;
801
+ paginationCursor?: PaginationCursor;
790
802
  }
791
- interface HistoricalVaultDeposit {
792
- vaultId: string;
793
- usdDepositAmount: string;
794
- sharesReceived: string;
795
- tokensReceived: string;
796
- timestamp: string;
803
+ interface GetVaultWithdrawalsResponse {
804
+ vaultWithdrawals: HistoricalVaultWithdraw[];
805
+ paginationCursor?: PaginationCursor;
797
806
  }
798
807
  interface Lend {
799
808
  userId: string;
@@ -1007,7 +1016,10 @@ declare enum EndpointsV1 {
1007
1016
  GetIndexPriceHistory = "/v1/get_index_price_history",
1008
1017
  ServicesStatus = "/v1/services_status",
1009
1018
  GetUserAggregatedVaultStats = "/v1/get_user_aggregated_vault_stats",
1010
- GetUserLiquidations = "/v1/get_user_liquidations"
1019
+ GetUserLiquidations = "/v1/get_user_liquidations",
1020
+ GetIndexerStatus = "/v1/get_indexer_status",
1021
+ GetVaultWithdrawals = "/v1/get_vault_withdrawals",
1022
+ GetVaultDeposits = "/v1/get_vault_deposits"
1011
1023
  }
1012
1024
  declare enum SpotMarketStatus {
1013
1025
  Halted = "halted",
@@ -1540,6 +1552,9 @@ declare class Client {
1540
1552
  getVaultHistoricalData: (request: GetVaultHistoricalDataRequest) => Promise<GetVaultHistoricalDataResponse>;
1541
1553
  getHistoricalIndexPrices: (request: GetIndexPriceHistoryRequest) => Promise<GetIndexPriceHistoryResponse>;
1542
1554
  getUserAggregatedVaultStats: (request: GetUserAggregatedVaultStatsRequest) => Promise<GetUserAggregatedVaultStatsResponse>;
1555
+ getIndexerStatus: () => Promise<GetIndexerStatusResponse>;
1556
+ getVaultHistoricalDeposits: (request: GetVaultDepositsRequest) => Promise<GetVaultDepositsResponse>;
1557
+ getVaultWithdrawals: (request: GetVaultWithdrawalsRequest) => Promise<GetVaultWithdrawalsResponse>;
1543
1558
  getTime: () => Promise<string>;
1544
1559
  }
1545
1560
 
@@ -1571,4 +1586,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
1571
1586
  declare const getTopicFromCommand: (data: WsCommand) => string;
1572
1587
  declare const getTopicFromMessage: (data: WsMessage) => string;
1573
1588
 
1574
- 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 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 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -268,6 +268,13 @@ interface GetIndexPriceHistoryResponse {
268
268
  prices: IndexPriceHistory[];
269
269
  paginationCursor?: PaginationCursor;
270
270
  }
271
+ interface GetIndexerStatusResponse {
272
+ lastProcessedBlock: string;
273
+ lastBlockProducedAt: string;
274
+ lastBlockUpdate: string;
275
+ lastProcessorUpdate: string;
276
+ lastSeenBlock: string;
277
+ }
271
278
  interface GetPerpMarketsDataRequest {
272
279
  markets: string[];
273
280
  }
@@ -708,6 +715,13 @@ interface GetUserVaultDepositsRequest {
708
715
  newerTimestampMs?: string;
709
716
  paginationCursor?: PaginationCursor;
710
717
  }
718
+ interface HistoricalVaultDeposit {
719
+ vaultId: string;
720
+ usdDepositAmount: string;
721
+ sharesReceived: string;
722
+ tokensReceived: string;
723
+ timestamp: string;
724
+ }
711
725
  interface GetUserVaultDepositsResponse {
712
726
  vaultDeposits: HistoricalVaultDeposit[];
713
727
  paginationCursor?: PaginationCursor;
@@ -780,20 +794,15 @@ interface GetVaultHistoricalDataResponse {
780
794
  data: VaultHistoricalData[];
781
795
  paginationCursor?: PaginationCursor;
782
796
  }
783
- interface HistoricalVaultDeposit {
784
- userId: string;
797
+ interface GetVaultWithdrawalsRequest {
785
798
  vaultId: string;
786
- usdDepositAmount: string;
787
- sharesReceived: string;
788
- tokensReceived: string;
789
- timestamp: string;
799
+ olderTimestampMs?: string;
800
+ newerTimestampMs?: string;
801
+ paginationCursor?: PaginationCursor;
790
802
  }
791
- interface HistoricalVaultDeposit {
792
- vaultId: string;
793
- usdDepositAmount: string;
794
- sharesReceived: string;
795
- tokensReceived: string;
796
- timestamp: string;
803
+ interface GetVaultWithdrawalsResponse {
804
+ vaultWithdrawals: HistoricalVaultWithdraw[];
805
+ paginationCursor?: PaginationCursor;
797
806
  }
798
807
  interface Lend {
799
808
  userId: string;
@@ -1007,7 +1016,10 @@ declare enum EndpointsV1 {
1007
1016
  GetIndexPriceHistory = "/v1/get_index_price_history",
1008
1017
  ServicesStatus = "/v1/services_status",
1009
1018
  GetUserAggregatedVaultStats = "/v1/get_user_aggregated_vault_stats",
1010
- GetUserLiquidations = "/v1/get_user_liquidations"
1019
+ GetUserLiquidations = "/v1/get_user_liquidations",
1020
+ GetIndexerStatus = "/v1/get_indexer_status",
1021
+ GetVaultWithdrawals = "/v1/get_vault_withdrawals",
1022
+ GetVaultDeposits = "/v1/get_vault_deposits"
1011
1023
  }
1012
1024
  declare enum SpotMarketStatus {
1013
1025
  Halted = "halted",
@@ -1540,6 +1552,9 @@ declare class Client {
1540
1552
  getVaultHistoricalData: (request: GetVaultHistoricalDataRequest) => Promise<GetVaultHistoricalDataResponse>;
1541
1553
  getHistoricalIndexPrices: (request: GetIndexPriceHistoryRequest) => Promise<GetIndexPriceHistoryResponse>;
1542
1554
  getUserAggregatedVaultStats: (request: GetUserAggregatedVaultStatsRequest) => Promise<GetUserAggregatedVaultStatsResponse>;
1555
+ getIndexerStatus: () => Promise<GetIndexerStatusResponse>;
1556
+ getVaultHistoricalDeposits: (request: GetVaultDepositsRequest) => Promise<GetVaultDepositsResponse>;
1557
+ getVaultWithdrawals: (request: GetVaultWithdrawalsRequest) => Promise<GetVaultWithdrawalsResponse>;
1543
1558
  getTime: () => Promise<string>;
1544
1559
  }
1545
1560
 
@@ -1571,4 +1586,4 @@ declare const generateApiKey: () => _aptos_labs_ts_sdk.Ed25519Account;
1571
1586
  declare const getTopicFromCommand: (data: WsCommand) => string;
1572
1587
  declare const getTopicFromMessage: (data: WsMessage) => string;
1573
1588
 
1574
- 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 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 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 };
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 };
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
18
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
43
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
66
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
91
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
116
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
141
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
166
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
192
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
221
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
248
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
276
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
302
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
326
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
350
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
374
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
398
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
425
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
454
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
477
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
505
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
529
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
553
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
577
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
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": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
601
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
602
602
  "name": "add_credits",
603
603
  "friends": [],
604
604
  "exposed_functions": [
@@ -704,6 +704,9 @@ var EndpointsV1 = /* @__PURE__ */ ((EndpointsV12) => {
704
704
  EndpointsV12["ServicesStatus"] = "/v1/services_status";
705
705
  EndpointsV12["GetUserAggregatedVaultStats"] = "/v1/get_user_aggregated_vault_stats";
706
706
  EndpointsV12["GetUserLiquidations"] = "/v1/get_user_liquidations";
707
+ EndpointsV12["GetIndexerStatus"] = "/v1/get_indexer_status";
708
+ EndpointsV12["GetVaultWithdrawals"] = "/v1/get_vault_withdrawals";
709
+ EndpointsV12["GetVaultDeposits"] = "/v1/get_vault_deposits";
707
710
  return EndpointsV12;
708
711
  })(EndpointsV1 || {});
709
712
  var SpotMarketStatus = /* @__PURE__ */ ((SpotMarketStatus2) => {
@@ -726,7 +729,7 @@ var UserStatus = /* @__PURE__ */ ((UserStatus2) => {
726
729
 
727
730
  // generated_types/withdrawFromVault.ts
728
731
  var ABI25 = {
729
- "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
732
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
730
733
  "name": "withdraw_from_vault",
731
734
  "friends": [],
732
735
  "exposed_functions": [
@@ -1374,6 +1377,26 @@ var Client = class _Client {
1374
1377
  const response = await this.sendGetJson("/v1/get_user_aggregated_vault_stats" /* GetUserAggregatedVaultStats */, request);
1375
1378
  return response;
1376
1379
  };
1380
+ this.getIndexerStatus = async () => {
1381
+ const response = await this.sendGetJson(
1382
+ "/v1/get_indexer_status" /* GetIndexerStatus */
1383
+ );
1384
+ return response;
1385
+ };
1386
+ this.getVaultHistoricalDeposits = async (request) => {
1387
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1388
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1389
+ }
1390
+ const response = await this.sendGetJson("/v1/get_vault_deposits" /* GetVaultDeposits */, request);
1391
+ return response;
1392
+ };
1393
+ this.getVaultWithdrawals = async (request) => {
1394
+ if (request.olderTimestampMs && request.newerTimestampMs && request.olderTimestampMs > request.newerTimestampMs) {
1395
+ throw new Error("olderTimestampMs must be lower than newerTimestampMs");
1396
+ }
1397
+ const response = await this.sendGetJson("/v1/get_vault_withdrawals" /* GetVaultWithdrawals */, request);
1398
+ return response;
1399
+ };
1377
1400
  // Meta
1378
1401
  this.getTime = async () => {
1379
1402
  const response = await this.sendGetJson("/time" /* Time */);
@@ -2101,7 +2124,7 @@ function parseEntryFunctionAbi(args) {
2101
2124
 
2102
2125
  // generated_types/faucetEntrypoints.ts
2103
2126
  var ABI26 = {
2104
- "address": "0x738cbcffc724a6a6d27db14e7c165c7e20bb523679a01697623ce907ed1df24b",
2127
+ "address": "0x2d45cf2f89e499eaf3480992593cdf5f42e385bf5f53293d578ce219824cb582",
2105
2128
  "name": "faucet_entrypoints",
2106
2129
  "friends": [],
2107
2130
  "exposed_functions": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nightlylabs/dex-sdk",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {