@nadohq/indexer-client 0.32.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/dist/IndexerBaseClient.d.cts +2 -2
  2. package/dist/IndexerBaseClient.d.ts +2 -2
  3. package/dist/IndexerClient.d.cts +1 -1
  4. package/dist/IndexerClient.d.ts +1 -1
  5. package/dist/{IndexerServerFailureError-Q8gMph7M.d.cts → IndexerServerFailureError-C1Rn5KxM.d.cts} +2 -2
  6. package/dist/{IndexerServerFailureError-Q8gMph7M.d.cts.map → IndexerServerFailureError-C1Rn5KxM.d.cts.map} +1 -1
  7. package/dist/{IndexerServerFailureError-CnyMDTmR.d.ts → IndexerServerFailureError-CSVuKIi6.d.ts} +2 -2
  8. package/dist/{IndexerServerFailureError-CnyMDTmR.d.ts.map → IndexerServerFailureError-CSVuKIi6.d.ts.map} +1 -1
  9. package/dist/{clientTypes-sF5is5HA.d.cts → clientTypes-DFn6P-tv.d.cts} +3 -2
  10. package/dist/clientTypes-DFn6P-tv.d.cts.map +1 -0
  11. package/dist/{clientTypes-CuXHS6Jk.d.ts → clientTypes-DKN-EsOj.d.ts} +3 -2
  12. package/dist/clientTypes-DKN-EsOj.d.ts.map +1 -0
  13. package/dist/dataMappers.cjs +2 -1
  14. package/dist/dataMappers.cjs.map +1 -1
  15. package/dist/dataMappers.d.cts +3 -3
  16. package/dist/dataMappers.d.cts.map +1 -1
  17. package/dist/dataMappers.d.ts +3 -3
  18. package/dist/dataMappers.d.ts.map +1 -1
  19. package/dist/dataMappers.js +2 -1
  20. package/dist/dataMappers.js.map +1 -1
  21. package/dist/index.d.cts +6 -6
  22. package/dist/index.d.ts +6 -6
  23. package/dist/{indexerBalanceValue-CuM_RYc3.d.ts → indexerBalanceValue-C9soABg1.d.ts} +2 -2
  24. package/dist/{indexerBalanceValue-CuM_RYc3.d.ts.map → indexerBalanceValue-C9soABg1.d.ts.map} +1 -1
  25. package/dist/{indexerBalanceValue-DaLg1BCK.d.cts → indexerBalanceValue-DhC367Il.d.cts} +2 -2
  26. package/dist/{indexerBalanceValue-DaLg1BCK.d.cts.map → indexerBalanceValue-DhC367Il.d.cts.map} +1 -1
  27. package/dist/{paginatedEventsTypes-DKN3qkoM.d.cts → paginatedEventsTypes-CBdWvsGe.d.cts} +2 -2
  28. package/dist/{paginatedEventsTypes-DKN3qkoM.d.cts.map → paginatedEventsTypes-CBdWvsGe.d.cts.map} +1 -1
  29. package/dist/{paginatedEventsTypes-Mdjf2Myl.d.ts → paginatedEventsTypes-Cc3NsS_6.d.ts} +2 -2
  30. package/dist/{paginatedEventsTypes-Mdjf2Myl.d.ts.map → paginatedEventsTypes-Cc3NsS_6.d.ts.map} +1 -1
  31. package/dist/{serverModelTypes-BwLIAkc1.d.ts → serverModelTypes-BAZNgoLE.d.ts} +6 -1
  32. package/dist/serverModelTypes-BAZNgoLE.d.ts.map +1 -0
  33. package/dist/{serverModelTypes-sQOL10Bi.d.cts → serverModelTypes-DC4dsX9i.d.cts} +6 -1
  34. package/dist/serverModelTypes-DC4dsX9i.d.cts.map +1 -0
  35. package/dist/{serverTypes-DrlzA5fi.d.cts → serverTypes-CKMTuCwh.d.cts} +2 -2
  36. package/dist/{serverTypes-DrlzA5fi.d.cts.map → serverTypes-CKMTuCwh.d.cts.map} +1 -1
  37. package/dist/{serverTypes-BdNekzFR.d.ts → serverTypes-DhOquJu2.d.ts} +2 -2
  38. package/dist/{serverTypes-BdNekzFR.d.ts.map → serverTypes-DhOquJu2.d.ts.map} +1 -1
  39. package/dist/types/IndexerServerFailureError.d.cts +1 -1
  40. package/dist/types/IndexerServerFailureError.d.ts +1 -1
  41. package/dist/types/clientTypes.d.cts +1 -1
  42. package/dist/types/clientTypes.d.ts +1 -1
  43. package/dist/types/index.d.cts +5 -5
  44. package/dist/types/index.d.ts +5 -5
  45. package/dist/types/paginatedEventsTypes.d.cts +1 -1
  46. package/dist/types/paginatedEventsTypes.d.ts +1 -1
  47. package/dist/types/serverModelTypes.d.cts +1 -1
  48. package/dist/types/serverModelTypes.d.ts +1 -1
  49. package/dist/types/serverTypes.d.cts +1 -1
  50. package/dist/types/serverTypes.d.ts +1 -1
  51. package/dist/utils/index.d.cts +1 -1
  52. package/dist/utils/index.d.ts +1 -1
  53. package/dist/utils/indexerBalanceValue.d.cts +1 -1
  54. package/dist/utils/indexerBalanceValue.d.ts +1 -1
  55. package/package.json +4 -4
  56. package/src/dataMappers.ts +1 -0
  57. package/src/types/clientTypes.ts +1 -0
  58. package/src/types/serverModelTypes.ts +5 -0
  59. package/dist/clientTypes-CuXHS6Jk.d.ts.map +0 -1
  60. package/dist/clientTypes-sF5is5HA.d.cts.map +0 -1
  61. package/dist/serverModelTypes-BwLIAkc1.d.ts.map +0 -1
  62. package/dist/serverModelTypes-sQOL10Bi.d.cts.map +0 -1
@@ -1,5 +1,5 @@
1
- import { Dt as IndexerServerQueryRequestByType, Ot as IndexerServerQueryRequestType, kt as IndexerServerQueryResponseByType } from "./serverTypes-DrlzA5fi.cjs";
2
- import { $ as GetIndexerOrdersResponse, A as GetIndexerLeaderboardRegistrationsResponse, B as GetIndexerMultiProductFundingRatesParams, C as GetIndexerInterestFundingPaymentsResponse, D as GetIndexerLeaderboardParticipantParams, E as GetIndexerLeaderboardParams, F as GetIndexerMakerStatisticsResponse, G as GetIndexerMultiProductSnapshotsResponse, H as GetIndexerMultiProductPerpPricesParams, I as GetIndexerMarketSnapshotsParams, J as GetIndexerNlpSnapshotsParams, K as GetIndexerMultiSubaccountSnapshotsParams, L as GetIndexerMarketSnapshotsResponse, M as GetIndexerLinkedSignerParams, N as GetIndexerLinkedSignerResponse, O as GetIndexerLeaderboardParticipantResponse, P as GetIndexerMakerStatisticsParams, Q as GetIndexerOrdersParams, R as GetIndexerMatchEventsParams, S as GetIndexerInterestFundingPaymentsParams, T as GetIndexerLeaderboardContestsResponse, U as GetIndexerMultiProductPerpPricesResponse, V as GetIndexerMultiProductFundingRatesResponse, W as GetIndexerMultiProductSnapshotsParams, X as GetIndexerOraclePricesParams, Y as GetIndexerNlpSnapshotsResponse, Z as GetIndexerOraclePricesResponse, _ as GetIndexerFastWithdrawalSignatureResponse, _n as ListIndexerSubaccountsResponse, _t as GetIndexerV2TickersParams, a as GetIndexerCandlesticksParams, at as GetIndexerPortfolioResponse, b as GetIndexerFundingRateParams, bn as RevokeSocialAccountParams, bt as GetIndexerXPointsResponse, c as GetIndexerCashIncentivesResponse, ct as GetIndexerProductSnapshotsParams, d as GetIndexerEdgeMarketSnapshotResponse, dt as GetIndexerReferralCodeParams, et as GetIndexerPerpPricesParams, f as GetIndexerEdgeMarketSnapshotsParams, ft as GetIndexerReferralCodeResponse, g as GetIndexerFastWithdrawalSignatureParams, gn as ListIndexerSubaccountsParams, gt as GetIndexerV2SymbolsResponse, h as GetIndexerEventsResponse, hn as ListIndexerSocialAccountsResponse, ht as GetIndexerV2SymbolsParams, i as GetIndexerBacklogResponse, it as GetIndexerPortfolioParams, j as GetIndexerLeaderboardResponse, k as GetIndexerLeaderboardRegistrationsParams, l as GetIndexerEdgeCandlesticksParams, lt as GetIndexerProductSnapshotsResponse, m as GetIndexerEventsParams, mn as ListIndexerSocialAccountsParams, mt as GetIndexerSubaccountDDAResponse, n as ConnectSocialAccountParams, nt as GetIndexerPointsParams, o as GetIndexerCandlesticksResponse, ot as GetIndexerPrivateAlphaChoiceParams, pt as GetIndexerSubaccountDDAParams, q as GetIndexerMultiSubaccountSnapshotsResponse, r as ConnectSocialAccountResponse, rt as GetIndexerPointsResponse, s as GetIndexerCashIncentivesParams, st as GetIndexerPrivateAlphaChoiceResponse, tt as GetIndexerPerpPricesResponse, u as GetIndexerEdgeCandlesticksResponse, ut as GetIndexerQuotePriceResponse, v as GetIndexerFundingRateHistoryParams, vn as RegisterLeaderboardParams, vt as GetIndexerV2TickersResponse, w as GetIndexerLeaderboardContestsParams, x as GetIndexerFundingRateResponse, xn as RevokeSocialAccountResponse, y as GetIndexerFundingRateHistoryResponse, yn as RegisterLeaderboardResponse, yt as GetIndexerXPointsParams, z as GetIndexerMatchEventsResponse } from "./clientTypes-sF5is5HA.cjs";
1
+ import { Dt as IndexerServerQueryRequestByType, Ot as IndexerServerQueryRequestType, kt as IndexerServerQueryResponseByType } from "./serverTypes-CKMTuCwh.cjs";
2
+ import { $ as GetIndexerOrdersResponse, A as GetIndexerLeaderboardRegistrationsResponse, B as GetIndexerMultiProductFundingRatesParams, C as GetIndexerInterestFundingPaymentsResponse, D as GetIndexerLeaderboardParticipantParams, E as GetIndexerLeaderboardParams, F as GetIndexerMakerStatisticsResponse, G as GetIndexerMultiProductSnapshotsResponse, H as GetIndexerMultiProductPerpPricesParams, I as GetIndexerMarketSnapshotsParams, J as GetIndexerNlpSnapshotsParams, K as GetIndexerMultiSubaccountSnapshotsParams, L as GetIndexerMarketSnapshotsResponse, M as GetIndexerLinkedSignerParams, N as GetIndexerLinkedSignerResponse, O as GetIndexerLeaderboardParticipantResponse, P as GetIndexerMakerStatisticsParams, Q as GetIndexerOrdersParams, R as GetIndexerMatchEventsParams, S as GetIndexerInterestFundingPaymentsParams, T as GetIndexerLeaderboardContestsResponse, U as GetIndexerMultiProductPerpPricesResponse, V as GetIndexerMultiProductFundingRatesResponse, W as GetIndexerMultiProductSnapshotsParams, X as GetIndexerOraclePricesParams, Y as GetIndexerNlpSnapshotsResponse, Z as GetIndexerOraclePricesResponse, _ as GetIndexerFastWithdrawalSignatureResponse, _n as ListIndexerSubaccountsResponse, _t as GetIndexerV2TickersParams, a as GetIndexerCandlesticksParams, at as GetIndexerPortfolioResponse, b as GetIndexerFundingRateParams, bn as RevokeSocialAccountParams, bt as GetIndexerXPointsResponse, c as GetIndexerCashIncentivesResponse, ct as GetIndexerProductSnapshotsParams, d as GetIndexerEdgeMarketSnapshotResponse, dt as GetIndexerReferralCodeParams, et as GetIndexerPerpPricesParams, f as GetIndexerEdgeMarketSnapshotsParams, ft as GetIndexerReferralCodeResponse, g as GetIndexerFastWithdrawalSignatureParams, gn as ListIndexerSubaccountsParams, gt as GetIndexerV2SymbolsResponse, h as GetIndexerEventsResponse, hn as ListIndexerSocialAccountsResponse, ht as GetIndexerV2SymbolsParams, i as GetIndexerBacklogResponse, it as GetIndexerPortfolioParams, j as GetIndexerLeaderboardResponse, k as GetIndexerLeaderboardRegistrationsParams, l as GetIndexerEdgeCandlesticksParams, lt as GetIndexerProductSnapshotsResponse, m as GetIndexerEventsParams, mn as ListIndexerSocialAccountsParams, mt as GetIndexerSubaccountDDAResponse, n as ConnectSocialAccountParams, nt as GetIndexerPointsParams, o as GetIndexerCandlesticksResponse, ot as GetIndexerPrivateAlphaChoiceParams, pt as GetIndexerSubaccountDDAParams, q as GetIndexerMultiSubaccountSnapshotsResponse, r as ConnectSocialAccountResponse, rt as GetIndexerPointsResponse, s as GetIndexerCashIncentivesParams, st as GetIndexerPrivateAlphaChoiceResponse, tt as GetIndexerPerpPricesResponse, u as GetIndexerEdgeCandlesticksResponse, ut as GetIndexerQuotePriceResponse, v as GetIndexerFundingRateHistoryParams, vn as RegisterLeaderboardParams, vt as GetIndexerV2TickersResponse, w as GetIndexerLeaderboardContestsParams, x as GetIndexerFundingRateResponse, xn as RevokeSocialAccountResponse, y as GetIndexerFundingRateHistoryResponse, yn as RegisterLeaderboardResponse, yt as GetIndexerXPointsParams, z as GetIndexerMatchEventsResponse } from "./clientTypes-DFn6P-tv.cjs";
3
3
  import { SignableRequestType, SignableRequestTypeToParams, WalletClientWithAccount } from "@nadohq/shared";
4
4
  import { AxiosInstance } from "axios";
5
5
 
