@nadohq/engine-client 0.15.0 → 0.17.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 (187) hide show
  1. package/dist/EngineBaseClient-DOOXIhnZ.d.ts +75 -0
  2. package/dist/EngineBaseClient-DOOXIhnZ.d.ts.map +1 -0
  3. package/dist/EngineBaseClient-L1ue7jBx.d.cts +75 -0
  4. package/dist/EngineBaseClient-L1ue7jBx.d.cts.map +1 -0
  5. package/dist/EngineBaseClient-Uc1D8ftx.cjs +150 -0
  6. package/dist/EngineBaseClient-Uc1D8ftx.cjs.map +1 -0
  7. package/dist/EngineBaseClient.cjs +3 -167
  8. package/dist/EngineBaseClient.d.cts +2 -75
  9. package/dist/EngineBaseClient.d.ts +2 -75
  10. package/dist/EngineBaseClient.js +112 -131
  11. package/dist/EngineBaseClient.js.map +1 -1
  12. package/dist/EngineClient.cjs +13 -38
  13. package/dist/EngineClient.cjs.map +1 -1
  14. package/dist/EngineClient.d.cts +8 -18
  15. package/dist/EngineClient.d.cts.map +1 -0
  16. package/dist/EngineClient.d.ts +8 -18
  17. package/dist/EngineClient.d.ts.map +1 -0
  18. package/dist/EngineClient.js +9 -11
  19. package/dist/EngineClient.js.map +1 -1
  20. package/dist/EngineExecuteBuilder-VLrEndhv.d.cts +105 -0
  21. package/dist/EngineExecuteBuilder-VLrEndhv.d.cts.map +1 -0
  22. package/dist/EngineExecuteBuilder-t8EQ5Rmp.d.ts +105 -0
  23. package/dist/EngineExecuteBuilder-t8EQ5Rmp.d.ts.map +1 -0
  24. package/dist/EngineExecuteBuilder.cjs +232 -277
  25. package/dist/EngineExecuteBuilder.cjs.map +1 -1
  26. package/dist/EngineExecuteBuilder.d.cts +2 -108
  27. package/dist/EngineExecuteBuilder.d.ts +2 -108
  28. package/dist/EngineExecuteBuilder.js +230 -256
  29. package/dist/EngineExecuteBuilder.js.map +1 -1
  30. package/dist/EngineExecuteClient-0EBoXRd7.d.ts +24 -0
  31. package/dist/EngineExecuteClient-0EBoXRd7.d.ts.map +1 -0
  32. package/dist/EngineExecuteClient-BGlNK5Le.d.cts +24 -0
  33. package/dist/EngineExecuteClient-BGlNK5Le.d.cts.map +1 -0
  34. package/dist/EngineExecuteClient.cjs +57 -110
  35. package/dist/EngineExecuteClient.cjs.map +1 -1
  36. package/dist/EngineExecuteClient.d.cts +2 -28
  37. package/dist/EngineExecuteClient.d.ts +2 -28
  38. package/dist/EngineExecuteClient.js +54 -83
  39. package/dist/EngineExecuteClient.js.map +1 -1
  40. package/dist/EngineQueryClient-C_7p1oRx.d.cts +147 -0
  41. package/dist/EngineQueryClient-C_7p1oRx.d.cts.map +1 -0
  42. package/dist/EngineQueryClient-DQwCRaYl.d.ts +147 -0
  43. package/dist/EngineQueryClient-DQwCRaYl.d.ts.map +1 -0
  44. package/dist/EngineQueryClient.cjs +354 -448
  45. package/dist/EngineQueryClient.cjs.map +1 -1
  46. package/dist/EngineQueryClient.d.cts +2 -149
  47. package/dist/EngineQueryClient.d.ts +2 -149
  48. package/dist/EngineQueryClient.js +351 -441
  49. package/dist/EngineQueryClient.js.map +1 -1
  50. package/dist/EngineServerFailureError-CDabRrF4.d.ts +11 -0
  51. package/dist/EngineServerFailureError-CDabRrF4.d.ts.map +1 -0
  52. package/dist/EngineServerFailureError-DpPY0--L.d.cts +11 -0
  53. package/dist/EngineServerFailureError-DpPY0--L.d.cts.map +1 -0
  54. package/dist/EngineWebClient-CEwqgd4t.d.ts +35 -0
  55. package/dist/EngineWebClient-CEwqgd4t.d.ts.map +1 -0
  56. package/dist/EngineWebClient-DajZqKAQ.d.cts +35 -0
  57. package/dist/EngineWebClient-DajZqKAQ.d.cts.map +1 -0
  58. package/dist/EngineWebClient.cjs +49 -86
  59. package/dist/EngineWebClient.cjs.map +1 -1
  60. package/dist/EngineWebClient.d.cts +2 -39
  61. package/dist/EngineWebClient.d.ts +2 -39
  62. package/dist/EngineWebClient.js +47 -60
  63. package/dist/EngineWebClient.js.map +1 -1
  64. package/dist/clientExecuteTypes-BlJOgCL_.d.cts +91 -0
  65. package/dist/clientExecuteTypes-BlJOgCL_.d.cts.map +1 -0
  66. package/dist/clientExecuteTypes-CJ08_c4q.d.ts +91 -0
  67. package/dist/clientExecuteTypes-CJ08_c4q.d.ts.map +1 -0
  68. package/dist/clientQueryTypes-DlTtS_mX.d.cts +221 -0
  69. package/dist/clientQueryTypes-DlTtS_mX.d.cts.map +1 -0
  70. package/dist/clientQueryTypes-DuRgEeBT.d.ts +221 -0
  71. package/dist/clientQueryTypes-DuRgEeBT.d.ts.map +1 -0
  72. package/dist/endpoints.cjs +19 -45
  73. package/dist/endpoints.cjs.map +1 -1
  74. package/dist/endpoints.d.cts +4 -2
  75. package/dist/endpoints.d.cts.map +1 -0
  76. package/dist/endpoints.d.ts +4 -2
  77. package/dist/endpoints.d.ts.map +1 -0
  78. package/dist/endpoints.js +16 -18
  79. package/dist/endpoints.js.map +1 -1
  80. package/dist/index-CmCelmEL.d.cts +1 -0
  81. package/dist/index-D0E78WnU.d.ts +1 -0
  82. package/dist/index.cjs +26 -31
  83. package/dist/index.d.cts +12 -20
  84. package/dist/index.d.ts +12 -20
  85. package/dist/index.js +8 -6
  86. package/dist/queryDataMappers-BguxA579.d.ts +21 -0
  87. package/dist/queryDataMappers-BguxA579.d.ts.map +1 -0
  88. package/dist/queryDataMappers-DO9yWdLo.d.cts +21 -0
  89. package/dist/queryDataMappers-DO9yWdLo.d.cts.map +1 -0
  90. package/dist/serverExecuteTypes-CgbHjnWM.d.ts +92 -0
  91. package/dist/serverExecuteTypes-CgbHjnWM.d.ts.map +1 -0
  92. package/dist/serverExecuteTypes-DejTR8Is.d.cts +92 -0
  93. package/dist/serverExecuteTypes-DejTR8Is.d.cts.map +1 -0
  94. package/dist/serverQueryModelTypes-85xnbU-a.d.cts +98 -0
  95. package/dist/serverQueryModelTypes-85xnbU-a.d.cts.map +1 -0
  96. package/dist/serverQueryModelTypes-CENoy5Hm.d.ts +98 -0
  97. package/dist/serverQueryModelTypes-CENoy5Hm.d.ts.map +1 -0
  98. package/dist/serverQueryTypes-B3vC8vxT.d.ts +301 -0
  99. package/dist/serverQueryTypes-B3vC8vxT.d.ts.map +1 -0
  100. package/dist/serverQueryTypes-Dva9R2tV.d.cts +301 -0
  101. package/dist/serverQueryTypes-Dva9R2tV.d.cts.map +1 -0
  102. package/dist/serverSubscriptionEventTypes-BMUrTkTg.d.cts +135 -0
  103. package/dist/serverSubscriptionEventTypes-BMUrTkTg.d.cts.map +1 -0
  104. package/dist/serverSubscriptionEventTypes-UCYAjmt7.d.ts +135 -0
  105. package/dist/serverSubscriptionEventTypes-UCYAjmt7.d.ts.map +1 -0
  106. package/dist/serverSubscriptionTypes-BSuYa6z_.d.cts +82 -0
  107. package/dist/serverSubscriptionTypes-BSuYa6z_.d.cts.map +1 -0
  108. package/dist/serverSubscriptionTypes-DoMWeKgY.d.ts +82 -0
  109. package/dist/serverSubscriptionTypes-DoMWeKgY.d.ts.map +1 -0
  110. package/dist/types/EngineServerFailureError.cjs +9 -33
  111. package/dist/types/EngineServerFailureError.cjs.map +1 -1
  112. package/dist/types/EngineServerFailureError.d.cts +2 -11
  113. package/dist/types/EngineServerFailureError.d.ts +2 -11
  114. package/dist/types/EngineServerFailureError.js +8 -8
  115. package/dist/types/EngineServerFailureError.js.map +1 -1
  116. package/dist/types/clientExecuteTypes.cjs +0 -19
  117. package/dist/types/clientExecuteTypes.d.cts +2 -91
  118. package/dist/types/clientExecuteTypes.d.ts +2 -91
  119. package/dist/types/clientExecuteTypes.js +1 -1
  120. package/dist/types/clientQueryTypes.cjs +0 -19
  121. package/dist/types/clientQueryTypes.d.cts +2 -220
  122. package/dist/types/clientQueryTypes.d.ts +2 -220
  123. package/dist/types/clientQueryTypes.js +1 -1
  124. package/dist/types/index.cjs +5 -39
  125. package/dist/types/index.d.cts +9 -10
  126. package/dist/types/index.d.ts +9 -10
  127. package/dist/types/index.js +3 -10
  128. package/dist/types/serverExecuteTypes.cjs +0 -19
  129. package/dist/types/serverExecuteTypes.d.cts +2 -93
  130. package/dist/types/serverExecuteTypes.d.ts +2 -93
  131. package/dist/types/serverExecuteTypes.js +1 -1
  132. package/dist/types/serverQueryModelTypes.cjs +0 -19
  133. package/dist/types/serverQueryModelTypes.d.cts +2 -96
  134. package/dist/types/serverQueryModelTypes.d.ts +2 -96
  135. package/dist/types/serverQueryModelTypes.js +1 -1
  136. package/dist/types/serverQueryTypes.cjs +12 -36
  137. package/dist/types/serverQueryTypes.cjs.map +1 -1
  138. package/dist/types/serverQueryTypes.d.cts +2 -310
  139. package/dist/types/serverQueryTypes.d.ts +2 -310
  140. package/dist/types/serverQueryTypes.js +11 -11
  141. package/dist/types/serverQueryTypes.js.map +1 -1
  142. package/dist/types/serverSubscriptionEventTypes.cjs +0 -19
  143. package/dist/types/serverSubscriptionEventTypes.d.cts +2 -135
  144. package/dist/types/serverSubscriptionEventTypes.d.ts +2 -135
  145. package/dist/types/serverSubscriptionEventTypes.js +1 -1
  146. package/dist/types/serverSubscriptionTypes.cjs +0 -19
  147. package/dist/types/serverSubscriptionTypes.d.cts +2 -80
  148. package/dist/types/serverSubscriptionTypes.d.ts +2 -80
  149. package/dist/types/serverSubscriptionTypes.js +1 -1
  150. package/dist/utils/index.cjs +14 -25
  151. package/dist/utils/index.d.cts +2 -6
  152. package/dist/utils/index.d.ts +2 -6
  153. package/dist/utils/index.js +2 -3
  154. package/dist/utils/productEngineTypeMappers.cjs +16 -44
  155. package/dist/utils/productEngineTypeMappers.cjs.map +1 -1
  156. package/dist/utils/productEngineTypeMappers.d.cts +5 -3
  157. package/dist/utils/productEngineTypeMappers.d.cts.map +1 -0
  158. package/dist/utils/productEngineTypeMappers.d.ts +5 -3
  159. package/dist/utils/productEngineTypeMappers.d.ts.map +1 -0
  160. package/dist/utils/productEngineTypeMappers.js +12 -17
  161. package/dist/utils/productEngineTypeMappers.js.map +1 -1
  162. package/dist/utils/queryDataMappers.cjs +204 -292
  163. package/dist/utils/queryDataMappers.cjs.map +1 -1
  164. package/dist/utils/queryDataMappers.d.cts +2 -20
  165. package/dist/utils/queryDataMappers.d.ts +2 -20
  166. package/dist/utils/queryDataMappers.js +190 -264
  167. package/dist/utils/queryDataMappers.js.map +1 -1
  168. package/package.json +9 -9
  169. package/dist/EngineBaseClient.cjs.map +0 -1
  170. package/dist/index.cjs.map +0 -1
  171. package/dist/index.js.map +0 -1
  172. package/dist/types/clientExecuteTypes.cjs.map +0 -1
  173. package/dist/types/clientExecuteTypes.js.map +0 -1
  174. package/dist/types/clientQueryTypes.cjs.map +0 -1
  175. package/dist/types/clientQueryTypes.js.map +0 -1
  176. package/dist/types/index.cjs.map +0 -1
  177. package/dist/types/index.js.map +0 -1
  178. package/dist/types/serverExecuteTypes.cjs.map +0 -1
  179. package/dist/types/serverExecuteTypes.js.map +0 -1
  180. package/dist/types/serverQueryModelTypes.cjs.map +0 -1
  181. package/dist/types/serverQueryModelTypes.js.map +0 -1
  182. package/dist/types/serverSubscriptionEventTypes.cjs.map +0 -1
  183. package/dist/types/serverSubscriptionEventTypes.js.map +0 -1
  184. package/dist/types/serverSubscriptionTypes.cjs.map +0 -1
  185. package/dist/types/serverSubscriptionTypes.js.map +0 -1
  186. package/dist/utils/index.cjs.map +0 -1
  187. package/dist/utils/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/serverQueryTypes.ts"],"sourcesContent":["import { HealthStatus } from '@nadohq/shared';\nimport {\n EngineServerHealthBreakdown,\n EngineServerNlpBalance,\n EngineServerNlpLockedBalance,\n EngineServerOrder,\n EngineServerPerpBalance,\n EngineServerPerpProduct,\n EngineServerProductType,\n EngineServerSpotBalance,\n EngineServerSpotProduct,\n} from './serverQueryModelTypes';\n\nexport interface EngineServerNoncesParams {\n address: string;\n}\n\nexport interface EngineServerSubaccountInfoQueryParams {\n subaccount: string;\n txns?: Array<{\n apply_delta: {\n product_id: number;\n subaccount: string;\n amount_delta: string;\n v_quote_delta: string;\n };\n }>;\n // If not given, engine defaults to 'false'\n pre_state?: string;\n}\n\nexport interface EngineServerIsolatedPositionsQueryParams {\n subaccount: string;\n}\n\nexport interface EngineServerSymbolsQueryParams {\n product_type?: EngineServerProductType;\n product_ids?: number[];\n}\n\nexport interface EngineServerMarketPriceQueryParams {\n product_id: number;\n}\n\nexport interface EngineServerMarketPricesQueryParams {\n product_ids: number[];\n}\n\nexport interface EngineServerGetOrderQueryParams {\n product_id: number;\n digest: string;\n}\n\nexport interface EngineServerValidateOrderQueryParams {\n product_id: number;\n // Bytes for order, does not need to be signed\n order: string;\n}\n\nexport interface EngineServerOrdersQueryParams {\n sender: string;\n product_ids: number[];\n}\n\nexport interface EngineServerSubaccountOrdersQueryParams {\n sender: string;\n product_id: number;\n}\n\nexport interface EngineServerSubaccountFeeRatesParams {\n sender: string;\n}\n\nexport interface EngineServerMarketLiquidityQueryParams {\n product_id: number;\n depth: number;\n}\n\nexport interface EngineServerMaxWithdrawableQueryParams {\n sender: string;\n product_id: number;\n // If not given, engine defaults to true (leverage/borrow enabled)\n spot_leverage: string | null;\n}\n\nexport interface EngineServerMaxOrderSizeQueryParams {\n sender: string;\n product_id: number;\n price_x18: string;\n // Optional average execution price in x18 units.\n // If not given, engine uses `price_x18` for both health stress and cost basis.\n avg_price_x18: string | null;\n // Note: When `reduce_only` is true, `direction` must be opposite of the current position, otherwise it returns 0.\n direction: 'long' | 'short';\n // If not given, engine defaults to true (leverage/borrow enabled)\n spot_leverage: string | null;\n // If not given, engine defaults to false. If true, the max order size will be capped to the subaccount's current position size;\n // If no position exists, it will return 0.\n reduce_only: string | null;\n isolated: string | null;\n // For isolated, max order size includes available collateral to transfer from parent cross subaccount\n // If not given, engine defaults to true (borrow enabled)\n borrow_margin: string | null;\n}\n\nexport interface EngineServerLinkedSignerParams {\n subaccount: string;\n}\n\nexport interface EngineServerMaxMintNlpQueryParams {\n sender: string;\n // If not given, engine defaults to true (leverage/borrow enabled)\n spot_leverage: string | null;\n}\n\nexport interface EngineServerMaxBurnNlpQueryParams {\n sender: string;\n}\n\nexport interface EngineServerNlpLockedBalancesQueryParams {\n subaccount: string;\n}\n\nexport interface EngineServerQueryRequestByType {\n all_products: Record<string, never>;\n contracts: Record<string, never>;\n edge_all_products: Record<string, never>;\n fee_rates: EngineServerSubaccountFeeRatesParams;\n health_groups: Record<string, never>;\n insurance: Record<string, never>;\n isolated_positions: EngineServerIsolatedPositionsQueryParams;\n linked_signer: EngineServerLinkedSignerParams;\n market_liquidity: EngineServerMarketLiquidityQueryParams;\n market_price: EngineServerMarketPriceQueryParams;\n market_prices: EngineServerMarketPricesQueryParams;\n max_nlp_burnable: EngineServerMaxBurnNlpQueryParams;\n max_nlp_mintable: EngineServerMaxMintNlpQueryParams;\n max_order_size: EngineServerMaxOrderSizeQueryParams;\n nlp_locked_balances: EngineServerNlpLockedBalancesQueryParams;\n nlp_pool_info: Record<string, never>;\n max_withdrawable: EngineServerMaxWithdrawableQueryParams;\n nonces: EngineServerNoncesParams;\n order: EngineServerGetOrderQueryParams;\n orders: EngineServerOrdersQueryParams;\n status: Record<string, never>;\n subaccount_info: Omit<EngineServerSubaccountInfoQueryParams, 'txns'> & {\n // JSON serialized txns\n txns?: string;\n };\n subaccount_orders: EngineServerSubaccountOrdersQueryParams;\n symbols: EngineServerSymbolsQueryParams;\n validate_order: EngineServerValidateOrderQueryParams;\n}\n\nexport type EngineServerQueryRequestType = keyof EngineServerQueryRequestByType;\n\nexport type EngineServerQueryRequest<\n TRequestType extends EngineServerQueryRequestType,\n> = {\n type: TRequestType;\n} & EngineServerQueryRequestByType[TRequestType];\n\nexport interface EngineServerContractsResponse {\n chain_id: string;\n endpoint_addr: string;\n}\n\n// Unless in active state, engine is not fully operational\nexport const ENGINE_SERVER_STATUS_VALUES = [\n 'started',\n 'active',\n 'stopping',\n 'syncing',\n 'live_syncing',\n 'failed',\n] as const;\n\nexport type EngineServerStatusResponse =\n (typeof ENGINE_SERVER_STATUS_VALUES)[number];\n\nexport interface EngineServerNoncesResponse {\n order_nonce: string;\n tx_nonce: string;\n}\n\nexport interface EngineServerSubaccountInfoResponse extends EngineServerSubaccountInfoState {\n exists: boolean;\n subaccount: string;\n spot_count: number;\n perp_count: number;\n spot_products: EngineServerSpotProduct[];\n perp_products: EngineServerPerpProduct[];\n\n /** This is set if request has `pre_state` flag set to 'true' */\n pre_state: EngineServerSubaccountInfoState | undefined;\n}\n\nexport interface EngineServerSubaccountInfoState {\n healths: [\n initial: EngineServerHealthBreakdown,\n maintenance: EngineServerHealthBreakdown,\n unweighted: EngineServerHealthBreakdown,\n ];\n // First index is product ID, each subarray is of length 3 [initial, maintenance, unweighted]\n health_contributions: string[][];\n spot_balances: EngineServerSpotBalance[];\n perp_balances: EngineServerPerpBalance[];\n}\n\nexport interface EngineServerIsolatedPosition {\n subaccount: string;\n healths: [\n initial: HealthStatus,\n maintenance: HealthStatus,\n unweighted: HealthStatus,\n ];\n quote_healths: [initial: string, maintenance: string, unweighted: string];\n base_healths: [initial: string, maintenance: string, unweighted: string];\n quote_balance: EngineServerSpotBalance;\n base_balance: EngineServerPerpBalance;\n quote_product: EngineServerSpotProduct;\n base_product: EngineServerPerpProduct;\n}\n\nexport type EngineServerIsolatedPositionsResponse = {\n isolated_positions: EngineServerIsolatedPosition[];\n};\n\nexport interface EngineServerSymbol {\n type: EngineServerProductType;\n product_id: number;\n symbol: string;\n price_increment_x18: string;\n size_increment: string;\n min_size: string;\n maker_fee_rate_x18: string;\n taker_fee_rate_x18: string;\n long_weight_initial_x18: string;\n long_weight_maintenance_x18: string;\n // undefined when there is no max open interest limit (always undefined for spot products)\n max_open_interest_x18: string | undefined;\n isolated_only: boolean;\n}\n\nexport interface EngineServerSymbolsResponse {\n symbols: Record<string, EngineServerSymbol>;\n}\n\nexport interface EngineServerAllProductsResponse {\n spot_products: EngineServerSpotProduct[];\n perp_products: EngineServerPerpProduct[];\n}\n\nexport interface EngineServerHealthGroupsResponse {\n health_groups: [spotProductId: number, perpProductId: number][];\n}\n\n// Price, liquidity pairs\nexport type EngineServerPriceTickLiquidity = [\n priceX18: string,\n liquidity: string,\n];\n\nexport interface EngineServerMarketLiquidityResponse {\n bids: EngineServerPriceTickLiquidity[];\n asks: EngineServerPriceTickLiquidity[];\n}\n\nexport interface EngineServerSubaccountOrders {\n sender: string;\n product_id: number;\n orders: EngineServerOrder[];\n}\n\nexport type EngineServerSubaccountOrdersResponse = EngineServerSubaccountOrders;\n\nexport interface EngineServerProductOrdersResponse {\n sender: string;\n product_orders: EngineServerSubaccountOrders[];\n}\n\nexport interface EngineServerFeeRatesResponse {\n liquidation_sequencer_fee: string;\n health_check_sequencer_fee: string;\n taker_sequencer_fee: string;\n // Product ID is the index\n withdraw_sequencer_fees: string[];\n taker_fee_rates_x18: string[];\n maker_fee_rates_x18: string[];\n fee_tier: number;\n}\n\nexport interface EngineServerMarketPrice {\n product_id: number;\n bid_x18: string;\n ask_x18: string;\n}\n\nexport type EngineServerMarketPriceResponse = EngineServerMarketPrice;\n\nexport interface EngineServerMarketPricesResponse {\n market_prices: EngineServerMarketPrice[];\n}\n\nexport type EngineServerOrderResponse = EngineServerOrder;\n\nexport interface EngineServerValidateOrderResponse {\n product_id: number;\n order: string;\n valid: boolean;\n}\n\nexport interface EngineServerMaxOrderSizeResponse {\n max_order_size: string;\n}\n\nexport interface EngineServerMaxWithdrawableResponse {\n max_withdrawable: string;\n}\n\nexport type EngineServerTimeResponse = number;\n\nexport interface EngineServerIpBlockResponse {\n blocked: boolean;\n reason: string;\n}\n\nexport interface EngineServerLinkedSignerResponse {\n linked_signer: string;\n}\n\nexport interface EngineInsuranceResponse {\n insurance: string;\n}\n\nexport interface EngineServerEdgeAllProductsResponse {\n // chain_id -> EngineServerAllProductsResponse\n edge_all_products: Record<number, EngineServerAllProductsResponse>;\n}\n\nexport interface EngineServerMaxBurnNlpResponse {\n max_nlp_amount: string;\n}\n\nexport interface EngineServerMaxMintNlpResponse {\n max_quote_amount: string;\n}\n\nexport interface EngineServerNlpLockedBalancesResponse {\n balance_locked: EngineServerNlpBalance;\n balance_unlocked: EngineServerNlpBalance;\n locked_balances: EngineServerNlpLockedBalance[];\n}\n\nexport interface EngineServerNlpPool {\n pool_id: number;\n subaccount: string;\n owner: string;\n balance_weight_x18: string;\n subaccount_info: EngineServerSubaccountInfoResponse;\n open_orders: EngineServerOrder[];\n}\n\nexport interface EngineServerNlpPoolInfoResponse {\n nlp_pools: EngineServerNlpPool[];\n}\n\nexport interface EngineServerQueryResponseByType {\n all_products: EngineServerAllProductsResponse;\n contracts: EngineServerContractsResponse;\n edge_all_products: EngineServerEdgeAllProductsResponse;\n fee_rates: EngineServerFeeRatesResponse;\n health_groups: EngineServerHealthGroupsResponse;\n insurance: EngineInsuranceResponse;\n isolated_positions: EngineServerIsolatedPositionsResponse;\n linked_signer: EngineServerLinkedSignerResponse;\n market_liquidity: EngineServerMarketLiquidityResponse;\n market_price: EngineServerMarketPriceResponse;\n market_prices: EngineServerMarketPricesResponse;\n max_nlp_burnable: EngineServerMaxBurnNlpResponse;\n max_nlp_mintable: EngineServerMaxMintNlpResponse;\n max_order_size: EngineServerMaxOrderSizeResponse;\n nlp_locked_balances: EngineServerNlpLockedBalancesResponse;\n nlp_pool_info: EngineServerNlpPoolInfoResponse;\n max_withdrawable: EngineServerMaxWithdrawableResponse;\n nonces: EngineServerNoncesResponse;\n order: EngineServerOrderResponse;\n orders: EngineServerProductOrdersResponse;\n status: EngineServerStatusResponse;\n subaccount_info: EngineServerSubaccountInfoResponse;\n subaccount_orders: EngineServerSubaccountOrdersResponse;\n symbols: EngineServerSymbolsResponse;\n validate_order: EngineServerValidateOrderResponse;\n}\n\nexport interface EngineServerQuerySuccessResponse<\n TQueryType extends keyof EngineServerQueryResponseByType =\n EngineServerQueryRequestType,\n> {\n status: 'success';\n data: EngineServerQueryResponseByType[TQueryType];\n}\n\nexport interface EngineServerQueryFailureResponse {\n status: 'failure';\n error: string;\n error_code: number;\n}\n\nexport type EngineServerQueryResponse<\n TQueryType extends keyof EngineServerQueryResponseByType =\n EngineServerQueryRequestType,\n> =\n | EngineServerQuerySuccessResponse<TQueryType>\n | EngineServerQueryFailureResponse;\n"],"mappings":";AAwKO,IAAM,8BAA8B;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
1
+ {"version":3,"file":"serverQueryTypes.js","names":[],"sources":["../../src/types/serverQueryTypes.ts"],"sourcesContent":["import { HealthStatus } from '@nadohq/shared';\nimport {\n EngineServerHealthBreakdown,\n EngineServerNlpBalance,\n EngineServerNlpLockedBalance,\n EngineServerOrder,\n EngineServerPerpBalance,\n EngineServerPerpProduct,\n EngineServerProductType,\n EngineServerSpotBalance,\n EngineServerSpotProduct,\n} from './serverQueryModelTypes';\n\nexport interface EngineServerNoncesParams {\n address: string;\n}\n\nexport interface EngineServerSubaccountInfoQueryParams {\n subaccount: string;\n txns?: Array<{\n apply_delta: {\n product_id: number;\n subaccount: string;\n amount_delta: string;\n v_quote_delta: string;\n };\n }>;\n // If not given, engine defaults to 'false'\n pre_state?: string;\n}\n\nexport interface EngineServerIsolatedPositionsQueryParams {\n subaccount: string;\n}\n\nexport interface EngineServerSymbolsQueryParams {\n product_type?: EngineServerProductType;\n product_ids?: number[];\n}\n\nexport interface EngineServerMarketPriceQueryParams {\n product_id: number;\n}\n\nexport interface EngineServerMarketPricesQueryParams {\n product_ids: number[];\n}\n\nexport interface EngineServerGetOrderQueryParams {\n product_id: number;\n digest: string;\n}\n\nexport interface EngineServerValidateOrderQueryParams {\n product_id: number;\n // Bytes for order, does not need to be signed\n order: string;\n}\n\nexport interface EngineServerOrdersQueryParams {\n sender: string;\n product_ids: number[];\n}\n\nexport interface EngineServerSubaccountOrdersQueryParams {\n sender: string;\n product_id: number;\n}\n\nexport interface EngineServerSubaccountFeeRatesParams {\n sender: string;\n}\n\nexport interface EngineServerMarketLiquidityQueryParams {\n product_id: number;\n depth: number;\n}\n\nexport interface EngineServerMaxWithdrawableQueryParams {\n sender: string;\n product_id: number;\n // If not given, engine defaults to true (leverage/borrow enabled)\n spot_leverage: string | null;\n}\n\nexport interface EngineServerMaxOrderSizeQueryParams {\n sender: string;\n product_id: number;\n price_x18: string;\n // Optional average execution price in x18 units.\n // If not given, engine uses `price_x18` for both health stress and cost basis.\n avg_price_x18: string | null;\n // Note: When `reduce_only` is true, `direction` must be opposite of the current position, otherwise it returns 0.\n direction: 'long' | 'short';\n // If not given, engine defaults to true (leverage/borrow enabled)\n spot_leverage: string | null;\n // If not given, engine defaults to false. If true, the max order size will be capped to the subaccount's current position size;\n // If no position exists, it will return 0.\n reduce_only: string | null;\n isolated: string | null;\n // For isolated, max order size includes available collateral to transfer from parent cross subaccount\n // If not given, engine defaults to true (borrow enabled)\n borrow_margin: string | null;\n}\n\nexport interface EngineServerLinkedSignerParams {\n subaccount: string;\n}\n\nexport interface EngineServerMaxMintNlpQueryParams {\n sender: string;\n // If not given, engine defaults to true (leverage/borrow enabled)\n spot_leverage: string | null;\n}\n\nexport interface EngineServerMaxBurnNlpQueryParams {\n sender: string;\n}\n\nexport interface EngineServerNlpLockedBalancesQueryParams {\n subaccount: string;\n}\n\nexport interface EngineServerQueryRequestByType {\n all_products: Record<string, never>;\n contracts: Record<string, never>;\n edge_all_products: Record<string, never>;\n fee_rates: EngineServerSubaccountFeeRatesParams;\n health_groups: Record<string, never>;\n insurance: Record<string, never>;\n isolated_positions: EngineServerIsolatedPositionsQueryParams;\n linked_signer: EngineServerLinkedSignerParams;\n market_liquidity: EngineServerMarketLiquidityQueryParams;\n market_price: EngineServerMarketPriceQueryParams;\n market_prices: EngineServerMarketPricesQueryParams;\n max_nlp_burnable: EngineServerMaxBurnNlpQueryParams;\n max_nlp_mintable: EngineServerMaxMintNlpQueryParams;\n max_order_size: EngineServerMaxOrderSizeQueryParams;\n nlp_locked_balances: EngineServerNlpLockedBalancesQueryParams;\n nlp_pool_info: Record<string, never>;\n max_withdrawable: EngineServerMaxWithdrawableQueryParams;\n nonces: EngineServerNoncesParams;\n order: EngineServerGetOrderQueryParams;\n orders: EngineServerOrdersQueryParams;\n status: Record<string, never>;\n subaccount_info: Omit<EngineServerSubaccountInfoQueryParams, 'txns'> & {\n // JSON serialized txns\n txns?: string;\n };\n subaccount_orders: EngineServerSubaccountOrdersQueryParams;\n symbols: EngineServerSymbolsQueryParams;\n validate_order: EngineServerValidateOrderQueryParams;\n}\n\nexport type EngineServerQueryRequestType = keyof EngineServerQueryRequestByType;\n\nexport type EngineServerQueryRequest<\n TRequestType extends EngineServerQueryRequestType,\n> = {\n type: TRequestType;\n} & EngineServerQueryRequestByType[TRequestType];\n\nexport interface EngineServerContractsResponse {\n chain_id: string;\n endpoint_addr: string;\n}\n\n// Unless in active state, engine is not fully operational\nexport const ENGINE_SERVER_STATUS_VALUES = [\n 'started',\n 'active',\n 'stopping',\n 'syncing',\n 'live_syncing',\n 'failed',\n] as const;\n\nexport type EngineServerStatusResponse =\n (typeof ENGINE_SERVER_STATUS_VALUES)[number];\n\nexport interface EngineServerNoncesResponse {\n order_nonce: string;\n tx_nonce: string;\n}\n\nexport interface EngineServerSubaccountInfoResponse extends EngineServerSubaccountInfoState {\n exists: boolean;\n subaccount: string;\n spot_count: number;\n perp_count: number;\n spot_products: EngineServerSpotProduct[];\n perp_products: EngineServerPerpProduct[];\n\n /** This is set if request has `pre_state` flag set to 'true' */\n pre_state: EngineServerSubaccountInfoState | undefined;\n}\n\nexport interface EngineServerSubaccountInfoState {\n healths: [\n initial: EngineServerHealthBreakdown,\n maintenance: EngineServerHealthBreakdown,\n unweighted: EngineServerHealthBreakdown,\n ];\n // First index is product ID, each subarray is of length 3 [initial, maintenance, unweighted]\n health_contributions: string[][];\n spot_balances: EngineServerSpotBalance[];\n perp_balances: EngineServerPerpBalance[];\n}\n\nexport interface EngineServerIsolatedPosition {\n subaccount: string;\n healths: [\n initial: HealthStatus,\n maintenance: HealthStatus,\n unweighted: HealthStatus,\n ];\n quote_healths: [initial: string, maintenance: string, unweighted: string];\n base_healths: [initial: string, maintenance: string, unweighted: string];\n quote_balance: EngineServerSpotBalance;\n base_balance: EngineServerPerpBalance;\n quote_product: EngineServerSpotProduct;\n base_product: EngineServerPerpProduct;\n}\n\nexport type EngineServerIsolatedPositionsResponse = {\n isolated_positions: EngineServerIsolatedPosition[];\n};\n\nexport interface EngineServerSymbol {\n type: EngineServerProductType;\n product_id: number;\n symbol: string;\n price_increment_x18: string;\n size_increment: string;\n min_size: string;\n maker_fee_rate_x18: string;\n taker_fee_rate_x18: string;\n long_weight_initial_x18: string;\n long_weight_maintenance_x18: string;\n // undefined when there is no max open interest limit (always undefined for spot products)\n max_open_interest_x18: string | undefined;\n isolated_only: boolean;\n}\n\nexport interface EngineServerSymbolsResponse {\n symbols: Record<string, EngineServerSymbol>;\n}\n\nexport interface EngineServerAllProductsResponse {\n spot_products: EngineServerSpotProduct[];\n perp_products: EngineServerPerpProduct[];\n}\n\nexport interface EngineServerHealthGroupsResponse {\n health_groups: [spotProductId: number, perpProductId: number][];\n}\n\n// Price, liquidity pairs\nexport type EngineServerPriceTickLiquidity = [\n priceX18: string,\n liquidity: string,\n];\n\nexport interface EngineServerMarketLiquidityResponse {\n bids: EngineServerPriceTickLiquidity[];\n asks: EngineServerPriceTickLiquidity[];\n}\n\nexport interface EngineServerSubaccountOrders {\n sender: string;\n product_id: number;\n orders: EngineServerOrder[];\n}\n\nexport type EngineServerSubaccountOrdersResponse = EngineServerSubaccountOrders;\n\nexport interface EngineServerProductOrdersResponse {\n sender: string;\n product_orders: EngineServerSubaccountOrders[];\n}\n\nexport interface EngineServerFeeRatesResponse {\n liquidation_sequencer_fee: string;\n health_check_sequencer_fee: string;\n taker_sequencer_fee: string;\n // Product ID is the index\n withdraw_sequencer_fees: string[];\n taker_fee_rates_x18: string[];\n maker_fee_rates_x18: string[];\n fee_tier: number;\n}\n\nexport interface EngineServerMarketPrice {\n product_id: number;\n bid_x18: string;\n ask_x18: string;\n}\n\nexport type EngineServerMarketPriceResponse = EngineServerMarketPrice;\n\nexport interface EngineServerMarketPricesResponse {\n market_prices: EngineServerMarketPrice[];\n}\n\nexport type EngineServerOrderResponse = EngineServerOrder;\n\nexport interface EngineServerValidateOrderResponse {\n product_id: number;\n order: string;\n valid: boolean;\n}\n\nexport interface EngineServerMaxOrderSizeResponse {\n max_order_size: string;\n}\n\nexport interface EngineServerMaxWithdrawableResponse {\n max_withdrawable: string;\n}\n\nexport type EngineServerTimeResponse = number;\n\nexport interface EngineServerIpBlockResponse {\n blocked: boolean;\n reason: string;\n}\n\nexport interface EngineServerLinkedSignerResponse {\n linked_signer: string;\n}\n\nexport interface EngineInsuranceResponse {\n insurance: string;\n}\n\nexport interface EngineServerEdgeAllProductsResponse {\n // chain_id -> EngineServerAllProductsResponse\n edge_all_products: Record<number, EngineServerAllProductsResponse>;\n}\n\nexport interface EngineServerMaxBurnNlpResponse {\n max_nlp_amount: string;\n}\n\nexport interface EngineServerMaxMintNlpResponse {\n max_quote_amount: string;\n}\n\nexport interface EngineServerNlpLockedBalancesResponse {\n balance_locked: EngineServerNlpBalance;\n balance_unlocked: EngineServerNlpBalance;\n locked_balances: EngineServerNlpLockedBalance[];\n}\n\nexport interface EngineServerNlpPool {\n pool_id: number;\n subaccount: string;\n owner: string;\n balance_weight_x18: string;\n subaccount_info: EngineServerSubaccountInfoResponse;\n open_orders: EngineServerOrder[];\n}\n\nexport interface EngineServerNlpPoolInfoResponse {\n nlp_pools: EngineServerNlpPool[];\n}\n\nexport interface EngineServerQueryResponseByType {\n all_products: EngineServerAllProductsResponse;\n contracts: EngineServerContractsResponse;\n edge_all_products: EngineServerEdgeAllProductsResponse;\n fee_rates: EngineServerFeeRatesResponse;\n health_groups: EngineServerHealthGroupsResponse;\n insurance: EngineInsuranceResponse;\n isolated_positions: EngineServerIsolatedPositionsResponse;\n linked_signer: EngineServerLinkedSignerResponse;\n market_liquidity: EngineServerMarketLiquidityResponse;\n market_price: EngineServerMarketPriceResponse;\n market_prices: EngineServerMarketPricesResponse;\n max_nlp_burnable: EngineServerMaxBurnNlpResponse;\n max_nlp_mintable: EngineServerMaxMintNlpResponse;\n max_order_size: EngineServerMaxOrderSizeResponse;\n nlp_locked_balances: EngineServerNlpLockedBalancesResponse;\n nlp_pool_info: EngineServerNlpPoolInfoResponse;\n max_withdrawable: EngineServerMaxWithdrawableResponse;\n nonces: EngineServerNoncesResponse;\n order: EngineServerOrderResponse;\n orders: EngineServerProductOrdersResponse;\n status: EngineServerStatusResponse;\n subaccount_info: EngineServerSubaccountInfoResponse;\n subaccount_orders: EngineServerSubaccountOrdersResponse;\n symbols: EngineServerSymbolsResponse;\n validate_order: EngineServerValidateOrderResponse;\n}\n\nexport interface EngineServerQuerySuccessResponse<\n TQueryType extends keyof EngineServerQueryResponseByType =\n EngineServerQueryRequestType,\n> {\n status: 'success';\n data: EngineServerQueryResponseByType[TQueryType];\n}\n\nexport interface EngineServerQueryFailureResponse {\n status: 'failure';\n error: string;\n error_code: number;\n}\n\nexport type EngineServerQueryResponse<\n TQueryType extends keyof EngineServerQueryResponseByType =\n EngineServerQueryRequestType,\n> =\n | EngineServerQuerySuccessResponse<TQueryType>\n | EngineServerQueryFailureResponse;\n"],"mappings":";AAwKA,MAAa,8BAA8B;CACzC;CACA;CACA;CACA;CACA;CACA;AACF"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/types/serverSubscriptionEventTypes.ts
17
- var serverSubscriptionEventTypes_exports = {};
18
- module.exports = __toCommonJS(serverSubscriptionEventTypes_exports);
19
- //# sourceMappingURL=serverSubscriptionEventTypes.cjs.map
@@ -1,135 +1,2 @@
1
- import { EngineServerPriceTickLiquidity } from './serverQueryTypes.cjs';
2
- import '@nadohq/shared';
3
- import './serverQueryModelTypes.cjs';
4
-
5
- /**
6
- * Reasons that can trigger position change events.
7
- */
8
- type PositionChangeReason = 'deposit_collateral' | 'match_orders' | 'withdraw_collateral' | 'transfer_quote' | 'settle_pnl' | 'mint_nlp' | 'burn_nlp' | 'liquidate_subaccount';
9
- /**
10
- * Possible reasons for order updates.
11
- */
12
- type OrderUpdateReason = 'cancelled' | 'filled' | 'placed';
13
- type EngineServerSubscriptionEventType = 'trade' | 'best_bid_offer' | 'book_depth' | 'fill' | 'position_change' | 'order_update' | 'liquidation' | 'latest_candlestick' | 'funding_payment';
14
- interface EngineServerSubscriptionBaseEvent<T extends EngineServerSubscriptionEventType = EngineServerSubscriptionEventType> {
15
- type: T;
16
- product_id: number;
17
- }
18
- /**
19
- * Event from subscribing to a `trade` stream.
20
- */
21
- interface EngineServerSubscriptionTradeEvent extends EngineServerSubscriptionBaseEvent<'trade'> {
22
- timestamp: string;
23
- price: string;
24
- taker_qty: string;
25
- maker_qty: string;
26
- is_taker_buyer: boolean;
27
- }
28
- /**
29
- * Event from subscribing to a `best_bid_offer` stream.
30
- */
31
- interface EngineServerSubscriptionBestBidOfferEvent extends EngineServerSubscriptionBaseEvent<'best_bid_offer'> {
32
- timestamp: string;
33
- bid_price: string;
34
- bid_qty: string;
35
- ask_price: string;
36
- ask_qty: string;
37
- }
38
- /**
39
- * Event from subscribing to a `book_depth` stream.
40
- */
41
- interface EngineServerSubscriptionBookDepthEvent extends EngineServerSubscriptionBaseEvent<'book_depth'> {
42
- last_max_timestamp: string;
43
- min_timestamp: string;
44
- max_timestamp: string;
45
- bids: EngineServerPriceTickLiquidity[];
46
- asks: EngineServerPriceTickLiquidity[];
47
- }
48
- /**
49
- * Event from subscribing to a `fill` stream.
50
- */
51
- interface EngineServerSubscriptionFillEvent extends EngineServerSubscriptionBaseEvent<'fill'> {
52
- timestamp: string;
53
- subaccount: string;
54
- order_digest: string;
55
- filled_qty: string;
56
- remaining_qty: string;
57
- original_qty: string;
58
- price: string;
59
- is_taker: boolean;
60
- is_bid: boolean;
61
- fee: string;
62
- submission_idx: string;
63
- appendix: string;
64
- }
65
- /**
66
- * Event from subscribing to a `position_change` stream.
67
- */
68
- interface EngineServerSubscriptionPositionChangeEvent extends EngineServerSubscriptionBaseEvent<'position_change'> {
69
- timestamp: string;
70
- subaccount: string;
71
- amount: string;
72
- /** Zero for everything except perps */
73
- v_quote_amount: string;
74
- reason: PositionChangeReason;
75
- /**
76
- * True if the position change was for an isolated position
77
- */
78
- isolated: boolean;
79
- }
80
- /**
81
- * Event from subscribing to an `order_update` stream.
82
- */
83
- interface EngineServerSubscriptionOrderUpdateEvent extends EngineServerSubscriptionBaseEvent<'order_update'> {
84
- timestamp: string;
85
- digest: string;
86
- amount: string;
87
- reason: OrderUpdateReason;
88
- }
89
- /**
90
- * Event from subscribing to a `liquidation` stream.
91
- */
92
- interface EngineServerSubscriptionLiquidationEvent extends EngineServerSubscriptionBaseEvent<'liquidation'> {
93
- timestamp: string;
94
- /** Single element for regular liquidations, two elements for spread liquidations [spotId, perpId] */
95
- product_ids: number[];
96
- liquidator: string;
97
- liquidatee: string;
98
- /** Amount liquidated (positive for long, negative for short) */
99
- amount: string;
100
- /** Price at which liquidation occurred */
101
- price: string;
102
- }
103
- /**
104
- * Event from subscribing to a `latest_candlestick` stream.
105
- */
106
- interface EngineServerSubscriptionLatestCandlestickEvent extends EngineServerSubscriptionBaseEvent<'latest_candlestick'> {
107
- timestamp: string;
108
- granularity: number;
109
- open_x18: string;
110
- high_x18: string;
111
- low_x18: string;
112
- close_x18: string;
113
- volume: string;
114
- }
115
- /**
116
- * Event from subscribing to a `funding_payment` stream.
117
- */
118
- interface EngineServerSubscriptionFundingPaymentEvent extends EngineServerSubscriptionBaseEvent<'funding_payment'> {
119
- timestamp: string;
120
- /** Funding payment amount (positive = receive, negative = pay) */
121
- payment_amount: string;
122
- /** Open interest at time of funding */
123
- open_interest: string;
124
- /** Current cumulative funding values */
125
- cumulative_funding_long_x18: string;
126
- cumulative_funding_short_x18: string;
127
- /** Time delta over which the funding payment was calculated */
128
- dt: string;
129
- }
130
- /**
131
- * Union type for all engine server subscription events.
132
- */
133
- type EngineServerSubscriptionEvent = EngineServerSubscriptionTradeEvent | EngineServerSubscriptionBestBidOfferEvent | EngineServerSubscriptionBookDepthEvent | EngineServerSubscriptionFillEvent | EngineServerSubscriptionPositionChangeEvent | EngineServerSubscriptionOrderUpdateEvent | EngineServerSubscriptionLiquidationEvent | EngineServerSubscriptionLatestCandlestickEvent | EngineServerSubscriptionFundingPaymentEvent;
134
-
135
- export type { EngineServerSubscriptionBaseEvent, EngineServerSubscriptionBestBidOfferEvent, EngineServerSubscriptionBookDepthEvent, EngineServerSubscriptionEvent, EngineServerSubscriptionEventType, EngineServerSubscriptionFillEvent, EngineServerSubscriptionFundingPaymentEvent, EngineServerSubscriptionLatestCandlestickEvent, EngineServerSubscriptionLiquidationEvent, EngineServerSubscriptionOrderUpdateEvent, EngineServerSubscriptionPositionChangeEvent, EngineServerSubscriptionTradeEvent, OrderUpdateReason, PositionChangeReason };
1
+ import { a as EngineServerSubscriptionEventType, c as EngineServerSubscriptionLatestCandlestickEvent, d as EngineServerSubscriptionPositionChangeEvent, f as EngineServerSubscriptionTradeEvent, i as EngineServerSubscriptionEvent, l as EngineServerSubscriptionLiquidationEvent, m as PositionChangeReason, n as EngineServerSubscriptionBestBidOfferEvent, o as EngineServerSubscriptionFillEvent, p as OrderUpdateReason, r as EngineServerSubscriptionBookDepthEvent, s as EngineServerSubscriptionFundingPaymentEvent, t as EngineServerSubscriptionBaseEvent, u as EngineServerSubscriptionOrderUpdateEvent } from "../serverSubscriptionEventTypes-BMUrTkTg.cjs";
2
+ export { EngineServerSubscriptionBaseEvent, EngineServerSubscriptionBestBidOfferEvent, EngineServerSubscriptionBookDepthEvent, EngineServerSubscriptionEvent, EngineServerSubscriptionEventType, EngineServerSubscriptionFillEvent, EngineServerSubscriptionFundingPaymentEvent, EngineServerSubscriptionLatestCandlestickEvent, EngineServerSubscriptionLiquidationEvent, EngineServerSubscriptionOrderUpdateEvent, EngineServerSubscriptionPositionChangeEvent, EngineServerSubscriptionTradeEvent, OrderUpdateReason, PositionChangeReason };
@@ -1,135 +1,2 @@
1
- import { EngineServerPriceTickLiquidity } from './serverQueryTypes.js';
2
- import '@nadohq/shared';
3
- import './serverQueryModelTypes.js';
4
-
5
- /**
6
- * Reasons that can trigger position change events.
7
- */
8
- type PositionChangeReason = 'deposit_collateral' | 'match_orders' | 'withdraw_collateral' | 'transfer_quote' | 'settle_pnl' | 'mint_nlp' | 'burn_nlp' | 'liquidate_subaccount';
9
- /**
10
- * Possible reasons for order updates.
11
- */
12
- type OrderUpdateReason = 'cancelled' | 'filled' | 'placed';
13
- type EngineServerSubscriptionEventType = 'trade' | 'best_bid_offer' | 'book_depth' | 'fill' | 'position_change' | 'order_update' | 'liquidation' | 'latest_candlestick' | 'funding_payment';
14
- interface EngineServerSubscriptionBaseEvent<T extends EngineServerSubscriptionEventType = EngineServerSubscriptionEventType> {
15
- type: T;
16
- product_id: number;
17
- }
18
- /**
19
- * Event from subscribing to a `trade` stream.
20
- */
21
- interface EngineServerSubscriptionTradeEvent extends EngineServerSubscriptionBaseEvent<'trade'> {
22
- timestamp: string;
23
- price: string;
24
- taker_qty: string;
25
- maker_qty: string;
26
- is_taker_buyer: boolean;
27
- }
28
- /**
29
- * Event from subscribing to a `best_bid_offer` stream.
30
- */
31
- interface EngineServerSubscriptionBestBidOfferEvent extends EngineServerSubscriptionBaseEvent<'best_bid_offer'> {
32
- timestamp: string;
33
- bid_price: string;
34
- bid_qty: string;
35
- ask_price: string;
36
- ask_qty: string;
37
- }
38
- /**
39
- * Event from subscribing to a `book_depth` stream.
40
- */
41
- interface EngineServerSubscriptionBookDepthEvent extends EngineServerSubscriptionBaseEvent<'book_depth'> {
42
- last_max_timestamp: string;
43
- min_timestamp: string;
44
- max_timestamp: string;
45
- bids: EngineServerPriceTickLiquidity[];
46
- asks: EngineServerPriceTickLiquidity[];
47
- }
48
- /**
49
- * Event from subscribing to a `fill` stream.
50
- */
51
- interface EngineServerSubscriptionFillEvent extends EngineServerSubscriptionBaseEvent<'fill'> {
52
- timestamp: string;
53
- subaccount: string;
54
- order_digest: string;
55
- filled_qty: string;
56
- remaining_qty: string;
57
- original_qty: string;
58
- price: string;
59
- is_taker: boolean;
60
- is_bid: boolean;
61
- fee: string;
62
- submission_idx: string;
63
- appendix: string;
64
- }
65
- /**
66
- * Event from subscribing to a `position_change` stream.
67
- */
68
- interface EngineServerSubscriptionPositionChangeEvent extends EngineServerSubscriptionBaseEvent<'position_change'> {
69
- timestamp: string;
70
- subaccount: string;
71
- amount: string;
72
- /** Zero for everything except perps */
73
- v_quote_amount: string;
74
- reason: PositionChangeReason;
75
- /**
76
- * True if the position change was for an isolated position
77
- */
78
- isolated: boolean;
79
- }
80
- /**
81
- * Event from subscribing to an `order_update` stream.
82
- */
83
- interface EngineServerSubscriptionOrderUpdateEvent extends EngineServerSubscriptionBaseEvent<'order_update'> {
84
- timestamp: string;
85
- digest: string;
86
- amount: string;
87
- reason: OrderUpdateReason;
88
- }
89
- /**
90
- * Event from subscribing to a `liquidation` stream.
91
- */
92
- interface EngineServerSubscriptionLiquidationEvent extends EngineServerSubscriptionBaseEvent<'liquidation'> {
93
- timestamp: string;
94
- /** Single element for regular liquidations, two elements for spread liquidations [spotId, perpId] */
95
- product_ids: number[];
96
- liquidator: string;
97
- liquidatee: string;
98
- /** Amount liquidated (positive for long, negative for short) */
99
- amount: string;
100
- /** Price at which liquidation occurred */
101
- price: string;
102
- }
103
- /**
104
- * Event from subscribing to a `latest_candlestick` stream.
105
- */
106
- interface EngineServerSubscriptionLatestCandlestickEvent extends EngineServerSubscriptionBaseEvent<'latest_candlestick'> {
107
- timestamp: string;
108
- granularity: number;
109
- open_x18: string;
110
- high_x18: string;
111
- low_x18: string;
112
- close_x18: string;
113
- volume: string;
114
- }
115
- /**
116
- * Event from subscribing to a `funding_payment` stream.
117
- */
118
- interface EngineServerSubscriptionFundingPaymentEvent extends EngineServerSubscriptionBaseEvent<'funding_payment'> {
119
- timestamp: string;
120
- /** Funding payment amount (positive = receive, negative = pay) */
121
- payment_amount: string;
122
- /** Open interest at time of funding */
123
- open_interest: string;
124
- /** Current cumulative funding values */
125
- cumulative_funding_long_x18: string;
126
- cumulative_funding_short_x18: string;
127
- /** Time delta over which the funding payment was calculated */
128
- dt: string;
129
- }
130
- /**
131
- * Union type for all engine server subscription events.
132
- */
133
- type EngineServerSubscriptionEvent = EngineServerSubscriptionTradeEvent | EngineServerSubscriptionBestBidOfferEvent | EngineServerSubscriptionBookDepthEvent | EngineServerSubscriptionFillEvent | EngineServerSubscriptionPositionChangeEvent | EngineServerSubscriptionOrderUpdateEvent | EngineServerSubscriptionLiquidationEvent | EngineServerSubscriptionLatestCandlestickEvent | EngineServerSubscriptionFundingPaymentEvent;
134
-
135
- export type { EngineServerSubscriptionBaseEvent, EngineServerSubscriptionBestBidOfferEvent, EngineServerSubscriptionBookDepthEvent, EngineServerSubscriptionEvent, EngineServerSubscriptionEventType, EngineServerSubscriptionFillEvent, EngineServerSubscriptionFundingPaymentEvent, EngineServerSubscriptionLatestCandlestickEvent, EngineServerSubscriptionLiquidationEvent, EngineServerSubscriptionOrderUpdateEvent, EngineServerSubscriptionPositionChangeEvent, EngineServerSubscriptionTradeEvent, OrderUpdateReason, PositionChangeReason };
1
+ import { a as EngineServerSubscriptionEventType, c as EngineServerSubscriptionLatestCandlestickEvent, d as EngineServerSubscriptionPositionChangeEvent, f as EngineServerSubscriptionTradeEvent, i as EngineServerSubscriptionEvent, l as EngineServerSubscriptionLiquidationEvent, m as PositionChangeReason, n as EngineServerSubscriptionBestBidOfferEvent, o as EngineServerSubscriptionFillEvent, p as OrderUpdateReason, r as EngineServerSubscriptionBookDepthEvent, s as EngineServerSubscriptionFundingPaymentEvent, t as EngineServerSubscriptionBaseEvent, u as EngineServerSubscriptionOrderUpdateEvent } from "../serverSubscriptionEventTypes-UCYAjmt7.js";
2
+ export { EngineServerSubscriptionBaseEvent, EngineServerSubscriptionBestBidOfferEvent, EngineServerSubscriptionBookDepthEvent, EngineServerSubscriptionEvent, EngineServerSubscriptionEventType, EngineServerSubscriptionFillEvent, EngineServerSubscriptionFundingPaymentEvent, EngineServerSubscriptionLatestCandlestickEvent, EngineServerSubscriptionLiquidationEvent, EngineServerSubscriptionOrderUpdateEvent, EngineServerSubscriptionPositionChangeEvent, EngineServerSubscriptionTradeEvent, OrderUpdateReason, PositionChangeReason };
@@ -1 +1 @@
1
- //# sourceMappingURL=serverSubscriptionEventTypes.js.map
1
+ export {};
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
-
16
- // src/types/serverSubscriptionTypes.ts
17
- var serverSubscriptionTypes_exports = {};
18
- module.exports = __toCommonJS(serverSubscriptionTypes_exports);
19
- //# sourceMappingURL=serverSubscriptionTypes.cjs.map
@@ -1,80 +1,2 @@
1
- interface EngineServerOrderUpdateStreamParams {
2
- /** when not provided, subscribes to all products */
3
- product_id?: number;
4
- subaccount: string;
5
- }
6
- interface EngineServerTradeStreamParams {
7
- product_id: number;
8
- }
9
- interface EngineServerBestBidOfferStreamParams {
10
- product_id: number;
11
- }
12
- interface EngineServerFillStreamParams {
13
- /** when not provided, subscribes to all products */
14
- product_id?: number;
15
- subaccount: string;
16
- }
17
- interface EngineServerPositionChangeStreamParams {
18
- /** when not provided, subscribes to all products */
19
- product_id?: number;
20
- subaccount: string;
21
- }
22
- interface EngineServerBookDepthStreamParams {
23
- product_id: number;
24
- }
25
- interface EngineServerLatestCandlestickStreamParams {
26
- product_id: number;
27
- granularity: number;
28
- }
29
- interface EngineServerLiquidationStreamParams {
30
- /** when not provided, subscribes to all products */
31
- product_id?: number;
32
- }
33
- interface EngineServerFundingPaymentStreamParams {
34
- product_id: number;
35
- }
36
- /**
37
- * Available subscription streams
38
- */
39
- interface EngineServerSubscriptionStreamParamsByType {
40
- order_update: EngineServerOrderUpdateStreamParams;
41
- trade: EngineServerTradeStreamParams;
42
- best_bid_offer: EngineServerBestBidOfferStreamParams;
43
- fill: EngineServerFillStreamParams;
44
- position_change: EngineServerPositionChangeStreamParams;
45
- book_depth: EngineServerBookDepthStreamParams;
46
- liquidation: EngineServerLiquidationStreamParams;
47
- latest_candlestick: EngineServerLatestCandlestickStreamParams;
48
- funding_payment: EngineServerFundingPaymentStreamParams;
49
- }
50
- type EngineServerSubscriptionStreamParamsType = keyof EngineServerSubscriptionStreamParamsByType;
51
- /**
52
- * Describes a stream that can be subscribed to.
53
- */
54
- type EngineServerSubscriptionStream<TStreamType extends EngineServerSubscriptionStreamParamsType> = {
55
- type: TStreamType;
56
- } & EngineServerSubscriptionStreamParamsByType[TStreamType];
57
- /**
58
- * Params to provide to a `subscribe` / `unsubscribe` action.
59
- */
60
- interface EngineServerSubscriptionParams {
61
- stream: EngineServerSubscriptionStream<EngineServerSubscriptionStreamParamsType>;
62
- }
63
- /**
64
- * Available actions on the subscription API.
65
- */
66
- interface EngineServerSubscriptionRequestByType {
67
- subscribe: EngineServerSubscriptionParams;
68
- unsubscribe: EngineServerSubscriptionParams;
69
- list: Record<string, never>;
70
- }
71
- type EngineServerSubscriptionRequestType = keyof EngineServerSubscriptionRequestByType;
72
- /**
73
- * Top level request to send to the server.
74
- */
75
- type EngineServerSubscriptionRequest<TRequestType extends EngineServerSubscriptionRequestType> = {
76
- id: number;
77
- method: TRequestType;
78
- } & EngineServerSubscriptionRequestByType[TRequestType];
79
-
80
- export type { EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerFillStreamParams, EngineServerFundingPaymentStreamParams, EngineServerLatestCandlestickStreamParams, EngineServerLiquidationStreamParams, EngineServerOrderUpdateStreamParams, EngineServerPositionChangeStreamParams, EngineServerSubscriptionParams, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerTradeStreamParams };
1
+ import { a as EngineServerLatestCandlestickStreamParams, c as EngineServerPositionChangeStreamParams, d as EngineServerSubscriptionRequestByType, f as EngineServerSubscriptionRequestType, g as EngineServerTradeStreamParams, h as EngineServerSubscriptionStreamParamsType, i as EngineServerFundingPaymentStreamParams, l as EngineServerSubscriptionParams, m as EngineServerSubscriptionStreamParamsByType, n as EngineServerBookDepthStreamParams, o as EngineServerLiquidationStreamParams, p as EngineServerSubscriptionStream, r as EngineServerFillStreamParams, s as EngineServerOrderUpdateStreamParams, t as EngineServerBestBidOfferStreamParams, u as EngineServerSubscriptionRequest } from "../serverSubscriptionTypes-BSuYa6z_.cjs";
2
+ export { EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerFillStreamParams, EngineServerFundingPaymentStreamParams, EngineServerLatestCandlestickStreamParams, EngineServerLiquidationStreamParams, EngineServerOrderUpdateStreamParams, EngineServerPositionChangeStreamParams, EngineServerSubscriptionParams, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerTradeStreamParams };
@@ -1,80 +1,2 @@
1
- interface EngineServerOrderUpdateStreamParams {
2
- /** when not provided, subscribes to all products */
3
- product_id?: number;
4
- subaccount: string;
5
- }
6
- interface EngineServerTradeStreamParams {
7
- product_id: number;
8
- }
9
- interface EngineServerBestBidOfferStreamParams {
10
- product_id: number;
11
- }
12
- interface EngineServerFillStreamParams {
13
- /** when not provided, subscribes to all products */
14
- product_id?: number;
15
- subaccount: string;
16
- }
17
- interface EngineServerPositionChangeStreamParams {
18
- /** when not provided, subscribes to all products */
19
- product_id?: number;
20
- subaccount: string;
21
- }
22
- interface EngineServerBookDepthStreamParams {
23
- product_id: number;
24
- }
25
- interface EngineServerLatestCandlestickStreamParams {
26
- product_id: number;
27
- granularity: number;
28
- }
29
- interface EngineServerLiquidationStreamParams {
30
- /** when not provided, subscribes to all products */
31
- product_id?: number;
32
- }
33
- interface EngineServerFundingPaymentStreamParams {
34
- product_id: number;
35
- }
36
- /**
37
- * Available subscription streams
38
- */
39
- interface EngineServerSubscriptionStreamParamsByType {
40
- order_update: EngineServerOrderUpdateStreamParams;
41
- trade: EngineServerTradeStreamParams;
42
- best_bid_offer: EngineServerBestBidOfferStreamParams;
43
- fill: EngineServerFillStreamParams;
44
- position_change: EngineServerPositionChangeStreamParams;
45
- book_depth: EngineServerBookDepthStreamParams;
46
- liquidation: EngineServerLiquidationStreamParams;
47
- latest_candlestick: EngineServerLatestCandlestickStreamParams;
48
- funding_payment: EngineServerFundingPaymentStreamParams;
49
- }
50
- type EngineServerSubscriptionStreamParamsType = keyof EngineServerSubscriptionStreamParamsByType;
51
- /**
52
- * Describes a stream that can be subscribed to.
53
- */
54
- type EngineServerSubscriptionStream<TStreamType extends EngineServerSubscriptionStreamParamsType> = {
55
- type: TStreamType;
56
- } & EngineServerSubscriptionStreamParamsByType[TStreamType];
57
- /**
58
- * Params to provide to a `subscribe` / `unsubscribe` action.
59
- */
60
- interface EngineServerSubscriptionParams {
61
- stream: EngineServerSubscriptionStream<EngineServerSubscriptionStreamParamsType>;
62
- }
63
- /**
64
- * Available actions on the subscription API.
65
- */
66
- interface EngineServerSubscriptionRequestByType {
67
- subscribe: EngineServerSubscriptionParams;
68
- unsubscribe: EngineServerSubscriptionParams;
69
- list: Record<string, never>;
70
- }
71
- type EngineServerSubscriptionRequestType = keyof EngineServerSubscriptionRequestByType;
72
- /**
73
- * Top level request to send to the server.
74
- */
75
- type EngineServerSubscriptionRequest<TRequestType extends EngineServerSubscriptionRequestType> = {
76
- id: number;
77
- method: TRequestType;
78
- } & EngineServerSubscriptionRequestByType[TRequestType];
79
-
80
- export type { EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerFillStreamParams, EngineServerFundingPaymentStreamParams, EngineServerLatestCandlestickStreamParams, EngineServerLiquidationStreamParams, EngineServerOrderUpdateStreamParams, EngineServerPositionChangeStreamParams, EngineServerSubscriptionParams, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerTradeStreamParams };
1
+ import { a as EngineServerLatestCandlestickStreamParams, c as EngineServerPositionChangeStreamParams, d as EngineServerSubscriptionRequestByType, f as EngineServerSubscriptionRequestType, g as EngineServerTradeStreamParams, h as EngineServerSubscriptionStreamParamsType, i as EngineServerFundingPaymentStreamParams, l as EngineServerSubscriptionParams, m as EngineServerSubscriptionStreamParamsByType, n as EngineServerBookDepthStreamParams, o as EngineServerLiquidationStreamParams, p as EngineServerSubscriptionStream, r as EngineServerFillStreamParams, s as EngineServerOrderUpdateStreamParams, t as EngineServerBestBidOfferStreamParams, u as EngineServerSubscriptionRequest } from "../serverSubscriptionTypes-DoMWeKgY.js";
2
+ export { EngineServerBestBidOfferStreamParams, EngineServerBookDepthStreamParams, EngineServerFillStreamParams, EngineServerFundingPaymentStreamParams, EngineServerLatestCandlestickStreamParams, EngineServerLiquidationStreamParams, EngineServerOrderUpdateStreamParams, EngineServerPositionChangeStreamParams, EngineServerSubscriptionParams, EngineServerSubscriptionRequest, EngineServerSubscriptionRequestByType, EngineServerSubscriptionRequestType, EngineServerSubscriptionStream, EngineServerSubscriptionStreamParamsByType, EngineServerSubscriptionStreamParamsType, EngineServerTradeStreamParams };
@@ -1 +1 @@
1
- //# sourceMappingURL=serverSubscriptionTypes.js.map
1
+ export {};
@@ -1,25 +1,14 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
-
17
- // src/utils/index.ts
18
- var utils_exports = {};
19
- module.exports = __toCommonJS(utils_exports);
20
- __reExport(utils_exports, require("./queryDataMappers.cjs"), module.exports);
21
- // Annotate the CommonJS export names for ESM import in node:
22
- 0 && (module.exports = {
23
- ...require("./queryDataMappers.cjs")
24
- });
25
- //# sourceMappingURL=index.cjs.map
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_utils_queryDataMappers = require("./queryDataMappers.cjs");
3
+ exports.mapEngineMarketPrice = require_utils_queryDataMappers.mapEngineMarketPrice;
4
+ exports.mapEngineServerBalanceHealthContributions = require_utils_queryDataMappers.mapEngineServerBalanceHealthContributions;
5
+ exports.mapEngineServerIsolatedPositions = require_utils_queryDataMappers.mapEngineServerIsolatedPositions;
6
+ exports.mapEngineServerNlpLockedBalances = require_utils_queryDataMappers.mapEngineServerNlpLockedBalances;
7
+ exports.mapEngineServerNlpPoolInfo = require_utils_queryDataMappers.mapEngineServerNlpPoolInfo;
8
+ exports.mapEngineServerOrder = require_utils_queryDataMappers.mapEngineServerOrder;
9
+ exports.mapEngineServerPerpProduct = require_utils_queryDataMappers.mapEngineServerPerpProduct;
10
+ exports.mapEngineServerSpotProduct = require_utils_queryDataMappers.mapEngineServerSpotProduct;
11
+ exports.mapEngineServerSymbol = require_utils_queryDataMappers.mapEngineServerSymbol;
12
+ exports.mapEngineServerSymbols = require_utils_queryDataMappers.mapEngineServerSymbols;
13
+ exports.mapEngineServerTickLiquidity = require_utils_queryDataMappers.mapEngineServerTickLiquidity;
14
+ exports.mapSubaccountSummary = require_utils_queryDataMappers.mapSubaccountSummary;
@@ -1,6 +1,2 @@
1
- export { mapEngineMarketPrice, mapEngineServerBalanceHealthContributions, mapEngineServerIsolatedPositions, mapEngineServerNlpLockedBalances, mapEngineServerNlpPoolInfo, mapEngineServerOrder, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbol, mapEngineServerSymbols, mapEngineServerTickLiquidity, mapSubaccountSummary } from './queryDataMappers.cjs';
2
- import '@nadohq/shared';
3
- import '../types/serverQueryTypes.cjs';
4
- import '../types/serverQueryModelTypes.cjs';
5
- import '../types/clientQueryTypes.cjs';
6
- import 'bignumber.js';
1
+ import { a as mapEngineServerNlpPoolInfo, c as mapEngineServerSpotProduct, d as mapEngineServerTickLiquidity, f as mapSubaccountSummary, i as mapEngineServerNlpLockedBalances, l as mapEngineServerSymbol, n as mapEngineServerBalanceHealthContributions, o as mapEngineServerOrder, r as mapEngineServerIsolatedPositions, s as mapEngineServerPerpProduct, t as mapEngineMarketPrice, u as mapEngineServerSymbols } from "../queryDataMappers-DO9yWdLo.cjs";
2
+ export { mapEngineMarketPrice, mapEngineServerBalanceHealthContributions, mapEngineServerIsolatedPositions, mapEngineServerNlpLockedBalances, mapEngineServerNlpPoolInfo, mapEngineServerOrder, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbol, mapEngineServerSymbols, mapEngineServerTickLiquidity, mapSubaccountSummary };
@@ -1,6 +1,2 @@
1
- export { mapEngineMarketPrice, mapEngineServerBalanceHealthContributions, mapEngineServerIsolatedPositions, mapEngineServerNlpLockedBalances, mapEngineServerNlpPoolInfo, mapEngineServerOrder, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbol, mapEngineServerSymbols, mapEngineServerTickLiquidity, mapSubaccountSummary } from './queryDataMappers.js';
2
- import '@nadohq/shared';
3
- import '../types/serverQueryTypes.js';
4
- import '../types/serverQueryModelTypes.js';
5
- import '../types/clientQueryTypes.js';
6
- import 'bignumber.js';
1
+ import { a as mapEngineServerNlpPoolInfo, c as mapEngineServerSpotProduct, d as mapEngineServerTickLiquidity, f as mapSubaccountSummary, i as mapEngineServerNlpLockedBalances, l as mapEngineServerSymbol, n as mapEngineServerBalanceHealthContributions, o as mapEngineServerOrder, r as mapEngineServerIsolatedPositions, s as mapEngineServerPerpProduct, t as mapEngineMarketPrice, u as mapEngineServerSymbols } from "../queryDataMappers-BguxA579.js";
2
+ export { mapEngineMarketPrice, mapEngineServerBalanceHealthContributions, mapEngineServerIsolatedPositions, mapEngineServerNlpLockedBalances, mapEngineServerNlpPoolInfo, mapEngineServerOrder, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbol, mapEngineServerSymbols, mapEngineServerTickLiquidity, mapSubaccountSummary };
@@ -1,3 +1,2 @@
1
- // src/utils/index.ts
2
- export * from "./queryDataMappers.js";
3
- //# sourceMappingURL=index.js.map
1
+ import { mapEngineMarketPrice, mapEngineServerBalanceHealthContributions, mapEngineServerIsolatedPositions, mapEngineServerNlpLockedBalances, mapEngineServerNlpPoolInfo, mapEngineServerOrder, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbol, mapEngineServerSymbols, mapEngineServerTickLiquidity, mapSubaccountSummary } from "./queryDataMappers.js";
2
+ export { mapEngineMarketPrice, mapEngineServerBalanceHealthContributions, mapEngineServerIsolatedPositions, mapEngineServerNlpLockedBalances, mapEngineServerNlpPoolInfo, mapEngineServerOrder, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbol, mapEngineServerSymbols, mapEngineServerTickLiquidity, mapSubaccountSummary };