@nadohq/engine-client 0.53.0 → 0.55.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.
- package/dist/{EngineBaseClient-Cxc6BZIi.d.cts → EngineBaseClient-CRw2Oq6b.d.cts} +5 -5
- package/dist/{EngineBaseClient-Cxc6BZIi.d.cts.map → EngineBaseClient-CRw2Oq6b.d.cts.map} +1 -1
- package/dist/{EngineBaseClient-CjoiEm02.d.ts → EngineBaseClient-CluoONVm.d.ts} +5 -5
- package/dist/{EngineBaseClient-CjoiEm02.d.ts.map → EngineBaseClient-CluoONVm.d.ts.map} +1 -1
- package/dist/EngineBaseClient.d.cts +1 -1
- package/dist/EngineBaseClient.d.ts +1 -1
- package/dist/EngineClient.d.cts +4 -4
- package/dist/EngineClient.d.ts +4 -4
- package/dist/{EngineEdgeQueryClient-Bq_XjCl7.d.cts → EngineEdgeQueryClient-Bu5QvTD2.d.cts} +4 -4
- package/dist/{EngineEdgeQueryClient-Bq_XjCl7.d.cts.map → EngineEdgeQueryClient-Bu5QvTD2.d.cts.map} +1 -1
- package/dist/{EngineEdgeQueryClient-CGPNiYNf.d.ts → EngineEdgeQueryClient-CzoSgrG_.d.ts} +4 -4
- package/dist/{EngineEdgeQueryClient-CGPNiYNf.d.ts.map → EngineEdgeQueryClient-CzoSgrG_.d.ts.map} +1 -1
- package/dist/EngineEdgeQueryClient.d.cts +1 -1
- package/dist/EngineEdgeQueryClient.d.ts +1 -1
- package/dist/{EngineExecuteBuilder-ySU-JZWq.d.cts → EngineExecuteBuilder--zGhBm89.d.cts} +4 -4
- package/dist/{EngineExecuteBuilder-ySU-JZWq.d.cts.map → EngineExecuteBuilder--zGhBm89.d.cts.map} +1 -1
- package/dist/{EngineExecuteBuilder-CJE3bMf2.d.ts → EngineExecuteBuilder-Df-wtiCL.d.ts} +4 -4
- package/dist/{EngineExecuteBuilder-CJE3bMf2.d.ts.map → EngineExecuteBuilder-Df-wtiCL.d.ts.map} +1 -1
- package/dist/EngineExecuteBuilder.d.cts +1 -1
- package/dist/EngineExecuteBuilder.d.ts +1 -1
- package/dist/{EngineExecuteClient-Dc-nshM9.d.ts → EngineExecuteClient-Bgy4Sdxm.d.ts} +5 -5
- package/dist/{EngineExecuteClient-Dc-nshM9.d.ts.map → EngineExecuteClient-Bgy4Sdxm.d.ts.map} +1 -1
- package/dist/{EngineExecuteClient-DG_pj7dE.d.cts → EngineExecuteClient-Bs7JROLa.d.cts} +5 -5
- package/dist/{EngineExecuteClient-DG_pj7dE.d.cts.map → EngineExecuteClient-Bs7JROLa.d.cts.map} +1 -1
- package/dist/EngineExecuteClient.d.cts +1 -1
- package/dist/EngineExecuteClient.d.ts +1 -1
- package/dist/{EngineQueryClient-CyLOXvEQ.d.ts → EngineQueryClient-BgFEpsv8.d.cts} +7 -15
- package/dist/EngineQueryClient-BgFEpsv8.d.cts.map +1 -0
- package/dist/{EngineQueryClient-Bb_dQxl9.d.cts → EngineQueryClient-DN3nc5u1.d.ts} +7 -15
- package/dist/EngineQueryClient-DN3nc5u1.d.ts.map +1 -0
- package/dist/EngineQueryClient.cjs +14 -5
- package/dist/EngineQueryClient.cjs.map +1 -1
- package/dist/EngineQueryClient.d.cts +1 -1
- package/dist/EngineQueryClient.d.ts +1 -1
- package/dist/EngineQueryClient.js +14 -5
- package/dist/EngineQueryClient.js.map +1 -1
- package/dist/{EngineServerFailureError-DmeIkcaO.d.ts → EngineServerFailureError-CdVixTCJ.d.ts} +3 -3
- package/dist/{EngineServerFailureError-DmeIkcaO.d.ts.map → EngineServerFailureError-CdVixTCJ.d.ts.map} +1 -1
- package/dist/{EngineServerFailureError-D6FhNLZ1.d.cts → EngineServerFailureError-Rxb1C9Ng.d.cts} +3 -3
- package/dist/{EngineServerFailureError-D6FhNLZ1.d.cts.map → EngineServerFailureError-Rxb1C9Ng.d.cts.map} +1 -1
- package/dist/{EngineWebClient-sirYCWks.d.cts → EngineWebClient-DsfsPm8h.d.cts} +3 -3
- package/dist/{EngineWebClient-sirYCWks.d.cts.map → EngineWebClient-DsfsPm8h.d.cts.map} +1 -1
- package/dist/{EngineWebClient-5TyQwF9e.d.ts → EngineWebClient-lr41B5ZT.d.ts} +3 -3
- package/dist/{EngineWebClient-5TyQwF9e.d.ts.map → EngineWebClient-lr41B5ZT.d.ts.map} +1 -1
- package/dist/EngineWebClient.d.cts +1 -1
- package/dist/EngineWebClient.d.ts +1 -1
- package/dist/{clientExecuteTypes-fh0QGFm3.d.ts → clientExecuteTypes-6S0AH47Q.d.ts} +2 -2
- package/dist/{clientExecuteTypes-fh0QGFm3.d.ts.map → clientExecuteTypes-6S0AH47Q.d.ts.map} +1 -1
- package/dist/{clientExecuteTypes-DdTonPFz.d.cts → clientExecuteTypes-By-lvAzV.d.cts} +2 -2
- package/dist/{clientExecuteTypes-DdTonPFz.d.cts.map → clientExecuteTypes-By-lvAzV.d.cts.map} +1 -1
- package/dist/{clientQueryTypes-BRmW-hwV.d.ts → clientQueryTypes-CEPCGqDx.d.cts} +16 -14
- package/dist/{clientQueryTypes-86sEMdWH.d.cts.map → clientQueryTypes-CEPCGqDx.d.cts.map} +1 -1
- package/dist/{clientQueryTypes-86sEMdWH.d.cts → clientQueryTypes-DWpgABZh.d.ts} +16 -14
- package/dist/{clientQueryTypes-BRmW-hwV.d.ts.map → clientQueryTypes-DWpgABZh.d.ts.map} +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/{queryDataMappers-DwyNNcWZ.d.ts → queryDataMappers-BiQsKN08.d.ts} +4 -4
- package/dist/{queryDataMappers-DwyNNcWZ.d.ts.map → queryDataMappers-BiQsKN08.d.ts.map} +1 -1
- package/dist/{queryDataMappers-Dv41azb7.d.cts → queryDataMappers-DoQGipeY.d.cts} +4 -4
- package/dist/{queryDataMappers-Dv41azb7.d.cts.map → queryDataMappers-DoQGipeY.d.cts.map} +1 -1
- package/dist/{serverEdgeQueryTypes-BuVoqyAf.d.ts → serverEdgeQueryTypes-B4NU8dQ5.d.ts} +2 -2
- package/dist/{serverEdgeQueryTypes-BuVoqyAf.d.ts.map → serverEdgeQueryTypes-B4NU8dQ5.d.ts.map} +1 -1
- package/dist/{serverEdgeQueryTypes-BaMFzyz8.d.cts → serverEdgeQueryTypes-CIjW7fOw.d.cts} +2 -2
- package/dist/{serverEdgeQueryTypes-BaMFzyz8.d.cts.map → serverEdgeQueryTypes-CIjW7fOw.d.cts.map} +1 -1
- package/dist/{serverExecuteTypes-DMNnEFf7.d.ts → serverExecuteTypes-B8nz4BGu.d.ts} +2 -2
- package/dist/{serverExecuteTypes-DMNnEFf7.d.ts.map → serverExecuteTypes-B8nz4BGu.d.ts.map} +1 -1
- package/dist/{serverExecuteTypes-B5TGnwV0.d.cts → serverExecuteTypes-DzPLzxDt.d.cts} +2 -2
- package/dist/{serverExecuteTypes-B5TGnwV0.d.cts.map → serverExecuteTypes-DzPLzxDt.d.cts.map} +1 -1
- package/dist/{serverQueryTypes-B310vOgF.d.ts → serverQueryTypes-CUC8fyd-.d.ts} +7 -1
- package/dist/serverQueryTypes-CUC8fyd-.d.ts.map +1 -0
- package/dist/{serverQueryTypes-Z9L5CzzX.d.cts → serverQueryTypes-Gygk40jK.d.cts} +7 -1
- package/dist/serverQueryTypes-Gygk40jK.d.cts.map +1 -0
- package/dist/{serverSubscriptionEventTypes-C3X3GUTW.d.ts → serverSubscriptionEventTypes-CQUE2i55.d.ts} +2 -2
- package/dist/{serverSubscriptionEventTypes-C3X3GUTW.d.ts.map → serverSubscriptionEventTypes-CQUE2i55.d.ts.map} +1 -1
- package/dist/{serverSubscriptionEventTypes-D4PkREoN.d.cts → serverSubscriptionEventTypes-DmwkAEwZ.d.cts} +2 -2
- package/dist/{serverSubscriptionEventTypes-D4PkREoN.d.cts.map → serverSubscriptionEventTypes-DmwkAEwZ.d.cts.map} +1 -1
- package/dist/types/EngineServerFailureError.d.cts +1 -1
- package/dist/types/EngineServerFailureError.d.ts +1 -1
- package/dist/types/clientExecuteTypes.d.cts +1 -1
- package/dist/types/clientExecuteTypes.d.ts +1 -1
- package/dist/types/clientQueryTypes.d.cts +2 -2
- package/dist/types/clientQueryTypes.d.ts +2 -2
- package/dist/types/index.d.cts +8 -8
- package/dist/types/index.d.ts +8 -8
- package/dist/types/serverEdgeQueryTypes.d.cts +1 -1
- package/dist/types/serverEdgeQueryTypes.d.ts +1 -1
- package/dist/types/serverExecuteTypes.d.cts +1 -1
- package/dist/types/serverExecuteTypes.d.ts +1 -1
- package/dist/types/serverQueryTypes.cjs.map +1 -1
- package/dist/types/serverQueryTypes.d.cts +1 -1
- package/dist/types/serverQueryTypes.d.ts +1 -1
- package/dist/types/serverQueryTypes.js.map +1 -1
- package/dist/types/serverSubscriptionEventTypes.d.cts +1 -1
- package/dist/types/serverSubscriptionEventTypes.d.ts +1 -1
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/queryDataMappers.d.cts +1 -1
- package/dist/utils/queryDataMappers.d.ts +1 -1
- package/package.json +3 -3
- package/src/EngineQueryClient.ts +17 -33
- package/src/types/clientQueryTypes.ts +13 -12
- package/src/types/serverQueryTypes.ts +6 -0
- package/dist/EngineQueryClient-Bb_dQxl9.d.cts.map +0 -1
- package/dist/EngineQueryClient-CyLOXvEQ.d.ts.map +0 -1
- package/dist/serverQueryTypes-B310vOgF.d.ts.map +0 -1
- package/dist/serverQueryTypes-Z9L5CzzX.d.cts.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as EngineServerQueryRequestType, W as EngineServerQueryRequestByType, q as EngineServerQueryResponseByType } from "./serverQueryTypes-
|
|
2
|
-
import { a as EngineServerExecuteRequestByType, l as EngineServerExecuteSuccessResult, o as EngineServerExecuteRequestType } from "./serverExecuteTypes-
|
|
3
|
-
import {
|
|
4
|
-
import { a as EngineServerCachedQueryRequestByType, c as EngineServerCachedQueryResponseByType, d as EngineServerEdgeControlRequestByType, f as EngineServerEdgeControlRequestType, o as EngineServerCachedQueryRequestType, p as EngineServerEdgeControlResponseByType } from "./serverEdgeQueryTypes-
|
|
1
|
+
import { G as EngineServerQueryRequestType, W as EngineServerQueryRequestByType, q as EngineServerQueryResponseByType } from "./serverQueryTypes-Gygk40jK.cjs";
|
|
2
|
+
import { a as EngineServerExecuteRequestByType, l as EngineServerExecuteSuccessResult, o as EngineServerExecuteRequestType } from "./serverExecuteTypes-DzPLzxDt.cjs";
|
|
3
|
+
import { K as GetEngineNoncesParams, q as GetEngineNoncesResponse } from "./clientQueryTypes-CEPCGqDx.cjs";
|
|
4
|
+
import { a as EngineServerCachedQueryRequestByType, c as EngineServerCachedQueryResponseByType, d as EngineServerEdgeControlRequestByType, f as EngineServerEdgeControlRequestType, o as EngineServerCachedQueryRequestType, p as EngineServerEdgeControlResponseByType } from "./serverEdgeQueryTypes-CIjW7fOw.cjs";
|
|
5
5
|
import { SignableRequestType, SignableRequestTypeToParams, WalletClientWithAccount } from "@nadohq/shared";
|
|
6
6
|
import { AxiosInstance } from "axios";
|
|
7
7
|
|
|
@@ -98,4 +98,4 @@ declare class EngineBaseClient {
|
|
|
98
98
|
}
|
|
99
99
|
//#endregion
|
|
100
100
|
export { EngineClientOpts as n, EngineBaseClient as t };
|
|
101
|
-
//# sourceMappingURL=EngineBaseClient-
|
|
101
|
+
//# sourceMappingURL=EngineBaseClient-CRw2Oq6b.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineBaseClient-
|
|
1
|
+
{"version":3,"file":"EngineBaseClient-CRw2Oq6b.d.cts","names":[],"sources":["../src/src/EngineBaseClient.ts"],"mappings":";;;;;;;;UAgCiB,gBAAA;EAEf,GAAA;EAEA,YAAA,GAAe,uBAAA;EAEf,wBAAA,GAA2B,uBAAuB;EAElD,UAAA;AAAA;AAAA,KAIG,wBAAA,GAA2B,OAAO,CAAC,gCAAA;;;;cAc3B,gBAAA;EAAA,SACF,IAAA,EAAM,gBAAA;EAAA,SACN,aAAA,EAAe,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mBAAA;EAAA,QAQA,iBAAA;AAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { G as EngineServerQueryRequestType, W as EngineServerQueryRequestByType, q as EngineServerQueryResponseByType } from "./serverQueryTypes-
|
|
2
|
-
import { a as EngineServerExecuteRequestByType, l as EngineServerExecuteSuccessResult, o as EngineServerExecuteRequestType } from "./serverExecuteTypes-
|
|
3
|
-
import {
|
|
4
|
-
import { a as EngineServerCachedQueryRequestByType, c as EngineServerCachedQueryResponseByType, d as EngineServerEdgeControlRequestByType, f as EngineServerEdgeControlRequestType, o as EngineServerCachedQueryRequestType, p as EngineServerEdgeControlResponseByType } from "./serverEdgeQueryTypes-
|
|
1
|
+
import { G as EngineServerQueryRequestType, W as EngineServerQueryRequestByType, q as EngineServerQueryResponseByType } from "./serverQueryTypes-CUC8fyd-.js";
|
|
2
|
+
import { a as EngineServerExecuteRequestByType, l as EngineServerExecuteSuccessResult, o as EngineServerExecuteRequestType } from "./serverExecuteTypes-B8nz4BGu.js";
|
|
3
|
+
import { K as GetEngineNoncesParams, q as GetEngineNoncesResponse } from "./clientQueryTypes-DWpgABZh.js";
|
|
4
|
+
import { a as EngineServerCachedQueryRequestByType, c as EngineServerCachedQueryResponseByType, d as EngineServerEdgeControlRequestByType, f as EngineServerEdgeControlRequestType, o as EngineServerCachedQueryRequestType, p as EngineServerEdgeControlResponseByType } from "./serverEdgeQueryTypes-B4NU8dQ5.js";
|
|
5
5
|
import { SignableRequestType, SignableRequestTypeToParams, WalletClientWithAccount } from "@nadohq/shared";
|
|
6
6
|
import { AxiosInstance } from "axios";
|
|
7
7
|
|
|
@@ -98,4 +98,4 @@ declare class EngineBaseClient {
|
|
|
98
98
|
}
|
|
99
99
|
//#endregion
|
|
100
100
|
export { EngineClientOpts as n, EngineBaseClient as t };
|
|
101
|
-
//# sourceMappingURL=EngineBaseClient-
|
|
101
|
+
//# sourceMappingURL=EngineBaseClient-CluoONVm.d.ts.map
|
|
@@ -1 +1 @@
|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AAA,EAAQ,OAAA;IACL,IAAA,EAAM,YAAA;EAAA,IAAiB,OAAA;EAgBzB;;;;;;EAHI,iBAAA,sBAAuC,8BAAA,CAAA,CAC5C,WAAA,EAAa,YAAA,EACb,MAAA,EAAQ,gCAAA,CAAiC,YAAA,IACxC,wBAAA;EAmBqC;;;;;;;;;EAJ3B,IAAA,WAAe,mBAAA,CAAA,CAC1B,WAAA,EAAa,CAAA,EACb,iBAAA,UACA,OAAA,UACA,MAAA,EAAQ,2BAAA,CAA4B,CAAA,IAAE,OAAA;EAAA,QAyBhC,mBAAA;EAAA,QAQA,iBAAA;AAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-
|
|
1
|
+
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-CRw2Oq6b.cjs";
|
|
2
2
|
export { EngineBaseClient, EngineClientOpts };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-
|
|
1
|
+
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-CluoONVm.js";
|
|
2
2
|
export { EngineBaseClient, EngineClientOpts };
|
package/dist/EngineClient.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as EngineEdgeQueryClient } from "./EngineEdgeQueryClient-
|
|
2
|
-
import { t as EngineExecuteClient } from "./EngineExecuteClient-
|
|
3
|
-
import { t as EngineQueryClient } from "./EngineQueryClient-
|
|
4
|
-
import { t as EngineWebClient } from "./EngineWebClient-
|
|
1
|
+
import { t as EngineEdgeQueryClient } from "./EngineEdgeQueryClient-Bu5QvTD2.cjs";
|
|
2
|
+
import { t as EngineExecuteClient } from "./EngineExecuteClient-Bs7JROLa.cjs";
|
|
3
|
+
import { t as EngineQueryClient } from "./EngineQueryClient-BgFEpsv8.cjs";
|
|
4
|
+
import { t as EngineWebClient } from "./EngineWebClient-DsfsPm8h.cjs";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineClient.d.ts
|
|
7
7
|
declare const EngineClient_base: import("ts-mixer/dist/types/types").Class<any[], EngineQueryClient & EngineEdgeQueryClient & EngineExecuteClient & EngineWebClient, typeof EngineQueryClient & typeof EngineEdgeQueryClient & typeof EngineExecuteClient & typeof EngineWebClient>;
|
package/dist/EngineClient.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as EngineEdgeQueryClient } from "./EngineEdgeQueryClient-
|
|
2
|
-
import { t as EngineExecuteClient } from "./EngineExecuteClient-
|
|
3
|
-
import { t as EngineQueryClient } from "./EngineQueryClient-
|
|
4
|
-
import { t as EngineWebClient } from "./EngineWebClient-
|
|
1
|
+
import { t as EngineEdgeQueryClient } from "./EngineEdgeQueryClient-CzoSgrG_.js";
|
|
2
|
+
import { t as EngineExecuteClient } from "./EngineExecuteClient-Bgy4Sdxm.js";
|
|
3
|
+
import { t as EngineQueryClient } from "./EngineQueryClient-DN3nc5u1.js";
|
|
4
|
+
import { t as EngineWebClient } from "./EngineWebClient-lr41B5ZT.js";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineClient.d.ts
|
|
7
7
|
declare const EngineClient_base: import("ts-mixer/dist/types/types").Class<any[], EngineQueryClient & EngineEdgeQueryClient & EngineExecuteClient & EngineWebClient, typeof EngineQueryClient & typeof EngineEdgeQueryClient & typeof EngineExecuteClient & typeof EngineWebClient>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Y as EngineServerStatusResponse } from "./serverQueryTypes-
|
|
2
|
-
import {
|
|
3
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
1
|
+
import { Y as EngineServerStatusResponse } from "./serverQueryTypes-Gygk40jK.cjs";
|
|
2
|
+
import { G as GetEngineNlpPoolInfoResponse, P as GetEngineMarketPricesResponse, S as GetEngineHealthGroupsResponse, _ as GetEngineContractsResponse, c as EnginePingResponse, f as EngineSymbolsResponse, g as GetEngineCachedMarketPricesParams, h as GetEngineCachedBboHistoryResponse, it as GetEngineSymbolsParams, m as GetEngineCachedBboHistoryParams, n as EngineCachedTimeParams, p as GetEngineAllMarketsResponse, s as EnginePingParams } from "./clientQueryTypes-CEPCGqDx.cjs";
|
|
3
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-CRw2Oq6b.cjs";
|
|
4
4
|
import { MarketWithProduct } from "@nadohq/shared";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineEdgeQueryClient.d.ts
|
|
@@ -76,4 +76,4 @@ declare class EngineEdgeQueryClient extends EngineBaseClient {
|
|
|
76
76
|
}
|
|
77
77
|
//#endregion
|
|
78
78
|
export { EngineEdgeQueryClient as t };
|
|
79
|
-
//# sourceMappingURL=EngineEdgeQueryClient-
|
|
79
|
+
//# sourceMappingURL=EngineEdgeQueryClient-Bu5QvTD2.d.cts.map
|
package/dist/{EngineEdgeQueryClient-Bq_XjCl7.d.cts.map → EngineEdgeQueryClient-Bu5QvTD2.d.cts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineEdgeQueryClient-
|
|
1
|
+
{"version":3,"file":"EngineEdgeQueryClient-Bu5QvTD2.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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Y as EngineServerStatusResponse } from "./serverQueryTypes-
|
|
2
|
-
import {
|
|
3
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
1
|
+
import { Y as EngineServerStatusResponse } from "./serverQueryTypes-CUC8fyd-.js";
|
|
2
|
+
import { G as GetEngineNlpPoolInfoResponse, P as GetEngineMarketPricesResponse, S as GetEngineHealthGroupsResponse, _ as GetEngineContractsResponse, c as EnginePingResponse, f as EngineSymbolsResponse, g as GetEngineCachedMarketPricesParams, h as GetEngineCachedBboHistoryResponse, it as GetEngineSymbolsParams, m as GetEngineCachedBboHistoryParams, n as EngineCachedTimeParams, p as GetEngineAllMarketsResponse, s as EnginePingParams } from "./clientQueryTypes-DWpgABZh.js";
|
|
3
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-CluoONVm.js";
|
|
4
4
|
import { MarketWithProduct } from "@nadohq/shared";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineEdgeQueryClient.d.ts
|
|
@@ -76,4 +76,4 @@ declare class EngineEdgeQueryClient extends EngineBaseClient {
|
|
|
76
76
|
}
|
|
77
77
|
//#endregion
|
|
78
78
|
export { EngineEdgeQueryClient as t };
|
|
79
|
-
//# sourceMappingURL=EngineEdgeQueryClient-
|
|
79
|
+
//# sourceMappingURL=EngineEdgeQueryClient-CzoSgrG_.d.ts.map
|
package/dist/{EngineEdgeQueryClient-CGPNiYNf.d.ts.map → EngineEdgeQueryClient-CzoSgrG_.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineEdgeQueryClient-
|
|
1
|
+
{"version":3,"file":"EngineEdgeQueryClient-CzoSgrG_.d.ts","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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineEdgeQueryClient } from "./EngineEdgeQueryClient-
|
|
1
|
+
import { t as EngineEdgeQueryClient } from "./EngineEdgeQueryClient-Bu5QvTD2.cjs";
|
|
2
2
|
export { EngineEdgeQueryClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineEdgeQueryClient } from "./EngineEdgeQueryClient-
|
|
1
|
+
import { t as EngineEdgeQueryClient } from "./EngineEdgeQueryClient-CzoSgrG_.js";
|
|
2
2
|
export { EngineEdgeQueryClient };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as EngineServerExecuteRequestByType, i as EngineServerExecutePlaceOrderPayload } from "./serverExecuteTypes-
|
|
2
|
-
import { _ as SignatureParamsOrSignature, a as EngineExecuteRequestParamsByType, v as WithBaseEngineExecuteParams, y as WithSignature } from "./clientExecuteTypes-
|
|
3
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
1
|
+
import { a as EngineServerExecuteRequestByType, i as EngineServerExecutePlaceOrderPayload } from "./serverExecuteTypes-DzPLzxDt.cjs";
|
|
2
|
+
import { _ as SignatureParamsOrSignature, a as EngineExecuteRequestParamsByType, v as WithBaseEngineExecuteParams, y as WithSignature } from "./clientExecuteTypes-By-lvAzV.cjs";
|
|
3
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-CRw2Oq6b.cjs";
|
|
4
4
|
import { EIP712OrderParams, SignableRequestType, SignableRequestTypeToParams } from "@nadohq/shared";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineExecuteBuilder.d.ts
|
|
@@ -116,4 +116,4 @@ declare class EngineExecuteBuilder {
|
|
|
116
116
|
}
|
|
117
117
|
//#endregion
|
|
118
118
|
export { EngineExecuteBuilder as t };
|
|
119
|
-
//# sourceMappingURL=EngineExecuteBuilder
|
|
119
|
+
//# sourceMappingURL=EngineExecuteBuilder--zGhBm89.d.cts.map
|
package/dist/{EngineExecuteBuilder-ySU-JZWq.d.cts.map → EngineExecuteBuilder--zGhBm89.d.cts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineExecuteBuilder
|
|
1
|
+
{"version":3,"file":"EngineExecuteBuilder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mBAAA,CACJ,YAAA,EAAc,gCAAA,eACb,OAAA,CAAQ,gCAAA;EAAA,UAgBK,oBAAA,WAA+B,mBAAA,CAAA,CAC7C,WAAA,EAAa,CAAA,EACb,eAAA,EAAiB,0BAAA,GACf,2BAAA,CAA4B,CAAA,IAAE,OAAA;EAAA,UAclB,kBAAA,CACd,MAAA,EAAQ,2BAAA;IAA8B,eAAA;EAAA,KAA0B,OAAA;EAAA,UAQxD,qBAAA,CACR,MAAA,EAAQ,2BAAA;AAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as EngineServerExecuteRequestByType, i as EngineServerExecutePlaceOrderPayload } from "./serverExecuteTypes-
|
|
2
|
-
import { _ as SignatureParamsOrSignature, a as EngineExecuteRequestParamsByType, v as WithBaseEngineExecuteParams, y as WithSignature } from "./clientExecuteTypes-
|
|
3
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
1
|
+
import { a as EngineServerExecuteRequestByType, i as EngineServerExecutePlaceOrderPayload } from "./serverExecuteTypes-B8nz4BGu.js";
|
|
2
|
+
import { _ as SignatureParamsOrSignature, a as EngineExecuteRequestParamsByType, v as WithBaseEngineExecuteParams, y as WithSignature } from "./clientExecuteTypes-6S0AH47Q.js";
|
|
3
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-CluoONVm.js";
|
|
4
4
|
import { EIP712OrderParams, SignableRequestType, SignableRequestTypeToParams } from "@nadohq/shared";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineExecuteBuilder.d.ts
|
|
@@ -116,4 +116,4 @@ declare class EngineExecuteBuilder {
|
|
|
116
116
|
}
|
|
117
117
|
//#endregion
|
|
118
118
|
export { EngineExecuteBuilder as t };
|
|
119
|
-
//# sourceMappingURL=EngineExecuteBuilder-
|
|
119
|
+
//# sourceMappingURL=EngineExecuteBuilder-Df-wtiCL.d.ts.map
|
package/dist/{EngineExecuteBuilder-CJE3bMf2.d.ts.map → EngineExecuteBuilder-Df-wtiCL.d.ts.map}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AQ,gCAAA;EArKE;;;;;EAoLP,mBAAA,CACJ,YAAA,EAAc,gCAAA,eACb,OAAA,CAAQ,gCAAA;EAzJR;;;;;EA+KG,mBAAA,CACJ,YAAA,EAAc,gCAAA,eACb,OAAA,CAAQ,gCAAA;EAAA,UAgBK,oBAAA,WAA+B,mBAAA,CAAA,CAC7C,WAAA,EAAa,CAAA,EACb,eAAA,EAAiB,0BAAA,GACf,2BAAA,CAA4B,CAAA,IAAE,OAAA;EAAA,UAclB,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--zGhBm89.cjs";
|
|
2
2
|
export { EngineExecuteBuilder };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-
|
|
1
|
+
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-Df-wtiCL.js";
|
|
2
2
|
export { EngineExecuteBuilder };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { l as EngineServerExecuteSuccessResult } from "./serverExecuteTypes-
|
|
2
|
-
import { a as EngineExecuteRequestParamsByType, d as EnginePlaceOrderResult } from "./clientExecuteTypes-
|
|
3
|
-
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-
|
|
4
|
-
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-
|
|
1
|
+
import { l as EngineServerExecuteSuccessResult } from "./serverExecuteTypes-B8nz4BGu.js";
|
|
2
|
+
import { a as EngineExecuteRequestParamsByType, d as EnginePlaceOrderResult } from "./clientExecuteTypes-6S0AH47Q.js";
|
|
3
|
+
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-CluoONVm.js";
|
|
4
|
+
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder-Df-wtiCL.js";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineExecuteClient.d.ts
|
|
7
7
|
declare class EngineExecuteClient extends EngineBaseClient {
|
|
@@ -31,4 +31,4 @@ declare class EngineExecuteClient extends EngineBaseClient {
|
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
33
|
export { EngineExecuteClient as t };
|
|
34
|
-
//# sourceMappingURL=EngineExecuteClient-
|
|
34
|
+
//# sourceMappingURL=EngineExecuteClient-Bgy4Sdxm.d.ts.map
|
package/dist/{EngineExecuteClient-Dc-nshM9.d.ts.map → EngineExecuteClient-Bgy4Sdxm.d.ts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineExecuteClient-
|
|
1
|
+
{"version":3,"file":"EngineExecuteClient-Bgy4Sdxm.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,oBAAA,CACJ,MAAA,EAAQ,gCAAA,6BAA0D,OAAA,CAA1B,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;EAhFA;;;;;;;;EAgGpC,eAAA,CACJ,MAAA,EAAQ,gCAAA,wBAAqD,OAAA,CAArB,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
|
-
import { l as EngineServerExecuteSuccessResult } from "./serverExecuteTypes-
|
|
2
|
-
import { a as EngineExecuteRequestParamsByType, d as EnginePlaceOrderResult } from "./clientExecuteTypes-
|
|
3
|
-
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-
|
|
4
|
-
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder
|
|
1
|
+
import { l as EngineServerExecuteSuccessResult } from "./serverExecuteTypes-DzPLzxDt.cjs";
|
|
2
|
+
import { a as EngineExecuteRequestParamsByType, d as EnginePlaceOrderResult } from "./clientExecuteTypes-By-lvAzV.cjs";
|
|
3
|
+
import { n as EngineClientOpts, t as EngineBaseClient } from "./EngineBaseClient-CRw2Oq6b.cjs";
|
|
4
|
+
import { t as EngineExecuteBuilder } from "./EngineExecuteBuilder--zGhBm89.cjs";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineExecuteClient.d.ts
|
|
7
7
|
declare class EngineExecuteClient extends EngineBaseClient {
|
|
@@ -31,4 +31,4 @@ declare class EngineExecuteClient extends EngineBaseClient {
|
|
|
31
31
|
}
|
|
32
32
|
//#endregion
|
|
33
33
|
export { EngineExecuteClient as t };
|
|
34
|
-
//# sourceMappingURL=EngineExecuteClient-
|
|
34
|
+
//# sourceMappingURL=EngineExecuteClient-Bs7JROLa.d.cts.map
|
package/dist/{EngineExecuteClient-DG_pj7dE.d.cts.map → EngineExecuteClient-Bs7JROLa.d.cts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineExecuteClient-
|
|
1
|
+
{"version":3,"file":"EngineExecuteClient-Bs7JROLa.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,oBAAA,CACJ,MAAA,EAAQ,gCAAA,6BAA0D,OAAA,CAA1B,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;EAhFA;;;;;;;;EAgGpC,eAAA,CACJ,MAAA,EAAQ,gCAAA,wBAAqD,OAAA,CAArB,gCAAA;EAQpC,OAAA,CAAQ,MAAA,EAAQ,gCAAA,eAA4C,OAAA,CAAZ,gCAAA;EAOhD,OAAA,CAAQ,MAAA,EAAQ,gCAAA,eAA4C,OAAA,CAAZ,gCAAA;AAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineExecuteClient } from "./EngineExecuteClient-
|
|
1
|
+
import { t as EngineExecuteClient } from "./EngineExecuteClient-Bs7JROLa.cjs";
|
|
2
2
|
export { EngineExecuteClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineExecuteClient } from "./EngineExecuteClient-
|
|
1
|
+
import { t as EngineExecuteClient } from "./EngineExecuteClient-Bgy4Sdxm.js";
|
|
2
2
|
export { EngineExecuteClient };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Y as EngineServerStatusResponse } from "./serverQueryTypes-
|
|
2
|
-
import { $ as
|
|
3
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
1
|
+
import { Y as EngineServerStatusResponse } from "./serverQueryTypes-Gygk40jK.cjs";
|
|
2
|
+
import { $ as GetEngineSubaccountOrdersResponse, A as GetEngineMarketLiquidityResponse, B as GetEngineMaxOrderSizeResponse, C as GetEngineInsuranceResponse, D as GetEngineLinkedSignerParams, E as GetEngineIsolatedPositionsResponse, F as GetEngineMaxBurnNlpAmountParams, G as GetEngineNlpPoolInfoResponse, H as GetEngineMaxWithdrawableResponse, I as GetEngineMaxBurnNlpAmountResponse, J as GetEngineOrderParams, L as GetEngineMaxMintNlpAmountParams, M as GetEngineMarketPriceResponse, N as GetEngineMarketPricesParams, O as GetEngineLinkedSignerResponse, P as GetEngineMarketPricesResponse, Q as GetEngineSubaccountOrdersParams, R as GetEngineMaxMintNlpAmountResponse, S as GetEngineHealthGroupsResponse, T as GetEngineIsolatedPositionsParams, U as GetEngineNlpLockedBalancesParams, V as GetEngineMaxWithdrawableParams, W as GetEngineNlpLockedBalancesResponse, X as GetEngineSubaccountFeeRatesParams, Y as GetEngineOrderResponse, Z as GetEngineSubaccountFeeRatesResponse, _ as GetEngineContractsResponse, b as GetEngineDynamicFeeQuoteResponse, et as GetEngineSubaccountProductOrdersParams, f as EngineSymbolsResponse, ft as ValidateEngineOrderParams, it as GetEngineSymbolsParams, j as GetEngineMarketPriceParams, k as GetEngineMarketLiquidityParams, mt as ValidateSignedEngineOrderParams, nt as GetEngineSubaccountSummaryParams, p as GetEngineAllMarketsResponse, pt as ValidateEngineOrderResponse, rt as GetEngineSubaccountSummaryResponse, tt as GetEngineSubaccountProductOrdersResponse, x as GetEngineEstimatedSubaccountSummaryParams, y as GetEngineDynamicFeeQuoteParams, z as GetEngineMaxOrderSizeParams } from "./clientQueryTypes-CEPCGqDx.cjs";
|
|
3
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-CRw2Oq6b.cjs";
|
|
4
4
|
import { MarketWithProduct } from "@nadohq/shared";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineQueryClient.d.ts
|
|
@@ -104,20 +104,12 @@ declare class EngineQueryClient extends EngineBaseClient {
|
|
|
104
104
|
*/
|
|
105
105
|
getMaxOrderSize(params: GetEngineMaxOrderSizeParams): Promise<GetEngineMaxOrderSizeResponse>;
|
|
106
106
|
/**
|
|
107
|
-
* Retrieves the estimated max withdrawal size for a product
|
|
107
|
+
* Retrieves the estimated max withdrawal size for a product, or the max transferable quote
|
|
108
|
+
* amount to a recipient when `recipientSubaccountName` is set (requires `productId` 0), with the
|
|
109
|
+
* current dynamic fee reserved. The reserved fee is returned as `fee`.
|
|
108
110
|
* @param params
|
|
109
111
|
*/
|
|
110
112
|
getMaxWithdrawable(params: GetEngineMaxWithdrawableParams): Promise<GetEngineMaxWithdrawableResponse>;
|
|
111
|
-
/**
|
|
112
|
-
* Retrieves the estimated max withdrawal size for a product, with the current dynamic fee of
|
|
113
|
-
* Withdraw Collateral V2 reserved instead of the flat fee. The reserved fee is returned as
|
|
114
|
-
* `fee`.
|
|
115
|
-
* @param params
|
|
116
|
-
* @returns The max withdrawable with the current dynamic fee reserved, and the reserved fee.
|
|
117
|
-
*/
|
|
118
|
-
getMaxWithdrawable(params: GetEngineMaxWithdrawableParams, options: {
|
|
119
|
-
withDynamicFee: true;
|
|
120
|
-
}): Promise<GetEngineMaxWithdrawableWithDynamicFeeResponse>;
|
|
121
113
|
/**
|
|
122
114
|
* Retrieves the current dynamic fee for a V2 withdrawal or V2 quote transfer.
|
|
123
115
|
* The fee is priced again at execution, so pass a `maxFeeX18` with some headroom when executing.
|
|
@@ -161,4 +153,4 @@ declare class EngineQueryClient extends EngineBaseClient {
|
|
|
161
153
|
}
|
|
162
154
|
//#endregion
|
|
163
155
|
export { EngineQueryClient as t };
|
|
164
|
-
//# sourceMappingURL=EngineQueryClient-
|
|
156
|
+
//# sourceMappingURL=EngineQueryClient-BgFEpsv8.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EngineQueryClient-BgFEpsv8.d.cts","names":[],"sources":["../src/src/EngineQueryClient.ts"],"mappings":";;;;;;cA4Ea,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,GAAiB,OAAA,CAAQ,2BAAA;EAmG5B;;;EAlFG,iBAAA,CAAA,GAAqB,OAAA,CAAQ,MAAA,SAAe,iBAAA;EAwHxC;;;EAnGJ,eAAA,CAAA,GAAmB,OAAA,CAAQ,6BAAA;EA6HtB;;;;;EAzGL,QAAA,CACJ,MAAA,EAAQ,oBAAA,GACP,OAAA,CAAQ,sBAAA;EAmK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,cAAA,CAAA,GAAkB,OAAA,CAAQ,4BAAA;AAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Y as EngineServerStatusResponse } from "./serverQueryTypes-
|
|
2
|
-
import { $ as
|
|
3
|
-
import { t as EngineBaseClient } from "./EngineBaseClient-
|
|
1
|
+
import { Y as EngineServerStatusResponse } from "./serverQueryTypes-CUC8fyd-.js";
|
|
2
|
+
import { $ as GetEngineSubaccountOrdersResponse, A as GetEngineMarketLiquidityResponse, B as GetEngineMaxOrderSizeResponse, C as GetEngineInsuranceResponse, D as GetEngineLinkedSignerParams, E as GetEngineIsolatedPositionsResponse, F as GetEngineMaxBurnNlpAmountParams, G as GetEngineNlpPoolInfoResponse, H as GetEngineMaxWithdrawableResponse, I as GetEngineMaxBurnNlpAmountResponse, J as GetEngineOrderParams, L as GetEngineMaxMintNlpAmountParams, M as GetEngineMarketPriceResponse, N as GetEngineMarketPricesParams, O as GetEngineLinkedSignerResponse, P as GetEngineMarketPricesResponse, Q as GetEngineSubaccountOrdersParams, R as GetEngineMaxMintNlpAmountResponse, S as GetEngineHealthGroupsResponse, T as GetEngineIsolatedPositionsParams, U as GetEngineNlpLockedBalancesParams, V as GetEngineMaxWithdrawableParams, W as GetEngineNlpLockedBalancesResponse, X as GetEngineSubaccountFeeRatesParams, Y as GetEngineOrderResponse, Z as GetEngineSubaccountFeeRatesResponse, _ as GetEngineContractsResponse, b as GetEngineDynamicFeeQuoteResponse, et as GetEngineSubaccountProductOrdersParams, f as EngineSymbolsResponse, ft as ValidateEngineOrderParams, it as GetEngineSymbolsParams, j as GetEngineMarketPriceParams, k as GetEngineMarketLiquidityParams, mt as ValidateSignedEngineOrderParams, nt as GetEngineSubaccountSummaryParams, p as GetEngineAllMarketsResponse, pt as ValidateEngineOrderResponse, rt as GetEngineSubaccountSummaryResponse, tt as GetEngineSubaccountProductOrdersResponse, x as GetEngineEstimatedSubaccountSummaryParams, y as GetEngineDynamicFeeQuoteParams, z as GetEngineMaxOrderSizeParams } from "./clientQueryTypes-DWpgABZh.js";
|
|
3
|
+
import { t as EngineBaseClient } from "./EngineBaseClient-CluoONVm.js";
|
|
4
4
|
import { MarketWithProduct } from "@nadohq/shared";
|
|
5
5
|
|
|
6
6
|
//#region src/EngineQueryClient.d.ts
|
|
@@ -104,20 +104,12 @@ declare class EngineQueryClient extends EngineBaseClient {
|
|
|
104
104
|
*/
|
|
105
105
|
getMaxOrderSize(params: GetEngineMaxOrderSizeParams): Promise<GetEngineMaxOrderSizeResponse>;
|
|
106
106
|
/**
|
|
107
|
-
* Retrieves the estimated max withdrawal size for a product
|
|
107
|
+
* Retrieves the estimated max withdrawal size for a product, or the max transferable quote
|
|
108
|
+
* amount to a recipient when `recipientSubaccountName` is set (requires `productId` 0), with the
|
|
109
|
+
* current dynamic fee reserved. The reserved fee is returned as `fee`.
|
|
108
110
|
* @param params
|
|
109
111
|
*/
|
|
110
112
|
getMaxWithdrawable(params: GetEngineMaxWithdrawableParams): Promise<GetEngineMaxWithdrawableResponse>;
|
|
111
|
-
/**
|
|
112
|
-
* Retrieves the estimated max withdrawal size for a product, with the current dynamic fee of
|
|
113
|
-
* Withdraw Collateral V2 reserved instead of the flat fee. The reserved fee is returned as
|
|
114
|
-
* `fee`.
|
|
115
|
-
* @param params
|
|
116
|
-
* @returns The max withdrawable with the current dynamic fee reserved, and the reserved fee.
|
|
117
|
-
*/
|
|
118
|
-
getMaxWithdrawable(params: GetEngineMaxWithdrawableParams, options: {
|
|
119
|
-
withDynamicFee: true;
|
|
120
|
-
}): Promise<GetEngineMaxWithdrawableWithDynamicFeeResponse>;
|
|
121
113
|
/**
|
|
122
114
|
* Retrieves the current dynamic fee for a V2 withdrawal or V2 quote transfer.
|
|
123
115
|
* The fee is priced again at execution, so pass a `maxFeeX18` with some headroom when executing.
|
|
@@ -161,4 +153,4 @@ declare class EngineQueryClient extends EngineBaseClient {
|
|
|
161
153
|
}
|
|
162
154
|
//#endregion
|
|
163
155
|
export { EngineQueryCl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,wCAAA;EAuQR;;;;EAhPG,qBAAA,CACJ,MAAA,EAAQ,iCAAA,GACP,OAAA,CAAQ,mCAAA;EA4QR;;;;EAnOG,kBAAA,CACJ,MAAA,EAAQ,8BAAA,GACP,OAAA,CAAQ,gCAAA;EA1U0C;;;;EAyV/C,cAAA,CACJ,MAAA,EAAQ,0BAAA,GACP,OAAA,CAAQ,4BAAA;EA5UL;;;;EAuVA,eAAA,CACJ,MAAA,EAAQ,2BAAA,GACP,OAAA,CAAQ,6BAAA;EA9UT;;;;EA2VI,eAAA,CACJ,MAAA,EAAQ,2BAAA,GACP,OAAA,CAAQ,6BAAA;EA1UT;;;;;;EA4WI,kBAAA,CACJ,MAAA,EAAQ,8BAAA,GACP,OAAA,CAAQ,gCAAA;EA1VA;;;;;;EA0XL,kBAAA,CACJ,MAAA,EAAQ,8BAAA,GACP,OAAA,CAAQ,gCAAA;EAjUY;;;;;EAyWjB,mBAAA,CACJ,MAAA,EAAQ,+BAAA,GACP,OAAA,CAAQ,iCAAA;EArUL;;;;;EAuVA,mBAAA,CACJ,MAAA,EAAQ,+BAAA,GACP,OAAA,CAAQ,iCAAA;EAnUR;;;;;EAmVU,eAAA,CACX,MAAA,EAAQ,2BAAA,GACP,OAAA,CAAQ,6BAAA;EArUA;;;;EAsVE,YAAA,CAAA,GAAgB,OAAA,CAAQ,0BAAA;EA/T1B;;;;;EA0UL,oBAAA,CACJ,MAAA,EAAQ,gCAAA,GACP,OAAA,CAAQ,kCAAA;EAvSL;;;EAqTA,cAAA,CAAA,GAAkB,OAAA,CAAQ,4BAAA;AAAA"}
|
|
@@ -276,7 +276,13 @@ var EngineQueryClient = class extends require_EngineBaseClient.EngineBaseClient
|
|
|
276
276
|
borrow_margin: params.isolated && params.isoBorrowMargin != null ? String(params.isoBorrowMargin) : null
|
|
277
277
|
})).max_order_size);
|
|
278
278
|
}
|
|
279
|
-
|
|
279
|
+
/**
|
|
280
|
+
* Retrieves the estimated max withdrawal size for a product, or the max transferable quote
|
|
281
|
+
* amount to a recipient when `recipientSubaccountName` is set (requires `productId` 0), with the
|
|
282
|
+
* current dynamic fee reserved. The reserved fee is returned as `fee`.
|
|
283
|
+
* @param params
|
|
284
|
+
*/
|
|
285
|
+
async getMaxWithdrawable(params) {
|
|
280
286
|
const baseResponse = await this.query("max_withdrawable", {
|
|
281
287
|
product_id: params.productId,
|
|
282
288
|
sender: (0, _nadohq_shared.subaccountToHex)({
|
|
@@ -284,13 +290,16 @@ var EngineQueryClient = class extends require_EngineBaseClient.EngineBaseClient
|
|
|
284
290
|
subaccountName: params.subaccountName
|
|
285
291
|
}),
|
|
286
292
|
spot_leverage: params.spotLeverage != null ? String(params.spotLeverage) : null,
|
|
287
|
-
dynamic_fee:
|
|
293
|
+
dynamic_fee: "true",
|
|
294
|
+
recipient: params.recipientSubaccountName != null ? (0, _nadohq_shared.subaccountToHex)({
|
|
295
|
+
subaccountOwner: params.subaccountOwner,
|
|
296
|
+
subaccountName: params.recipientSubaccountName
|
|
297
|
+
}) : null
|
|
288
298
|
});
|
|
289
|
-
|
|
299
|
+
return {
|
|
290
300
|
maxWithdrawable: (0, _nadohq_shared.toBigNumber)(baseResponse.max_withdrawable),
|
|
291
|
-
fee:
|
|
301
|
+
fee: (0, _nadohq_shared.toBigNumber)(baseResponse.fee_x18 ?? 0)
|
|
292
302
|
};
|
|
293
|
-
return (0, _nadohq_shared.toBigNumber)(baseResponse.max_withdrawable);
|
|
294
303
|
}
|
|
295
304
|
/**
|
|
296
305
|
* Retrieves the current dynamic fee for a V2 withdrawal or V2 quote transfer.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EngineQueryClient.cjs","names":["EngineBaseClient","mapSubaccountSummary","mapEngineServerIsolatedPositions","mapEngineServerSymbols","mapProductEngineType","mapEngineServerSpotProduct","mapEngineServerPerpProduct","mapEngineServerOrder","mapEngineServerTickLiquidity","mapEngineMarketPrice","mapEngineServerNlpLockedBalances","mapEngineServerNlpPoolInfo"],"sources":["../src/EngineQueryClient.ts"],"sourcesContent":["import {\n addDecimals,\n encodeSignedOrder,\n getOrderVerifyingAddress,\n mapValues,\n MarketWithProduct,\n removeDecimals,\n subaccountToHex,\n toBigNumber,\n toIntegerString,\n} from '@nadohq/shared';\nimport BigNumber from 'bignumber.js';\nimport { EngineBaseClient } from './EngineBaseClient';\nimport {\n EngineServerDynamicFeeQuoteQueryParams,\n EngineServerStatusResponse,\n EngineServerSubaccountInfoQueryParams,\n EngineSymbolsResponse,\n GetEngineAllMarketsResponse,\n GetEngineContractsResponse,\n GetEngineDynamicFeeQuoteParams,\n GetEngineDynamicFeeQuoteResponse,\n GetEngineEstimatedSubaccountSummaryParams,\n GetEngineHealthGroupsResponse,\n GetEngineInsuranceResponse,\n GetEngineIsolatedPositionsParams,\n GetEngineIsolatedPositionsResponse,\n GetEngineLinkedSignerParams,\n GetEngineLinkedSignerResponse,\n GetEngineMarketLiquidityParams,\n GetEngineMarketLiquidityResponse,\n GetEngineMarketPriceParams,\n GetEngineMarketPriceResponse,\n GetEngineMarketPricesParams,\n GetEngineMarketPricesResponse,\n GetEngineMaxBurnNlpAmountParams,\n GetEngineMaxBurnNlpAmountResponse,\n GetEngineMaxMintNlpAmountParams,\n GetEngineMaxMintNlpAmountResponse,\n GetEngineMaxOrderSizeParams,\n GetEngineMaxOrderSizeResponse,\n GetEngineMaxWithdrawableParams,\n GetEngineMaxWithdrawableResponse,\n GetEngineMaxWithdrawableWithDynamicFeeResponse,\n GetEngineNlpLockedBalancesParams,\n GetEngineNlpLockedBalancesResponse,\n GetEngineNlpPoolInfoResponse,\n GetEngineOrderParams,\n GetEngineOrderResponse,\n GetEngineSubaccountFeeRatesParams,\n GetEngineSubaccountFeeRatesResponse,\n GetEngineSubaccountOrdersParams,\n GetEngineSubaccountOrdersResponse,\n GetEngineSubaccountProductOrdersParams,\n GetEngineSubaccountProductOrdersResponse,\n GetEngineSubaccountSummaryParams,\n GetEngineSubaccountSummaryResponse,\n GetEngineSymbolsParams,\n SubaccountOrderFeeRates,\n ValidateEngineOrderParams,\n ValidateEngineOrderResponse,\n ValidateSignedEngineOrderParams,\n} from './types';\nimport { mapProductEngineType } from './utils/productEngineTypeMappers';\nimport {\n mapEngineMarketPrice,\n mapEngineServerIsolatedPositions,\n mapEngineServerNlpLockedBalances,\n mapEngineServerNlpPoolInfo,\n mapEngineServerOrder,\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n mapEngineServerSymbols,\n mapEngineServerTickLiquidity,\n mapSubaccountSummary,\n} from './utils/queryDataMappers';\n\nexport class EngineQueryClient extends EngineBaseClient {\n /**\n * Retrieves the set of contracts that the engine is interfacing with\n */\n async getContracts(): Promise<GetEngineContractsResponse> {\n const baseResponse = await this.query('contracts', {});\n return {\n chainId: Number(baseResponse.chain_id),\n endpointAddr: baseResponse.endpoint_addr,\n };\n }\n\n /**\n * Retrieves current engine status\n */\n async getStatus(): Promise<EngineServerStatusResponse> {\n return this.query('status', {});\n }\n\n /**\n * Retrieves a subaccount summary reflective of the state within the offchain engine. This adheres to the\n * same return interface as the contract version\n *\n * @param params\n */\n async getSubaccountSummary(\n params: GetEngineSubaccountSummaryParams,\n ): Promise<GetEngineSubaccountSummaryResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const baseResponse = await this.query('subaccount_info', {\n subaccount,\n });\n\n return mapSubaccountSummary(baseResponse);\n }\n\n /**\n * Retrieves a list of isolated positions\n *\n * @param params\n */\n async getIsolatedPositions(\n params: GetEngineIsolatedPositionsParams,\n ): Promise<GetEngineIsolatedPositionsResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const baseResponse = await this.query('isolated_positions', {\n subaccount,\n });\n\n return mapEngineServerIsolatedPositions(baseResponse);\n }\n\n /**\n * Retrieves an estimated subaccount summary with the applied transactions\n *\n * @param params\n */\n async getEstimatedSubaccountSummary(\n params: GetEngineEstimatedSubaccountSummaryParams,\n ): Promise<GetEngineSubaccountSummaryResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const queryParams: EngineServerSubaccountInfoQueryParams = {\n subaccount: subaccount,\n txns: params.txs.map(\n (\n tx,\n ): NonNullable<\n EngineServerSubaccountInfoQueryParams['txns']\n >[number] => {\n switch (tx.type) {\n case 'apply_delta':\n return {\n apply_delta: {\n product_id: tx.tx.productId,\n subaccount,\n amount_delta: toIntegerString(tx.tx.amountDelta),\n v_quote_delta: toIntegerString(tx.tx.vQuoteDelta),\n },\n };\n }\n },\n ),\n };\n const baseResponse = await this.query('subaccount_info', {\n subaccount: queryParams.subaccount,\n txns: JSON.stringify(queryParams.txns),\n // Backend expects string variants of booleans\n pre_state:\n params.preState !== undefined ? String(params.preState) : undefined,\n });\n\n return mapSubaccountSummary(baseResponse);\n }\n\n /**\n * Retrieves symbols and product info\n *\n * @param params\n */\n async getSymbols(\n params: GetEngineSymbolsParams,\n ): Promise<EngineSymbolsResponse> {\n const baseResponse = await this.query('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 * Retrieves all market states as per the offchain engine. Same return interface as contracts\n */\n async getAllMarkets(): Promise<GetEngineAllMarketsResponse> {\n const markets: MarketWithProduct[] = [];\n\n const baseResponse = await this.query('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 * Retrieves all markets by chain id.\n */\n async getEdgeAllMarkets(): Promise<Record<number, MarketWithProduct[]>> {\n const baseResponse = await this.query('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 * Retrieves all health groups (linked spot & perp products) from the engine\n */\n async getHealthGroups(): Promise<GetEngineHealthGroupsResponse> {\n const baseResponse = await this.query('health_groups', {});\n\n return {\n healthGroups: baseResponse.health_groups.map(\n ([spotProductId, perpProductId]) => {\n return {\n spotProductId,\n perpProductId,\n };\n },\n ),\n };\n }\n\n /**\n * Retrieves an order from the offchain engine\n *\n * @param params\n */\n async getOrder(\n params: GetEngineOrderParams,\n ): Promise<GetEngineOrderResponse> {\n const baseResponse = await this.query('order', {\n digest: params.digest,\n product_id: params.productId,\n });\n\n return mapEngineServerOrder(baseResponse);\n }\n\n /**\n * Signs and validates with the engine that the order is valid to be submitted (i.e. does not violate health reqs)\n *\n * @param params\n */\n async validateOrderParams(\n params: ValidateEngineOrderParams,\n ): Promise<ValidateEngineOrderResponse> {\n const signedOrder = {\n order: params.order,\n signature: await this.sign(\n 'place_order',\n getOrderVerifyingAddress(params.productId),\n params.chainId,\n params.order,\n ),\n };\n return this.validateSignedOrderParams({\n signedOrder,\n productId: params.productId,\n });\n }\n\n /**\n * Validates an existing signed order with the engine as a pre-check for health\n *\n * @param params\n */\n async validateSignedOrderParams(\n params: ValidateSignedEngineOrderParams,\n ): Promise<ValidateEngineOrderResponse> {\n const baseResponse = await this.query('validate_order', {\n product_id: params.productId,\n order: encodeSignedOrder(params.signedOrder),\n });\n\n return {\n productId: baseResponse.product_id,\n valid: baseResponse.valid,\n };\n }\n\n /**\n * Get all subaccount orders from the engine, per product ID\n * @param params\n */\n async getSubaccountOrders(\n params: GetEngineSubaccountOrdersParams,\n ): Promise<GetEngineSubaccountOrdersResponse> {\n const baseResponse = await this.query('subaccount_orders', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n product_id: params.productId,\n });\n\n return {\n orders: baseResponse.orders.map(mapEngineServerOrder),\n productId: params.productId,\n };\n }\n\n /**\n * Get all subaccount orders from the engine, for multiple products\n * @param params\n */\n async getSubaccountMultiProductOrders(\n params: GetEngineSubaccountProductOrdersParams,\n ): Promise<GetEngineSubaccountProductOrdersResponse> {\n const baseResponse = await this.query('orders', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n product_ids: params.productIds,\n });\n\n return {\n productOrders: baseResponse.product_orders.map((orders) => {\n return {\n orders: orders.orders.map(mapEngineServerOrder),\n productId: orders.product_id,\n };\n }),\n };\n }\n\n /**\n * Gets maker & taker fee rates for order fees\n * @param params\n */\n async getSubaccountFeeRates(\n params: GetEngineSubaccountFeeRatesParams,\n ): Promise<GetEngineSubaccountFeeRatesResponse> {\n const baseResponse = await this.query('fee_rates', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return {\n healthCheckSequencerFee: toBigNumber(\n baseResponse.health_check_sequencer_fee,\n ),\n liquidationSequencerFee: toBigNumber(\n baseResponse.liquidation_sequencer_fee,\n ),\n takerSequencerFee: toBigNumber(baseResponse.taker_sequencer_fee),\n orders: baseResponse.taker_fee_rates_x18.reduce(\n (acc, takerRateX18, currIndex) => {\n acc[currIndex] = {\n taker: removeDecimals(takerRateX18),\n maker: removeDecimals(baseResponse.maker_fee_rates_x18[currIndex]),\n };\n return acc;\n },\n {} as Record<number, SubaccountOrderFeeRates>,\n ),\n withdrawal: baseResponse.withdraw_sequencer_fees.reduce(\n (acc, productFee, currIndex) => {\n acc[currIndex] = toBigNumber(productFee);\n return acc;\n },\n {} as Record<number, BigNumber>,\n ),\n feeTier: baseResponse.fee_tier,\n };\n }\n\n /**\n * Gets \"price ticks\" for a given market, useful for constructing liquidity levels at each price\n * @param params\n */\n async getMarketLiquidity(\n params: GetEngineMarketLiquidityParams,\n ): Promise<GetEngineMarketLiquidityResponse> {\n const baseResponse = await this.query('market_liquidity', {\n product_id: params.productId,\n depth: params.depth,\n });\n return {\n asks: baseResponse.asks.map(mapEngineServerTickLiquidity),\n bids: baseResponse.bids.map(mapEngineServerTickLiquidity),\n };\n }\n\n /**\n * Retrieves the latest price for a given market\n * @param params\n */\n async getMarketPrice(\n params: GetEngineMarketPriceParams,\n ): Promise<GetEngineMarketPriceResponse> {\n const baseResponse = await this.query('market_price', {\n product_id: params.productId,\n });\n return mapEngineMarketPrice(baseResponse);\n }\n\n /**\n * Retrieves the latest prices for provided markets\n * @param params\n */\n async getMarketPrices(\n params: GetEngineMarketPricesParams,\n ): Promise<GetEngineMarketPricesResponse> {\n const baseResponse = await this.query('market_prices', {\n product_ids: params.productIds,\n });\n return {\n marketPrices: baseResponse.market_prices.map(mapEngineMarketPrice),\n };\n }\n\n /**\n * Retrieves the estimated max order size for a product\n * @param params\n */\n async getMaxOrderSize(\n params: GetEngineMaxOrderSizeParams,\n ): Promise<GetEngineMaxOrderSizeResponse> {\n const baseResponse = await this.query('max_order_size', {\n direction: params.side,\n price_x18: toIntegerString(addDecimals(params.price)),\n avg_price_x18:\n params.avgPrice != null\n ? toIntegerString(addDecimals(params.avgPrice))\n : null,\n product_id: params.productId,\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n // Backend expects string variants of booleans\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n reduce_only: params.reduceOnly != null ? String(params.reduceOnly) : null,\n isolated: params.isolated != null ? String(params.isolated) : null,\n borrow_margin:\n // This field is only relevant for isolated orders\n params.isolated && params.isoBorrowMargin != null\n ? String(params.isoBorrowMargin)\n : null,\n });\n\n return toBigNumber(baseResponse.max_order_size);\n }\n\n /**\n * Retrieves the estimated max withdrawal size for a product\n * @param params\n */\n async getMaxWithdrawable(\n params: GetEngineMaxWithdrawableParams,\n ): Promise<GetEngineMaxWithdrawableResponse>;\n /**\n * Retrieves the estimated max withdrawal size for a product, with the current dynamic fee of\n * Withdraw Collateral V2 reserved instead of the flat fee. The reserved fee is returned as\n * `fee`.\n * @param params\n * @returns The max withdrawable with the current dynamic fee reserved, and the reserved fee.\n */\n async getMaxWithdrawable(\n params: GetEngineMaxWithdrawableParams,\n options: { withDynamicFee: true },\n ): Promise<GetEngineMaxWithdrawableWithDynamicFeeResponse>;\n async getMaxWithdrawable(\n params: GetEngineMaxWithdrawableParams,\n options?: { withDynamicFee?: boolean },\n ): Promise<\n | GetEngineMaxWithdrawableResponse\n | GetEngineMaxWithdrawableWithDynamicFeeResponse\n > {\n const baseResponse = await this.query('max_withdrawable', {\n product_id: params.productId,\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n dynamic_fee: options?.withDynamicFee ? 'true' : null,\n });\n\n if (options?.withDynamicFee) {\n return {\n maxWithdrawable: toBigNumber(baseResponse.max_withdrawable),\n fee:\n baseResponse.fee_x18 != null\n ? toBigNumber(baseResponse.fee_x18)\n : undefined,\n };\n }\n\n return toBigNumber(baseResponse.max_withdrawable);\n }\n\n /**\n * Retrieves the current dynamic fee for a V2 withdrawal or V2 quote transfer.\n * The fee is priced again at execution, so pass a `maxFeeX18` with some headroom when executing.\n * @param params\n * @returns The current required fee, the fee cap, and the V2 demand pressure.\n */\n async getDynamicFeeQuote(\n params: GetEngineDynamicFeeQuoteParams,\n ): Promise<GetEngineDynamicFeeQuoteResponse> {\n const sender = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n let queryParams: EngineServerDynamicFeeQuoteQueryParams;\n switch (params.kind) {\n case 'withdrawal':\n queryParams = {\n kind: params.kind,\n sender,\n product_id: params.productId,\n };\n break;\n case 'transfer_quote':\n queryParams = {\n kind: params.kind,\n sender,\n recipient: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.recipientSubaccountName,\n }),\n };\n break;\n }\n\n const baseResponse = await this.query('dynamic_fee_quote', queryParams);\n\n return {\n requiredFee: toBigNumber(baseResponse.required_fee_x18),\n feeCap: toBigNumber(baseResponse.fee_cap_x18),\n pressure: toBigNumber(baseResponse.pressure_x18),\n };\n }\n\n /**\n * Retrieves the estimated max quote amount for minting NLP.\n *\n * @param params\n */\n async getMaxMintNlpAmount(\n params: GetEngineMaxMintNlpAmountParams,\n ): Promise<GetEngineMaxMintNlpAmountResponse> {\n const baseResponse = await this.query('max_nlp_mintable', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n });\n\n return toBigNumber(baseResponse.max_quote_amount);\n }\n\n /**\n * Retrieves the max amount of NLP that can be burned.\n *\n * @param params\n */\n async getMaxBurnNlpAmount(\n params: GetEngineMaxBurnNlpAmountParams,\n ): Promise<GetEngineMaxBurnNlpAmountResponse> {\n const baseResponse = await this.query('max_nlp_burnable', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return toBigNumber(baseResponse.max_nlp_amount);\n }\n\n /**\n * Gets the currently linked signer for the subaccount\n * @param params\n * @returns\n */\n public async getLinkedSigner(\n params: GetEngineLinkedSignerParams,\n ): Promise<GetEngineLinkedSignerResponse> {\n const baseResponse = await this.query('linked_signer', {\n subaccount: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return {\n signer: baseResponse.linked_signer,\n };\n }\n\n /**\n * Gets the insurance funds in USDT.\n * @returns\n */\n public async getInsurance(): Promise<GetEngineInsuranceResponse> {\n const baseResponse = await this.query('insurance', {});\n\n return toBigNumber(baseResponse.insurance);\n }\n\n /**\n * Retrieves the NLP locked and unlocked balances for a subaccount.\n *\n * @param params\n */\n async getNlpLockedBalances(\n params: GetEngineNlpLockedBalancesParams,\n ): Promise<GetEngineNlpLockedBalancesResponse> {\n const baseResponse = await this.query('nlp_locked_balances', {\n subaccount: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return mapEngineServerNlpLockedBalances(baseResponse);\n }\n\n /**\n * Retrieves information about all NLP sub-pools\n */\n async getNlpPoolInfo(): Promise<GetEngineNlpPoolInfoResponse> {\n const baseResponse = await this.query('nlp_pool_info', {});\n return mapEngineServerNlpPoolInfo(baseResponse);\n }\n}\n"],"mappings":";;;;;;AA6EA,IAAa,oBAAb,cAAuCA,yBAAAA,iBAAiB;;;;CAItD,MAAM,eAAoD;EACxD,MAAM,eAAe,MAAM,KAAK,MAAM,aAAa,CAAC,CAAC;EACrD,OAAO;GACL,SAAS,OAAO,aAAa,QAAQ;GACrC,cAAc,aAAa;EAC7B;CACF;;;;CAKA,MAAM,YAAiD;EACrD,OAAO,KAAK,MAAM,UAAU,CAAC,CAAC;CAChC;;;;;;;CAQA,MAAM,qBACJ,QAC6C;EAC7C,MAAM,cAAA,GAAA,eAAA,iBAA6B;GACjC,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EAKD,OAAOC,+BAAAA,qBAAqB,MAJD,KAAK,MAAM,mBAAmB,EACvD,WACF,CAAC,CAEuC;CAC1C;;;;;;CAOA,MAAM,qBACJ,QAC6C;EAC7C,MAAM,cAAA,GAAA,eAAA,iBAA6B;GACjC,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EAKD,OAAOC,+BAAAA,iCAAiC,MAJb,KAAK,MAAM,sBAAsB,EAC1D,WACF,CAAC,CAEmD;CACtD;;;;;;CAOA,MAAM,8BACJ,QAC6C;EAC7C,MAAM,cAAA,GAAA,eAAA,iBAA6B;GACjC,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EACD,MAAM,cAAqD;GAC7C;GACZ,MAAM,OAAO,IAAI,KAEb,OAGW;IACX,QAAQ,GAAG,MAAX;K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CAAC,GAGsB,cACvB;CACF;;;;;CAMA,MAAa,eAAoD;EAG/D,QAAA,GAAA,eAAA,cAAmB,MAFQ,KAAK,MAAM,aAAa,CAAC,CAAC,GAErB,SAAS;CAC3C;;;;;;CAOA,MAAM,qBACJ,QAC6C;EAQ7C,OAAOC,+BAAAA,iCAAiC,MAPb,KAAK,MAAM,uBAAuB,EAC3D,aAAA,GAAA,eAAA,iBAA4B;GAC1B,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC,EACH,CAAC,CAEmD;CACtD;;;;CAKA,MAAM,iBAAwD;EAE5D,OAAOC,+BAAAA,2BAA2B,MADP,KAAK,MAAM,iBAAiB,CAAC,CAAC,CACX;CAChD;AACF"}
|
|
1
|
+
{"version":3,"file":"EngineQueryClient.cjs","names":["EngineBaseClient","mapSubaccountSummary","mapEngineServerIsolatedPositions","mapEngineServerSymbols","mapProductEngineType","mapEngineServerSpotProduct","mapEngineServerPerpProduct","mapEngineServerOrder","mapEngineServerTickLiquidity","mapEngineMarketPrice","mapEngineServerNlpLockedBalances","mapEngineServerNlpPoolInfo"],"sources":["../src/EngineQueryClient.ts"],"sourcesContent":["import {\n addDecimals,\n encodeSignedOrder,\n getOrderVerifyingAddress,\n mapValues,\n MarketWithProduct,\n removeDecimals,\n subaccountToHex,\n toBigNumber,\n toIntegerString,\n} from '@nadohq/shared';\nimport BigNumber from 'bignumber.js';\nimport { EngineBaseClient } from './EngineBaseClient';\nimport {\n EngineServerDynamicFeeQuoteQueryParams,\n EngineServerStatusResponse,\n EngineServerSubaccountInfoQueryParams,\n EngineSymbolsResponse,\n GetEngineAllMarketsResponse,\n GetEngineContractsResponse,\n GetEngineDynamicFeeQuoteParams,\n GetEngineDynamicFeeQuoteResponse,\n GetEngineEstimatedSubaccountSummaryParams,\n GetEngineHealthGroupsResponse,\n GetEngineInsuranceResponse,\n GetEngineIsolatedPositionsParams,\n GetEngineIsolatedPositionsResponse,\n GetEngineLinkedSignerParams,\n GetEngineLinkedSignerResponse,\n GetEngineMarketLiquidityParams,\n GetEngineMarketLiquidityResponse,\n GetEngineMarketPriceParams,\n GetEngineMarketPriceResponse,\n GetEngineMarketPricesParams,\n GetEngineMarketPricesResponse,\n GetEngineMaxBurnNlpAmountParams,\n GetEngineMaxBurnNlpAmountResponse,\n GetEngineMaxMintNlpAmountParams,\n GetEngineMaxMintNlpAmountResponse,\n GetEngineMaxOrderSizeParams,\n GetEngineMaxOrderSizeResponse,\n GetEngineMaxWithdrawableParams,\n GetEngineMaxWithdrawableResponse,\n GetEngineNlpLockedBalancesParams,\n GetEngineNlpLockedBalancesResponse,\n GetEngineNlpPoolInfoResponse,\n GetEngineOrderParams,\n GetEngineOrderResponse,\n GetEngineSubaccountFeeRatesParams,\n GetEngineSubaccountFeeRatesResponse,\n GetEngineSubaccountOrdersParams,\n GetEngineSubaccountOrdersResponse,\n GetEngineSubaccountProductOrdersParams,\n GetEngineSubaccountProductOrdersResponse,\n GetEngineSubaccountSummaryParams,\n GetEngineSubaccountSummaryResponse,\n GetEngineSymbolsParams,\n SubaccountOrderFeeRates,\n ValidateEngineOrderParams,\n ValidateEngineOrderResponse,\n ValidateSignedEngineOrderParams,\n} from './types';\nimport { mapProductEngineType } from './utils/productEngineTypeMappers';\nimport {\n mapEngineMarketPrice,\n mapEngineServerIsolatedPositions,\n mapEngineServerNlpLockedBalances,\n mapEngineServerNlpPoolInfo,\n mapEngineServerOrder,\n mapEngineServerPerpProduct,\n mapEngineServerSpotProduct,\n mapEngineServerSymbols,\n mapEngineServerTickLiquidity,\n mapSubaccountSummary,\n} from './utils/queryDataMappers';\n\nexport class EngineQueryClient extends EngineBaseClient {\n /**\n * Retrieves the set of contracts that the engine is interfacing with\n */\n async getContracts(): Promise<GetEngineContractsResponse> {\n const baseResponse = await this.query('contracts', {});\n return {\n chainId: Number(baseResponse.chain_id),\n endpointAddr: baseResponse.endpoint_addr,\n };\n }\n\n /**\n * Retrieves current engine status\n */\n async getStatus(): Promise<EngineServerStatusResponse> {\n return this.query('status', {});\n }\n\n /**\n * Retrieves a subaccount summary reflective of the state within the offchain engine. This adheres to the\n * same return interface as the contract version\n *\n * @param params\n */\n async getSubaccountSummary(\n params: GetEngineSubaccountSummaryParams,\n ): Promise<GetEngineSubaccountSummaryResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const baseResponse = await this.query('subaccount_info', {\n subaccount,\n });\n\n return mapSubaccountSummary(baseResponse);\n }\n\n /**\n * Retrieves a list of isolated positions\n *\n * @param params\n */\n async getIsolatedPositions(\n params: GetEngineIsolatedPositionsParams,\n ): Promise<GetEngineIsolatedPositionsResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const baseResponse = await this.query('isolated_positions', {\n subaccount,\n });\n\n return mapEngineServerIsolatedPositions(baseResponse);\n }\n\n /**\n * Retrieves an estimated subaccount summary with the applied transactions\n *\n * @param params\n */\n async getEstimatedSubaccountSummary(\n params: GetEngineEstimatedSubaccountSummaryParams,\n ): Promise<GetEngineSubaccountSummaryResponse> {\n const subaccount = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n const queryParams: EngineServerSubaccountInfoQueryParams = {\n subaccount: subaccount,\n txns: params.txs.map(\n (\n tx,\n ): NonNullable<\n EngineServerSubaccountInfoQueryParams['txns']\n >[number] => {\n switch (tx.type) {\n case 'apply_delta':\n return {\n apply_delta: {\n product_id: tx.tx.productId,\n subaccount,\n amount_delta: toIntegerString(tx.tx.amountDelta),\n v_quote_delta: toIntegerString(tx.tx.vQuoteDelta),\n },\n };\n }\n },\n ),\n };\n const baseResponse = await this.query('subaccount_info', {\n subaccount: queryParams.subaccount,\n txns: JSON.stringify(queryParams.txns),\n // Backend expects string variants of booleans\n pre_state:\n params.preState !== undefined ? String(params.preState) : undefined,\n });\n\n return mapSubaccountSummary(baseResponse);\n }\n\n /**\n * Retrieves symbols and product info\n *\n * @param params\n */\n async getSymbols(\n params: GetEngineSymbolsParams,\n ): Promise<EngineSymbolsResponse> {\n const baseResponse = await this.query('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 * Retrieves all market states as per the offchain engine. Same return interface as contracts\n */\n async getAllMarkets(): Promise<GetEngineAllMarketsResponse> {\n const markets: MarketWithProduct[] = [];\n\n const baseResponse = await this.query('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 * Retrieves all markets by chain id.\n */\n async getEdgeAllMarkets(): Promise<Record<number, MarketWithProduct[]>> {\n const baseResponse = await this.query('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 * Retrieves all health groups (linked spot & perp products) from the engine\n */\n async getHealthGroups(): Promise<GetEngineHealthGroupsResponse> {\n const baseResponse = await this.query('health_groups', {});\n\n return {\n healthGroups: baseResponse.health_groups.map(\n ([spotProductId, perpProductId]) => {\n return {\n spotProductId,\n perpProductId,\n };\n },\n ),\n };\n }\n\n /**\n * Retrieves an order from the offchain engine\n *\n * @param params\n */\n async getOrder(\n params: GetEngineOrderParams,\n ): Promise<GetEngineOrderResponse> {\n const baseResponse = await this.query('order', {\n digest: params.digest,\n product_id: params.productId,\n });\n\n return mapEngineServerOrder(baseResponse);\n }\n\n /**\n * Signs and validates with the engine that the order is valid to be submitted (i.e. does not violate health reqs)\n *\n * @param params\n */\n async validateOrderParams(\n params: ValidateEngineOrderParams,\n ): Promise<ValidateEngineOrderResponse> {\n const signedOrder = {\n order: params.order,\n signature: await this.sign(\n 'place_order',\n getOrderVerifyingAddress(params.productId),\n params.chainId,\n params.order,\n ),\n };\n return this.validateSignedOrderParams({\n signedOrder,\n productId: params.productId,\n });\n }\n\n /**\n * Validates an existing signed order with the engine as a pre-check for health\n *\n * @param params\n */\n async validateSignedOrderParams(\n params: ValidateSignedEngineOrderParams,\n ): Promise<ValidateEngineOrderResponse> {\n const baseResponse = await this.query('validate_order', {\n product_id: params.productId,\n order: encodeSignedOrder(params.signedOrder),\n });\n\n return {\n productId: baseResponse.product_id,\n valid: baseResponse.valid,\n };\n }\n\n /**\n * Get all subaccount orders from the engine, per product ID\n * @param params\n */\n async getSubaccountOrders(\n params: GetEngineSubaccountOrdersParams,\n ): Promise<GetEngineSubaccountOrdersResponse> {\n const baseResponse = await this.query('subaccount_orders', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n product_id: params.productId,\n });\n\n return {\n orders: baseResponse.orders.map(mapEngineServerOrder),\n productId: params.productId,\n };\n }\n\n /**\n * Get all subaccount orders from the engine, for multiple products\n * @param params\n */\n async getSubaccountMultiProductOrders(\n params: GetEngineSubaccountProductOrdersParams,\n ): Promise<GetEngineSubaccountProductOrdersResponse> {\n const baseResponse = await this.query('orders', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n product_ids: params.productIds,\n });\n\n return {\n productOrders: baseResponse.product_orders.map((orders) => {\n return {\n orders: orders.orders.map(mapEngineServerOrder),\n productId: orders.product_id,\n };\n }),\n };\n }\n\n /**\n * Gets maker & taker fee rates for order fees\n * @param params\n */\n async getSubaccountFeeRates(\n params: GetEngineSubaccountFeeRatesParams,\n ): Promise<GetEngineSubaccountFeeRatesResponse> {\n const baseResponse = await this.query('fee_rates', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return {\n healthCheckSequencerFee: toBigNumber(\n baseResponse.health_check_sequencer_fee,\n ),\n liquidationSequencerFee: toBigNumber(\n baseResponse.liquidation_sequencer_fee,\n ),\n takerSequencerFee: toBigNumber(baseResponse.taker_sequencer_fee),\n orders: baseResponse.taker_fee_rates_x18.reduce(\n (acc, takerRateX18, currIndex) => {\n acc[currIndex] = {\n taker: removeDecimals(takerRateX18),\n maker: removeDecimals(baseResponse.maker_fee_rates_x18[currIndex]),\n };\n return acc;\n },\n {} as Record<number, SubaccountOrderFeeRates>,\n ),\n withdrawal: baseResponse.withdraw_sequencer_fees.reduce(\n (acc, productFee, currIndex) => {\n acc[currIndex] = toBigNumber(productFee);\n return acc;\n },\n {} as Record<number, BigNumber>,\n ),\n feeTier: baseResponse.fee_tier,\n };\n }\n\n /**\n * Gets \"price ticks\" for a given market, useful for constructing liquidity levels at each price\n * @param params\n */\n async getMarketLiquidity(\n params: GetEngineMarketLiquidityParams,\n ): Promise<GetEngineMarketLiquidityResponse> {\n const baseResponse = await this.query('market_liquidity', {\n product_id: params.productId,\n depth: params.depth,\n });\n return {\n asks: baseResponse.asks.map(mapEngineServerTickLiquidity),\n bids: baseResponse.bids.map(mapEngineServerTickLiquidity),\n };\n }\n\n /**\n * Retrieves the latest price for a given market\n * @param params\n */\n async getMarketPrice(\n params: GetEngineMarketPriceParams,\n ): Promise<GetEngineMarketPriceResponse> {\n const baseResponse = await this.query('market_price', {\n product_id: params.productId,\n });\n return mapEngineMarketPrice(baseResponse);\n }\n\n /**\n * Retrieves the latest prices for provided markets\n * @param params\n */\n async getMarketPrices(\n params: GetEngineMarketPricesParams,\n ): Promise<GetEngineMarketPricesResponse> {\n const baseResponse = await this.query('market_prices', {\n product_ids: params.productIds,\n });\n return {\n marketPrices: baseResponse.market_prices.map(mapEngineMarketPrice),\n };\n }\n\n /**\n * Retrieves the estimated max order size for a product\n * @param params\n */\n async getMaxOrderSize(\n params: GetEngineMaxOrderSizeParams,\n ): Promise<GetEngineMaxOrderSizeResponse> {\n const baseResponse = await this.query('max_order_size', {\n direction: params.side,\n price_x18: toIntegerString(addDecimals(params.price)),\n avg_price_x18:\n params.avgPrice != null\n ? toIntegerString(addDecimals(params.avgPrice))\n : null,\n product_id: params.productId,\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n // Backend expects string variants of booleans\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n reduce_only: params.reduceOnly != null ? String(params.reduceOnly) : null,\n isolated: params.isolated != null ? String(params.isolated) : null,\n borrow_margin:\n // This field is only relevant for isolated orders\n params.isolated && params.isoBorrowMargin != null\n ? String(params.isoBorrowMargin)\n : null,\n });\n\n return toBigNumber(baseResponse.max_order_size);\n }\n\n /**\n * Retrieves the estimated max withdrawal size for a product, or the max transferable quote\n * amount to a recipient when `recipientSubaccountName` is set (requires `productId` 0), with the\n * current dynamic fee reserved. The reserved fee is returned as `fee`.\n * @param params\n */\n async getMaxWithdrawable(\n params: GetEngineMaxWithdrawableParams,\n ): Promise<GetEngineMaxWithdrawableResponse> {\n const baseResponse = await this.query('max_withdrawable', {\n product_id: params.productId,\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n dynamic_fee: 'true',\n recipient:\n params.recipientSubaccountName != null\n ? subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.recipientSubaccountName,\n })\n : null,\n });\n\n return {\n maxWithdrawable: toBigNumber(baseResponse.max_withdrawable),\n // Server omits `fee_x18` when the subaccount has no deposits\n fee: toBigNumber(baseResponse.fee_x18 ?? 0),\n };\n }\n\n /**\n * Retrieves the current dynamic fee for a V2 withdrawal or V2 quote transfer.\n * The fee is priced again at execution, so pass a `maxFeeX18` with some headroom when executing.\n * @param params\n * @returns The current required fee, the fee cap, and the V2 demand pressure.\n */\n async getDynamicFeeQuote(\n params: GetEngineDynamicFeeQuoteParams,\n ): Promise<GetEngineDynamicFeeQuoteResponse> {\n const sender = subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n });\n let queryParams: EngineServerDynamicFeeQuoteQueryParams;\n switch (params.kind) {\n case 'withdrawal':\n queryParams = {\n kind: params.kind,\n sender,\n product_id: params.productId,\n };\n break;\n case 'transfer_quote':\n queryParams = {\n kind: params.kind,\n sender,\n recipient: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.recipientSubaccountName,\n }),\n };\n break;\n }\n\n const baseResponse = await this.query('dynamic_fee_quote', queryParams);\n\n return {\n requiredFee: toBigNumber(baseResponse.required_fee_x18),\n feeCap: toBigNumber(baseResponse.fee_cap_x18),\n pressure: toBigNumber(baseResponse.pressure_x18),\n };\n }\n\n /**\n * Retrieves the estimated max quote amount for minting NLP.\n *\n * @param params\n */\n async getMaxMintNlpAmount(\n params: GetEngineMaxMintNlpAmountParams,\n ): Promise<GetEngineMaxMintNlpAmountResponse> {\n const baseResponse = await this.query('max_nlp_mintable', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n spot_leverage:\n params.spotLeverage != null ? String(params.spotLeverage) : null,\n });\n\n return toBigNumber(baseResponse.max_quote_amount);\n }\n\n /**\n * Retrieves the max amount of NLP that can be burned.\n *\n * @param params\n */\n async getMaxBurnNlpAmount(\n params: GetEngineMaxBurnNlpAmountParams,\n ): Promise<GetEngineMaxBurnNlpAmountResponse> {\n const baseResponse = await this.query('max_nlp_burnable', {\n sender: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return toBigNumber(baseResponse.max_nlp_amount);\n }\n\n /**\n * Gets the currently linked signer for the subaccount\n * @param params\n * @returns\n */\n public async getLinkedSigner(\n params: GetEngineLinkedSignerParams,\n ): Promise<GetEngineLinkedSignerResponse> {\n const baseResponse = await this.query('linked_signer', {\n subaccount: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return {\n signer: baseResponse.linked_signer,\n };\n }\n\n /**\n * Gets the insurance funds in USDT.\n * @returns\n */\n public async getInsurance(): Promise<GetEngineInsuranceResponse> {\n const baseResponse = await this.query('insurance', {});\n\n return toBigNumber(baseResponse.insurance);\n }\n\n /**\n * Retrieves the NLP locked and unlocked balances for a subaccount.\n *\n * @param params\n */\n async getNlpLockedBalances(\n params: GetEngineNlpLockedBalancesParams,\n ): Promise<GetEngineNlpLockedBalancesResponse> {\n const baseResponse = await this.query('nlp_locked_balances', {\n subaccount: subaccountToHex({\n subaccountOwner: params.subaccountOwner,\n subaccountName: params.subaccountName,\n }),\n });\n\n return mapEngineServerNlpLockedBalances(baseResponse);\n }\n\n /**\n * Retrieves information about all NLP sub-pools\n */\n async getNlpPoolInfo(): Promise<GetEngineNlpPoolInfoResponse> {\n const baseResponse = await this.query('nlp_pool_info', {});\n return mapEngineServerNlpPoolInfo(baseResponse);\n }\n}\n"],"mappings":";;;;;;AA4EA,IAAa,oBAAb,cAAuCA,yBAAAA,iBAAiB;;;;CAItD,MAAM,eAAoD;EACxD,MAAM,eAAe,MAAM,KAAK,MAAM,aAAa,CAAC,CAAC;EACrD,OAAO;GACL,SAAS,OAAO,aAAa,QAAQ;GACrC,cAAc,aAAa;EAC7B;CACF;;;;CAKA,MAAM,YAAiD;EACrD,OAAO,KAAK,MAAM,UAAU,CAAC,CAAC;CAChC;;;;;;;CAQA,MAAM,qBACJ,QAC6C;EAC7C,MAAM,cAAA,GAAA,eAAA,iBAA6B;GACjC,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC;EAKD,OAAOC,+BAAAA,qBAAqB,MAJD,KAAK,MAAM,mBAAmB,EACvD,WACF,CAAC,CAEuC;CAC1C;;;;;;CAOA,MAAM,qBACJ,QAC6C;EAC7C,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;CAClD;;;;;;CAOA,MAAM,oBACJ,QAC4C;EAQ5C,QAAA,GAAA,eAAA,cAAmB,MAPQ,KAAK,MAAM,oBAAoB,EACxD,SAAA,GAAA,eAAA,iBAAwB;GACtB,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC,EACH,CAAC,GAE+B,cAAc;CAChD;;;;;;CAOA,MAAa,gBACX,QACwC;EAQxC,OAAO,EACL,SAAQ,MARiB,KAAK,MAAM,iBAAiB,EACrD,aAAA,GAAA,eAAA,iBAA4B;GAC1B,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC,EACH,CAAC,GAGsB,cACvB;CACF;;;;;CAMA,MAAa,eAAoD;EAG/D,QAAA,GAAA,eAAA,cAAmB,MAFQ,KAAK,MAAM,aAAa,CAAC,CAAC,GAErB,SAAS;CAC3C;;;;;;CAOA,MAAM,qBACJ,QAC6C;EAQ7C,OAAOC,+BAAAA,iCAAiC,MAPb,KAAK,MAAM,uBAAuB,EAC3D,aAAA,GAAA,eAAA,iBAA4B;GAC1B,iBAAiB,OAAO;GACxB,gBAAgB,OAAO;EACzB,CAAC,EACH,CAAC,CAEmD;CACtD;;;;CAKA,MAAM,iBAAwD;EAE5D,OAAOC,+BAAAA,2BAA2B,MADP,KAAK,MAAM,iBAAiB,CAAC,CAAC,CACX;CAChD;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineQueryClient } from "./EngineQueryClient-
|
|
1
|
+
import { t as EngineQueryClient } from "./EngineQueryClient-BgFEpsv8.cjs";
|
|
2
2
|
export { EngineQueryClient };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as EngineQueryClient } from "./EngineQueryClient-
|
|
1
|
+
import { t as EngineQueryClient } from "./EngineQueryClient-DN3nc5u1.js";
|
|
2
2
|
export { EngineQueryClient };
|