@@ -1,5 +1,5 @@
1
- import { Dt as IndexerServerQueryRequestByType, Ot as IndexerServerQueryRequestType, kt as IndexerServerQueryResponseByType } from "./serverTypes-BdNekzFR.js";
2
- import { $ as GetIndexerOrdersResponse, A as GetIndexerLeaderboardRegistrationsResponse, B as GetIndexerMultiProductFundingRatesParams, C as GetIndexerInterestFundingPaymentsResponse, D as GetIndexerLeaderboardParticipantParams, E as GetIndexerLeaderboardParams, F as GetIndexerMakerStatisticsResponse, G as GetIndexerMultiProductSnapshotsResponse, H as GetIndexerMultiProductPerpPricesParams, I as GetIndexerMarketSnapshotsParams, J as GetIndexerNlpSnapshotsParams, K as GetIndexerMultiSubaccountSnapshotsParams, L as GetIndexerMarketSnapshotsResponse, M as GetIndexerLinkedSignerParams, N as GetIndexerLinkedSignerResponse, O as GetIndexerLeaderboardParticipantResponse, P as GetIndexerMakerStatisticsParams, Q as GetIndexerOrdersParams, R as GetIndexerMatchEventsParams, S as GetIndexerInterestFundingPaymentsParams, T as GetIndexerLeaderboardContestsResponse, U as GetIndexerMultiProductPerpPricesResponse, V as GetIndexerMultiProductFundingRatesResponse, W as GetIndexerMultiProductSnapshotsParams, X as GetIndexerOraclePricesParams, Y as GetIndexerNlpSnapshotsResponse, Z as GetIndexerOraclePricesResponse, _ as GetIndexerFastWithdrawalSignatureResponse, _n as ListIndexerSubaccountsResponse, _t as GetIndexerV2TickersParams, a as GetIndexerCandlesticksParams, at as GetIndexerPortfolioResponse, b as GetIndexerFundingRateParams, bn as RevokeSocialAccountParams, bt as GetIndexerXPointsResponse, c as GetIndexerCashIncentivesResponse, ct as GetIndexerProductSnapshotsParams, d as GetIndexerEdgeMarketSnapshotResponse, dt as GetIndexerReferralCodeParams, et as GetIndexerPerpPricesParams, f as GetIndexerEdgeMarketSnapshotsParams, ft as GetIndexerReferralCodeResponse, g as GetIndexerFastWithdrawalSignatureParams, gn as ListIndexerSubaccountsParams, gt as GetIndexerV2SymbolsResponse, h as GetIndexerEventsResponse, hn as ListIndexerSocialAccountsResponse, ht as GetIndexerV2SymbolsParams, i as GetIndexerBacklogResponse, it as GetIndexerPortfolioParams, j as GetIndexerLeaderboardResponse, k as GetIndexerLeaderboardRegistrationsParams, l as GetIndexerEdgeCandlesticksParams, lt as GetIndexerProductSnapshotsResponse, m as GetIndexerEventsParams, mn as ListIndexerSocialAccountsParams, mt as GetIndexerSubaccountDDAResponse, n as ConnectSocialAccountParams, nt as GetIndexerPointsParams, o as GetIndexerCandlesticksResponse, ot as GetIndexerPrivateAlphaChoiceParams, pt as GetIndexerSubaccountDDAParams, q as GetIndexerMultiSubaccountSnapshotsResponse, r as ConnectSocialAccountResponse, rt as GetIndexerPointsResponse, s as GetIndexerCashIncentivesParams, st as GetIndexerPrivateAlphaChoiceResponse, tt as GetIndexerPerpPricesResponse, u as GetIndexerEdgeCandlesticksResponse, ut as GetIndexerQuotePriceResponse, v as GetIndexerFundingRateHistoryParams, vn as RegisterLeaderboardParams, vt as GetIndexerV2TickersResponse, w as GetIndexerLeaderboardContestsParams, x as GetIndexerFundingRateResponse, xn as RevokeSocialAccountResponse, y as GetIndexerFundingRateHistoryResponse, yn as RegisterLeaderboardResponse, yt as GetIndexerXPointsParams, z as GetIndexerMatchEventsResponse } from "./clientTypes-CuXHS6Jk.js";
1
+ import { Dt as IndexerServerQueryRequestByType, Ot as IndexerServerQueryRequestType, kt as IndexerServerQueryResponseByType } from "./serverTypes-DhOquJu2.js";
2
+ import { $ as GetIndexerOrdersResponse, A as GetIndexerLeaderboardRegistrationsResponse, B as GetIndexerMultiProductFundingRatesParams, C as GetIndexerInterestFundingPaymentsResponse, D as GetIndexerLeaderboardParticipantParams, E as GetIndexerLeaderboardParams, F as GetIndexerMakerStatisticsResponse, G as GetIndexerMultiProductSnapshotsResponse, H as GetIndexerMultiProductPerpPricesParams, I as GetIndexerMarketSnapshotsParams, J as GetIndexerNlpSnapshotsParams, K as GetIndexerMultiSubaccountSnapshotsParams, L as GetIndexerMarketSnapshotsResponse, M as GetIndexerLinkedSignerParams, N as GetIndexerLinkedSignerResponse, O as GetIndexerLeaderboardParticipantResponse, P as GetIndexerMakerStatisticsParams, Q as GetIndexerOrdersParams, R as GetIndexerMatchEventsParams, S as GetIndexerInterestFundingPaymentsParams, T as GetIndexerLeaderboardContestsResponse, U as GetIndexerMultiProductPerpPricesResponse, V as GetIndexerMultiProductFundingRatesResponse, W as GetIndexerMultiProductSnapshotsParams, X as GetIndexerOraclePricesParams, Y as GetIndexerNlpSnapshotsResponse, Z as GetIndexerOraclePricesResponse, _ as GetIndexerFastWithdrawalSignatureResponse, _n as ListIndexerSubaccountsResponse, _t as GetIndexerV2TickersParams, a as GetIndexerCandlesticksParams, at as GetIndexerPortfolioResponse, b as GetIndexerFundingRateParams, bn as RevokeSocialAccountParams, bt as GetIndexerXPointsResponse, c as GetIndexerCashIncentivesResponse, ct as GetIndexerProductSnapshotsParams, d as GetIndexerEdgeMarketSnapshotResponse, dt as GetIndexerReferralCodeParams, et as GetIndexerPerpPricesParams, f as GetIndexerEdgeMarketSnapshotsParams, ft as GetIndexerReferralCodeResponse, g as GetIndexerFastWithdrawalSignatureParams, gn as ListIndexerSubaccountsParams, gt as GetIndexerV2SymbolsResponse, h as GetIndexerEventsResponse, hn as ListIndexerSocialAccountsResponse, ht as GetIndexerV2SymbolsParams, i as GetIndexerBacklogResponse, it as GetIndexerPortfolioParams, j as GetIndexerLeaderboardResponse, k as GetIndexerLeaderboardRegistrationsParams, l as GetIndexerEdgeCandlesticksParams, lt as GetIndexerProductSnapshotsResponse, m as GetIndexerEventsParams, mn as ListIndexerSocialAccountsParams, mt as GetIndexerSubaccountDDAResponse, n as ConnectSocialAccountParams, nt as GetIndexerPointsParams, o as GetIndexerCandlesticksResponse, ot as GetIndexerPrivateAlphaChoiceParams, pt as GetIndexerSubaccountDDAParams, q as GetIndexerMultiSubaccountSnapshotsResponse, r as ConnectSocialAccountResponse, rt as GetIndexerPointsResponse, s as GetIndexerCashIncentivesParams, st as GetIndexerPrivateAlphaChoiceResponse, tt as GetIndexerPerpPricesResponse, u as GetIndexerEdgeCandlesticksResponse, ut as GetIndexerQuotePriceResponse, v as GetIndexerFundingRateHistoryParams, vn as RegisterLeaderboardParams, vt as GetIndexerV2TickersResponse, w as GetIndexerLeaderboardContestsParams, x as GetIndexerFundingRateResponse, xn as RevokeSocialAccountResponse, y as GetIndexerFundingRateHistoryResponse, yn as RegisterLeaderboardResponse, yt as GetIndexerXPointsParams, z as GetIndexerMatchEventsResponse } from "./clientTypes-DKN-EsOj.js";
3
3
  import { SignableRequestType, SignableRequestTypeToParams, WalletClientWithAccount } from "@nadohq/shared";
4
4
  import { AxiosInstance } from "axios";
5
5
 
@@ -1,4 +1,4 @@
1
- import { _ as GetIndexerSubaccountSettlementEventsResponse, a as GetIndexerPaginatedOrdersParams, c as GetIndexerSubaccountCollateralEventsResponse, d as GetIndexerSubaccountLiquidationEventsResponse, f as GetIndexerSubaccountMatchEventParams, g as GetIndexerSubaccountSettlementEventsParams, h as GetIndexerSubaccountNlpEventsResponse, i as GetIndexerPaginatedLeaderboardResponse, l as GetIndexerSubaccountInterestFundingPaymentsParams, m as GetIndexerSubaccountNlpEventsParams, n as GetIndexerPaginatedInterestFundingPaymentsResponse, o as GetIndexerPaginatedOrdersResponse, p as GetIndexerSubaccountMatchEventsResponse, r as GetIndexerPaginatedLeaderboardParams, s as GetIndexerSubaccountCollateralEventsParams, u as GetIndexerSubaccountLiquidationEventsParams } from "./paginatedEventsTypes-DKN3qkoM.cjs";
1
+ import { _ as GetIndexerSubaccountSettlementEventsResponse, a as GetIndexerPaginatedOrdersParams, c as GetIndexerSubaccountCollateralEventsResponse, d as GetIndexerSubaccountLiquidationEventsResponse, f as GetIndexerSubaccountMatchEventParams, g as GetIndexerSubaccountSettlementEventsParams, h as GetIndexerSubaccountNlpEventsResponse, i as GetIndexerPaginatedLeaderboardResponse, l as GetIndexerSubaccountInterestFundingPaymentsParams, m as GetIndexerSubaccountNlpEventsParams, n as GetIndexerPaginatedInterestFundingPaymentsResponse, o as GetIndexerPaginatedOrdersResponse, p as GetIndexerSubaccountMatchEventsResponse, r as GetIndexerPaginatedLeaderboardParams, s as GetIndexerSubaccountCollateralEventsParams, u as GetIndexerSubaccountLiquidationEventsParams } from "./paginatedEventsTypes-CBdWvsGe.cjs";
2
2
  import { IndexerBaseClient } from "./IndexerBaseClient.cjs";
3
3
 
4
4
  //#region src/IndexerClient.d.ts
@@ -1,4 +1,4 @@
1
- import { _ as GetIndexerSubaccountSettlementEventsResponse, a as GetIndexerPaginatedOrdersParams, c as GetIndexerSubaccountCollateralEventsResponse, d as GetIndexerSubaccountLiquidationEventsResponse, f as GetIndexerSubaccountMatchEventParams, g as GetIndexerSubaccountSettlementEventsParams, h as GetIndexerSubaccountNlpEventsResponse, i as GetIndexerPaginatedLeaderboardResponse, l as GetIndexerSubaccountInterestFundingPaymentsParams, m as GetIndexerSubaccountNlpEventsParams, n as GetIndexerPaginatedInterestFundingPaymentsResponse, o as GetIndexerPaginatedOrdersResponse, p as GetIndexerSubaccountMatchEventsResponse, r as GetIndexerPaginatedLeaderboardParams, s as GetIndexerSubaccountCollateralEventsParams, u as GetIndexerSubaccountLiquidationEventsParams } from "./paginatedEventsTypes-Mdjf2Myl.js";
1
+ import { _ as GetIndexerSubaccountSettlementEventsResponse, a as GetIndexerPaginatedOrdersParams, c as GetIndexerSubaccountCollateralEventsResponse, d as GetIndexerSubaccountLiquidationEventsResponse, f as GetIndexerSubaccountMatchEventParams, g as GetIndexerSubaccountSettlementEventsParams, h as GetIndexerSubaccountNlpEventsResponse, i as GetIndexerPaginatedLeaderboardResponse, l as GetIndexerSubaccountInterestFundingPaymentsParams, m as GetIndexerSubaccountNlpEventsParams, n as GetIndexerPaginatedInterestFundingPaymentsResponse, o as GetIndexerPaginatedOrdersResponse, p as GetIndexerSubaccountMatchEventsResponse, r as GetIndexerPaginatedLeaderboardParams, s as GetIndexerSubaccountCollateralEventsParams, u as GetIndexerSubaccountLiquidationEventsParams } from "./paginatedEventsTypes-Cc3NsS_6.js";
2
2
  import { IndexerBaseClient } from "./IndexerBaseClient.js";
3
3
 
4
4
  //#region src/IndexerClient.d.ts
@@ -1,4 +1,4 @@
1
- import { Nt as IndexerServerRequestType, b as IndexerServerFailureResponse } from "./serverTypes-DrlzA5fi.cjs";
1
+ import { Nt as IndexerServerRequestType, b as IndexerServerFailureResponse } from "./serverTypes-CKMTuCwh.cjs";
2
2
  import { BaseServerFailureError } from "@nadohq/shared";
3
3
 
4
4
  //#region src/types/IndexerServerFailureError.d.ts
@@ -22,4 +22,4 @@ declare class IndexerServerFailureError extends BaseServerFailureError {
22
22
  }
23
23
  //#endregion
24
24
  export { IndexerServerFailureError as t };
25
- //# sourceMappingURL=IndexerServerFailureError-Q8gMph7M.d.cts.map
25
+ //# sourceMappingURL=IndexerServerFailureError-C1Rn5KxM.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IndexerServerFailureError-Q8gMph7M.d.cts","names":[],"sources":["../src/types/src/types/IndexerServerFailureError.ts"],"mappings":";;;;;;AAeA;;;;;;;cAAa,yBAAA,SAAkC,sBAAA;EAAA,SAC5B,YAAA,EAAc,4BAAA;EAAA,SACd,WAAA,EAAa,wBAAA;EADb;;;EAAA,SAMR,UAAA;cAEG,YAAA,EAAc,4BAAA,EAA8B,UAAA;AAAA"}
1
+ {"version":3,"file":"IndexerServerFailureError-C1Rn5KxM.d.cts","names":[],"sources":["../src/types/src/types/IndexerServerFailureError.ts"],"mappings":";;;;;;AAeA;;;;;;;cAAa,yBAAA,SAAkC,sBAAA;EAAA,SAC5B,YAAA,EAAc,4BAAA;EAAA,SACd,WAAA,EAAa,wBAAA;EADb;;;EAAA,SAMR,UAAA;cAEG,YAAA,EAAc,4BAAA,EAA8B,UAAA;AAAA"}
@@ -1,4 +1,4 @@
1
- import { Nt as IndexerServerRequestType, b as IndexerServerFailureResponse } from "./serverTypes-BdNekzFR.js";
1
+ import { Nt as IndexerServerRequestType, b as IndexerServerFailureResponse } from "./serverTypes-DhOquJu2.js";
2
2
  import { BaseServerFailureError } from "@nadohq/shared";
3
3
 
4
4
  //#region src/types/IndexerServerFailureError.d.ts
@@ -22,4 +22,4 @@ declare class IndexerServerFailureError extends BaseServerFailureError {
22
22
  }
23
23
  //#endregion
24
24
  export { IndexerServerFailureError as t };
25
- //# sourceMappingURL=IndexerServerFailureError-CnyMDTmR.d.ts.map
25
+ //# sourceMappingURL=IndexerServerFailureError-CSVuKIi6.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IndexerServerFailureError-CnyMDTmR.d.ts","names":[],"sources":["../src/types/src/types/IndexerServerFailureError.ts"],"mappings":";;;;;;AAeA;;;;;;;cAAa,yBAAA,SAAkC,sBAAA;EAAA,SAC5B,YAAA,EAAc,4BAAA;EAAA,SACd,WAAA,EAAa,wBAAA;EADb;;;EAAA,SAMR,UAAA;cAEG,YAAA,EAAc,4BAAA,EAA8B,UAAA;AAAA"}
1
+ {"version":3,"file":"IndexerServerFailureError-CSVuKIi6.d.ts","names":[],"sources":["../src/types/src/types/IndexerServerFailureError.ts"],"mappings":";;;;;;AAeA;;;;;;;cAAa,yBAAA,SAAkC,sBAAA;EAAA,SAC5B,YAAA,EAAc,4BAAA;EAAA,SACd,WAAA,EAAa,wBAAA;EADb;;;EAAA,SAMR,UAAA;cAEG,YAAA,EAAc,4BAAA,EAA8B,UAAA;AAAA"}
@@ -2,7 +2,7 @@ import { t as CandlestickPeriod } from "./CandlestickPeriod-D3_IoSev.cjs";
2
2
  import { t as IndexerEventType } from "./IndexerEventType-9GB2zRoN.cjs";
3
3
  import { t as IndexerLeaderboardRankType } from "./IndexerLeaderboardType-Ck12QVWR.cjs";
4
4
  import { c as NadoWithdrawCollateralV2Tx, o as NadoTx, s as NadoWithdrawCollateralTx } from "./NadoTx-C3_f0YvI.cjs";
5
- import { K as IndexerServerListSubaccountsParams, Rt as IndexerServerTriggerTypeFilter, x as IndexerServerFastWithdrawalSignatureParams } from "./serverTypes-DrlzA5fi.cjs";
5
+ import { K as IndexerServerListSubaccountsParams, Rt as IndexerServerTriggerTypeFilter, x as IndexerServerFastWithdrawalSignatureParams } from "./serverTypes-CKMTuCwh.cjs";
6
6
  import { EIP712OrderValues, Market, OrderAppendix, PerpBalance, PerpMarket, ProductEngineType, SignatureParams, SpotBalance, SpotMarket, Subaccount } from "@nadohq/shared";
7
7
  import BigNumber from "bignumber.js";
8
8
  import { Address, Hex } from "viem";
@@ -34,6 +34,7 @@ interface IndexerBalanceTrackedVars {
34
34
  netEntryUnrealized: BigNumber;
35
35
  netEntryCumulative: BigNumber;
36
36
  quoteVolumeCumulative: BigNumber;
37
+ cumulativeTradeCount: BigNumber;
37
38
  }
