@nadohq/engine-client 0.20.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{EngineBaseClient-DOOXIhnZ.d.ts → EngineBaseClient-Cn4PMYKt.d.ts} +30 -5
- package/dist/EngineBaseClient-Cn4PMYKt.d.ts.map +1 -0
- package/dist/{EngineBaseClient-L1ue7jBx.d.cts → EngineBaseClient-a2leWTER.d.cts} +30 -5
- package/dist/EngineBaseClient-a2leWTER.d.cts.map +1 -0
- package/dist/{EngineBaseClient-Uc1D8ftx.cjs → EngineBaseClient-zgQmbhJv.cjs} +41 -7
- package/dist/EngineBaseClient-zgQmbhJv.cjs.map +1 -0
- package/dist/EngineBaseClient.cjs +1 -1
- package/dist/EngineBaseClient.d.cts +1 -1
- package/dist/EngineBaseClient.d.ts +1 -1
- package/dist/EngineBaseClient.js +40 -6
- package/dist/EngineBaseClient.js.map +1 -1
- package/dist/EngineClient.cjs +4 -3
- package/dist/EngineClient.cjs.map +1 -1
- package/dist/EngineClient.d.cts +6 -5
- package/dist/EngineClient.d.cts.map +1 -1
- package/dist/EngineClient.d.ts +6 -5
- package/dist/EngineClient.d.ts.map +1 -1
- package/dist/EngineClient.js +3 -2
- package/dist/EngineClient.js.map +1 -1
- package/dist/EngineEdgeQueryClient-B9Y8srJa.d.ts +79 -0
- package/dist/EngineEdgeQueryClient-B9Y8srJa.d.ts.map +1 -0
- package/dist/EngineEdgeQueryClient-CPEDAOd0.d.cts +79 -0
- package/dist/EngineEdgeQueryClient-CPEDAOd0.d.cts.map +1 -0
- package/dist/EngineEdgeQueryClient.cjs +143 -0
- package/dist/EngineEdgeQueryClient.cjs.map +1 -0
- package/dist/EngineEdgeQueryClient.d.cts +2 -0
- package/dist/EngineEdgeQueryClient.d.ts +2 -0
- package/dist/EngineEdgeQueryClient.js +142 -0
- package/dist/EngineEdgeQueryClient.js.map +1 -0
- package/dist/{EngineExecuteBuilder-t8EQ5Rmp.d.ts → EngineExecuteBuilder-BXKoW0uz.d.ts} +2 -2
- package/dist/{EngineExecuteBuilder-t8EQ5Rmp.d.ts.map → EngineExecuteBuilder-BXKoW0uz.d.ts.map} +1 -1
- package/dist/{EngineExecuteBuilder-VLrEndhv.d.cts → EngineExecuteBuilder-BaMHTuf-.d.cts} +2 -2
- package/dist/{EngineExecuteBuilder-VLrEndhv.d.cts.map → EngineExecuteBuilder-BaMHTuf-.d.cts.map} +1 -1
- package/dist/EngineExecuteBuilder.cjs +1 -1
- package/dist/EngineExecuteBuilder.d.cts +1 -1
- package/dist/EngineExecuteBuilder.d.ts +1 -1
- package/dist/{EngineExecuteClient-BGlNK5Le.d.cts → EngineExecuteClient-BLUkw1vR.d.cts} +3 -3
- package/dist/{EngineExecuteClient-BGlNK5Le.d.cts.map → EngineExecuteClient-BLUkw1vR.d.cts.map} +1 -1
- package/dist/{EngineExecuteClient-0EBoXRd7.d.ts → EngineExecuteClient-ReEcySA_.d.ts} +3 -3
- package/dist/{EngineExecuteClient-0EBoXRd7.d.ts.map → EngineExecuteClient-ReEcySA_.d.ts.map} +1 -1
- package/dist/EngineExecuteClient.cjs +1 -1
- package/dist/EngineExecuteClient.d.cts +1 -1
- package/dist/EngineExecuteClient.d.ts +1 -1
- package/dist/{EngineQueryClient-C_7p1oRx.d.cts → EngineQueryClient-Br-BC5LQ.d.cts} +3 -3
- package/dist/{EngineQueryClient-C_7p1oRx.d.cts.map → EngineQueryClient-Br-BC5LQ.d.cts.map} +1 -1
- package/dist/{EngineQueryClient-DQwCRaYl.d.ts → EngineQueryClient-C0xBMTo-.d.ts} +3 -3
- package/dist/{EngineQueryClient-DQwCRaYl.d.ts.map → EngineQueryClient-C0xBMTo-.d.ts.map} +1 -1
- package/dist/EngineQueryClient.cjs +1 -1
- package/dist/EngineQueryClient.d.cts +1 -1
- package/dist/EngineQueryClient.d.ts +1 -1
- package/dist/{EngineWebClient-CEwqgd4t.d.ts → EngineWebClient-KXOdpUol.d.ts} +3 -3
- package/dist/{EngineWebClient-CEwqgd4t.d.ts.map → EngineWebClient-KXOdpUol.d.ts.map} +1 -1
- package/dist/{EngineWebClient-DajZqKAQ.d.cts → EngineWebClient-i8BslipN.d.cts} +3 -3
- package/dist/{EngineWebClient-DajZqKAQ.d.cts.map → EngineWebClient-i8BslipN.d.cts.map} +1 -1
- package/dist/EngineWebClient.cjs +1 -1
- package/dist/EngineWebClient.d.cts +1 -1
- package/dist/EngineWebClient.d.ts +1 -1
- package/dist/{clientQueryTypes-DlTtS_mX.d.cts → clientQueryTypes-BTKfuoGI.d.cts} +39 -2
- package/dist/{clientQueryTypes-DlTtS_mX.d.cts.map → clientQueryTypes-BTKfuoGI.d.cts.map} +1 -1
- package/dist/{clientQueryTypes-DuRgEeBT.d.ts → clientQueryTypes-BaYOTnpm.d.ts} +39 -2
- package/dist/{clientQueryTypes-DuRgEeBT.d.ts.map → clientQueryTypes-BaYOTnpm.d.ts.map} +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +2 -2
- package/dist/{queryDataMappers-BguxA579.d.ts → queryDataMappers-CyUgQn0_.d.ts} +5 -3
- package/dist/{queryDataMappers-DO9yWdLo.d.cts.map → queryDataMappers-CyUgQn0_.d.ts.map} +1 -1
- package/dist/{queryDataMappers-DO9yWdLo.d.cts → queryDataMappers-kC-SPiHX.d.cts} +5 -3
- package/dist/queryDataMappers-kC-SPiHX.d.cts.map +1 -0
- package/dist/serverEdgeQueryTypes-BpMlbsCD.d.cts +100 -0
- package/dist/serverEdgeQueryTypes-BpMlbsCD.d.cts.map +1 -0
- package/dist/serverEdgeQueryTypes-DbSUWFzo.d.ts +100 -0
- package/dist/serverEdgeQueryTypes-DbSUWFzo.d.ts.map +1 -0
- package/dist/{serverSubscriptionEventTypes-CbT2Fx8Y.d.ts → serverSubscriptionEventTypes-Co3utjCs.d.ts} +1 -1
- package/dist/{serverSubscriptionEventTypes-CbT2Fx8Y.d.ts.map → serverSubscriptionEventTypes-Co3utjCs.d.ts.map} +1 -1
- package/dist/{serverSubscriptionEventTypes-UorThoIE.d.cts → serverSubscriptionEventTypes-CpmdNk1G.d.cts} +1 -1
- package/dist/{serverSubscriptionEventTypes-UorThoIE.d.cts.map → serverSubscriptionEventTypes-CpmdNk1G.d.cts.map} +1 -1
- package/dist/{serverSubscriptionTypes-CE6BIS-C.d.cts → serverSubscriptionTypes-BA92bWic.d.cts} +1 -1
- package/dist/{serverSubscriptionTypes-CE6BIS-C.d.cts.map → serverSubscriptionTypes-BA92bWic.d.cts.map} +1 -1
- package/dist/{serverSubscriptionTypes-Cgz-h0ot.d.ts → serverSubscriptionTypes-CEis5IgT.d.ts} +1 -1
- package/dist/{serverSubscriptionTypes-Cgz-h0ot.d.ts.map → serverSubscriptionTypes-CEis5IgT.d.ts.map} +1 -1
- package/dist/types/clientQueryTypes.d.cts +2 -2
- package/dist/types/clientQueryTypes.d.ts +2 -2
- package/dist/types/index.d.cts +5 -4
- package/dist/types/index.d.ts +5 -4
- package/dist/types/serverEdgeQueryTypes.cjs +0 -0
- package/dist/types/serverEdgeQueryTypes.d.cts +2 -0
- package/dist/types/serverEdgeQueryTypes.d.ts +2 -0
- package/dist/types/serverEdgeQueryTypes.js +1 -0
- package/dist/types/serverSubscriptionEventTypes.d.cts +1 -1
- package/dist/types/serverSubscriptionEventTypes.d.ts +1 -1
- package/dist/types/serverSubscriptionTypes.d.cts +1 -1
- package/dist/types/serverSubscriptionTypes.d.ts +1 -1
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.cts +2 -2
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +2 -2
- package/dist/utils/productEngineTypeMappers.cjs +1 -1
- package/dist/utils/queryDataMappers.cjs +14 -1
- package/dist/utils/queryDataMappers.cjs.map +1 -1
- package/dist/utils/queryDataMappers.d.cts +2 -2
- package/dist/utils/queryDataMappers.d.ts +2 -2
- package/dist/utils/queryDataMappers.js +13 -1
- package/dist/utils/queryDataMappers.js.map +1 -1
- package/package.json +3 -3
- package/src/EngineBaseClient.ts +86 -10
- package/src/EngineClient.ts +3 -1
- package/src/EngineEdgeQueryClient.ts +211 -0
- package/src/types/clientQueryTypes.ts +54 -0
- package/src/types/index.ts +1 -0
- package/src/types/serverEdgeQueryTypes.ts +153 -0
- package/src/utils/queryDataMappers.ts +17 -0
- package/dist/EngineBaseClient-DOOXIhnZ.d.ts.map +0 -1
- package/dist/EngineBaseClient-L1ue7jBx.d.cts.map +0 -1
- package/dist/EngineBaseClient-Uc1D8ftx.cjs.map +0 -1
- package/dist/queryDataMappers-BguxA579.d.ts.map +0 -1
- /package/dist/{index-CmCelmEL.d.cts → index-D6CnpA_r.d.cts} +0 -0
- /package/dist/{index-D0E78WnU.d.ts → index-DhI2LvVQ.d.ts} +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { q as EngineServerStatusResponse } from "./serverQueryTypes-Dva9R2tV.cjs";
|
|
2
|
+
import { M as GetEngineMarketPricesResponse, U as GetEngineNlpPoolInfoResponse, _ as GetEngineContractsResponse, b as GetEngineHealthGroupsResponse, c as EnginePingResponse, f as EngineSymbolsResponse, g as GetEngineCachedMarketPricesParams, h as GetEngineCachedBboHistoryResponse, m as GetEngineCachedBboHistoryParams, n as EngineCachedTimeParams, nt as GetEngineSymbolsParams, p as GetEngineAllMarketsResponse, s as EnginePingParams } from "./clientQueryTypes-BTKfuoGI.cjs";
|
|
3
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-a2leWTER.cjs";
|
|
4
|
+
import { MarketWithProduct } from "@nadohq/shared";
|
|
5
|
+
|
|
6
|
+
//#region src/EngineEdgeQueryClient.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* "Edge" queries hit the gateway's in-memory cache via `/edge/query`. They are lower latency
|
|
9
|
+
* than the live {@link EngineQueryClient} queries but eventually consistent — do not use them
|
|
10
|
+
* for order, margin, or settlement decisions.
|
|
11
|
+
*
|
|
12
|
+
* Each `getCached*` method mirrors the data shape of its live counterpart; only the request
|
|
13
|
+
* type and refresh semantics differ.
|
|
14
|
+
*
|
|
15
|
+
* @see https://docs.nado.xyz/developer-resources/api/gateway/edge
|
|
16
|
+
*/
|
|
17
|
+
declare class EngineEdgeQueryClient extends EngineBaseClient {
|
|
18
|
+
/**
|
|
19
|
+
* Cached highest bid / lowest ask per product. Products with no cached best-bid/offer yet are
|
|
20
|
+
* silently omitted, so the returned array may be shorter than `productIds`.
|
|
21
|
+
*
|
|
22
|
+
* @param params Omit `productIds` to return every product currently in the cache
|
|
23
|
+
*/
|
|
24
|
+
getCachedMarketPrices(params?: GetEngineCachedMarketPricesParams): Promise<GetEngineMarketPricesResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* Cached product metadata and trading config (increments, fees, weights, trading status).
|
|
27
|
+
*
|
|
28
|
+
* @param params Optional `productIds` / `productType` filters
|
|
29
|
+
*/
|
|
30
|
+
getCachedSymbols(params?: GetEngineSymbolsParams): Promise<EngineSymbolsResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Cached chain ID and on-chain contract addresses for the current chain. Always available: if
|
|
33
|
+
* the cache is cold the gateway falls back to its live contract config.
|
|
34
|
+
*/
|
|
35
|
+
getCachedContracts(): Promise<GetEngineContractsResponse>;
|
|
36
|
+
/**
|
|
37
|
+
* Cached engine status (e.g. `active`, `syncing`). Refreshed every 500ms.
|
|
38
|
+
*/
|
|
39
|
+
getCachedStatus(): Promise<EngineServerStatusResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Cached full config, risk, and on-chain state for every spot and perp product.
|
|
42
|
+
*/
|
|
43
|
+
getCachedAllMarkets(): Promise<GetEngineAllMarketsResponse>;
|
|
44
|
+
/**
|
|
45
|
+
* Cached all products grouped per edge market, keyed by chain ID.
|
|
46
|
+
*/
|
|
47
|
+
getCachedEdgeAllMarkets(): Promise<Record<number, MarketWithProduct[]>>;
|
|
48
|
+
/**
|
|
49
|
+
* Cached spot/perp product pairings used for health grouping.
|
|
50
|
+
*/
|
|
51
|
+
getCachedHealthGroups(): Promise<GetEngineHealthGroupsResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Cached NLP pool information. Refreshed every 5s.
|
|
54
|
+
*/
|
|
55
|
+
getCachedNlpPoolInfo(): Promise<GetEngineNlpPoolInfoResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* A rolling, down-samplable time series of best-bid/offer snapshots per product. The gateway
|
|
58
|
+
* samples the live price cache every 500ms and retains up to 30 minutes of history per product.
|
|
59
|
+
*
|
|
60
|
+
* @param params
|
|
61
|
+
*/
|
|
62
|
+
getCachedBboHistory(params?: GetEngineCachedBboHistoryParams): Promise<GetEngineCachedBboHistoryResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Latency / clock-sync helper. Echoes `clientTime` back alongside the server time so the caller
|
|
65
|
+
* can measure round-trip latency and clock offset in one call.
|
|
66
|
+
*
|
|
67
|
+
* @param params
|
|
68
|
+
*/
|
|
69
|
+
ping(params?: EnginePingParams): Promise<EnginePingResponse>;
|
|
70
|
+
/**
|
|
71
|
+
* Returns the current server time (epoch ms) from the gateway clock.
|
|
72
|
+
*
|
|
73
|
+
* @param params
|
|
74
|
+
*/
|
|
75
|
+
getEdgeControlTime(params?: EngineCachedTimeParams): Promise<number>;
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { EngineEdgeQueryClient as t };
|
|
79
|
+
//# sourceMappingURL=EngineEdgeQueryClient-CPEDAOd0.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EngineEdgeQueryClient-CPEDAOd0.d.cts","names":[],"sources":["../src/src/EngineEdgeQueryClient.ts"],"mappings":";;;;;;;;;;AAsCA;;;;;;cAAa,qBAAA,SAA8B,gBAAA;EAyB9B;;;;;;EAlBL,qBAAA,CACJ,MAAA,GAAQ,iCAAA,GACP,OAAA,CAAQ,6BAAA;EAiDkB;;;;;EAnCvB,gBAAA,CACJ,MAAA,GAAQ,sBAAA,GACP,OAAA,CAAQ,qBAAA;EAyF2B;;;;EA1EhC,kBAAA,CAAA,GAAsB,OAAA,CAAQ,0BAAA;EAuGjB;;;EA5Fb,eAAA,CAAA,GAAmB,OAAA,CAAQ,0BAAA;EAmH9B;;;EA5GG,mBAAA,CAAA,GAAuB,OAAA,CAAQ,2BAAA;EA1DI;;;EA2EnC,uBAAA,CAAA,GAA2B,OAAA,CAC/B,MAAA,SAAe,iBAAA;EAnEd;;;EAyFG,qBAAA,CAAA,GAAyB,OAAA,CAAQ,6BAAA;EA1ErC;;;EA0FI,oBAAA,CAAA,GAAwB,OAAA,CAAQ,4BAAA;EA1EV;;;;;;EAqFtB,mBAAA,CACJ,MAAA,GAAQ,+BAAA,GACP,OAAA,CAAQ,iCAAA;EArE0B;;;;;;EAqF/B,IAAA,CAAK,MAAA,GAAQ,gBAAA,GAAwB,OAAA,CAAQ,kBAAA;EA7CZ;;;;;EAkEjC,kBAAA,CACJ,MAAA,GAAQ,sBAAA,GACP,OAAA;AAAA"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_EngineBaseClient = require("./EngineBaseClient-zgQmbhJv.cjs");
|
|
3
|
+
const require_utils_productEngineTypeMappers = require("./utils/productEngineTypeMappers.cjs");
|
|
4
|
+
const require_utils_queryDataMappers = require("./utils/queryDataMappers.cjs");
|
|
5
|
+
let _nadohq_shared = require("@nadohq/shared");
|
|
6
|
+
//#region src/EngineEdgeQueryClient.ts
|
|
7
|
+
/**
|
|
8
|
+
* "Edge" queries hit the gateway's in-memory cache via `/edge/query`. They are lower latency
|
|
9
|
+
* than the live {@link EngineQueryClient} queries but eventually consistent — do not use them
|
|
10
|
+
* for order, margin, or settlement decisions.
|
|
11
|
+
*
|
|
12
|
+
* Each `getCached*` method mirrors the data shape of its live counterpart; only the request
|
|
13
|
+
* type and refresh semantics differ.
|
|
14
|
+
*
|
|
15
|
+
* @see https://docs.nado.xyz/developer-resources/api/gateway/edge
|
|
16
|
+
*/
|
|
17
|
+
var EngineEdgeQueryClient = class extends require_EngineBaseClient.EngineBaseClient {
|
|
18
|
+
/**
|
|
19
|
+
* Cached highest bid / lowest ask per product. Products with no cached best-bid/offer yet are
|
|
20
|
+
* silently omitted, so the returned array may be shorter than `productIds`.
|
|
21
|
+
*
|
|
22
|
+
* @param params Omit `productIds` to return every product currently in the cache
|
|
23
|
+
*/
|
|
24
|
+
async getCachedMarketPrices(params = {}) {
|
|
25
|
+
return { marketPrices: (await this.edgeQuery("cached_prices", { product_ids: params.productIds })).market_prices.map(require_utils_queryDataMappers.mapEngineMarketPrice) };
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Cached product metadata and trading config (increments, fees, weights, trading status).
|
|
29
|
+
*
|
|
30
|
+
* @param params Optional `productIds` / `productType` filters
|
|
31
|
+
*/
|
|
32
|
+
async getCachedSymbols(params = {}) {
|
|
33
|
+
return require_utils_queryDataMappers.mapEngineServerSymbols(await this.edgeQuery("cached_symbols", {
|
|
34
|
+
product_ids: params.productIds,
|
|
35
|
+
product_type: params.productType != null ? require_utils_productEngineTypeMappers.mapProductEngineType(params.productType) : void 0
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Cached chain ID and on-chain contract addresses for the current chain. Always available: if
|
|
40
|
+
* the cache is cold the gateway falls back to its live contract config.
|
|
41
|
+
*/
|
|
42
|
+
async getCachedContracts() {
|
|
43
|
+
const baseResponse = await this.edgeQuery("cached_contracts", {});
|
|
44
|
+
return {
|
|
45
|
+
chainId: Number(baseResponse.chain_id),
|
|
46
|
+
endpointAddr: baseResponse.endpoint_addr
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Cached engine status (e.g. `active`, `syncing`). Refreshed every 500ms.
|
|
51
|
+
*/
|
|
52
|
+
async getCachedStatus() {
|
|
53
|
+
return this.edgeQuery("cached_status", {});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Cached full config, risk, and on-chain state for every spot and perp product.
|
|
57
|
+
*/
|
|
58
|
+
async getCachedAllMarkets() {
|
|
59
|
+
const markets = [];
|
|
60
|
+
const baseResponse = await this.edgeQuery("cached_all_products", {});
|
|
61
|
+
baseResponse.spot_products.forEach((spotProduct) => {
|
|
62
|
+
markets.push(require_utils_queryDataMappers.mapEngineServerSpotProduct(spotProduct));
|
|
63
|
+
});
|
|
64
|
+
baseResponse.perp_products.forEach((perpProduct) => {
|
|
65
|
+
markets.push(require_utils_queryDataMappers.mapEngineServerPerpProduct(perpProduct));
|
|
66
|
+
});
|
|
67
|
+
return markets;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Cached all products grouped per edge market, keyed by chain ID.
|
|
71
|
+
*/
|
|
72
|
+
async getCachedEdgeAllMarkets() {
|
|
73
|
+
return (0, _nadohq_shared.mapValues)((await this.edgeQuery("cached_edge_all_products", {})).edge_all_products, (allProducts) => {
|
|
74
|
+
const markets = [];
|
|
75
|
+
allProducts.spot_products.forEach((spotProduct) => {
|
|
76
|
+
markets.push(require_utils_queryDataMappers.mapEngineServerSpotProduct(spotProduct));
|
|
77
|
+
});
|
|
78
|
+
allProducts.perp_products.forEach((perpProduct) => {
|
|
79
|
+
markets.push(require_utils_queryDataMappers.mapEngineServerPerpProduct(perpProduct));
|
|
80
|
+
});
|
|
81
|
+
return markets;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Cached spot/perp product pairings used for health grouping.
|
|
86
|
+
*/
|
|
87
|
+
async getCachedHealthGroups() {
|
|
88
|
+
return { healthGroups: (await this.edgeQuery("cached_health_groups", {})).health_groups.map(([spotProductId, perpProductId]) => ({
|
|
89
|
+
spotProductId,
|
|
90
|
+
perpProductId
|
|
91
|
+
})) };
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Cached NLP pool information. Refreshed every 5s.
|
|
95
|
+
*/
|
|
96
|
+
async getCachedNlpPoolInfo() {
|
|
97
|
+
return require_utils_queryDataMappers.mapEngineServerNlpPoolInfo(await this.edgeQuery("cached_nlp_pool_info", {}));
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* A rolling, down-samplable time series of best-bid/offer snapshots per product. The gateway
|
|
101
|
+
* samples the live price cache every 500ms and retains up to 30 minutes of history per product.
|
|
102
|
+
*
|
|
103
|
+
* @param params
|
|
104
|
+
*/
|
|
105
|
+
async getCachedBboHistory(params = {}) {
|
|
106
|
+
return require_utils_queryDataMappers.mapEngineBboHistory(await this.edgeQuery("cached_bbo_history", {
|
|
107
|
+
product_ids: params.productIds,
|
|
108
|
+
interval_ms: params.intervalMs,
|
|
109
|
+
max_time_ms: params.maxTimeMs,
|
|
110
|
+
limit: params.limit
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Latency / clock-sync helper. Echoes `clientTime` back alongside the server time so the caller
|
|
115
|
+
* can measure round-trip latency and clock offset in one call.
|
|
116
|
+
*
|
|
117
|
+
* @param params
|
|
118
|
+
*/
|
|
119
|
+
async ping(params = {}) {
|
|
120
|
+
const baseResponse = await this.edgeControlQuery("ping", {
|
|
121
|
+
id: params.id,
|
|
122
|
+
client_time: params.clientTime != null ? String(params.clientTime) : void 0
|
|
123
|
+
});
|
|
124
|
+
return {
|
|
125
|
+
id: baseResponse.id,
|
|
126
|
+
serverTime: Number(baseResponse.server_time),
|
|
127
|
+
clientTime: baseResponse.client_time != null ? Number(baseResponse.client_time) : void 0
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Returns the current server time (epoch ms) from the gateway clock.
|
|
132
|
+
*
|
|
133
|
+
* @param params
|
|
134
|
+
*/
|
|
135
|
+
async getEdgeControlTime(params = {}) {
|
|
136
|
+
const baseResponse = await this.edgeControlQuery("time", { id: params.id });
|
|
137
|
+
return Number(baseResponse.server_time);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
//#endregion
|
|
141
|
+
exports.EngineEdgeQueryClient = EngineEdgeQueryClient;
|
|
142
|
+
|
|
143
|
+
//# sourceMappingURL=EngineEdgeQueryClient.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EngineEdgeQueryClient.cjs","names":["EngineBaseClient","mapEngineMarketPrice","mapEngineServerSymbols","mapProductEngineType","mapEngineServerSpotProduct","mapEngineServerPerpProduct","mapEngineServerNlpPoolInfo","mapEngineBboHistory"],"sources":["../src/EngineEdgeQueryClient.ts"],"sourcesContent":["import { mapValues, MarketWithProduct } from '@nadohq/shared';\nimport { EngineBaseClient } from './EngineBaseClient';\nimport {\n EngineCachedTimeParams,\n EnginePingParams,\n EnginePingResponse,\n EngineServerStatusResponse,\n EngineSymbolsResponse,\n GetEngineAllMarketsResponse,\n GetEngineCachedBboHistoryParams,\n GetEngineCachedBboHistoryResponse,\n GetEngineCachedMarketPricesParams,\n GetEngineContractsResponse,\n GetEngineHealthGroupsResponse,\n GetEngineMarketPricesResponse,\n GetEngineNlpPoolInfoResponse,\n GetEngineSymbolsParams,\n} from './types';\nimport { mapProductEngineType } from './utils/productEngineTypeMappers';\nimport {\n mapEngineBboHistory,\n mapEngineMarketPrice,\n mapEngineServerNlpPoolInfo,\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n mapEngineServerSymbols,\n} from './utils/queryDataMappers';\n\n/**\n * \"Edge\" queries hit the gateway's in-memory cache via `/edge/query`. They are lower latency\n * than the live {@link EngineQueryClient} queries but eventually consistent — do not use them\n * for order, margin, or settlement decisions.\n *\n * Each `getCached*` method mirrors the data shape of its live counterpart; only the request\n * type and refresh semantics differ.\n *\n * @see https://docs.nado.xyz/developer-resources/api/gateway/edge\n */\nexport class EngineEdgeQueryClient extends EngineBaseClient {\n /**\n * Cached highest bid / lowest ask per product. Products with no cached best-bid/offer yet are\n * silently omitted, so the returned array may be shorter than `productIds`.\n *\n * @param params Omit `productIds` to return every product currently in the cache\n */\n async getCachedMarketPrices(\n params: GetEngineCachedMarketPricesParams = {},\n ): Promise<GetEngineMarketPricesResponse> {\n const baseResponse = await this.edgeQuery('cached_prices', {\n product_ids: params.productIds,\n });\n return {\n marketPrices: baseResponse.market_prices.map(mapEngineMarketPrice),\n };\n }\n\n /**\n * Cached product metadata and trading config (increments, fees, weights, trading status).\n *\n * @param params Optional `productIds` / `productType` filters\n */\n async getCachedSymbols(\n params: GetEngineSymbolsParams = {},\n ): Promise<EngineSymbolsResponse> {\n const baseResponse = await this.edgeQuery('cached_symbols', {\n product_ids: params.productIds,\n product_type:\n params.productType != null\n ? mapProductEngineType(params.productType)\n : undefined,\n });\n return mapEngineServerSymbols(baseResponse);\n }\n\n /**\n * Cached chain ID and on-chain contract addresses for the current chain. Always available: if\n * the cache is cold the gateway falls back to its live contract config.\n */\n async getCachedContracts(): Promise<GetEngineContractsResponse> {\n const baseResponse = await this.edgeQuery('cached_contracts', {});\n return {\n chainId: Number(baseResponse.chain_id),\n endpointAddr: baseResponse.endpoint_addr,\n };\n }\n\n /**\n * Cached engine status (e.g. `active`, `syncing`). Refreshed every 500ms.\n */\n async getCachedStatus(): Promise<EngineServerStatusResponse> {\n return this.edgeQuery('cached_status', {});\n }\n\n /**\n * Cached full config, risk, and on-chain state for every spot and perp product.\n */\n async getCachedAllMarkets(): Promise<GetEngineAllMarketsResponse> {\n const markets: MarketWithProduct[] = [];\n\n const baseResponse = await this.edgeQuery('cached_all_products', {});\n baseResponse.spot_products.forEach((spotProduct) => {\n markets.push(mapEngineServerSpotProduct(spotProduct));\n });\n baseResponse.perp_products.forEach((perpProduct) => {\n markets.push(mapEngineServerPerpProduct(perpProduct));\n });\n\n return markets;\n }\n\n /**\n * Cached all products grouped per edge market, keyed by chain ID.\n */\n async getCachedEdgeAllMarkets(): Promise<\n Record<number, MarketWithProduct[]>\n > {\n const baseResponse = await this.edgeQuery('cached_edge_all_products', {});\n\n return mapValues(baseResponse.edge_all_products, (allProducts) => {\n const markets: MarketWithProduct[] = [];\n\n allProducts.spot_products.forEach((spotProduct) => {\n markets.push(mapEngineServerSpotProduct(spotProduct));\n });\n\n allProducts.perp_products.forEach((perpProduct) => {\n markets.push(mapEngineServerPerpProduct(perpProduct));\n });\n\n return markets;\n });\n }\n\n /**\n * Cached spot/perp product pairings used for health grouping.\n */\n async getCachedHealthGroups(): Promise<GetEngineHealthGroupsResponse> {\n const baseResponse = await this.edgeQuery('cached_health_groups', {});\n\n return {\n healthGroups: baseResponse.health_groups.map(\n ([spotProductId, perpProductId]) => ({\n spotProductId,\n perpProductId,\n }),\n ),\n };\n }\n\n /**\n * Cached NLP pool information. Refreshed every 5s.\n */\n async getCachedNlpPoolInfo(): Promise<GetEngineNlpPoolInfoResponse> {\n const baseResponse = await this.edgeQuery('cached_nlp_pool_info', {});\n return mapEngineServerNlpPoolInfo(baseResponse);\n }\n\n /**\n * A rolling, down-samplable time series of best-bid/offer snapshots per product. The gateway\n * samples the live price cache every 500ms and retains up to 30 minutes of history per product.\n *\n * @param params\n */\n async getCachedBboHistory(\n params: GetEngineCachedBboHistoryParams = {},\n ): Promise<GetEngineCachedBboHistoryResponse> {\n const baseResponse = await this.edgeQuery('cached_bbo_history', {\n product_ids: params.productIds,\n interval_ms: params.intervalMs,\n max_time_ms: params.maxTimeMs,\n limit: params.limit,\n });\n return mapEngineBboHistory(baseResponse);\n }\n\n /**\n * Latency / clock-sync helper. Echoes `clientTime` back alongside the server time so the caller\n * can measure round-trip latency and clock offset in one call.\n *\n * @param params\n */\n async ping(params: EnginePingParams = {}): Promise<EnginePingResponse> {\n const baseResponse = await this.edgeControlQuery('ping', {\n id: params.id,\n client_time:\n params.clientTime != null ? String(params.clientTime) : undefined,\n });\n return {\n id: baseResponse.id,\n serverTime: Number(baseResponse.server_time),\n clientTime:\n baseResponse.client_time != null\n ? Number(baseResponse.client_time)\n : undefined,\n };\n }\n\n /**\n * Returns the current server time (epoch ms) from the gateway clock.\n *\n * @param params\n */\n async getEdgeControlTime(\n params: EngineCachedTimeParams = {},\n ): Promise<number> {\n const baseResponse = await this.edgeControlQuery('time', {\n id: params.id,\n });\n return Number(baseResponse.server_time);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAsCA,IAAa,wBAAb,cAA2CA,yBAAAA,iBAAiB;;;;;;;CAO1D,MAAM,sBACJ,SAA4C,CAAC,GACL;EAIxC,OAAO,EACL,eAAc,MAJW,KAAK,UAAU,iBAAiB,EACzD,aAAa,OAAO,WACtB,CAAC,GAE4B,cAAc,IAAIC,+BAAAA,oBAAoB,EACnE;CACF;;;;;;CAOA,MAAM,iBACJ,SAAiC,CAAC,GACF;EAQhC,OAAOC,+BAAAA,uBAAuB,MAPH,KAAK,UAAU,kBAAkB;GAC1D,aAAa,OAAO;GACpB,cACE,OAAO,eAAe,OAClBC,uCAAAA,qBAAqB,OAAO,WAAW,IACvC,KAAA;EACR,CAAC,CACyC;CAC5C;;;;;CAMA,MAAM,qBAA0D;EAC9D,MAAM,eAAe,MAAM,KAAK,UAAU,oBAAoB,CAAC,CAAC;EAChE,OAAO;GACL,SAAS,OAAO,aAAa,QAAQ;GACrC,cAAc,aAAa;EAC7B;CACF;;;;CAKA,MAAM,kBAAuD;EAC3D,OAAO,KAAK,UAAU,iBAAiB,CAAC,CAAC;CAC3C;;;;CAKA,MAAM,sBAA4D;EAChE,MAAM,UAA+B,CAAC;EAEtC,MAAM,eAAe,MAAM,KAAK,UAAU,uBAAuB,CAAC,CAAC;EACnE,aAAa,cAAc,SAAS,gBAAgB;GAClD,QAAQ,KAAKC,+BAAAA,2BAA2B,WAAW,CAAC;EACtD,CAAC;EACD,aAAa,cAAc,SAAS,gBAAgB;GAClD,QAAQ,KAAKC,+BAAAA,2BAA2B,WAAW,CAAC;EACtD,CAAC;EAED,OAAO;CACT;;;;CAKA,MAAM,0BAEJ;EAGA,QAAA,GAAA,eAAA,YAAiB,MAFU,KAAK,UAAU,4BAA4B,CAAC,CAAC,GAE1C,o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Client } from "./EngineBaseClient.js";
|
|
2
|
+
import { mapProductEngineType } from "./utils/productEngineTypeMappers.js";
|
|
3
|
+
import { mapEngineBboHistory, mapEngineMarketPrice, mapEngineServerNlpPoolInfo, mapEngineServerPerpProduct, mapEngineServerSpotProduct, mapEngineServerSymbols } from "./utils/queryDataMappers.js";
|
|
4
|
+
import { mapValues } from "@nadohq/shared";
|
|
5
|
+
//#region src/EngineEdgeQueryClient.ts
|
|
6
|
+
/**
|
|
7
|
+
* "Edge" queries hit the gateway's in-memory cache via `/edge/query`. They are lower latency
|
|
8
|
+
* than the live {@link EngineQueryClient} queries but eventually consistent — do not use them
|
|
9
|
+
* for order, margin, or settlement decisions.
|
|
10
|
+
*
|
|
11
|
+
* Each `getCached*` method mirrors the data shape of its live counterpart; only the request
|
|
12
|
+
* type and refresh semantics differ.
|
|
13
|
+
*
|
|
14
|
+
* @see https://docs.nado.xyz/developer-resources/api/gateway/edge
|
|
15
|
+
*/
|
|
16
|
+
var EngineEdgeQueryClient = class extends EngineBaseClient {
|
|
17
|
+
/**
|
|
18
|
+
* Cached highest bid / lowest ask per product. Products with no cached best-bid/offer yet are
|
|
19
|
+
* silently omitted, so the returned array may be shorter than `productIds`.
|
|
20
|
+
*
|
|
21
|
+
* @param params Omit `productIds` to return every product currently in the cache
|
|
22
|
+
*/
|
|
23
|
+
async getCachedMarketPrices(params = {}) {
|
|
24
|
+
return { marketPrices: (await this.edgeQuery("cached_prices", { product_ids: params.productIds })).market_prices.map(mapEngineMarketPrice) };
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Cached product metadata and trading config (increments, fees, weights, trading status).
|
|
28
|
+
*
|
|
29
|
+
* @param params Optional `productIds` / `productType` filters
|
|
30
|
+
*/
|
|
31
|
+
async getCachedSymbols(params = {}) {
|
|
32
|
+
return mapEngineServerSymbols(await this.edgeQuery("cached_symbols", {
|
|
33
|
+
product_ids: params.productIds,
|
|
34
|
+
product_type: params.productType != null ? mapProductEngineType(params.productType) : void 0
|
|
35
|
+
}));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Cached chain ID and on-chain contract addresses for the current chain. Always available: if
|
|
39
|
+
* the cache is cold the gateway falls back to its live contract config.
|
|
40
|
+
*/
|
|
41
|
+
async getCachedContracts() {
|
|
42
|
+
const baseResponse = await this.edgeQuery("cached_contracts", {});
|
|
43
|
+
return {
|
|
44
|
+
chainId: Number(baseResponse.chain_id),
|
|
45
|
+
endpointAddr: baseResponse.endpoint_addr
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Cached engine status (e.g. `active`, `syncing`). Refreshed every 500ms.
|
|
50
|
+
*/
|
|
51
|
+
async getCachedStatus() {
|
|
52
|
+
return this.edgeQuery("cached_status", {});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Cached full config, risk, and on-chain state for every spot and perp product.
|
|
56
|
+
*/
|
|
57
|
+
async getCachedAllMarkets() {
|
|
58
|
+
const markets = [];
|
|
59
|
+
const baseResponse = await this.edgeQuery("cached_all_products", {});
|
|
60
|
+
baseResponse.spot_products.forEach((spotProduct) => {
|
|
61
|
+
markets.push(mapEngineServerSpotProduct(spotProduct));
|
|
62
|
+
});
|
|
63
|
+
baseResponse.perp_products.forEach((perpProduct) => {
|
|
64
|
+
markets.push(mapEngineServerPerpProduct(perpProduct));
|
|
65
|
+
});
|
|
66
|
+
return markets;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Cached all products grouped per edge market, keyed by chain ID.
|
|
70
|
+
*/
|
|
71
|
+
async getCachedEdgeAllMarkets() {
|
|
72
|
+
return mapValues((await this.edgeQuery("cached_edge_all_products", {})).edge_all_products, (allProducts) => {
|
|
73
|
+
const markets = [];
|
|
74
|
+
allProducts.spot_products.forEach((spotProduct) => {
|
|
75
|
+
markets.push(mapEngineServerSpotProduct(spotProduct));
|
|
76
|
+
});
|
|
77
|
+
allProducts.perp_products.forEach((perpProduct) => {
|
|
78
|
+
markets.push(mapEngineServerPerpProduct(perpProduct));
|
|
79
|
+
});
|
|
80
|
+
return markets;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Cached spot/perp product pairings used for health grouping.
|
|
85
|
+
*/
|
|
86
|
+
async getCachedHealthGroups() {
|
|
87
|
+
return { healthGroups: (await this.edgeQuery("cached_health_groups", {})).health_groups.map(([spotProductId, perpProductId]) => ({
|
|
88
|
+
spotProductId,
|
|
89
|
+
perpProductId
|
|
90
|
+
})) };
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Cached NLP pool information. Refreshed every 5s.
|
|
94
|
+
*/
|
|
95
|
+
async getCachedNlpPoolInfo() {
|
|
96
|
+
return mapEngineServerNlpPoolInfo(await this.edgeQuery("cached_nlp_pool_info", {}));
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* A rolling, down-samplable time series of best-bid/offer snapshots per product. The gateway
|
|
100
|
+
* samples the live price cache every 500ms and retains up to 30 minutes of history per product.
|
|
101
|
+
*
|
|
102
|
+
* @param params
|
|
103
|
+
*/
|
|
104
|
+
async getCachedBboHistory(params = {}) {
|
|
105
|
+
return mapEngineBboHistory(await this.edgeQuery("cached_bbo_history", {
|
|
106
|
+
product_ids: params.productIds,
|
|
107
|
+
interval_ms: params.intervalMs,
|
|
108
|
+
max_time_ms: params.maxTimeMs,
|
|
109
|
+
limit: params.limit
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Latency / clock-sync helper. Echoes `clientTime` back alongside the server time so the caller
|
|
114
|
+
* can measure round-trip latency and clock offset in one call.
|
|
115
|
+
*
|
|
116
|
+
* @param params
|
|
117
|
+
*/
|
|
118
|
+
async ping(params = {}) {
|
|
119
|
+
const baseResponse = await this.edgeControlQuery("ping", {
|
|
120
|
+
id: params.id,
|
|
121
|
+
client_time: params.clientTime != null ? String(params.clientTime) : void 0
|
|
122
|
+
});
|
|
123
|
+
return {
|
|
124
|
+
id: baseResponse.id,
|
|
125
|
+
serverTime: Number(baseResponse.server_time),
|
|
126
|
+
clientTime: baseResponse.client_time != null ? Number(baseResponse.client_time) : void 0
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Returns the current server time (epoch ms) from the gateway clock.
|
|
131
|
+
*
|
|
132
|
+
* @param params
|
|
133
|
+
*/
|
|
134
|
+
async getEdgeControlTime(params = {}) {
|
|
135
|
+
const baseResponse = await this.edgeControlQuery("time", { id: params.id });
|
|
136
|
+
return Number(baseResponse.server_time);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
//#endregion
|
|
140
|
+
export { EngineEdgeQueryClient };
|
|
141
|
+
|
|
142
|
+
//# sourceMappingURL=EngineEdgeQueryClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EngineEdgeQueryClient.js","names":[],"sources":["../src/EngineEdgeQueryClient.ts"],"sourcesContent":["import { mapValues, MarketWithProduct } from '@nadohq/shared';\nimport { EngineBaseClient } from './EngineBaseClient';\nimport {\n EngineCachedTimeParams,\n EnginePingParams,\n EnginePingResponse,\n EngineServerStatusResponse,\n EngineSymbolsResponse,\n GetEngineAllMarketsResponse,\n GetEngineCachedBboHistoryParams,\n GetEngineCachedBboHistoryResponse,\n GetEngineCachedMarketPricesParams,\n GetEngineContractsResponse,\n GetEngineHealthGroupsResponse,\n GetEngineMarketPricesResponse,\n GetEngineNlpPoolInfoResponse,\n GetEngineSymbolsParams,\n} from './types';\nimport { mapProductEngineType } from './utils/productEngineTypeMappers';\nimport {\n mapEngineBboHistory,\n mapEngineMarketPrice,\n mapEngineServerNlpPoolInfo,\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n mapEngineServerSymbols,\n} from './utils/queryDataMappers';\n\n/**\n * \"Edge\" queries hit the gateway's in-memory cache via `/edge/query`. They are lower latency\n * than the live {@link EngineQueryClient} queries but eventually consistent — do not use them\n * for order, margin, or settlement decisions.\n *\n * Each `getCached*` method mirrors the data shape of its live counterpart; only the request\n * type and refresh semantics differ.\n *\n * @see https://docs.nado.xyz/developer-resources/api/gateway/edge\n */\nexport class EngineEdgeQueryClient extends EngineBaseClient {\n /**\n * Cached highest bid / lowest ask per product. Products with no cached best-bid/offer yet are\n * silently omitted, so the returned array may be shorter than `productIds`.\n *\n * @param params Omit `productIds` to return every product currently in the cache\n */\n async getCachedMarketPrices(\n params: GetEngineCachedMarketPricesParams = {},\n ): Promise<GetEngineMarketPricesResponse> {\n const baseResponse = await this.edgeQuery('cached_prices', {\n product_ids: params.productIds,\n });\n return {\n marketPrices: baseResponse.market_prices.map(mapEngineMarketPrice),\n };\n }\n\n /**\n * Cached product metadata and trading config (increments, fees, weights, trading status).\n *\n * @param params Optional `productIds` / `productType` filters\n */\n async getCachedSymbols(\n params: GetEngineSymbolsParams = {},\n ): Promise<EngineSymbolsResponse> {\n const baseResponse = await this.edgeQuery('cached_symbols', {\n product_ids: params.productIds,\n product_type:\n params.productType != null\n ? mapProductEngineType(params.productType)\n : undefined,\n });\n return mapEngineServerSymbols(baseResponse);\n }\n\n /**\n * Cached chain ID and on-chain contract addresses for the current chain. Always available: if\n * the cache is cold the gateway falls back to its live contract config.\n */\n async getCachedContracts(): Promise<GetEngineContractsResponse> {\n const baseResponse = await this.edgeQuery('cached_contracts', {});\n return {\n chainId: Number(baseResponse.chain_id),\n endpointAddr: baseResponse.endpoint_addr,\n };\n }\n\n /**\n * Cached engine status (e.g. `active`, `syncing`). Refreshed every 500ms.\n */\n async getCachedStatus(): Promise<EngineServerStatusResponse> {\n return this.edgeQuery('cached_status', {});\n }\n\n /**\n * Cached full config, risk, and on-chain state for every spot and perp product.\n */\n async getCachedAllMarkets(): Promise<GetEngineAllMarketsResponse> {\n const markets: MarketWithProduct[] = [];\n\n const baseResponse = await this.edgeQuery('cached_all_products', {});\n baseResponse.spot_products.forEach((spotProduct) => {\n markets.push(mapEngineServerSpotProduct(spotProduct));\n });\n baseResponse.perp_products.forEach((perpProduct) => {\n markets.push(mapEngineServerPerpProduct(perpProduct));\n });\n\n return markets;\n }\n\n /**\n * Cached all products grouped per edge market, keyed by chain ID.\n */\n async getCachedEdgeAllMarkets(): Promise<\n Record<number, MarketWithProduct[]>\n > {\n const baseResponse = await this.edgeQuery('cached_edge_all_products', {});\n\n return mapValues(baseResponse.edge_all_products, (allProducts) => {\n const markets: MarketWithProduct[] = [];\n\n allProducts.spot_products.forEach((spotProduct) => {\n markets.push(mapEngineServerSpotProduct(spotProduct));\n });\n\n allProducts.perp_products.forEach((perpProduct) => {\n markets.push(mapEngineServerPerpProduct(perpProduct));\n });\n\n return markets;\n });\n }\n\n /**\n * Cached spot/perp product pairings used for health grouping.\n */\n async getCachedHealthGroups(): Promise<GetEngineHealthGroupsResponse> {\n const baseResponse = await this.edgeQuery('cached_health_groups', {});\n\n return {\n healthGroups: baseResponse.health_groups.map(\n ([spotProductId, perpProductId]) => ({\n spotProductId,\n perpProductId,\n }),\n ),\n };\n }\n\n /**\n * Cached NLP pool information. Refreshed every 5s.\n */\n async getCachedNlpPoolInfo(): Promise<GetEngineNlpPoolInfoResponse> {\n const baseResponse = await this.edgeQuery('cached_nlp_pool_info', {});\n return mapEngineServerNlpPoolInfo(baseResponse);\n }\n\n /**\n * A rolling, down-samplable time series of best-bid/offer snapshots per product. The gateway\n * samples the live price cache every 500ms and retains up to 30 minutes of history per product.\n *\n * @param params\n */\n async getCachedBboHistory(\n params: GetEngineCachedBboHistoryParams = {},\n ): Promise<GetEngineCachedBboHistoryResponse> {\n const baseResponse = await this.edgeQuery('cached_bbo_history', {\n product_ids: params.productIds,\n interval_ms: params.intervalMs,\n max_time_ms: params.maxTimeMs,\n limit: params.limit,\n });\n return mapEngineBboHistory(baseResponse);\n }\n\n /**\n * Latency / clock-sync helper. Echoes `clientTime` back alongside the server time so the caller\n * can measure round-trip latency and clock offset in one call.\n *\n * @param params\n */\n async ping(params: EnginePingParams = {}): Promise<EnginePingResponse> {\n const baseResponse = await this.edgeControlQuery('ping', {\n id: params.id,\n client_time:\n params.clientTime != null ? String(params.clientTime) : undefined,\n });\n return {\n id: baseResponse.id,\n serverTime: Number(baseResponse.server_time),\n clientTime:\n baseResponse.client_time != null\n ? Number(baseResponse.client_time)\n : undefined,\n };\n }\n\n /**\n * Returns the current server time (epoch ms) from the gateway clock.\n *\n * @param params\n */\n async getEdgeControlTime(\n params: EngineCachedTimeParams = {},\n ): Promise<number> {\n const baseResponse = await this.edgeControlQuery('time', {\n id: params.id,\n });\n return Number(baseResponse.server_time);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsCA,IAAa,wBAAb,cAA2C,iBAAiB;;;;;;;CAO1D,MAAM,sBACJ,SAA4C,CAAC,GACL;EAIxC,OAAO,EACL,eAAc,MAJW,KAAK,UAAU,iBAAiB,EACzD,aAAa,OAAO,WACtB,CAAC,GAE4B,cAAc,IAAI,oBAAoB,EACnE;CACF;;;;;;CAOA,MAAM,iBACJ,SAAiC,CAAC,GACF;EAQhC,OAAO,uBAAuB,MAPH,KAAK,UAAU,kBAAkB;GAC1D,aAAa,OAAO;GACpB,cACE,OAAO,eAAe,OAClB,qBAAqB,OAAO,WAAW,IACvC,KAAA;EACR,CAAC,CACyC;CAC5C;;;;;CAMA,MAAM,qBAA0D;EAC9D,MAAM,eAAe,MAAM,KAAK,UAAU,oBAAoB,CAAC,CAAC;EAChE,OAAO;GACL,SAAS,OAAO,aAAa,QAAQ;GACrC,cAAc,aAAa;EAC7B;CACF;;;;CAKA,MAAM,kBAAuD;EAC3D,OAAO,KAAK,UAAU,iBAAiB,CAAC,CAAC;CAC3C;;;;CAKA,MAAM,sBAA4D;EAChE,MAAM,UAA+B,CAAC;EAEtC,MAAM,eAAe,MAAM,KAAK,UAAU,uBAAuB,CAAC,CAAC;EACnE,aAAa,cAAc,SAAS,gBAAgB;GAClD,QAAQ,KAAK,2BAA2B,WAAW,CAAC;EACtD,CAAC;EACD,aAAa,cAAc,SAAS,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QAAQ,EACvD,IAAI,OAAO,GACb,CAAC;EACD,OAAO,OAAO,aAAa,WAAW;CACxC;AACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as EngineServerExecuteRequestByType, i as EngineServerExecutePlaceOrderPayload } from "./serverExecuteTypes-CgbHjnWM.js";
|
|
2
2
|
import { _ as WithSignature, a as EngineExecuteRequestParamsByType, g as WithBaseEngineExecuteParams, h as SignatureParams } from "./clientExecuteTypes-CJ08_c4q.js";
|
|
3
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
3
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-Cn4PMYKt.js";
|
|
4
4
|
import { EIP712OrderParams, SignableRequestType, SignableRequestTypeToParams } from "@nadohq/shared";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineExecuteBuilder.d.ts
|
|
@@ -102,4 +102,4 @@ declare class EngineExecuteBuilder {
|
|
|
102
102
|
}
|
|
103
103
|
//#endregion
|
|
104
104
|
export { EngineExecuteBuilder as t };
|
|
105
|
-
//# sourceMappingURL=EngineExecuteBuilder-
|
|
105
|
+
//# sourceMappingURL=EngineExecuteBuilder-BXKoW0uz.d.ts.map
|
package/dist/{EngineExecuteBuilder-t8EQ5Rmp.d.ts.map → EngineExecuteBuilder-BXKoW0uz.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineExecuteBuilder-
|
|
1
|
+
{"version":3,"file":"EngineExecuteBuilder-BXKoW0uz.d.ts","names":[],"sources":["../src/src/EngineExecuteBuilder.ts"],"mappings":";;;;;;;;;;AAuBA;cAAa,oBAAA;EAAA,SACF,YAAA,EAAc,gBAAA;cAEX,YAAA,EAAc,gBAAA;EAAA;;;;;EASpB,+BAAA,CACJ,YAAA,EAAc,gCAAA,2BACb,OAAA,CAAQ,gCAAA;EAuBR;;;;;EAFG,8BAAA,CACJ,YAAA,EAAc,gCAAA,0BACb,OAAA,CAAQ,gCAAA;EAiDK;;;;;;E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ExecuteRequestParamsByType, g as WithBaseEngineExecuteParams, h as SignatureParams } from "./clientExecuteTypes-BlJOgCL_.cjs";
|
|
3
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
3
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-a2leWTER.cjs";
|
|
4
4
|
import { EIP712OrderParams, SignableRequestType, SignableRequestTypeToParams } from "@nadohq/shared";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineExecuteBuilder.d.ts
|
|
@@ -102,4 +102,4 @@ declare class EngineExecuteBuilder {
|
|
|
102
102
|
}
|
|
103
103
|
//#endregion
|
|
104
104
|
export { EngineExecuteBuilder as t };
|
|
105
|
-
//# sourceMappingURL=EngineExecuteBuilder-
|
|
105
|
+
//# sourceMappingURL=EngineExecuteBuilder-BaMHTuf-.d.cts.map
|
package/dist/{EngineExecuteBuilder-VLrEndhv.d.cts.map → EngineExecuteBuilder-BaMHTuf-.d.cts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineExecuteBuilder-
|
|
1
|
+
{"version":3,"file":"EngineExecuteBuilder-BaMHTuf-.d.cts","names":[],"sources":["../src/src/EngineExecuteBuilder.ts"],"mappings":";;;;;;;;;;AAuBA;cAAa,oBAAA;EAAA,SACF,YAAA,EAAc,gBAAA;cAEX,YAAA,EAAc,gBAAA;EAAA;;;;;EASpB,+BAAA,CACJ,YAAA,EAAc,gCAAA,2BACb,OAAA,CAAQ,gCAAA;EAuBR;;;;;EAFG,8BAAA,CACJ,YAAA,EAAc,gCAAA,0BACb,OAAA,CAAQ,gCAAA;EAiDK;;;;;;EA1BV,sBAAA,CACJ,YAAA,EAAc,gCAAA,kBACb,OAAA,CAAQ,oCAAA;EA2ER;;;;;;EApDH,0BAAA,CACE,YAAA,EAAc,aAAA,CACZ,gCAAA;IACE,KAAA,EAAO,iBAAA;EAAA,KAGV,oCAAA;EAiHA;;;;;EAzFG,uBAAA,CACJ,YAAA,EAAc,gCAAA,mBACb,OAAA,CAAQ,gCAAA;EAsIR;;;;;;EApHG,wBAAA,CACJ,YAAA,EAAc,gCAAA,oBACb,OAAA,CAAQ,gCAAA;EA4J0B;;;;;;EAxIrC,4BAAA,CACE,YAAA,EAAc,aAAA,CACZ,gCAAA;IAAsD,KAAA;EAAA,KAEvD,gCAAA;EAhKoB;;;;;EAiLjB,+BAAA,CACJ,YAAA,EAAc,gCAAA,4BACb,OAAA,CAAQ,gCAAA;EAvKT;;;;;;EA6LI,sBAAA,CACJ,YAAA,EAAc,gCAAA,kBACb,OAAA,CAAQ,gCAAA;EAvKA;;;;;;EA6LL,yBAAA,CACJ,YAAA,EAAc,gCAAA,qBACb,OAAA,CAAQ,gCAAA;EA9IK;;;;;EAmKV,mBAAA,CACJ,YAAA,EAAc,gCAAA,eACb,OAAA,CAAQ,gCAAA;EAxIL;;;;;EA8JA,mBAAA,CACJ,YAAA,EAAc,gCAAA,eACb,OAAA,CAAQ,gCAAA;EAAA,UAgBK,oBAAA,WAA+B,mBAAA,CAAA,CAC7C,WAAA,EAAa,CAAA,EACb,eAAA,EAAiB,eAAA,GAAkB,2BAAA,CAA4B,CAAA,IAAE,OAAA;EAAA,UAcnD,kBAAA,CACd,MAAA,EAAQ,2BAAA;IAA8B,eAAA;EAAA,KAA0B,OAAA;EAAA,UAQxD,qBAAA,CACR,MAAA,EAAQ,2BAAA;AAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-
|
|
1
|
+
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-BaMHTuf-.cjs";
|
|
2
2
|
export { EngineExecuteBuilder };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-
|
|
1
|
+
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-BXKoW0uz.js";
|
|
2
2
|
export { EngineExecuteBuilder };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as EngineServerExecuteSuccessResult } from "./serverExecuteTypes-DejTR8Is.cjs";
|
|
2
2
|
import { a as EngineExecuteRequestParamsByType, d as EnginePlaceOrderResult } from "./clientExecuteTypes-BlJOgCL_.cjs";
|
|
3
|
-
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-
|
|
4
|
-
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-
|
|
3
|
+
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-a2leWTER.cjs";
|
|
4
|
+
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-BaMHTuf-.cjs";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineExecuteClient.d.ts
|
|
7
7
|
declare class EngineExecuteClient extends EngineBaseClient {
|
|
@@ -21,4 +21,4 @@ declare class EngineExecuteClient extends EngineBaseClient {
|
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
23
|
export { EngineExecuteClient as t };
|
|
24
|
-
//# sourceMappingURL=EngineExecuteClient-
|
|
24
|
+
//# sourceMappingURL=EngineExecuteClient-BLUkw1vR.d.cts.map
|
package/dist/{EngineExecuteClient-BGlNK5Le.d.cts.map → EngineExecuteClient-BLUkw1vR.d.cts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineExecuteClient-
|
|
1
|
+
{"version":3,"file":"EngineExecuteClient-BLUkw1vR.d.cts","names":[],"sources":["../src/src/EngineExecuteClient.ts"],"mappings":";;;;;;cAQa,mBAAA,SAA4B,gBAAA;EAAA,SAC9B,cAAA,EAAgB,oBAAA;cAEb,IAAA,EAAM,gBAAA;EAKZ,mBAAA,CACJ,MAAA,EAAQ,gCAAA,2BAAwD,OAAA,CAAxB,gCAAA;EAQpC,kBAAA,CACJ,MAAA,EAAQ,gCAAA,0BAAuD,OAAA,CAAvB,gCAAA;EAQpC,UAAA,CACJ,MAAA,EAAQ,gCAAA,kBACP,OAAA,CAAQ,sBAAA;EASL,WAAA,CAAY,MAAA,EAAQ,gCAAA,mBAAgD,OAAA,CAAhB,gCAAA;EAOpD,YAAA,CACJ,MAAA,EAAQ,gCAAA,oBAAiD,OAAA,CAAjB,gCAAA;EAQpC,cAAA,CACJ,MAAA,EAAQ,gCAAA,uBAAoD,OAAA,CAApB,gCAAA;EAkBpC,mBAAA,CACJ,MAAA,EAAQ,gCAAA,4BAAyD,OAAA,CAAzB,gCAAA;EAQpC,UAAA,CAAW,MAAA,EAAQ,gCAAA,kBAA+C,OAAA,CAAf,gCAAA;EAOnD,aAAA,CACJ,MAAA,EAAQ,gCAAA,qBAAkD,OAAA,CAAlB,gCAAA;EAQpC,OAAA,CAAQ,MAAA,EAAQ,gCAAA,eAA4C,OAAA,CAAZ,gCAAA;EAOhD,OAAA,CAAQ,MAAA,EAAQ,gCAAA,eAA4C,OAAA,CAAZ,gCAAA;AAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as EngineServerExecuteSuccessResult } from "./serverExecuteTypes-CgbHjnWM.js";
|
|
2
2
|
import { a as EngineExecuteRequestParamsByType, d as EnginePlaceOrderResult } from "./clientExecuteTypes-CJ08_c4q.js";
|
|
3
|
-
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-
|
|
4
|
-
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-
|
|
3
|
+
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-Cn4PMYKt.js";
|
|
4
|
+
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-BXKoW0uz.js";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineExecuteClient.d.ts
|
|
7
7
|
declare class EngineExecuteClient extends EngineBaseClient {
|
|
@@ -21,4 +21,4 @@ declare class EngineExecuteClient extends EngineBaseClient {
|
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
23
23
|
export { EngineExecuteClient as t };
|
|
24
|
-
//# sourceMappingURL=EngineExecuteClient-
|
|
24
|
+
//# sourceMappingURL=EngineExecuteClient-ReEcySA_.d.ts.map
|
package/dist/{EngineExecuteClient-0EBoXRd7.d.ts.map → EngineExecuteClient-ReEcySA_.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineExecuteClient-
|
|
1
|
+
{"version":3,"file":"EngineExecuteClient-ReEcySA_.d.ts","names":[],"sources":["../src/src/EngineExecuteClient.ts"],"mappings":";;;;;;cAQa,mBAAA,SAA4B,gBAAA;EAAA,SAC9B,cAAA,EAAgB,oBAAA;cAEb,IAAA,EAAM,gBAAA;EAKZ,mBAAA,CACJ,MAAA,EAAQ,gCAAA,2BAAwD,OAAA,CAAxB,gCAAA;EAQpC,kBAAA,CACJ,MAAA,EAAQ,gCAAA,0BAAuD,OAAA,CAAvB,gCAAA;EAQpC,UAAA,CACJ,MAAA,EAAQ,gCAAA,kBACP,OAAA,CAAQ,sBAAA;EASL,WAAA,CAAY,MAAA,EAAQ,gCAAA,mBAAgD,OAAA,CAAhB,gCAAA;EAOpD,YAAA,CACJ,MAAA,EAAQ,gCAAA,oBAAiD,OAAA,CAAjB,gCAAA;EAQpC,cAAA,CACJ,MAAA,EAAQ,gCAAA,uBAAoD,OAAA,CAApB,gCAAA;EAkBpC,mBAAA,CACJ,MAAA,EAAQ,gCAAA,4BAAyD,OAAA,CAAzB,gCAAA;EAQpC,UAAA,CAAW,MAAA,EAAQ,gCAAA,kBAA+C,OAAA,CAAf,gCAAA;EAOnD,aAAA,CACJ,MAAA,EAAQ,gCAAA,qBAAkD,OAAA,CAAlB,gCAAA;EAQpC,OAAA,CAAQ,MAAA,EAAQ,gCAAA,eAA4C,OAAA,CAAZ,gCAAA;EAOhD,OAAA,CAAQ,MAAA,EAAQ,gCAAA,eAA4C,OAAA,CAAZ,gCAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_EngineBaseClient = require("./EngineBaseClient-
|
|
2
|
+
const require_EngineBaseClient = require("./EngineBaseClient-zgQmbhJv.cjs");
|
|
3
3
|
const require_EngineExecuteBuilder = require("./EngineExecuteBuilder.cjs");
|
|
4
4
|
let _nadohq_shared = require("@nadohq/shared");
|
|
5
5
|
//#region src/EngineExecuteClient.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineExecuteClient } from "./EngineExecuteClient-
|
|
1
|
+
import { t as EngineExecuteClient } from "./EngineExecuteClient-BLUkw1vR.cjs";
|
|
2
2
|
export { EngineExecuteClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineExecuteClient } from "./EngineExecuteClient-
|
|
1
|
+
import { t as EngineExecuteClient } from "./EngineExecuteClient-ReEcySA_.js";
|
|
2
2
|
export { EngineExecuteClient };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { q as EngineServerStatusResponse } from "./serverQueryTypes-Dva9R2tV.cjs";
|
|
2
|
-
import { A as
|
|
3
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
2
|
+
import { $ as GetEngineSubaccountProductOrdersResponse, A as GetEngineMarketPriceResponse, B as GetEngineMaxWithdrawableResponse, C as GetEngineIsolatedPositionsParams, D as GetEngineMarketLiquidityParams, E as GetEngineLinkedSignerResponse, F as GetEngineMaxMintNlpAmountParams, H as GetEngineNlpLockedBalancesResponse, I as GetEngineMaxMintNlpAmountResponse, J as GetEngineSubaccountFeeRatesParams, K as GetEngineOrderParams, L as GetEngineMaxOrderSizeParams, M as GetEngineMarketPricesResponse, N as GetEngineMaxBurnNlpAmountParams, O as GetEngineMarketLiquidityResponse, P as GetEngineMaxBurnNlpAmountResponse, Q as GetEngineSubaccountProductOrdersParams, R as GetEngineMaxOrderSizeResponse, T as GetEngineLinkedSignerParams, U as GetEngineNlpPoolInfoResponse, V as GetEngineNlpLockedBalancesParams, X as GetEngineSubaccountOrdersParams, Y as GetEngineSubaccountFeeRatesResponse, Z as GetEngineSubaccountOrdersResponse, _ as GetEngineContractsResponse, b as GetEngineHealthGroupsResponse, dt as ValidateEngineOrderResponse, et as GetEngineSubaccountSummaryParams, f as EngineSymbolsResponse, ft as ValidateSignedEngineOrderParams, j as GetEngineMarketPricesParams, k as GetEngineMarketPriceParams, nt as GetEngineSymbolsParams, p as GetEngineAllMarketsResponse, q as GetEngineOrderResponse, tt as GetEngineSubaccountSummaryResponse, ut as ValidateEngineOrderParams, w as GetEngineIsolatedPositionsResponse, x as GetEngineInsuranceResponse, y as GetEngineEstimatedSubaccountSummaryParams, z as GetEngineMaxWithdrawableParams } from "./clientQueryTypes-BTKfuoGI.cjs";
|
|
3
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-a2leWTER.cjs";
|
|
4
4
|
import { MarketWithProduct } from "@nadohq/shared";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineQueryClient.d.ts
|
|
@@ -144,4 +144,4 @@ declare class EngineQueryClient extends EngineBaseClient {
|
|
|
144
144
|
}
|
|
145
145
|
//#endregion
|
|
146
146
|
export { EngineQueryClient as t };
|
|
147
|
-
//# sourceMappingURL=EngineQueryClient-
|
|
147
|
+
//# sourceMappingURL=EngineQueryClient-Br-BC5LQ.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineQueryClient-
|
|
1
|
+
{"version":3,"file":"EngineQueryClient-Br-BC5LQ.d.cts","names":[],"sources":["../src/src/EngineQueryClient.ts"],"mappings":";;;;;;cAyEa,iBAAA,SAA0B,gBAAA;;;;EAI/B,YAAA,CAAA,GAAgB,OAAA,CAAQ,0BAAA;EAJD;;;EAevB,SAAA,CAAA,GAAa,OAAA,CAAQ,0BAAA;EAAA;;;;;;EAUrB,oBAAA,CACJ,MAAA,EAAQ,gCAAA,GACP,OAAA,CAAQ,kCAAA;EAmBR;;;;;EAFG,oBAAA,CACJ,MAAA,EAAQ,gCAAA,GACP,OAAA,CAAQ,kCAAA;EAgER;;;;;EA/CG,6BAAA,CACJ,MAAA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AA;EAlTY;;;;;EAoUjB,mBAAA,CACJ,MAAA,EAAQ,+BAAA,GACP,OAAA,CAAQ,iCAAA;EAhSL;;;;;EAgTO,eAAA,CACX,MAAA,EAAQ,2BAAA,GACP,OAAA,CAAQ,6BAAA;EA5RR;;;;EA6SU,YAAA,CAAA,GAAgB,OAAA,CAAQ,0BAAA;EA7RlC;;;;;EAwSG,oBAAA,CACJ,MAAA,EAAQ,gCAAA,GACP,OAAA,CAAQ,kCAAA;EAnRA;;;EAiSL,cAAA,CAAA,GAAkB,OAAA,CAAQ,4BAAA;AAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { q as EngineServerStatusResponse } from "./serverQueryTypes-B3vC8vxT.js";
|
|
2
|
-
import { A as
|
|
3
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
2
|
+
import { $ as GetEngineSubaccountProductOrdersResponse, A as GetEngineMarketPriceResponse, B as GetEngineMaxWithdrawableResponse, C as GetEngineIsolatedPositionsParams, D as GetEngineMarketLiquidityParams, E as GetEngineLinkedSignerResponse, F as GetEngineMaxMintNlpAmountParams, H as GetEngineNlpLockedBalancesResponse, I as GetEngineMaxMintNlpAmountResponse, J as GetEngineSubaccountFeeRatesParams, K as GetEngineOrderParams, L as GetEngineMaxOrderSizeParams, M as GetEngineMarketPricesResponse, N as GetEngineMaxBurnNlpAmountParams, O as GetEngineMarketLiquidityResponse, P as GetEngineMaxBurnNlpAmountResponse, Q as GetEngineSubaccountProductOrdersParams, R as GetEngineMaxOrderSizeResponse, T as GetEngineLinkedSignerParams, U as GetEngineNlpPoolInfoResponse, V as GetEngineNlpLockedBalancesParams, X as GetEngineSubaccountOrdersParams, Y as GetEngineSubaccountFeeRatesResponse, Z as GetEngineSubaccountOrdersResponse, _ as GetEngineContractsResponse, b as GetEngineHealthGroupsResponse, dt as ValidateEngineOrderResponse, et as GetEngineSubaccountSummaryParams, f as EngineSymbolsResponse, ft as ValidateSignedEngineOrderParams, j as GetEngineMarketPricesParams, k as GetEngineMarketPriceParams, nt as GetEngineSymbolsParams, p as GetEngineAllMarketsResponse, q as GetEngineOrderResponse, tt as GetEngineSubaccountSummaryResponse, ut as ValidateEngineOrderParams, w as GetEngineIsolatedPositionsResponse, x as GetEngineInsuranceResponse, y as GetEngineEstimatedSubaccountSummaryParams, z as GetEngineMaxWithdrawableParams } from "./clientQueryTypes-BaYOTnpm.js";
|
|
3
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-Cn4PMYKt.js";
|
|
4
4
|
import { MarketWithProduct } from "@nadohq/shared";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineQueryClient.d.ts
|
|
@@ -144,4 +144,4 @@ declare class EngineQueryClient extends EngineBaseClient {
|
|
|
144
144
|
}
|
|
145
145
|
//#endregion
|
|
146
146
|
export { EngineQueryClient as t };
|
|
147
|
-
//# sourceMappingURL=EngineQueryClient-
|
|
147
|
+
//# sourceMappingURL=EngineQueryClient-C0xBMTo-.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineQueryClient-
|
|
1
|
+
{"version":3,"file":"EngineQueryClient-C0xBMTo-.d.ts","names":[],"sources":["../src/src/EngineQueryClient.ts"],"mappings":";;;;;;cAyEa,iBAAA,SAA0B,gBAAA;;;;EAI/B,YAAA,CAAA,GAAgB,OAAA,CAAQ,0BAAA;EAJD;;;EAevB,SAAA,CAAA,GAAa,OAAA,CAAQ,0BAAA;EAAA;;;;;;EAUrB,oBAAA,CACJ,MAAA,EAAQ,gCAAA,GACP,OAAA,CAAQ,kCAAA;EAmBR;;;;;EAFG,oBAAA,CACJ,MAAA,EAAQ,gCAAA,GACP,OAAA,CAAQ,kCAAA;EAgER;;;;;EA/CG,6BAAA,CACJ,MAAA,EAAQ,yCAAA,GACP,OAAA,CAAQ,kCAAA;EAiGsB;;;;;EAtD3B,UAAA,CACJ,MAAA,EAAQ,sBAAA,GACP,OAAA,CAAQ,qBAAA;EA0FA;;;EA5EL,aAAA,CAAA,G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