38
39
  interface IndexerEvent<TStateType extends IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot> {
39
40
  subaccount: string;
@@ -849,4 +850,4 @@ interface IndexerV2Symbol {
849
850
  type GetIndexerV2SymbolsResponse = Record<string, IndexerV2Symbol>;
850
851
  //#endregion
851
852
  export { GetIndexerOrdersResponse as $, IndexerPortfolioPoint as $t, GetIndexerLeaderboardRegistrationsResponse as A, IndexerEventPerpStateSnapshot as At, GetIndexerMultiProductFundingRatesParams as B, IndexerMaker as Bt, GetIndexerInterestFundingPaymentsResponse as C, IndexerCashIncentivesEvent as Ct, GetIndexerLeaderboardParticipantParams as D, IndexerCashIncentivesWalletSummary as Dt, GetIndexerLeaderboardParams as E, IndexerCashIncentivesEventWallet as Et, GetIndexerMakerStatisticsResponse as F, IndexerLeaderboardContest as Ft, GetIndexerMultiProductSnapshotsResponse as G, IndexerNlpSnapshot as Gt, GetIndexerMultiProductPerpPricesParams as H, IndexerMarketSnapshot as Ht, GetIndexerMarketSnapshotsParams as I, IndexerLeaderboardContestTrack as It, GetIndexerNlpSnapshotsParams as J, IndexerPerpBalance as Jt, GetIndexerMultiSubaccountSnapshotsParams as K, IndexerOraclePrice as Kt, GetIndexerMarketSnapshotsResponse as L, IndexerLeaderboardParticipant as Lt, GetIndexerLinkedSignerParams as M, IndexerEventWithTx as Mt, GetIndexerLinkedSignerResponse as N, IndexerFundingRate as Nt, GetIndexerLeaderboardParticipantResponse as O, IndexerEvent as Ot, GetIndexerMakerStatisticsParams as P, IndexerFundingRateHistoryEntry as Pt, GetIndexerOrdersParams as Q, IndexerPortfolioPeriod as Qt, GetIndexerMatchEventsParams as R, IndexerLeaderboardRegistration as Rt, GetIndexerInterestFundingPaymentsParams as S, TickerMarketType as Sn, IndexerBalanceTrackedVars as St, GetIndexerLeaderboardContestsResponse as T, IndexerCashIncentivesEventPlatform as Tt, GetIndexerMultiProductPerpPricesResponse as U, IndexerMatchEvent as Ut, GetIndexerMultiProductFundingRatesResponse as V, IndexerMakerSnapshot as Vt, GetIndexerMultiProductSnapshotsParams as W, IndexerMatchEventBalances as Wt, GetIndexerOraclePricesParams as X, IndexerPointsEpoch as Xt, GetIndexerNlpSnapshotsResponse as Y, IndexerPerpPrices as Yt, GetIndexerOraclePricesResponse as Z, IndexerPortfolioHistory as Zt, GetIndexerFastWithdrawalSignatureResponse as _, ListIndexerSubaccountsResponse as _n, GetIndexerV2TickersParams as _t, GetIndexerCandlesticksParams as a, IndexerSpotBalance as an, GetIndexerPortfolioResponse as at, GetIndexerFundingRateParams as b, RevokeSocialAccountParams as bn, GetIndexerXPointsResponse as bt, GetIndexerCashIncentivesResponse as c, IndexerV2Symbol as cn, GetIndexerProductSnapshotsParams as ct, GetIndexerEdgeMarketSnapshotResponse as d, IndexerXPointsAllTime as dn, GetIndexerReferralCodeParams as dt, IndexerProductPayment as en, GetIndexerPerpPricesParams as et, GetIndexerEdgeMarketSnapshotsParams as f, IndexerXPointsEpoch as fn, GetIndexerReferralCodeResponse as ft, GetIndexerFastWithdrawalSignatureParams as g, ListIndexerSubaccountsParams as gn, GetIndexerV2SymbolsResponse as gt, GetIndexerEventsResponse as h, ListIndexerSocialAccountsResponse as hn, GetIndexerV2SymbolsParams as ht, GetIndexerBacklogResponse as i, IndexerSocialAccountInfo as in, GetIndexerPortfolioParams as it, GetIndexerLeaderboardResponse as j, IndexerEventSpotStateSnapshot as jt, GetIndexerLeaderboardRegistrationsParams as k, IndexerEventBalanceStateSnapshot as kt, GetIndexerEdgeCandlesticksParams as l, IndexerV2TickerResponse as ln, GetIndexerProductSnapshotsResponse as lt, GetIndexerEventsParams as m, ListIndexerSocialAccountsParams as mn, GetIndexerSubaccountDDAResponse as mt, ConnectSocialAccountParams as n, IndexerSnapshotBalance as nn, GetIndexerPointsParams as nt, GetIndexerCandlesticksResponse as o, IndexerSubaccountSnapshot as on, GetIndexerPrivateAlphaChoiceParams as ot, GetIndexerEventsLimitType as p, IndexerXPointsQuest as pn, GetIndexerSubaccountDDAParams as pt, GetIndexerMultiSubaccountSnapshotsResponse as q, IndexerOrder as qt, ConnectSocialAccountResponse as r, IndexerSnapshotsIntervalParams as rn, GetIndexerPointsResponse as rt, GetIndexerCashIncentivesParams as s, IndexerV2MarketHours as sn, GetIndexerPrivateAlphaChoiceResponse as st, Candlestick as t, IndexerProductSnapshot as tn, GetIndexerPerpPricesResponse as tt, GetIndexerEdgeCandlesticksResponse as u, IndexerV2TradingStatus as un, GetIndexerQuotePriceResponse as ut, GetIndexerFundingRateHistoryParams as v, RegisterLeaderboardParams as vn, GetIndexerV2TickersResponse as vt, GetIndexerLeaderboardContestsParams as w, IndexerCashIncentivesEventMetadata as wt, GetIndexerFundingRateResponse as x, RevokeSocialAccountResponse as xn, IndexerAllTimePoints as xt, GetIndexerFundingRateHistoryResponse as y, RegisterLeaderboardResponse as yn, GetIndexerXPointsParams as yt, GetIndexerMatchEventsResponse as z, IndexerLeaderboardTrackPosition as zt };
852
- //# sourceMappingURL=clientTypes-sF5is5HA.d.cts.map
853
+ //# sourceMappingURL=clientTypes-DFn6P-tv.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientTypes-DFn6P-tv.d.cts","names":[],"sources":["../src/types/src/types/clientTypes.ts"],"mappings":";;;;;;;;;;;;AAgCA;KAAY,kBAAA,GAAqB,IAAI,CAAC,WAAA;AAAA,KAE1B,kBAAA,GAAqB,IAAI,CAAC,WAAA;AAAA,UAErB,6BAAA;EACf,IAAA,EAAM,iBAAA,CAAkB,IAAA;EACxB,UAAA,EAAY,kBAAA;EACZ,WAAA,EAAa,kBAAA;EACb,MAAA,EAAQ,UAAA;AAAA;AAAA,UAGO,6BAAA;EACf,IAAA,EAAM,iBAAA,CAAkB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{ t as IndexerEventType } from "./IndexerEventType-Brm9aX8w.js";
3
3
  import { t as IndexerLeaderboardRankType } from "./IndexerLeaderboardType-DAKw2tfI.js";
4
4
  import { c as NadoWithdrawCollateralV2Tx, o as NadoTx, s as NadoWithdrawCollateralTx } from "./NadoTx-Bd4U-zDu.js";
5
- import { K as IndexerServerListSubaccountsParams, Rt as IndexerServerTriggerTypeFilter, x as IndexerServerFastWithdrawalSignatureParams } from "./serverTypes-BdNekzFR.js";
5
+ import { K as IndexerServerListSubaccountsParams, Rt as IndexerServerTriggerTypeFilter, x as IndexerServerFastWithdrawalSignatureParams } from "./serverTypes-DhOquJu2.js";
6
6
  import { EIP712OrderValues, Market, OrderAppendix, PerpBalance, PerpMarket, ProductEngineType, SignatureParams, SpotBalance, SpotMarket, Subaccount } from "@nadohq/shared";
7
7
  import BigNumber from "bignumber.js";
8
8
  import { Address, Hex } from "viem";
@@ -34,6 +34,7 @@ interface IndexerBalanceTrackedVars {
34
34
  netEntryUnrealized: BigNumber;
35
35
  netEntryCumulative: BigNumber;
36
36
  quoteVolumeCumulative: BigNumber;
37
+ cumulativeTradeCount: BigNumber;
37
38
  }
38
39
  interface IndexerEvent<TStateType extends IndexerEventBalanceStateSnapshot = IndexerEventBalanceStateSnapshot> {
39
40
  subaccount: string;
@@ -849,4 +850,4 @@ interface IndexerV2Symbol {
849
850
  type GetIndexerV2SymbolsResponse = Record<string, IndexerV2Symbol>;
850
851
  //#endregion
851
852
  export { GetIndexerOrdersResponse as $, IndexerPortfolioPoint as $t, GetIndexerLeaderboardRegistrationsResponse as A, IndexerEventPerpStateSnapshot as At, GetIndexerMultiProductFundingRatesParams as B, IndexerMaker as Bt, GetIndexerInterestFundingPaymentsResponse as C, IndexerCashIncentivesEvent as Ct, GetIndexerLeaderboardParticipantParams as D, IndexerCashIncentivesWalletSummary as Dt, GetIndexerLeaderboardParams as E, IndexerCashIncentivesEventWallet as Et, GetIndexerMakerStatisticsResponse as F, IndexerLeaderboardContest as Ft, GetIndexerMultiProductSnapshotsResponse as G, IndexerNlpSnapshot as Gt, GetIndexerMultiProductPerpPricesParams as H, IndexerMarketSnapshot as Ht, GetIndexerMarketSnapshotsParams as I, IndexerLeaderboardContestTrack as It, GetIndexerNlpSnapshotsParams as J, IndexerPerpBalance as Jt, GetIndexerMultiSubaccountSnapshotsParams as K, IndexerOraclePrice as Kt, GetIndexerMarketSnapshotsResponse as L, IndexerLeaderboardParticipant as Lt, GetIndexerLinkedSignerParams as M, IndexerEventWithTx as Mt, GetIndexerLinkedSignerResponse as N, IndexerFundingRate as Nt, GetIndexerLeaderboardParticipantResponse as O, IndexerEvent as Ot, GetIndexerMakerStatisticsParams as P, IndexerFundingRateHistoryEntry as Pt, GetIndexerOrdersParams as Q, IndexerPortfolioPeriod as Qt, GetIndexerMatchEventsParams as R, IndexerLeaderboardRegistration as Rt, GetIndexerInterestFundingPaymentsParams as S, TickerMarketType as Sn, IndexerBalanceTrackedVars as St, GetIndexerLeaderboardContestsResponse as T, IndexerCashIncentivesEventPlatform as Tt, GetIndexerMultiProductPerpPricesResponse as U, IndexerMatchEvent as Ut, GetIndexerMultiProductFundingRatesResponse as V, IndexerMakerSnapshot as Vt, GetIndexerMultiProductSnapshotsParams as W, IndexerMatchEventBalances as Wt, GetIndexerOraclePricesParams as X, IndexerPointsEpoch as Xt, GetIndexerNlpSnapshotsResponse as Y, IndexerPerpPrices as Yt, GetIndexerOraclePricesResponse as Z, IndexerPortfolioHistory as Zt, GetIndexerFastWithdrawalSignatureResponse as _, ListIndexerSubaccountsResponse as _n, GetIndexerV2TickersParams as _t, GetIndexerCandlesticksParams as a, IndexerSpotBalance as an, GetIndexerPortfolioResponse as at, GetIndexerFundingRateParams as b, RevokeSocialAccountParams as bn, GetIndexerXPointsResponse as bt, GetIndexerCashIncentivesResponse as c, IndexerV2Symbol as cn, GetIndexerProductSnapshotsParams as ct, GetIndexerEdgeMarketSnapshotResponse as d, IndexerXPointsAllTime as dn, GetIndexerReferralCodeParams as dt, IndexerProductPayment as en, GetIndexerPerpPricesParams as et, GetIndexerEdgeMarketSnapshotsParams as f, IndexerXPointsEpoch as fn, GetIndexerReferralCodeResponse as ft, GetIndexerFastWithdrawalSignatureParams as g, ListIndexerSubaccountsParams as gn, GetIndexerV2SymbolsResponse as gt, GetIndexerEventsResponse as h, ListIndexerSocialAccountsResponse as hn, GetIndexerV2SymbolsParams as ht, GetIndexerBacklogResponse as i, IndexerSocialAccountInfo as in, GetIndexerPortfolioParams as it, GetIndexerLeaderboardResponse as j, IndexerEventSpotStateSnapshot as jt, GetIndexerLeaderboardRegistrationsParams as k, IndexerEventBalanceStateSnapshot as kt, GetIndexerEdgeCandlesticksParams as l, IndexerV2TickerResponse as ln, GetIndexerProductSnapshotsResponse as lt, GetIndexerEventsParams as m, ListIndexerSocialAccountsParams as mn, GetIndexerSubaccountDDAResponse as mt, ConnectSocialAccountParams as n, IndexerSnapshotBalance as nn, GetIndexerPointsParams as nt, GetIndexerCandlesticksResponse as o, IndexerSubaccountSnapshot as on, GetIndexerPrivateAlphaChoiceParams as ot, GetIndexerEventsLimitType as p, IndexerXPointsQuest as pn, GetIndexerSubaccountDDAParams as pt, GetIndexerMultiSubaccountSnapshotsResponse as q, IndexerOrder as qt, ConnectSocialAccountResponse as r, IndexerSnapshotsIntervalParams as rn, GetIndexerPointsResponse as rt, GetIndexerCashIncentivesParams as s, IndexerV2MarketHours as sn, GetIndexerPrivateAlphaChoiceResponse as st, Candlestick as t, IndexerProductSnapshot as tn, GetIndexerPerpPricesResponse as tt, GetIndexerEdgeCandlesticksResponse as u, IndexerV2TradingStatus as un, GetIndexerQuotePriceResponse as ut, GetIndexerFundingRateHistoryParams as v, RegisterLeaderboardParams as vn, GetIndexerV2TickersResponse as vt, GetIndexerLeaderboardContestsParams as w, IndexerCashIncentivesEventMetadata as wt, GetIndexerFundingRateResponse as x, RevokeSocialAccountResponse as xn, IndexerAllTimePoints as xt, GetIndexerFundingRateHistoryResponse as y, RegisterLeaderboardResponse as yn, GetIndexerXPointsParams as yt, GetIndexerMatchEventsResponse as z, IndexerLeaderboardTrackPosition as zt };
852
- //# sourceMappingURL=clientTypes-CuXHS6Jk.d.ts.map
853
+ //# sourceMappingURL=clientTypes-DKN-EsOj.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientTypes-DKN-EsOj.d.ts","names":[],"sources":["../src/types/src/types/clientTypes.ts"],"mappings":";;;;;;;;;;;;AAgCA;KAAY,kBAAA,GAAqB,IAAI,CAAC,WAAA;AAAA,KAE1B,kBAAA,GAAqB,IAAI,CAAC,WAAA;AAAA,UAErB,6BAAA;EACf,IAAA,EAAM,iBAAA,CAAkB,IAAA;EACxB,UAAA,EAAY,kBAAA;EACZ,WAAA,EAAa,kBAAA;EACb,MAAA,EAAQ,UAAA;AAAA;AAAA,UAGO,6BAAA;EACf,IAAA,EAAM,iBAAA,CAAkB,IAAA;EACxB,UAAA,EAAY,kBAAA;EACZ,WAAA,EAAa,kBAAA;EACb,MAAA,EAAQ,UAAA;AAAA;AAAA,KAGE,gCAAA,GACR,6BAAA,GACA,6BAA6B;AAAA,UAEhB,yBAAA;EACf,qBAAA,EAAuB,SAAA;EACvB,qBAAA,EAAuB,SAAA;EACvB,oBAAA,EAAsB,SAAA;EACtB,oBAAA,EAAsB,SAAA;EACtB,kBAAA,EAAoB,SAAA;EACpB,kBAAA,EAAoB,SAAA;EACpB,qBAAA,EAAuB,SAAA;EACvB,oBAAA,EAAsB,SAAA;AAAA;AAAA,UAGP,YAAA,oBACI,gCAAA,GACjB,gCAAA;EAEF,UAAA;EACA,QAAA;EAEA,iBAAA;EACA,SAAA;EACA,eAAA;EACA,SAAA,EAAW,gBAAA;EACX,KAAA,EAAO,UAAA;EACP,WAAA,EAAa,yBAAA;AAAA;AAAA,UAGE,kBAAA,oBACI,gCAAA,GACjB,gCAAA,UACM,YAAA,CAAa,UAAA;EACrB,SAAA,EAAW,SAAA;EACX,EAAA,EAAI,MAAA;AAAA;;;;KAOM,4BA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aAAA;EAljBiB;EAojBjB,OAAA;EAjjBU;EAmjBV,YAAA,EAAc,SAAA;;EAEd,YAAA,EAAc,SAAA;EArjB6C;EAujB3D,iBAAA,EAAmB,SAAA;EAjjBwB;EAmjB3C,qBAAA,EAAuB,SAAA;EAljBvB;EAojBA,eAAA,EAAiB,SAAA;EA7iBF;;;EAijBf,YAAA,EAAc,SAAA;EAhjBQ;EAkjBtB,aAAA,EAAe,sBAAA;EA/iB8B;EAijB7C,YAAA;EAhjBc;EAkjBd,WAAA,EAAa,oBAAA;EA/iBQ;;;;EAojBrB,SAAA;EAtjBA;EAwjBA,eAAA;EAtjBA;EAwjBA,eAAA;AAAA;;AAtjBM;AAOR;;KAsjBY,2BAAA,GAA8B,MAAM,SAAS,eAAA"}
@@ -86,7 +86,8 @@ function mapIndexerEvent(event) {
86
86
  netFundingUnrealized: (0, _nadohq_shared.toBigNumber)(event.net_funding_unrealized),
87
87
  netInterestCumulative: (0, _nadohq_shared.toBigNumber)(event.net_interest_cumulative),
88
88
  netInterestUnrealized: (0, _nadohq_shared.toBigNumber)(event.net_interest_unrealized),
89
- quoteVolumeCumulative: (0, _nadohq_shared.toBigNumber)(event.quote_volume_cumulative)
89
+ quoteVolumeCumulative: (0, _nadohq_shared.toBigNumber)(event.quote_volume_cumulative),
90
+ cumulativeTradeCount: (0, _nadohq_shared.toBigNumber)(event.cumulative_trade_count)
90
91
  }
91
92
  };
92
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dataMappers.cjs","names":["ProductEngineType","toBigNumber"],"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport {\n getRecvTimeFromOrderNonce,\n mapValues,\n Market,\n PerpMarket,\n ProductEngineType,\n removeDecimals,\n SpotMarket,\n subaccountFromHex,\n toBigNumber,\n toIntegerString,\n unpackOrderAppendix,\n} from '@nadohq/shared';\nimport {\n Candlestick,\n GetIndexerPortfolioResponse,\n IndexerEvent,\n IndexerEventWithTx,\n IndexerFundingRate,\n IndexerFundingRateHistoryEntry,\n IndexerLeaderboardContest,\n IndexerLeaderboardParticipant,\n IndexerLeaderboardRegistration,\n IndexerMaker,\n IndexerMarketSnapshot,\n IndexerMatchEventBalances,\n IndexerNlpSnapshot,\n IndexerOrder,\n IndexerPerpBalance,\n IndexerPerpPrices,\n IndexerPortfolioPoint,\n IndexerProductPayment,\n IndexerServerBalance,\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerFundingRate,\n IndexerServerFundingRateHistoryEntry,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMatchEventBalances,\n IndexerServerNlpSnapshot,\n IndexerServerOrder,\n IndexerServerPerpPrices,\n IndexerServerPortfolioPoint,\n IndexerServerPortfolioResponse,\n IndexerServerProduct,\n IndexerServerProductPayment,\n IndexerServerSnapshotsInterval,\n IndexerServerTx,\n IndexerServerV2MarketHours,\n IndexerServerV2Symbol,\n IndexerServerV2TickerResponse,\n IndexerSnapshotsIntervalParams,\n IndexerSpotBalance,\n IndexerV2MarketHours,\n IndexerV2Symbol,\n IndexerV2TickerResponse,\n IndexerV2TradingStatus,\n} from './types';\n\nexport function mapSnapshotsIntervalToServerParams(\n params: IndexerSnapshotsIntervalParams,\n): IndexerServerSnapshotsInterval {\n return {\n count: params.limit,\n max_time: params.maxTimeInclusive\n ? toIntegerString(params.maxTimeInclusive)\n : undefined,\n granularity: params.granularity,\n };\n}\n\nexport function mapIndexerServerProduct(product: IndexerServerProduct): Market {\n if ('spot' in product) {\n return mapEngineServerSpotProduct(product.spot);\n }\n return mapEngineServerPerpProduct(product.perp);\n}\n\nexport function mapIndexerServerBalance(\n balance: IndexerServerBalance,\n): IndexerSpotBalance | IndexerPerpBalance {\n if ('spot' in balance) {\n return {\n amount: toBigNumber(balance.spot.balance.amount),\n productId: balance.spot.product_id,\n type: ProductEngineType.SPOT,\n };\n }\n return {\n amount: toBigNumber(balance.perp.balance.amount),\n productId: balance.perp.product_id,\n type: ProductEngineType.PERP,\n vQuoteBalance: toBigNumber(balance.perp.balance.v_quote_balance),\n };\n}\n\nexport function mapIndexerOrder(order: IndexerServerOrder): IndexerOrder {\n const appendix = unpackOrderAppendix(order.appendix);\n return {\n amount: toBigNumber(order.amount),\n digest: order.digest,\n expiration: Number(order.expiration),\n appendix,\n nonce: toBigNumber(order.nonce),\n isolated: order.isolated,\n recvTimeSeconds: getRecvTimeFromOrderNonce(order.nonce) / 1000,\n price: removeDecimals(order.price_x18),\n productId: order.product_id,\n subaccount: order.subaccount,\n submissionIndex: order.submission_idx,\n lastFillSubmissionIndex: order.last_fill_submission_idx,\n baseFilled: toBigNumber(order.base_filled),\n quoteFilled: toBigNumber(order.quote_filled),\n totalFee: toBigNumber(order.fee),\n builderFee: toBigNumber(order.builder_fee),\n realizedPnl: toBigNumber(order.realized_pnl),\n closedAmount: toBigNumber(order.closed_amount),\n closedNetEntry: toBigNumber(order.closed_net_entry),\n preCloseMargin: order.closed_margin\n ? toBigNumber(order.closed_margin)\n : null,\n firstFillTimestamp: toBigNumber(order.first_fill_timestamp),\n lastFillTimestamp: toBigNumber(order.last_fill_timestamp),\n preBalances: mapIndexerMatchEventBalances(order.pre_balance),\n postBalances: mapIndexerMatchEventBalances(order.post_balance),\n };\n}\n\nexport function mapIndexerEvent(event: IndexerServerEvent): IndexerEvent {\n const eventState: IndexerEvent['state'] = (() => {\n // Assume backend data is consistent\n if ('spot' in event.pre_balance) {\n return {\n type: ProductEngineType.SPOT,\n market: mapIndexerServerProduct(event.product) as SpotMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerSpotBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerSpotBalance,\n };\n }\n return {\n type: ProductEngineType.PERP,\n market: mapIndexerServerProduct(event.product) as PerpMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerPerpBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerPerpBalance,\n };\n })();\n\n return {\n eventType: event.event_type,\n productId: event.product_id,\n isolated: event.isolated,\n isolatedProductId: event.isolated_product_id,\n state: eventState,\n subaccount: event.subaccount,\n submissionIndex: event.submission_idx,\n trackedVars: {\n netEntryCumulative: toBigNumber(event.net_entry_cumulative),\n netEntryUnrealized: toBigNumber(event.net_entry_unrealized),\n netFundingCumulative: toBigNumber(event.net_funding_cumulative),\n netFundingUnrealized: toBigNumber(event.net_funding_unrealized),\n netInterestCumulative: toBigNumber(event.net_interest_cumulative),\n netInterestUnrealized: toBigNumber(event.net_interest_unrealized),\n quoteVolumeCumulative: toBigNumber(event.quote_volume_cumulative),\n },\n };\n}\n\nexport function mapIndexerEventWithTx(\n event: IndexerServerEvent,\n tx: IndexerServerTx,\n): IndexerEventWithTx {\n return {\n timestamp: toBigNumber(tx.timestamp),\n tx: tx.tx,\n ...mapIndexerEvent(event),\n };\n}\n\nexport function mapIndexerMatchEventBalances(\n eventBalances: IndexerServerMatchEventBalances,\n): IndexerMatchEventBalances {\n return {\n base: mapIndexerServerBalance(eventBalances.base),\n quote: eventBalances.quote\n ? (mapIndexerServerBalance(eventBalances.quote) as IndexerSpotBalance)\n : undefined,\n };\n}\n\nexport function mapIndexerProductPayment(\n payment: IndexerServerProductPayment,\n): IndexerProductPayment {\n return {\n submissionIndex: payment.idx,\n timestamp: toBigNumber(payment.timestamp),\n paymentAmount: toBigNumber(payment.amount),\n balanceAmount: toBigNumber(payment.balance_amount),\n annualPaymentRate: removeDecimals(payment.rate_x18),\n oraclePrice: removeDecimals(payment.oracle_price_x18),\n isolated: payment.isolated,\n productId: payment.product_id,\n isolatedProductId: payment.isolated_product_id,\n };\n}\n\nexport function mapIndexerPerpPrices(\n perpPrices: IndexerServerPerpPrices,\n): IndexerPerpPrices {\n return {\n indexPrice: removeDecimals(perpPrices.index_price_x18),\n markPrice: removeDecimals(perpPrices.mark_price_x18),\n updateTime: toBigNumber(perpPrices.update_time),\n productId: perpPrices.product_id,\n };\n}\n\nexport function mapIndexerFundingRate(\n fundingRate: IndexerServerFundingRate,\n): IndexerFundingRate {\n return {\n fundingRate: removeDecimals(fundingRate.funding_rate_x18),\n updateTime: toBigNumber(fundingRate.update_time),\n productId: fundingRate.product_id,\n };\n}\n\nexport function mapIndexerFundingRateHistory(\n entry: IndexerServerFundingRateHistoryEntry,\n): IndexerFundingRateHistoryEntry {\n return {\n productId: entry.product_id,\n timestamp: toBigNumber(entry.timestamp),\n fundingRateFrac: removeDecimals(entry.funding_rate_x18),\n };\n}\n\nfunction mapIndexerPortfolioPoint([\n timestamp,\n value,\n]: IndexerServerPortfolioPoint): IndexerPortfolioPoint {\n return {\n timestamp: toBigNumber(timestamp),\n value: toBigNumber(value),\n };\n}\n\nexport function mapIndexerPortfolio(\n response: IndexerServerPortfolioResponse,\n): GetIndexerPortfolioResponse {\n return Object.fromEntries(\n response.map(([period, history]) => [\n period,\n {\n accountValueHistory: history.accountValueHistory.map(\n mapIndexerPortfolioPoint,\n ),\n pnlHistory: history.pnlHistory.map(mapIndexerPortfolioPoint),\n volumeHistory: history.volumeHistory.map(mapIndexerPortfolioPoint),\n tradeSizeHistory: history.tradeSizeHistory.map(\n mapIndexerPortfolioPoint,\n ),\n marketCountHistory: history.marketCountHistory.map(\n mapIndexerPortfolioPoint,\n ),\n },\n ]),\n ) as GetIndexerPortfolioResponse;\n}\n\nexport function mapIndexerMakerStatistics(\n maker: IndexerServerMaker,\n): IndexerMaker {\n return {\n address: maker.address,\n snapshots: maker.data.map((makerData) => {\n return {\n timestamp: toBigNumber(makerData.timestamp),\n makerFee: toBigNumber(makerData.maker_fee),\n uptime: toBigNumber(makerData.uptime),\n sumQMin: toBigNumber(makerData.sum_q_min),\n qScore: toBigNumber(makerData.q_score),\n makerShare: toBigNumber(makerData.maker_share),\n expectedMakerReward: toBigNumber(makerData.expected_maker_reward),\n };\n }),\n };\n}\n\nexport function mapIndexerLeaderboardPosition(\n position: IndexerServerLeaderboardPosition,\n): IndexerLeaderboardParticipant {\n const tracks = mapValues(position.tracks, (trackData) => ({\n value: toBigNumber(trackData.value),\n rank: toBigNumber(trackData.rank),\n qualificationStatus: trackData.qualification_status,\n }));\n\n return {\n subaccount: subaccountFromHex(position.subaccount),\n contestId: position.contest_id,\n accountValue: toBigNumber(position.account_value),\n updateTime: toBigNumber(position.update_time),\n tracks,\n socialAccounts: position.social_accounts.map((account) => ({\n provider: account.provider,\n username: account.username,\n displayName: account.display_name,\n profileImageUrl: account.profile_image_url,\n })),\n };\n}\n\nexport function mapIndexerLeaderboardRegistration(\n registration: IndexerServerLeaderboardRegistration,\n): IndexerLeaderboardRegistration {\n return {\n subaccount: subaccountFromHex(registration.subaccount),\n contestId: registration.contest_id,\n updateTime: toBigNumber(registration.update_time),\n };\n}\n\nexport function mapIndexerLeaderboardContest(\n contest: IndexerServerLeaderboardContest,\n): IndexerLeaderboardContest {\n const startTime = toBigNumber(contest.start_time);\n const endTime = toBigNumber(contest.end_time);\n\n return {\n contestId: contest.contest_id,\n startTime,\n endTime,\n totalParticipants: toBigNumber(contest.count),\n requiredProductIds: contest.product_ids,\n active: contest.active,\n lastUpdated: toBigNumber(contest.last_updated),\n title: contest.title,\n description: contest.description,\n tracks: contest.tracks.map((track) => ({\n trackId: track.track_id,\n rankType: track.rank_type,\n sortOrder: track.sort_order,\n accountValueThreshold: toBigNumber(track.threshold),\n volumeThreshold: toBigNumber(track.volume_threshold),\n })),\n };\n}\n\nexport function mapIndexerCandlesticks(\n candlestick: IndexerServerCandlestick,\n): Candlestick {\n return {\n close: removeDecimals(candlestick.close_x18),\n high: removeDecimals(candlestick.high_x18),\n low: removeDecimals(candlestick.low_x18),\n open: removeDecimals(candlestick.open_x18),\n time: toBigNumber(candlestick.timestamp),\n volume: toBigNumber(candlestick.volume),\n };\n}\n\nexport function mapIndexerMarketSnapshot(\n snapshot: IndexerServerMarketSnapshot,\n): IndexerMarketSnapshot {\n return {\n timestamp: toBigNumber(snapshot.timestamp),\n cumulativeUsers: toBigNumber(snapshot.cumulative_users),\n dailyActiveUsers: toBigNumber(snapshot.daily_active_users),\n tvl: toBigNumber(snapshot.tvl),\n borrowRates: mapValues(snapshot.borrow_rates, (value) =>\n removeDecimals(value),\n ),\n cumulativeLiquidationAmounts: mapValues(\n snapshot.cumulative_liquidation_amounts,\n toBigNumber,\n ),\n cumulativeMakerFees: mapValues(snapshot.cumulative_maker_fees, toBigNumber),\n cumulativeSequencerFees: mapValues(\n snapshot.cumulative_sequencer_fees,\n toBigNumber,\n ),\n cumulativeTakerFees: mapValues(snapshot.cumulative_taker_fees, toBigNumber),\n cumulativeTrades: mapValues(snapshot.cumulative_trades, toBigNumber),\n cumulativeVolumes: mapValues(snapshot.cumulative_volumes, toBigNumber),\n depositRates: mapValues(snapshot.deposit_rates, (value) =>\n removeDecimals(value),\n ),\n fundingRates: mapValues(snapshot.funding_rates, (value) =>\n removeDecimals(value),\n ),\n openInterestsQuote: mapValues(snapshot.open_interests, toBigNumber),\n totalBorrows: mapValues(snapshot.total_borrows, toBigNumber),\n totalDeposits: mapValues(snapshot.total_deposits, toBigNumber),\n cumulativeTradeSizes: mapValues(\n snapshot.cumulative_trade_sizes,\n toBigNumber,\n ),\n cumulativeInflows: mapValues(snapshot.cumulative_inflows, toBigNumber),\n cumulativeOutflows: mapValues(snapshot.cumulative_outflows, toBigNumber),\n oraclePrices: mapValues(snapshot.oracle_prices, (value) =>\n removeDecimals(value),\n ),\n };\n}\n\nexport function mapIndexerNlpSnapshot(\n snapshot: IndexerServerNlpSnapshot,\n): IndexerNlpSnapshot {\n return {\n submissionIndex: snapshot.submission_idx,\n timestamp: toBigNumber(snapshot.timestamp),\n cumulativeBurnAmountQuote: toBigNumber(snapshot.cumulative_burn_quote),\n cumulativeMintAmountQuote: toBigNumber(snapshot.cumulative_mint_quote),\n cumulativePnl: toBigNumber(snapshot.cumulative_pnl),\n cumulativeTrades: toBigNumber(snapshot.cumulative_trades),\n cumulativeVolume: toBigNumber(snapshot.cumulative_volume),\n depositors: toBigNumber(snapshot.depositors),\n oraclePrice: removeDecimals(snapshot.oracle_price_x18),\n tvl: toBigNumber(snapshot.tvl),\n };\n}\n\nexport function mapIndexerV2Ticker(\n ticker: IndexerServerV2TickerResponse,\n): IndexerV2TickerResponse {\n return {\n productId: ticker.product_id,\n tickerId: ticker.ticker_id,\n baseCurrency: ticker.base_currency,\n quoteCurrency: ticker.quote_currency,\n lastPrice: ticker.last_price,\n baseVolume: ticker.base_volume,\n quoteVolume: ticker.quote_volume,\n priceChangePercent24h: ticker.price_change_percent_24h,\n };\n}\n\nexport function mapIndexerV2MarketHours(\n hours: IndexerServerV2MarketHours,\n): IndexerV2MarketHours {\n return {\n isOpen: hours.is_open,\n reason: hours.reason,\n nextClose: hours.next_close,\n nextOpen: hours.next_open,\n };\n}\n\nexport function mapIndexerV2Symbols(\n symbol: IndexerServerV2Symbol,\n): IndexerV2Symbol {\n return {\n type: symbol.type,\n productId: symbol.product_id,\n symbol: symbol.symbol,\n priceIncrement: removeDecimals(symbol.price_increment_x18),\n sizeIncrement: symbol.size_increment,\n minSize: symbol.min_size,\n makerFeeRate: removeDecimals(symbol.maker_fee_rate_x18),\n takerFeeRate: removeDecimals(symbol.taker_fee_rate_x18),\n longWeightInitial: removeDecimals(symbol.long_weight_initial_x18),\n longWeightMaintenance: removeDecimals(symbol.long_weight_maintenance_x18),\n maxOpenInterest: symbol.max_open_interest_x18\n ? removeDecimals(symbol.max_open_interest_x18)\n : null,\n exchangeRate: symbol.exchange_rate_x18\n ? removeDecimals(symbol.exchange_rate_x18)\n : null,\n tradingStatus: symbol.trading_status as IndexerV2TradingStatus,\n isolatedOnly: symbol.isolated_only,\n marketHours: symbol.market_hours\n ? mapIndexerV2MarketHours(symbol.market_hours)\n : null,\n boostType: symbol.boost_type ?? null,\n takerMultiplier: symbol.taker_multiplier ?? null,\n makerMultiplier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,qBAAA,GAAA,eAAA,gBACF,OAAO,iBAAiB,IACvC;EACJ,eAAe,OAAO;EACtB,cAAc,OAAO;EACrB,aAAa,OAAO,eAChB,wBAAwB,OAAO,YAAY,IAC3C;EACJ,WAAW,OAAO,cAAc;EAChC,iBAAiB,OAAO,oBAAoB;EAC5C,iBAAiB,OAAO,oBAAoB;CAC9C;AACF"}
1
+ {"version":3,"file":"dataMappers.cjs","names":["ProductEngineType","toBigNumber"],"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport {\n getRecvTimeFromOrderNonce,\n mapValues,\n Market,\n PerpMarket,\n ProductEngineType,\n removeDecimals,\n SpotMarket,\n subaccountFromHex,\n toBigNumber,\n toIntegerString,\n unpackOrderAppendix,\n} from '@nadohq/shared';\nimport {\n Candlestick,\n GetIndexerPortfolioResponse,\n IndexerEvent,\n IndexerEventWithTx,\n IndexerFundingRate,\n IndexerFundingRateHistoryEntry,\n IndexerLeaderboardContest,\n IndexerLeaderboardParticipant,\n IndexerLeaderboardRegistration,\n IndexerMaker,\n IndexerMarketSnapshot,\n IndexerMatchEventBalances,\n IndexerNlpSnapshot,\n IndexerOrder,\n IndexerPerpBalance,\n IndexerPerpPrices,\n IndexerPortfolioPoint,\n IndexerProductPayment,\n IndexerServerBalance,\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerFundingRate,\n IndexerServerFundingRateHistoryEntry,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMatchEventBalances,\n IndexerServerNlpSnapshot,\n IndexerServerOrder,\n IndexerServerPerpPrices,\n IndexerServerPortfolioPoint,\n IndexerServerPortfolioResponse,\n IndexerServerProduct,\n IndexerServerProductPayment,\n IndexerServerSnapshotsInterval,\n IndexerServerTx,\n IndexerServerV2MarketHours,\n IndexerServerV2Symbol,\n IndexerServerV2TickerResponse,\n IndexerSnapshotsIntervalParams,\n IndexerSpotBalance,\n IndexerV2MarketHours,\n IndexerV2Symbol,\n IndexerV2TickerResponse,\n IndexerV2TradingStatus,\n} from './types';\n\nexport function mapSnapshotsIntervalToServerParams(\n params: IndexerSnapshotsIntervalParams,\n): IndexerServerSnapshotsInterval {\n return {\n count: params.limit,\n max_time: params.maxTimeInclusive\n ? toIntegerString(params.maxTimeInclusive)\n : undefined,\n granularity: params.granularity,\n };\n}\n\nexport function mapIndexerServerProduct(product: IndexerServerProduct): Market {\n if ('spot' in product) {\n return mapEngineServerSpotProduct(product.spot);\n }\n return mapEngineServerPerpProduct(product.perp);\n}\n\nexport function mapIndexerServerBalance(\n balance: IndexerServerBalance,\n): IndexerSpotBalance | IndexerPerpBalance {\n if ('spot' in balance) {\n return {\n amount: toBigNumber(balance.spot.balance.amount),\n productId: balance.spot.product_id,\n type: ProductEngineType.SPOT,\n };\n }\n return {\n amount: toBigNumber(balance.perp.balance.amount),\n productId: balance.perp.product_id,\n type: ProductEngineType.PERP,\n vQuoteBalance: toBigNumber(balance.perp.balance.v_quote_balance),\n };\n}\n\nexport function mapIndexerOrder(order: IndexerServerOrder): IndexerOrder {\n const appendix = unpackOrderAppendix(order.appendix);\n return {\n amount: toBigNumber(order.amount),\n digest: order.digest,\n expiration: Number(order.expiration),\n appendix,\n nonce: toBigNumber(order.nonce),\n isolated: order.isolated,\n recvTimeSeconds: getRecvTimeFromOrderNonce(order.nonce) / 1000,\n price: removeDecimals(order.price_x18),\n productId: order.product_id,\n subaccount: order.subaccount,\n submissionIndex: order.submission_idx,\n lastFillSubmissionIndex: order.last_fill_submission_idx,\n baseFilled: toBigNumber(order.base_filled),\n quoteFilled: toBigNumber(order.quote_filled),\n totalFee: toBigNumber(order.fee),\n builderFee: toBigNumber(order.builder_fee),\n realizedPnl: toBigNumber(order.realized_pnl),\n closedAmount: toBigNumber(order.closed_amount),\n closedNetEntry: toBigNumber(order.closed_net_entry),\n preCloseMargin: order.closed_margin\n ? toBigNumber(order.closed_margin)\n : null,\n firstFillTimestamp: toBigNumber(order.first_fill_timestamp),\n lastFillTimestamp: toBigNumber(order.last_fill_timestamp),\n preBalances: mapIndexerMatchEventBalances(order.pre_balance),\n postBalances: mapIndexerMatchEventBalances(order.post_balance),\n };\n}\n\nexport function mapIndexerEvent(event: IndexerServerEvent): IndexerEvent {\n const eventState: IndexerEvent['state'] = (() => {\n // Assume backend data is consistent\n if ('spot' in event.pre_balance) {\n return {\n type: ProductEngineType.SPOT,\n market: mapIndexerServerProduct(event.product) as SpotMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerSpotBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerSpotBalance,\n };\n }\n return {\n type: ProductEngineType.PERP,\n market: mapIndexerServerProduct(event.product) as PerpMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerPerpBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerPerpBalance,\n };\n })();\n\n return {\n eventType: event.event_type,\n productId: event.product_id,\n isolated: event.isolated,\n isolatedProductId: event.isolated_product_id,\n state: eventState,\n subaccount: event.subaccount,\n submissionIndex: event.submission_idx,\n trackedVars: {\n netEntryCumulative: toBigNumber(event.net_entry_cumulative),\n netEntryUnrealized: toBigNumber(event.net_entry_unrealized),\n netFundingCumulative: toBigNumber(event.net_funding_cumulative),\n netFundingUnrealized: toBigNumber(event.net_funding_unrealized),\n netInterestCumulative: toBigNumber(event.net_interest_cumulative),\n netInterestUnrealized: toBigNumber(event.net_interest_unrealized),\n quoteVolumeCumulative: toBigNumber(event.quote_volume_cumulative),\n cumulativeTradeCount: toBigNumber(event.cumulative_trade_count),\n },\n };\n}\n\nexport function mapIndexerEventWithTx(\n event: IndexerServerEvent,\n tx: IndexerServerTx,\n): IndexerEventWithTx {\n return {\n timestamp: toBigNumber(tx.timestamp),\n tx: tx.tx,\n ...mapIndexerEvent(event),\n };\n}\n\nexport function mapIndexerMatchEventBalances(\n eventBalances: IndexerServerMatchEventBalances,\n): IndexerMatchEventBalances {\n return {\n base: mapIndexerServerBalance(eventBalances.base),\n quote: eventBalances.quote\n ? (mapIndexerServerBalance(eventBalances.quote) as IndexerSpotBalance)\n : undefined,\n };\n}\n\nexport function mapIndexerProductPayment(\n payment: IndexerServerProductPayment,\n): IndexerProductPayment {\n return {\n submissionIndex: payment.idx,\n timestamp: toBigNumber(payment.timestamp),\n paymentAmount: toBigNumber(payment.amount),\n balanceAmount: toBigNumber(payment.balance_amount),\n annualPaymentRate: removeDecimals(payment.rate_x18),\n oraclePrice: removeDecimals(payment.oracle_price_x18),\n isolated: payment.isolated,\n productId: payment.product_id,\n isolatedProductId: payment.isolated_product_id,\n };\n}\n\nexport function mapIndexerPerpPrices(\n perpPrices: IndexerServerPerpPrices,\n): IndexerPerpPrices {\n return {\n indexPrice: removeDecimals(perpPrices.index_price_x18),\n markPrice: removeDecimals(perpPrices.mark_price_x18),\n updateTime: toBigNumber(perpPrices.update_time),\n productId: perpPrices.product_id,\n };\n}\n\nexport function mapIndexerFundingRate(\n fundingRate: IndexerServerFundingRate,\n): IndexerFundingRate {\n return {\n fundingRate: removeDecimals(fundingRate.funding_rate_x18),\n updateTime: toBigNumber(fundingRate.update_time),\n productId: fundingRate.product_id,\n };\n}\n\nexport function mapIndexerFundingRateHistory(\n entry: IndexerServerFundingRateHistoryEntry,\n): IndexerFundingRateHistoryEntry {\n return {\n productId: entry.product_id,\n timestamp: toBigNumber(entry.timestamp),\n fundingRateFrac: removeDecimals(entry.funding_rate_x18),\n };\n}\n\nfunction mapIndexerPortfolioPoint([\n timestamp,\n value,\n]: IndexerServerPortfolioPoint): IndexerPortfolioPoint {\n return {\n timestamp: toBigNumber(timestamp),\n value: toBigNumber(value),\n };\n}\n\nexport function mapIndexerPortfolio(\n response: IndexerServerPortfolioResponse,\n): GetIndexerPortfolioResponse {\n return Object.fromEntries(\n response.map(([period, history]) => [\n period,\n {\n accountValueHistory: history.accountValueHistory.map(\n mapIndexerPortfolioPoint,\n ),\n pnlHistory: history.pnlHistory.map(mapIndexerPortfolioPoint),\n volumeHistory: history.volumeHistory.map(mapIndexerPortfolioPoint),\n tradeSizeHistory: history.tradeSizeHistory.map(\n mapIndexerPortfolioPoint,\n ),\n marketCountHistory: history.marketCountHistory.map(\n mapIndexerPortfolioPoint,\n ),\n },\n ]),\n ) as GetIndexerPortfolioResponse;\n}\n\nexport function mapIndexerMakerStatistics(\n maker: IndexerServerMaker,\n): IndexerMaker {\n return {\n address: maker.address,\n snapshots: maker.data.map((makerData) => {\n return {\n timestamp: toBigNumber(makerData.timestamp),\n makerFee: toBigNumber(makerData.maker_fee),\n uptime: toBigNumber(makerData.uptime),\n sumQMin: toBigNumber(makerData.sum_q_min),\n qScore: toBigNumber(makerData.q_score),\n makerShare: toBigNumber(makerData.maker_share),\n expectedMakerReward: toBigNumber(makerData.expected_maker_reward),\n };\n }),\n };\n}\n\nexport function mapIndexerLeaderboardPosition(\n position: IndexerServerLeaderboardPosition,\n): IndexerLeaderboardParticipant {\n const tracks = mapValues(position.tracks, (trackData) => ({\n value: toBigNumber(trackData.value),\n rank: toBigNumber(trackData.rank),\n qualificationStatus: trackData.qualification_status,\n }));\n\n return {\n subaccount: subaccountFromHex(position.subaccount),\n contestId: position.contest_id,\n accountValue: toBigNumber(position.account_value),\n updateTime: toBigNumber(position.update_time),\n tracks,\n socialAccounts: position.social_accounts.map((account) => ({\n provider: account.provider,\n username: account.username,\n displayName: account.display_name,\n profileImageUrl: account.profile_image_url,\n })),\n };\n}\n\nexport function mapIndexerLeaderboardRegistration(\n registration: IndexerServerLeaderboardRegistration,\n): IndexerLeaderboardRegistration {\n return {\n subaccount: subaccountFromHex(registration.subaccount),\n contestId: registration.contest_id,\n updateTime: toBigNumber(registration.update_time),\n };\n}\n\nexport function mapIndexerLeaderboardContest(\n contest: IndexerServerLeaderboardContest,\n): IndexerLeaderboardContest {\n const startTime = toBigNumber(contest.start_time);\n const endTime = toBigNumber(contest.end_time);\n\n return {\n contestId: contest.contest_id,\n startTime,\n endTime,\n totalParticipants: toBigNumber(contest.count),\n requiredProductIds: contest.product_ids,\n active: contest.active,\n lastUpdated: toBigNumber(contest.last_updated),\n title: contest.title,\n description: contest.description,\n tracks: contest.tracks.map((track) => ({\n trackId: track.track_id,\n rankType: track.rank_type,\n sortOrder: track.sort_order,\n accountValueThreshold: toBigNumber(track.threshold),\n volumeThreshold: toBigNumber(track.volume_threshold),\n })),\n };\n}\n\nexport function mapIndexerCandlesticks(\n candlestick: IndexerServerCandlestick,\n): Candlestick {\n return {\n close: removeDecimals(candlestick.close_x18),\n high: removeDecimals(candlestick.high_x18),\n low: removeDecimals(candlestick.low_x18),\n open: removeDecimals(candlestick.open_x18),\n time: toBigNumber(candlestick.timestamp),\n volume: toBigNumber(candlestick.volume),\n };\n}\n\nexport function mapIndexerMarketSnapshot(\n snapshot: IndexerServerMarketSnapshot,\n): IndexerMarketSnapshot {\n return {\n timestamp: toBigNumber(snapshot.timestamp),\n cumulativeUsers: toBigNumber(snapshot.cumulative_users),\n dailyActiveUsers: toBigNumber(snapshot.daily_active_users),\n tvl: toBigNumber(snapshot.tvl),\n borrowRates: mapValues(snapshot.borrow_rates, (value) =>\n removeDecimals(value),\n ),\n cumulativeLiquidationAmounts: mapValues(\n snapshot.cumulative_liquidation_amounts,\n toBigNumber,\n ),\n cumulativeMakerFees: mapValues(snapshot.cumulative_maker_fees, toBigNumber),\n cumulativeSequencerFees: mapValues(\n snapshot.cumulative_sequencer_fees,\n toBigNumber,\n ),\n cumulativeTakerFees: mapValues(snapshot.cumulative_taker_fees, toBigNumber),\n cumulativeTrades: mapValues(snapshot.cumulative_trades, toBigNumber),\n cumulativeVolumes: mapValues(snapshot.cumulative_volumes, toBigNumber),\n depositRates: mapValues(snapshot.deposit_rates, (value) =>\n removeDecimals(value),\n ),\n fundingRates: mapValues(snapshot.funding_rates, (value) =>\n removeDecimals(value),\n ),\n openInterestsQuote: mapValues(snapshot.open_interests, toBigNumber),\n totalBorrows: mapValues(snapshot.total_borrows, toBigNumber),\n totalDeposits: mapValues(snapshot.total_deposits, toBigNumber),\n cumulativeTradeSizes: mapValues(\n snapshot.cumulative_trade_sizes,\n toBigNumber,\n ),\n cumulativeInflows: mapValues(snapshot.cumulative_inflows, toBigNumber),\n cumulativeOutflows: mapValues(snapshot.cumulative_outflows, toBigNumber),\n oraclePrices: mapValues(snapshot.oracle_prices, (value) =>\n removeDecimals(value),\n ),\n };\n}\n\nexport function mapIndexerNlpSnapshot(\n snapshot: IndexerServerNlpSnapshot,\n): IndexerNlpSnapshot {\n return {\n submissionIndex: snapshot.submission_idx,\n timestamp: toBigNumber(snapshot.timestamp),\n cumulativeBurnAmountQuote: toBigNumber(snapshot.cumulative_burn_quote),\n cumulativeMintAmountQuote: toBigNumber(snapshot.cumulative_mint_quote),\n cumulativePnl: toBigNumber(snapshot.cumulative_pnl),\n cumulativeTrades: toBigNumber(snapshot.cumulative_trades),\n cumulativeVolume: toBigNumber(snapshot.cumulative_volume),\n depositors: toBigNumber(snapshot.depositors),\n oraclePrice: removeDecimals(snapshot.oracle_price_x18),\n tvl: toBigNumber(snapshot.tvl),\n };\n}\n\nexport function mapIndexerV2Ticker(\n ticker: IndexerServerV2TickerResponse,\n): IndexerV2TickerResponse {\n return {\n productId: ticker.product_id,\n tickerId: ticker.ticker_id,\n baseCurrency: ticker.base_currency,\n quoteCurrency: ticker.quote_currency,\n lastPrice: ticker.last_price,\n baseVolume: ticker.base_volume,\n quoteVolume: ticker.quote_volume,\n priceChangePercent24h: ticker.price_change_percent_24h,\n };\n}\n\nexport function mapIndexerV2MarketHours(\n hours: IndexerServerV2MarketHours,\n): IndexerV2MarketHours {\n return {\n isOpen: hours.is_open,\n reason: hours.reason,\n nextClose: hours.next_close,\n nextOpen: hours.next_open,\n };\n}\n\nexport function mapIndexerV2Symbols(\n symbol: IndexerServerV2Symbol,\n): IndexerV2Symbol {\n return {\n type: symbol.type,\n productId: symbol.product_id,\n symbol: symbol.symbol,\n priceIncrement: removeDecimals(symbol.price_increment_x18),\n sizeIncrement: symbol.size_increment,\n minSize: symbol.min_size,\n makerFeeRate: removeDecimals(symbol.maker_fee_rate_x18),\n takerFeeRate: removeDecimals(symbol.taker_fee_rate_x18),\n longWeightInitial: removeDecimals(symbol.long_weight_initial_x18),\n longWeightMaintenance: removeDecimals(symbol.long_weight_maintenance_x18),\n maxOpenInterest: symbol.max_open_interest_x18\n ? removeDecimals(symbol.max_open_interest_x18)\n : null,\n exchangeRate: symbol.exchange_rate_x18\n ? removeDecimals(symbol.exchange_rate_x18)\n : null,\n tradingStatus: symbol.trading_status as IndexerV2TradingStatus,\n isolatedOnly: symbol.isolated_only,\n marketHours: symbol.market_hours\n ? mapIndexerV2MarketHours(symbol.market_hours)\n : null,\n boostType: symbol.boost_type ?? null,\n takerMultiplier: symbol.taker_multiplier ?? null,\n makerMultiplier: symbol.maker_multiplier ?? null,\n };\n}\n"],"mappings":";;;;;AAmEA,SAAgB,mCACd,QACgC;CAChC,OAAO;EACL,OAAO,OAAO;EACd,UAAU,OAAO,oBAAA,GAAA,eAAA,iBACG,OAAO,gBAAgB,IACvC,KAAA;EACJ,aAAa,OAAO;CACtB;AACF;AAEA,SAAgB,wBAAwB,SAAuC;CAC7E,IAAI,UAAU,SACZ,QAAA,GAAA,sBAAA,4BAAkC,QAAQ,IAAI;CAEhD,QAAA,GAAA,sBAAA,4BAAkC,QAAQ,IAAI;AAChD;AAEA,SAAgB,wBACd,SACyC;CACzC,IAAI,UAAU,SACZ,OAAO;EACL,SAAA,GAAA,eAAA,aAAoB,QAAQ,KAAK,QAAQ,MAAM;EAC/C,WAAW,QAAQ,KAAK;EACxB,MAAMA,eAAAA,kBAAkB;CAC1B;CAEF,OAAO;EACL,SAAA,GAAA,eAAA,aAAoB,QAAQ,KAAK,QAAQ,MAAM;EAC/C,WAAW,QAAQ,KAAK;EACxB,MAAMA,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tB,WAAW,OAAO;EAClB,YAAY,OAAO;EACnB,aAAa,OAAO;EACpB,uBAAuB,OAAO;CAChC;AACF;AAEA,SAAgB,wBACd,OACsB;CACtB,OAAO;EACL,QAAQ,MAAM;EACd,QAAQ,MAAM;EACd,WAAW,MAAM;EACjB,UAAU,MAAM;CAClB;AACF;AAEA,SAAgB,oBACd,QACiB;CACjB,OAAO;EACL,MAAM,OAAO;EACb,WAAW,OAAO;EAClB,QAAQ,OAAO;EACf,iBAAA,GAAA,eAAA,gBAA+B,OAAO,mBAAmB;EACzD,eAAe,OAAO;EACtB,SAAS,OAAO;EAChB,eAAA,GAAA,eAAA,gBAA6B,OAAO,kBAAkB;EACtD,eAAA,GAAA,eAAA,gBAA6B,OAAO,kBAAkB;EACtD,oBAAA,GAAA,eAAA,gBAAkC,OAAO,uBAAuB;EAChE,wBAAA,GAAA,eAAA,gBAAsC,OAAO,2BAA2B;EACxE,iBAAiB,OAAO,yBAAA,GAAA,eAAA,gBACL,OAAO,qBAAqB,IAC3C;EACJ,cAAc,OAAO,qBAAA,GAAA,eAAA,gBACF,OAAO,iBAAiB,IACvC;EACJ,eAAe,OAAO;EACtB,cAAc,OAAO;EACrB,aAAa,OAAO,eAChB,wBAAwB,OAAO,YAAY,IAC3C;EACJ,WAAW,OAAO,cAAc;EAChC,iBAAiB,OAAO,oBAAoB;EAC5C,iBAAiB,OAAO,oBAAoB;CAC9C;AACF"}
@@ -1,6 +1,6 @@
1
- import { C as IndexerServerTx, _ as IndexerServerOrder, d as IndexerServerMarketSnapshot, h as IndexerServerNlpSnapshot, i as IndexerServerLeaderboardContest, l as IndexerServerMaker, m as IndexerServerMatchEventBalances, n as IndexerServerCandlestick, o as IndexerServerLeaderboardPosition, r as IndexerServerEvent, s as IndexerServerLeaderboardRegistration, t as IndexerServerBalance, v as IndexerServerProduct, x as IndexerServerSnapshotsInterval, y as IndexerServerProductPayment } from "./serverModelTypes-sQOL10Bi.cjs";
2
- import { Bt as IndexerServerV2Symbol, C as IndexerServerFundingRate, Ht as IndexerServerV2TickerResponse, bt as IndexerServerPortfolioResponse, ut as IndexerServerPerpPrices, w as IndexerServerFundingRateHistoryEntry, zt as IndexerServerV2MarketHours } from "./serverTypes-DrlzA5fi.cjs";
3
- import { Bt as IndexerMaker, Ft as IndexerLeaderboardContest, Gt as IndexerNlpSnapshot, Ht as IndexerMarketSnapshot, Jt as IndexerPerpBalance, Lt as IndexerLeaderboardParticipant, Mt as IndexerEventWithTx, Nt as IndexerFundingRate, Ot as IndexerEvent, Pt as IndexerFundingRateHistoryEntry, Rt as IndexerLeaderboardRegistration, Wt as IndexerMatchEventBalances, Yt as IndexerPerpPrices, an as IndexerSpotBalance, at as GetIndexerPortfolioResponse, cn as IndexerV2Symbol, en as IndexerProductPayment, ln as IndexerV2TickerResponse, qt as IndexerOrder, rn as IndexerSnapshotsIntervalParams, sn as IndexerV2MarketHours, t as Candlestick } from "./clientTypes-sF5is5HA.cjs";
1
+ import { C as IndexerServerTx, _ as IndexerServerOrder, d as IndexerServerMarketSnapshot, h as IndexerServerNlpSnapshot, i as IndexerServerLeaderboardContest, l as IndexerServerMaker, m as IndexerServerMatchEventBalances, n as IndexerServerCandlestick, o as IndexerServerLeaderboardPosition, r as IndexerServerEvent, s as IndexerServerLeaderboardRegistration, t as IndexerServerBalance, v as IndexerServerProduct, x as IndexerServerSnapshotsInterval, y as IndexerServerProductPayment } from "./serverModelTypes-DC4dsX9i.cjs";
2
+ import { Bt as IndexerServerV2Symbol, C as IndexerServerFundingRate, Ht as IndexerServerV2TickerResponse, bt as IndexerServerPortfolioResponse, ut as IndexerServerPerpPrices, w as IndexerServerFundingRateHistoryEntry, zt as IndexerServerV2MarketHours } from "./serverTypes-CKMTuCwh.cjs";
3
+ import { Bt as IndexerMaker, Ft as IndexerLeaderboardContest, Gt as IndexerNlpSnapshot, Ht as IndexerMarketSnapshot, Jt as IndexerPerpBalance, Lt as IndexerLeaderboardParticipant, Mt as IndexerEventWithTx, Nt as IndexerFundingRate, Ot as IndexerEvent, Pt as IndexerFundingRateHistoryEntry, Rt as IndexerLeaderboardRegistration, Wt as IndexerMatchEventBalances, Yt as IndexerPerpPrices, an as IndexerSpotBalance, at as GetIndexerPortfolioResponse, cn as IndexerV2Symbol, en as IndexerProductPayment, ln as IndexerV2TickerResponse, qt as IndexerOrder, rn as IndexerSnapshotsIntervalParams, sn as IndexerV2MarketHours, t as Candlestick } from "./clientTypes-DFn6P-tv.cjs";
4
4
  import { Market } from "@nadohq/shared";
5
5
 
6
6
  //#region src/dataMappers.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"dataMappers.d.cts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;iBAmEgB,kCAAA,CACd,MAAA,EAAQ,8BAAA,GACP,8BAA8B;AAAA,iBAUjB,uBAAA,CAAwB,OAAA,EAAS,oBAAA,GAAuB,MAAM;AAAA,iBAO9D,uBAAA,CACd,OAAA,EAAS,oBAAA,GACR,kBAAA,GAAqB,kBAAA;AAAA,iBAgBR,eAAA,CAAgB,KAAA,EAAO,kBAAA,GAAqB,YAAY;AAAA,iBAgCxD,eAAA,CAAgB,KAAA,EAAO,kBAAA,GAAqB,YAAY;AAAA,iBA+CxD,qBAAA,CACd,KAAA,EAAO,kBAAA,EACP,EAAA,EAAI,eAAA,GACH,kBAAA;AAAA,iBAQa,4BAAA,CACd,aAAA,EAAe,+BAAA,GACd,yBAAyB;AAAA,iBASZ,wBAAA,CACd,OAAA,EAAS,2BAAA,GACR,qBAAqB;AAAA,iBAcR,oBAAA,CACd,UAAA,EAAY,uBAAA,GACX,iBAAiB;AAAA,iBASJ,qBAAA,CACd,WAAA,EAAa,wBAAA,GACZ,kBAAkB;AAAA,iBAQL,4BAAA,CACd,KAAA,EAAO,oCAAA,GACN,8BAA8B;AAAA,iBAkBjB,mBAAA,CACd,QAAA,EAAU,8BAAA,GACT,2BAA2B;AAAA,iBAqBd,yBAAA,CACd,KAAA,EAAO,kBAAA,GACN,YAAY;AAA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L,4BAAA,CACd,KAAA,EAAO,oCAAA,GACN,8BAA8B;AAAA,iBAkBjB,mBAAA,CACd,QAAA,EAAU,8BAAA,GACT,2BAA2B;AAAA,iBAqBd,yBAAA,CACd,KAAA,EAAO,kBAAA,GACN,YAAY;AAAA,iBAiBC,6BAAA,CACd,QAAA,EAAU,gCAAA,GACT,6BAA6B;AAAA,iBAsBhB,iCAAA,CACd,YAAA,EAAc,oCAAA,GACb,8BAA8B;AAAA,iBAQjB,4BAAA,CACd,OAAA,EAAS,+BAAA,GACR,yBAAyB;AAAA,iBAwBZ,sBAAA,CACd,WAAA,EAAa,wBAAA,GACZ,WAAW;AAAA,iBAWE,wBAAA,CACd,QAAA,EAAU,2BAAA,GACT,qBAAqB;AAAA,iBA0CR,qBAAA,CACd,QAAA,EAAU,wBAAA,GACT,kBAAkB;AAAA,iBAeL,kBAAA,CACd,MAAA,EAAQ,6BAAA,GACP,uBAAuB;AAAA,iBAaV,uBAAA,CACd,KAAA,EAAO,0BAAA,GACN,oBAAoB;AAAA,iBASP,mBAAA,CACd,MAAA,EAAQ,qBAAA,GACP,eAAe"}
@@ -1,6 +1,6 @@
1
- import { C as IndexerServerTx, _ as IndexerServerOrder, d as IndexerServerMarketSnapshot, h as IndexerServerNlpSnapshot, i as IndexerServerLeaderboardContest, l as IndexerServerMaker, m as IndexerServerMatchEventBalances, n as IndexerServerCandlestick, o as IndexerServerLeaderboardPosition, r as IndexerServerEvent, s as IndexerServerLeaderboardRegistration, t as IndexerServerBalance, v as IndexerServerProduct, x as IndexerServerSnapshotsInterval, y as IndexerServerProductPayment } from "./serverModelTypes-BwLIAkc1.js";
2
- import { Bt as IndexerServerV2Symbol, C as IndexerServerFundingRate, Ht as IndexerServerV2TickerResponse, bt as IndexerServerPortfolioResponse, ut as IndexerServerPerpPrices, w as IndexerServerFundingRateHistoryEntry, zt as IndexerServerV2MarketHours } from "./serverTypes-BdNekzFR.js";
3
- import { Bt as IndexerMaker, Ft as IndexerLeaderboardContest, Gt as IndexerNlpSnapshot, Ht as IndexerMarketSnapshot, Jt as IndexerPerpBalance, Lt as IndexerLeaderboardParticipant, Mt as IndexerEventWithTx, Nt as IndexerFundingRate, Ot as IndexerEvent, Pt as IndexerFundingRateHistoryEntry, Rt as IndexerLeaderboardRegistration, Wt as IndexerMatchEventBalances, Yt as IndexerPerpPrices, an as IndexerSpotBalance, at as GetIndexerPortfolioResponse, cn as IndexerV2Symbol, en as IndexerProductPayment, ln as IndexerV2TickerResponse, qt as IndexerOrder, rn as IndexerSnapshotsIntervalParams, sn as IndexerV2MarketHours, t as Candlestick } from "./clientTypes-CuXHS6Jk.js";
1
+ import { C as IndexerServerTx, _ as IndexerServerOrder, d as IndexerServerMarketSnapshot, h as IndexerServerNlpSnapshot, i as IndexerServerLeaderboardContest, l as IndexerServerMaker, m as IndexerServerMatchEventBalances, n as IndexerServerCandlestick, o as IndexerServerLeaderboardPosition, r as IndexerServerEvent, s as IndexerServerLeaderboardRegistration, t as IndexerServerBalance, v as IndexerServerProduct, x as IndexerServerSnapshotsInterval, y as IndexerServerProductPayment } from "./serverModelTypes-BAZNgoLE.js";
2
+ import { Bt as IndexerServerV2Symbol, C as IndexerServerFundingRate, Ht as IndexerServerV2TickerResponse, bt as IndexerServerPortfolioResponse, ut as IndexerServerPerpPrices, w as IndexerServerFundingRateHistoryEntry, zt as IndexerServerV2MarketHours } from "./serverTypes-DhOquJu2.js";
3
+ import { Bt as IndexerMaker, Ft as IndexerLeaderboardContest, Gt as IndexerNlpSnapshot, Ht as IndexerMarketSnapshot, Jt as IndexerPerpBalance, Lt as IndexerLeaderboardParticipant, Mt as IndexerEventWithTx, Nt as IndexerFundingRate, Ot as IndexerEvent, Pt as IndexerFundingRateHistoryEntry, Rt as IndexerLeaderboardRegistration, Wt as IndexerMatchEventBalances, Yt as IndexerPerpPrices, an as IndexerSpotBalance, at as GetIndexerPortfolioResponse, cn as IndexerV2Symbol, en as IndexerProductPayment, ln as IndexerV2TickerResponse, qt as IndexerOrder, rn as IndexerSnapshotsIntervalParams, sn as IndexerV2MarketHours, t as Candlestick } from "./clientTypes-DKN-EsOj.js";
4
4
  import { Market } from "@nadohq/shared";
5
5
 
6
6
  //#region src/dataMappers.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"dataMappers.d.ts","names":[],"sources":["../src/src/dataMappers.ts"],"mappings":";;;;;;iBAmEgB,kCAAA,CACd,MAAA,EAAQ,8BAAA,GACP,8BAA8B;AAAA,iBAUjB,uBAAA,CAAwB,OAAA,EAAS,oBAAA,GAAuB,MAAM;AAAA,iBAO9D,uBAAA,CACd,OAAA,EAAS,oBAAA,GACR,kBAAA,GAAqB,kBAAA;AAAA,iBAgBR,eAAA,CAAgB,KAAA,EAAO,kBAAA,GAAqB,YAAY;AAAA,iBAgCxD,eAAA,CAAgB,KAAA,EAAO,kBAAA,GAAqB,YAAY;AAAA,iBA+CxD,qBAAA,CACd,KAAA,EAAO,kBAAA,EACP,EAAA,EAAI,eAAA,GACH,kBAAA;AAAA,iBAQa,4BAAA,CACd,aAAA,EAAe,+BAAA,GACd,yBAAyB;AAAA,iBASZ,wBAAA,CACd,OAAA,EAAS,2BAAA,GACR,qBAAqB;AAAA,iBAcR,oBAAA,CACd,UAAA,EAAY,uBAAA,GACX,iBAAiB;AAAA,iBASJ,qBAAA,CACd,WAAA,EAAa,wBAAA,GACZ,kBAAkB;AAAA,iBAQL,4BAAA,CACd,KAAA,EAAO,oCAAA,GACN,8BAA8B;AAAA,iBAkBjB,mBAAA,CACd,QAAA,EAAU,8BAAA,GACT,2BAA2B;AAAA,iBAqBd,yBAAA,CACd,KAAA,EAAO,kBAAA,GACN,YAAY;AAAA,iBAiBC,6BAAA,CACd,QAAA,EAAU,gCAAA,GACT,6BAA6B;AAAA,iBAsBhB,iCAAA,CACd,YAAA,EAAc,oCAAA,GACb,8BAA8B;AAAA,iBAQjB,4BAAA,CACd,OAAA,EAAS,+BAAA,GACR,yBAAyB;AAAA,iBAwBZ,sBAAA,CACd,WA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AAA,GACT,6BAA6B;AAAA,iBAsBhB,iCAAA,CACd,YAAA,EAAc,oCAAA,GACb,8BAA8B;AAAA,iBAQjB,4BAAA,CACd,OAAA,EAAS,+BAAA,GACR,yBAAyB;AAAA,iBAwBZ,sBAAA,CACd,WAAA,EAAa,wBAAA,GACZ,WAAW;AAAA,iBAWE,wBAAA,CACd,QAAA,EAAU,2BAAA,GACT,qBAAqB;AAAA,iBA0CR,qBAAA,CACd,QAAA,EAAU,wBAAA,GACT,kBAAkB;AAAA,iBAeL,kBAAA,CACd,MAAA,EAAQ,6BAAA,GACP,uBAAuB;AAAA,iBAaV,uBAAA,CACd,KAAA,EAAO,0BAAA,GACN,oBAAoB;AAAA,iBASP,mBAAA,CACd,MAAA,EAAQ,qBAAA,GACP,eAAe"}
@@ -84,7 +84,8 @@ function mapIndexerEvent(event) {
84
84
  netFundingUnrealized: toBigNumber(event.net_funding_unrealized),
85
85
  netInterestCumulative: toBigNumber(event.net_interest_cumulative),
86
86
  netInterestUnrealized: toBigNumber(event.net_interest_unrealized),
87
- quoteVolumeCumulative: toBigNumber(event.quote_volume_cumulative)
87
+ quoteVolumeCumulative: toBigNumber(event.quote_volume_cumulative),
88
+ cumulativeTradeCount: toBigNumber(event.cumulative_trade_count)
88
89
  }
89
90
  };
90
91
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dataMappers.js","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport {\n getRecvTimeFromOrderNonce,\n mapValues,\n Market,\n PerpMarket,\n ProductEngineType,\n removeDecimals,\n SpotMarket,\n subaccountFromHex,\n toBigNumber,\n toIntegerString,\n unpackOrderAppendix,\n} from '@nadohq/shared';\nimport {\n Candlestick,\n GetIndexerPortfolioResponse,\n IndexerEvent,\n IndexerEventWithTx,\n IndexerFundingRate,\n IndexerFundingRateHistoryEntry,\n IndexerLeaderboardContest,\n IndexerLeaderboardParticipant,\n IndexerLeaderboardRegistration,\n IndexerMaker,\n IndexerMarketSnapshot,\n IndexerMatchEventBalances,\n IndexerNlpSnapshot,\n IndexerOrder,\n IndexerPerpBalance,\n IndexerPerpPrices,\n IndexerPortfolioPoint,\n IndexerProductPayment,\n IndexerServerBalance,\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerFundingRate,\n IndexerServerFundingRateHistoryEntry,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMatchEventBalances,\n IndexerServerNlpSnapshot,\n IndexerServerOrder,\n IndexerServerPerpPrices,\n IndexerServerPortfolioPoint,\n IndexerServerPortfolioResponse,\n IndexerServerProduct,\n IndexerServerProductPayment,\n IndexerServerSnapshotsInterval,\n IndexerServerTx,\n IndexerServerV2MarketHours,\n IndexerServerV2Symbol,\n IndexerServerV2TickerResponse,\n IndexerSnapshotsIntervalParams,\n IndexerSpotBalance,\n IndexerV2MarketHours,\n IndexerV2Symbol,\n IndexerV2TickerResponse,\n IndexerV2TradingStatus,\n} from './types';\n\nexport function mapSnapshotsIntervalToServerParams(\n params: IndexerSnapshotsIntervalParams,\n): IndexerServerSnapshotsInterval {\n return {\n count: params.limit,\n max_time: params.maxTimeInclusive\n ? toIntegerString(params.maxTimeInclusive)\n : undefined,\n granularity: params.granularity,\n };\n}\n\nexport function mapIndexerServerProduct(product: IndexerServerProduct): Market {\n if ('spot' in product) {\n return mapEngineServerSpotProduct(product.spot);\n }\n return mapEngineServerPerpProduct(product.perp);\n}\n\nexport function mapIndexerServerBalance(\n balance: IndexerServerBalance,\n): IndexerSpotBalance | IndexerPerpBalance {\n if ('spot' in balance) {\n return {\n amount: toBigNumber(balance.spot.balance.amount),\n productId: balance.spot.product_id,\n type: ProductEngineType.SPOT,\n };\n }\n return {\n amount: toBigNumber(balance.perp.balance.amount),\n productId: balance.perp.product_id,\n type: ProductEngineType.PERP,\n vQuoteBalance: toBigNumber(balance.perp.balance.v_quote_balance),\n };\n}\n\nexport function mapIndexerOrder(order: IndexerServerOrder): IndexerOrder {\n const appendix = unpackOrderAppendix(order.appendix);\n return {\n amount: toBigNumber(order.amount),\n digest: order.digest,\n expiration: Number(order.expiration),\n appendix,\n nonce: toBigNumber(order.nonce),\n isolated: order.isolated,\n recvTimeSeconds: getRecvTimeFromOrderNonce(order.nonce) / 1000,\n price: removeDecimals(order.price_x18),\n productId: order.product_id,\n subaccount: order.subaccount,\n submissionIndex: order.submission_idx,\n lastFillSubmissionIndex: order.last_fill_submission_idx,\n baseFilled: toBigNumber(order.base_filled),\n quoteFilled: toBigNumber(order.quote_filled),\n totalFee: toBigNumber(order.fee),\n builderFee: toBigNumber(order.builder_fee),\n realizedPnl: toBigNumber(order.realized_pnl),\n closedAmount: toBigNumber(order.closed_amount),\n closedNetEntry: toBigNumber(order.closed_net_entry),\n preCloseMargin: order.closed_margin\n ? toBigNumber(order.closed_margin)\n : null,\n firstFillTimestamp: toBigNumber(order.first_fill_timestamp),\n lastFillTimestamp: toBigNumber(order.last_fill_timestamp),\n preBalances: mapIndexerMatchEventBalances(order.pre_balance),\n postBalances: mapIndexerMatchEventBalances(order.post_balance),\n };\n}\n\nexport function mapIndexerEvent(event: IndexerServerEvent): IndexerEvent {\n const eventState: IndexerEvent['state'] = (() => {\n // Assume backend data is consistent\n if ('spot' in event.pre_balance) {\n return {\n type: ProductEngineType.SPOT,\n market: mapIndexerServerProduct(event.product) as SpotMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerSpotBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerSpotBalance,\n };\n }\n return {\n type: ProductEngineType.PERP,\n market: mapIndexerServerProduct(event.product) as PerpMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerPerpBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerPerpBalance,\n };\n })();\n\n return {\n eventType: event.event_type,\n productId: event.product_id,\n isolated: event.isolated,\n isolatedProductId: event.isolated_product_id,\n state: eventState,\n subaccount: event.subaccount,\n submissionIndex: event.submission_idx,\n trackedVars: {\n netEntryCumulative: toBigNumber(event.net_entry_cumulative),\n netEntryUnrealized: toBigNumber(event.net_entry_unrealized),\n netFundingCumulative: toBigNumber(event.net_funding_cumulative),\n netFundingUnrealized: toBigNumber(event.net_funding_unrealized),\n netInterestCumulative: toBigNumber(event.net_interest_cumulative),\n netInterestUnrealized: toBigNumber(event.net_interest_unrealized),\n quoteVolumeCumulative: toBigNumber(event.quote_volume_cumulative),\n },\n };\n}\n\nexport function mapIndexerEventWithTx(\n event: IndexerServerEvent,\n tx: IndexerServerTx,\n): IndexerEventWithTx {\n return {\n timestamp: toBigNumber(tx.timestamp),\n tx: tx.tx,\n ...mapIndexerEvent(event),\n };\n}\n\nexport function mapIndexerMatchEventBalances(\n eventBalances: IndexerServerMatchEventBalances,\n): IndexerMatchEventBalances {\n return {\n base: mapIndexerServerBalance(eventBalances.base),\n quote: eventBalances.quote\n ? (mapIndexerServerBalance(eventBalances.quote) as IndexerSpotBalance)\n : undefined,\n };\n}\n\nexport function mapIndexerProductPayment(\n payment: IndexerServerProductPayment,\n): IndexerProductPayment {\n return {\n submissionIndex: payment.idx,\n timestamp: toBigNumber(payment.timestamp),\n paymentAmount: toBigNumber(payment.amount),\n balanceAmount: toBigNumber(payment.balance_amount),\n annualPaymentRate: removeDecimals(payment.rate_x18),\n oraclePrice: removeDecimals(payment.oracle_price_x18),\n isolated: payment.isolated,\n productId: payment.product_id,\n isolatedProductId: payment.isolated_product_id,\n };\n}\n\nexport function mapIndexerPerpPrices(\n perpPrices: IndexerServerPerpPrices,\n): IndexerPerpPrices {\n return {\n indexPrice: removeDecimals(perpPrices.index_price_x18),\n markPrice: removeDecimals(perpPrices.mark_price_x18),\n updateTime: toBigNumber(perpPrices.update_time),\n productId: perpPrices.product_id,\n };\n}\n\nexport function mapIndexerFundingRate(\n fundingRate: IndexerServerFundingRate,\n): IndexerFundingRate {\n return {\n fundingRate: removeDecimals(fundingRate.funding_rate_x18),\n updateTime: toBigNumber(fundingRate.update_time),\n productId: fundingRate.product_id,\n };\n}\n\nexport function mapIndexerFundingRateHistory(\n entry: IndexerServerFundingRateHistoryEntry,\n): IndexerFundingRateHistoryEntry {\n return {\n productId: entry.product_id,\n timestamp: toBigNumber(entry.timestamp),\n fundingRateFrac: removeDecimals(entry.funding_rate_x18),\n };\n}\n\nfunction mapIndexerPortfolioPoint([\n timestamp,\n value,\n]: IndexerServerPortfolioPoint): IndexerPortfolioPoint {\n return {\n timestamp: toBigNumber(timestamp),\n value: toBigNumber(value),\n };\n}\n\nexport function mapIndexerPortfolio(\n response: IndexerServerPortfolioResponse,\n): GetIndexerPortfolioResponse {\n return Object.fromEntries(\n response.map(([period, history]) => [\n period,\n {\n accountValueHistory: history.accountValueHistory.map(\n mapIndexerPortfolioPoint,\n ),\n pnlHistory: history.pnlHistory.map(mapIndexerPortfolioPoint),\n volumeHistory: history.volumeHistory.map(mapIndexerPortfolioPoint),\n tradeSizeHistory: history.tradeSizeHistory.map(\n mapIndexerPortfolioPoint,\n ),\n marketCountHistory: history.marketCountHistory.map(\n mapIndexerPortfolioPoint,\n ),\n },\n ]),\n ) as GetIndexerPortfolioResponse;\n}\n\nexport function mapIndexerMakerStatistics(\n maker: IndexerServerMaker,\n): IndexerMaker {\n return {\n address: maker.address,\n snapshots: maker.data.map((makerData) => {\n return {\n timestamp: toBigNumber(makerData.timestamp),\n makerFee: toBigNumber(makerData.maker_fee),\n uptime: toBigNumber(makerData.uptime),\n sumQMin: toBigNumber(makerData.sum_q_min),\n qScore: toBigNumber(makerData.q_score),\n makerShare: toBigNumber(makerData.maker_share),\n expectedMakerReward: toBigNumber(makerData.expected_maker_reward),\n };\n }),\n };\n}\n\nexport function mapIndexerLeaderboardPosition(\n position: IndexerServerLeaderboardPosition,\n): IndexerLeaderboardParticipant {\n const tracks = mapValues(position.tracks, (trackData) => ({\n value: toBigNumber(trackData.value),\n rank: toBigNumber(trackData.rank),\n qualificationStatus: trackData.qualification_status,\n }));\n\n return {\n subaccount: subaccountFromHex(position.subaccount),\n contestId: position.contest_id,\n accountValue: toBigNumber(position.account_value),\n updateTime: toBigNumber(position.update_time),\n tracks,\n socialAccounts: position.social_accounts.map((account) => ({\n provider: account.provider,\n username: account.username,\n displayName: account.display_name,\n profileImageUrl: account.profile_image_url,\n })),\n };\n}\n\nexport function mapIndexerLeaderboardRegistration(\n registration: IndexerServerLeaderboardRegistration,\n): IndexerLeaderboardRegistration {\n return {\n subaccount: subaccountFromHex(registration.subaccount),\n contestId: registration.contest_id,\n updateTime: toBigNumber(registration.update_time),\n };\n}\n\nexport function mapIndexerLeaderboardContest(\n contest: IndexerServerLeaderboardContest,\n): IndexerLeaderboardContest {\n const startTime = toBigNumber(contest.start_time);\n const endTime = toBigNumber(contest.end_time);\n\n return {\n contestId: contest.contest_id,\n startTime,\n endTime,\n totalParticipants: toBigNumber(contest.count),\n requiredProductIds: contest.product_ids,\n active: contest.active,\n lastUpdated: toBigNumber(contest.last_updated),\n title: contest.title,\n description: contest.description,\n tracks: contest.tracks.map((track) => ({\n trackId: track.track_id,\n rankType: track.rank_type,\n sortOrder: track.sort_order,\n accountValueThreshold: toBigNumber(track.threshold),\n volumeThreshold: toBigNumber(track.volume_threshold),\n })),\n };\n}\n\nexport function mapIndexerCandlesticks(\n candlestick: IndexerServerCandlestick,\n): Candlestick {\n return {\n close: removeDecimals(candlestick.close_x18),\n high: removeDecimals(candlestick.high_x18),\n low: removeDecimals(candlestick.low_x18),\n open: removeDecimals(candlestick.open_x18),\n time: toBigNumber(candlestick.timestamp),\n volume: toBigNumber(candlestick.volume),\n };\n}\n\nexport function mapIndexerMarketSnapshot(\n snapshot: IndexerServerMarketSnapshot,\n): IndexerMarketSnapshot {\n return {\n timestamp: toBigNumber(snapshot.timestamp),\n cumulativeUsers: toBigNumber(snapshot.cumulative_users),\n dailyActiveUsers: toBigNumber(snapshot.daily_active_users),\n tvl: toBigNumber(snapshot.tvl),\n borrowRates: mapValues(snapshot.borrow_rates, (value) =>\n removeDecimals(value),\n ),\n cumulativeLiquidationAmounts: mapValues(\n snapshot.cumulative_liquidation_amounts,\n toBigNumber,\n ),\n cumulativeMakerFees: mapValues(snapshot.cumulative_maker_fees, toBigNumber),\n cumulativeSequencerFees: mapValues(\n snapshot.cumulative_sequencer_fees,\n toBigNumber,\n ),\n cumulativeTakerFees: mapValues(snapshot.cumulative_taker_fees, toBigNumber),\n cumulativeTrades: mapValues(snapshot.cumulative_trades, toBigNumber),\n cumulativeVolumes: mapValues(snapshot.cumulative_volumes, toBigNumber),\n depositRates: mapValues(snapshot.deposit_rates, (value) =>\n removeDecimals(value),\n ),\n fundingRates: mapValues(snapshot.funding_rates, (value) =>\n removeDecimals(value),\n ),\n openInterestsQuote: mapValues(snapshot.open_interests, toBigNumber),\n totalBorrows: mapValues(snapshot.total_borrows, toBigNumber),\n totalDeposits: mapValues(snapshot.total_deposits, toBigNumber),\n cumulativeTradeSizes: mapValues(\n snapshot.cumulative_trade_sizes,\n toBigNumber,\n ),\n cumulativeInflows: mapValues(snapshot.cumulative_inflows, toBigNumber),\n cumulativeOutflows: mapValues(snapshot.cumulative_outflows, toBigNumber),\n oraclePrices: mapValues(snapshot.oracle_prices, (value) =>\n removeDecimals(value),\n ),\n };\n}\n\nexport function mapIndexerNlpSnapshot(\n snapshot: IndexerServerNlpSnapshot,\n): IndexerNlpSnapshot {\n return {\n submissionIndex: snapshot.submission_idx,\n timestamp: toBigNumber(snapshot.timestamp),\n cumulativeBurnAmountQuote: toBigNumber(snapshot.cumulative_burn_quote),\n cumulativeMintAmountQuote: toBigNumber(snapshot.cumulative_mint_quote),\n cumulativePnl: toBigNumber(snapshot.cumulative_pnl),\n cumulativeTrades: toBigNumber(snapshot.cumulative_trades),\n cumulativeVolume: toBigNumber(snapshot.cumulative_volume),\n depositors: toBigNumber(snapshot.depositors),\n oraclePrice: removeDecimals(snapshot.oracle_price_x18),\n tvl: toBigNumber(snapshot.tvl),\n };\n}\n\nexport function mapIndexerV2Ticker(\n ticker: IndexerServerV2TickerResponse,\n): IndexerV2TickerResponse {\n return {\n productId: ticker.product_id,\n tickerId: ticker.ticker_id,\n baseCurrency: ticker.base_currency,\n quoteCurrency: ticker.quote_currency,\n lastPrice: ticker.last_price,\n baseVolume: ticker.base_volume,\n quoteVolume: ticker.quote_volume,\n priceChangePercent24h: ticker.price_change_percent_24h,\n };\n}\n\nexport function mapIndexerV2MarketHours(\n hours: IndexerServerV2MarketHours,\n): IndexerV2MarketHours {\n return {\n isOpen: hours.is_open,\n reason: hours.reason,\n nextClose: hours.next_close,\n nextOpen: hours.next_open,\n };\n}\n\nexport function mapIndexerV2Symbols(\n symbol: IndexerServerV2Symbol,\n): IndexerV2Symbol {\n return {\n type: symbol.type,\n productId: symbol.product_id,\n symbol: symbol.symbol,\n priceIncrement: removeDecimals(symbol.price_increment_x18),\n sizeIncrement: symbol.size_increment,\n minSize: symbol.min_size,\n makerFeeRate: removeDecimals(symbol.maker_fee_rate_x18),\n takerFeeRate: removeDecimals(symbol.taker_fee_rate_x18),\n longWeightInitial: removeDecimals(symbol.long_weight_initial_x18),\n longWeightMaintenance: removeDecimals(symbol.long_weight_maintenance_x18),\n maxOpenInterest: symbol.max_open_interest_x18\n ? removeDecimals(symbol.max_open_interest_x18)\n : null,\n exchangeRate: symbol.exchange_rate_x18\n ? removeDecimals(symbol.exchange_rate_x18)\n : null,\n tradingStatus: symbol.trading_status as IndexerV2TradingStatus,\n isolatedOnly: symbol.isolated_only,\n marketHours: symbol.market_hours\n ? mapIndexerV2MarketHours(symbol.market_hours)\n : null,\n boostType: symbol.boost_type ?? null,\n takerMultiplier: symbol.taker_multiplier ?? null,\n makerMultiplier: symbol.maker_multiplier ?? null,\n };\n}\n"],"mappings":";;;AAmEA,SAAgB,mCACd,QACgC;CAChC,OAAO;EACL,OAAO,OAAO;EACd,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iBAAiB;EACxD,kBAAkB,YAAY,SAAS,iBAAiB;EACxD,YAAY,YAAY,SAAS,UAAU;EAC3C,aAAa,eAAe,SAAS,gBAAgB;EACrD,KAAK,YAAY,SAAS,GAAG;CAC/B;AACF;AAEA,SAAgB,mBACd,QACyB;CACzB,OAAO;EACL,WAAW,OAAO;EAClB,UAAU,OAAO;EACjB,cAAc,OAAO;EACrB,eAAe,OAAO;EACtB,WAAW,OAAO;EAClB,YAAY,OAAO;EACnB,aAAa,OAAO;EACpB,uBAAuB,OAAO;CAChC;AACF;AAEA,SAAgB,wBACd,OACsB;CACtB,OAAO;EACL,QAAQ,MAAM;EACd,QAAQ,MAAM;EACd,WAAW,MAAM;EACjB,UAAU,MAAM;CAClB;AACF;AAEA,SAAgB,oBACd,QACiB;CACjB,OAAO;EACL,MAAM,OAAO;EACb,WAAW,OAAO;EAClB,QAAQ,OAAO;EACf,gBAAgB,eAAe,OAAO,mBAAmB;EACzD,eAAe,OAAO;EACtB,SAAS,OAAO;EAChB,cAAc,eAAe,OAAO,kBAAkB;EACtD,cAAc,eAAe,OAAO,kBAAkB;EACtD,mBAAmB,eAAe,OAAO,uBAAuB;EAChE,uBAAuB,eAAe,OAAO,2BAA2B;EACxE,iBAAiB,OAAO,wBACpB,eAAe,OAAO,qBAAqB,IAC3C;EACJ,cAAc,OAAO,oBACjB,eAAe,OAAO,iBAAiB,IACvC;EACJ,eAAe,OAAO;EACtB,cAAc,OAAO;EACrB,aAAa,OAAO,eAChB,wBAAwB,OAAO,YAAY,IAC3C;EACJ,WAAW,OAAO,cAAc;EAChC,iBAAiB,OAAO,oBAAoB;EAC5C,iBAAiB,OAAO,oBAAoB;CAC9C;AACF"}
1
+ {"version":3,"file":"dataMappers.js","names":[],"sources":["../src/dataMappers.ts"],"sourcesContent":["import {\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n} from '@nadohq/engine-client';\nimport {\n getRecvTimeFromOrderNonce,\n mapValues,\n Market,\n PerpMarket,\n ProductEngineType,\n removeDecimals,\n SpotMarket,\n subaccountFromHex,\n toBigNumber,\n toIntegerString,\n unpackOrderAppendix,\n} from '@nadohq/shared';\nimport {\n Candlestick,\n GetIndexerPortfolioResponse,\n IndexerEvent,\n IndexerEventWithTx,\n IndexerFundingRate,\n IndexerFundingRateHistoryEntry,\n IndexerLeaderboardContest,\n IndexerLeaderboardParticipant,\n IndexerLeaderboardRegistration,\n IndexerMaker,\n IndexerMarketSnapshot,\n IndexerMatchEventBalances,\n IndexerNlpSnapshot,\n IndexerOrder,\n IndexerPerpBalance,\n IndexerPerpPrices,\n IndexerPortfolioPoint,\n IndexerProductPayment,\n IndexerServerBalance,\n IndexerServerCandlestick,\n IndexerServerEvent,\n IndexerServerFundingRate,\n IndexerServerFundingRateHistoryEntry,\n IndexerServerLeaderboardContest,\n IndexerServerLeaderboardPosition,\n IndexerServerLeaderboardRegistration,\n IndexerServerMaker,\n IndexerServerMarketSnapshot,\n IndexerServerMatchEventBalances,\n IndexerServerNlpSnapshot,\n IndexerServerOrder,\n IndexerServerPerpPrices,\n IndexerServerPortfolioPoint,\n IndexerServerPortfolioResponse,\n IndexerServerProduct,\n IndexerServerProductPayment,\n IndexerServerSnapshotsInterval,\n IndexerServerTx,\n IndexerServerV2MarketHours,\n IndexerServerV2Symbol,\n IndexerServerV2TickerResponse,\n IndexerSnapshotsIntervalParams,\n IndexerSpotBalance,\n IndexerV2MarketHours,\n IndexerV2Symbol,\n IndexerV2TickerResponse,\n IndexerV2TradingStatus,\n} from './types';\n\nexport function mapSnapshotsIntervalToServerParams(\n params: IndexerSnapshotsIntervalParams,\n): IndexerServerSnapshotsInterval {\n return {\n count: params.limit,\n max_time: params.maxTimeInclusive\n ? toIntegerString(params.maxTimeInclusive)\n : undefined,\n granularity: params.granularity,\n };\n}\n\nexport function mapIndexerServerProduct(product: IndexerServerProduct): Market {\n if ('spot' in product) {\n return mapEngineServerSpotProduct(product.spot);\n }\n return mapEngineServerPerpProduct(product.perp);\n}\n\nexport function mapIndexerServerBalance(\n balance: IndexerServerBalance,\n): IndexerSpotBalance | IndexerPerpBalance {\n if ('spot' in balance) {\n return {\n amount: toBigNumber(balance.spot.balance.amount),\n productId: balance.spot.product_id,\n type: ProductEngineType.SPOT,\n };\n }\n return {\n amount: toBigNumber(balance.perp.balance.amount),\n productId: balance.perp.product_id,\n type: ProductEngineType.PERP,\n vQuoteBalance: toBigNumber(balance.perp.balance.v_quote_balance),\n };\n}\n\nexport function mapIndexerOrder(order: IndexerServerOrder): IndexerOrder {\n const appendix = unpackOrderAppendix(order.appendix);\n return {\n amount: toBigNumber(order.amount),\n digest: order.digest,\n expiration: Number(order.expiration),\n appendix,\n nonce: toBigNumber(order.nonce),\n isolated: order.isolated,\n recvTimeSeconds: getRecvTimeFromOrderNonce(order.nonce) / 1000,\n price: removeDecimals(order.price_x18),\n productId: order.product_id,\n subaccount: order.subaccount,\n submissionIndex: order.submission_idx,\n lastFillSubmissionIndex: order.last_fill_submission_idx,\n baseFilled: toBigNumber(order.base_filled),\n quoteFilled: toBigNumber(order.quote_filled),\n totalFee: toBigNumber(order.fee),\n builderFee: toBigNumber(order.builder_fee),\n realizedPnl: toBigNumber(order.realized_pnl),\n closedAmount: toBigNumber(order.closed_amount),\n closedNetEntry: toBigNumber(order.closed_net_entry),\n preCloseMargin: order.closed_margin\n ? toBigNumber(order.closed_margin)\n : null,\n firstFillTimestamp: toBigNumber(order.first_fill_timestamp),\n lastFillTimestamp: toBigNumber(order.last_fill_timestamp),\n preBalances: mapIndexerMatchEventBalances(order.pre_balance),\n postBalances: mapIndexerMatchEventBalances(order.post_balance),\n };\n}\n\nexport function mapIndexerEvent(event: IndexerServerEvent): IndexerEvent {\n const eventState: IndexerEvent['state'] = (() => {\n // Assume backend data is consistent\n if ('spot' in event.pre_balance) {\n return {\n type: ProductEngineType.SPOT,\n market: mapIndexerServerProduct(event.product) as SpotMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerSpotBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerSpotBalance,\n };\n }\n return {\n type: ProductEngineType.PERP,\n market: mapIndexerServerProduct(event.product) as PerpMarket,\n preBalance: mapIndexerServerBalance(\n event.pre_balance,\n ) as IndexerPerpBalance,\n postBalance: mapIndexerServerBalance(\n event.post_balance,\n ) as IndexerPerpBalance,\n };\n })();\n\n return {\n eventType: event.event_type,\n productId: event.product_id,\n isolated: event.isolated,\n isolatedProductId: event.isolated_product_id,\n state: eventState,\n subaccount: event.subaccount,\n submissionIndex: event.submission_idx,\n trackedVars: {\n netEntryCumulative: toBigNumber(event.net_entry_cumulative),\n netEntryUnrealized: toBigNumber(event.net_entry_unrealized),\n netFundingCumulative: toBigNumber(event.net_funding_cumulative),\n netFundingUnrealized: toBigNumber(event.net_funding_unrealized),\n netInterestCumulative: toBigNumber(event.net_interest_cumulative),\n netInterestUnrealized: toBigNumber(event.net_interest_unrealized),\n quoteVolumeCumulative: toBigNumber(event.quote_volume_cumulative),\n cumulativeTradeCount: toBigNumber(event.cumulative_trade_count),\n },\n };\n}\n\nexport function mapIndexerEventWithTx(\n event: IndexerServerEvent,\n tx: IndexerServerTx,\n): IndexerEventWithTx {\n return {\n timestamp: toBigNumber(tx.timestamp),\n tx: tx.tx,\n ...mapIndexerEvent(event),\n };\n}\n\nexport function mapIndexerMatchEventBalances(\n eventBalances: IndexerServerMatchEventBalances,\n): IndexerMatchEventBalances {\n return {\n base: mapIndexerServerBalance(eventBalances.base),\n quote: eventBalances.quote\n ? (mapIndexerServerBalance(eventBalances.quote) as IndexerSpotBalance)\n : undefined,\n };\n}\n\nexport function mapIndexerProductPayment(\n payment: IndexerServerProductPayment,\n): IndexerProductPayment {\n return {\n submissionIndex: payment.idx,\n timestamp: toBigNumber(payment.timestamp),\n paymentAmount: toBigNumber(payment.amount),\n balanceAmount: toBigNumber(payment.balance_amount),\n annualPaymentRate: removeDecimals(payment.rate_x18),\n oraclePrice: removeDecimals(payment.oracle_price_x18),\n isolated: payment.isolated,\n productId: payment.product_id,\n isolatedProductId: payment.isolated_product_id,\n };\n}\n\nexport function mapIndexerPerpPrices(\n perpPrices: IndexerServerPerpPrices,\n): IndexerPerpPrices {\n return {\n indexPrice: removeDecimals(perpPrices.index_price_x18),\n markPrice: removeDecimals(perpPrices.mark_price_x18),\n updateTime: toBigNumber(perpPrices.update_time),\n productId: perpPrices.product_id,\n };\n}\n\nexport function mapIndexerFundingRate(\n fundingRate: IndexerServerFundingRate,\n): IndexerFundingRate {\n return {\n fundingRate: removeDecimals(fundingRate.funding_rate_x18),\n updateTime: toBigNumber(fundingRate.update_time),\n productId: fundingRate.product_id,\n };\n}\n\nexport function mapIndexerFundingRateHistory(\n entry: IndexerServerFundingRateHistoryEntry,\n): IndexerFundingRateHistoryEntry {\n return {\n productId: entry.product_id,\n timestamp: toBigNumber(entry.timestamp),\n fundingRateFrac: removeDecimals(entry.funding_rate_x18),\n };\n}\n\nfunction mapIndexerPortfolioPoint([\n timestamp,\n value,\n]: IndexerServerPortfolioPoint): IndexerPortfolioPoint {\n return {\n timestamp: toBigNumber(timestamp),\n value: toBigNumber(value),\n };\n}\n\nexport function mapIndexerPortfolio(\n response: IndexerServerPortfolioResponse,\n): GetIndexerPortfolioResponse {\n return Object.fromEntries(\n response.map(([period, history]) => [\n period,\n {\n accountValueHistory: history.accountValueHistory.map(\n mapIndexerPortfolioPoint,\n ),\n pnlHistory: history.pnlHistory.map(mapIndexerPortfolioPoint),\n volumeHistory: history.volumeHistory.map(mapIndexerPortfolioPoint),\n tradeSizeHistory: history.tradeSizeHistory.map(\n mapIndexerPortfolioPoint,\n ),\n marketCountHistory: history.marketCountHistory.map(\n mapIndexerPortfolioPoint,\n ),\n },\n ]),\n ) as GetIndexerPortfolioResponse;\n}\n\nexport function mapIndexerMakerStatistics(\n maker: IndexerServerMaker,\n): IndexerMaker {\n return {\n address: maker.address,\n snapshots: maker.data.map((makerData) => {\n return {\n timestamp: toBigNumber(makerData.timestamp),\n makerFee: toBigNumber(makerData.maker_fee),\n uptime: toBigNumber(makerData.uptime),\n sumQMin: toBigNumber(makerData.sum_q_min),\n qScore: toBigNumber(makerData.q_score),\n makerShare: toBigNumber(makerData.maker_share),\n expectedMakerReward: toBigNumber(makerData.expected_maker_reward),\n };\n }),\n };\n}\n\nexport function mapIndexerLeaderboardPosition(\n position: IndexerServerLeaderboardPosition,\n): IndexerLeaderboardParticipant {\n const tracks = mapValues(position.tracks, (trackData) => ({\n value: toBigNumber(trackData.value),\n rank: toBigNumber(trackData.rank),\n qualificationStatus: trackData.qualification_status,\n }));\n\n return {\n subaccount: subaccountFromHex(position.subaccount),\n contestId: position.contest_id,\n accountValue: toBigNumber(position.account_value),\n updateTime: toBigNumber(position.update_time),\n tracks,\n socialAccounts: position.social_accounts.map((account) => ({\n provider: account.provider,\n username: account.username,\n displayName: account.display_name,\n profileImageUrl: account.profile_image_url,\n })),\n };\n}\n\nexport function mapIndexerLeaderboardRegistration(\n registration: IndexerServerLeaderboardRegistration,\n): IndexerLeaderboardRegistration {\n return {\n subaccount: subaccountFromHex(registration.subaccount),\n contestId: registration.contest_id,\n updateTime: toBigNumber(registration.update_time),\n };\n}\n\nexport function mapIndexerLeaderboardContest(\n contest: IndexerServerLeaderboardContest,\n): IndexerLeaderboardContest {\n const startTime = toBigNumber(contest.start_time);\n const endTime = toBigNumber(contest.end_time);\n\n return {\n contestId: contest.contest_id,\n startTime,\n endTime,\n totalParticipants: toBigNumber(contest.count),\n requiredProductIds: contest.product_ids,\n active: contest.active,\n lastUpdated: toBigNumber(contest.last_updated),\n title: contest.title,\n description: contest.description,\n tracks: contest.tracks.map((track) => ({\n trackId: track.track_id,\n rankType: track.rank_type,\n sortOrder: track.sort_order,\n accountValueThreshold: toBigNumber(track.threshold),\n volumeThreshold: toBigNumber(track.volume_threshold),\n })),\n };\n}\n\nexport function mapIndexerCandlesticks(\n candlestick: IndexerServerCandlestick,\n): Candlestick {\n return {\n close: removeDecimals(candlestick.close_x18),\n high: removeDecimals(candlestick.high_x18),\n low: removeDecimals(candlestick.low_x18),\n open: removeDecimals(candlestick.open_x18),\n time: toBigNumber(candlestick.timestamp),\n volume: toBigNumber(candlestick.volume),\n };\n}\n\nexport function mapIndexerMarketSnapshot(\n snapshot: IndexerServerMarketSnapshot,\n): IndexerMarketSnapshot {\n return {\n timestamp: toBigNumber(snapshot.timestamp),\n cumulativeUsers: toBigNumber(snapshot.cumulative_users),\n dailyActiveUsers: toBigNumber(snapshot.daily_active_users),\n tvl: toBigNumber(snapshot.tvl),\n borrowRates: mapValues(snapshot.borrow_rates, (value) =>\n removeDecimals(value),\n ),\n cumulativeLiquidationAmounts: mapValues(\n snapshot.cumulative_liquidation_amounts,\n toBigNumber,\n ),\n cumulativeMakerFees: mapValues(snapshot.cumulative_maker_fees, toBigNumber),\n cumulativeSequencerFees: mapValues(\n snapshot.cumulative_sequencer_fees,\n toBigNumber,\n ),\n cumulativeTakerFees: mapValues(snapshot.cumulative_taker_fees, toBigNumber),\n cumulativeTrades: mapValues(snapshot.cumulative_trades, toBigNumber),\n cumulativeVolumes: mapValues(snapshot.cumulative_volumes, toBigNumber),\n depositRates: mapValues(snapshot.deposit_rates, (value) =>\n removeDecimals(value),\n ),\n fundingRates: mapValues(snapshot.funding_rates, (value) =>\n removeDecimals(value),\n ),\n openInterestsQuote: mapValues(snapshot.open_interests, toBigNumber),\n totalBorrows: mapValues(snapshot.total_borrows, toBigNumber),\n totalDeposits: mapValues(snapshot.total_deposits, toBigNumber),\n cumulativeTradeSizes: mapValues(\n snapshot.cumulative_trade_sizes,\n toBigNumber,\n ),\n cumulativeInflows: mapValues(snapshot.cumulative_inflows, toBigNumber),\n cumulativeOutflows: mapValues(snapshot.cumulative_outflows, toBigNumber),\n oraclePrices: mapValues(snapshot.oracle_prices, (value) =>\n removeDecimals(value),\n ),\n };\n}\n\nexport function mapIndexerNlpSnapshot(\n snapshot: IndexerServerNlpSnapshot,\n): IndexerNlpSnapshot {\n return {\n submissionIndex: snapshot.submission_idx,\n timestamp: toBigNumber(snapshot.timestamp),\n cumulativeBurnAmountQuote: toBigNumber(snapshot.cumulative_burn_quote),\n cumulativeMintAmountQuote: toBigNumber(snapshot.cumulative_mint_quote),\n cumulativePnl: toBigNumber(snapshot.cumulative_pnl),\n cumulativeTrades: toBigNumber(snapshot.cumulative_trades),\n cumulativeVolume: toBigNumber(snapshot.cumulative_volume),\n depositors: toBigNumber(snapshot.depositors),\n oraclePrice: removeDecimals(snapshot.oracle_price_x18),\n tvl: toBigNumber(snapshot.tvl),\n };\n}\n\nexport function mapIndexerV2Ticker(\n ticker: IndexerServerV2TickerResponse,\n): IndexerV2TickerResponse {\n return {\n productId: ticker.product_id,\n tickerId: ticker.ticker_id,\n baseCurrency: ticker.base_currency,\n quoteCurrency: ticker.quote_currency,\n lastPrice: ticker.last_price,\n baseVolume: ticker.base_volume,\n quoteVolume: ticker.quote_volume,\n priceChangePercent24h: ticker.price_change_percent_24h,\n };\n}\n\nexport function mapIndexerV2MarketHours(\n hours: IndexerServerV2MarketHours,\n): IndexerV2MarketHours {\n return {\n isOpen: hours.is_open,\n reason: hours.reason,\n nextClose: hours.next_close,\n nextOpen: hours.next_open,\n };\n}\n\nexport function mapIndexerV2Symbols(\n symbol: IndexerServerV2Symbol,\n): IndexerV2Symbol {\n return {\n type: symbol.type,\n productId: symbol.product_id,\n symbol: symbol.symbol,\n priceIncrement: removeDecimals(symbol.price_increment_x18),\n sizeIncrement: symbol.size_increment,\n minSize: symbol.min_size,\n makerFeeRate: removeDecimals(symbol.maker_fee_rate_x18),\n takerFeeRate: removeDecimals(symbol.taker_fee_rate_x18),\n longWeightInitial: removeDecimals(symbol.long_weight_initial_x18),\n longWeightMaintenance: removeDecimals(symbol.long_weight_maintenance_x18),\n maxOpenInterest: symbol.max_open_interest_x18\n ? removeDecimals(symbol.max_open_interest_x18)\n : null,\n exchangeRate: symbol.exchange_rate_x18\n ? removeDecimals(symbol.exchange_rate_x18)\n : null,\n tradingStatus: symbol.trading_status as IndexerV2TradingStatus,\n isolatedOnly: symbol.isolated_only,\n marketHours: symbol.market_hours\n ? mapIndexerV2MarketHours(symbol.market_hours)\n : null,\n boostType: symbol.boost_type ?? null,\n takerMultiplier: symbol.taker_multiplier ?? null,\n makerMultiplier: symbol.maker_multiplier ?? null,\n };\n}\n"],"mappings":";;;AAmEA,SAAgB,mCACd,QACgC;CAChC,OAAO;EACL,OAAO,OAAO;EACd,UAAU,OAAO,mBACb,gBAAgB,OAAO,gBAAgB,IACvC,KAAA;EACJ,aAAa,OAAO;CACtB;AACF;AAEA,SAAgB,wBAAwB,SAAuC;CAC7E,IAAI,UAAU,SACZ,OAAO,2BAA2B,QAAQ,IAAI;CAEhD,OAAO,2BAA2B,QAAQ,IAAI;AAChD;AAEA,SAAgB,wBACd,SACyC;CACzC,IAAI,UAAU,SACZ,OAAO;EACL,QAAQ,YAAY,QAAQ,KAAK,QAAQ,MAAM;EAC/C,WAAW,QAAQ,KAAK;EACxB,MAAM,kBAAkB;CAC1B;CAEF,OAAO;EACL,QAAQ,YAAY,QAAQ,KAAK,QAAQ,MAAM;EAC/C,WAAW,QAAQ,KAAK;EACxB,MAAM,kBAAkB;EACxB,eAAe,YAAY,QAAQ,KAAK,QAAQ,eAAe;CACjE;AACF;AAEA,SAAgB,gBAAgB,OAAyC;CACvE,MAAM,WAAW,oBAAoB,MAAM,QAAQ;CACnD,OAAO;EACL,QAAQ,YAAY,MAAM,MAAM;EAChC,QAAQ,MAAM;EACd,YAAY,OAAO,MAAM,UAAU;EACnC;EACA,OAAO,YAAY,MAAM,KAAK;EAC9B,UAAU,MAAM;EAChB,iBAAiB,0BAA0B,MAAM,KAAK,IAAI;EAC1D,OAAO,eAAe,MAAM,SAAS;EACrC,WAAW,MAAM;EACjB,YAAY,MAAM;EAClB,iBAAiB,MAAM;EACvB,yBAAyB,MAAM;EAC/B,YAAY,YAAY,MAAM,WAAW;EACzC,aAAa,YAAY,MAAM,YAAY;EAC3C,UAAU,YAAY,MA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