@nadohq/client 0.15.0 → 0.18.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/BaseSpotAPI-BeTjhXT_.d.cts +14 -0
- package/dist/BaseSpotAPI-BeTjhXT_.d.cts.map +1 -0
- package/dist/BaseSpotAPI-Ck64kyYt.d.ts +14 -0
- package/dist/BaseSpotAPI-Ck64kyYt.d.ts.map +1 -0
- package/dist/MarketExecuteAPI-BBp0Nn6N.d.cts +55 -0
- package/dist/MarketExecuteAPI-BBp0Nn6N.d.cts.map +1 -0
- package/dist/MarketExecuteAPI-_S9-rNsv.d.ts +55 -0
- package/dist/MarketExecuteAPI-_S9-rNsv.d.ts.map +1 -0
- package/dist/MarketQueryAPI-Dhb8hWiD.d.cts +118 -0
- package/dist/MarketQueryAPI-Dhb8hWiD.d.cts.map +1 -0
- package/dist/MarketQueryAPI-Dz8FrVPK.d.ts +118 -0
- package/dist/MarketQueryAPI-Dz8FrVPK.d.ts.map +1 -0
- package/dist/PerpExecuteAPI-C0APgWq4.d.cts +7 -0
- package/dist/PerpExecuteAPI-C0APgWq4.d.cts.map +1 -0
- package/dist/PerpExecuteAPI-DPNJdARF.d.ts +7 -0
- package/dist/PerpExecuteAPI-DPNJdARF.d.ts.map +1 -0
- package/dist/PerpQueryAPI-RGhdNhoJ.d.cts +19 -0
- package/dist/PerpQueryAPI-RGhdNhoJ.d.cts.map +1 -0
- package/dist/PerpQueryAPI-tJbMmCcO.d.ts +19 -0
- package/dist/PerpQueryAPI-tJbMmCcO.d.ts.map +1 -0
- package/dist/SpotExecuteAPI-UWnX_Hm4.d.ts +22 -0
- package/dist/SpotExecuteAPI-UWnX_Hm4.d.ts.map +1 -0
- package/dist/SpotExecuteAPI-b07ixUz2.d.cts +22 -0
- package/dist/SpotExecuteAPI-b07ixUz2.d.cts.map +1 -0
- package/dist/SpotQueryAPI-CfZcvt4p.d.ts +36 -0
- package/dist/SpotQueryAPI-CfZcvt4p.d.ts.map +1 -0
- package/dist/SpotQueryAPI-DS85MzQB.d.cts +36 -0
- package/dist/SpotQueryAPI-DS85MzQB.d.cts.map +1 -0
- package/dist/SubaccountExecuteAPI-DhHBzzdk.d.cts +21 -0
- package/dist/SubaccountExecuteAPI-DhHBzzdk.d.cts.map +1 -0
- package/dist/SubaccountExecuteAPI-KApMbONz.d.ts +21 -0
- package/dist/SubaccountExecuteAPI-KApMbONz.d.ts.map +1 -0
- package/dist/SubaccountQueryAPI-C9h3epmM.d.cts +40 -0
- package/dist/SubaccountQueryAPI-C9h3epmM.d.cts.map +1 -0
- package/dist/SubaccountQueryAPI-DnLcgfiM.d.ts +40 -0
- package/dist/SubaccountQueryAPI-DnLcgfiM.d.ts.map +1 -0
- package/dist/WebSocketExecuteAPI-7gLrCoXN.d.cts +44 -0
- package/dist/WebSocketExecuteAPI-7gLrCoXN.d.cts.map +1 -0
- package/dist/WebSocketExecuteAPI-DHhKag16.d.ts +44 -0
- package/dist/WebSocketExecuteAPI-DHhKag16.d.ts.map +1 -0
- package/dist/WebSocketQueryAPI-B9vBQo5q.d.ts +20 -0
- package/dist/WebSocketQueryAPI-B9vBQo5q.d.ts.map +1 -0
- package/dist/WebSocketQueryAPI-BMLp4dCH.d.cts +20 -0
- package/dist/WebSocketQueryAPI-BMLp4dCH.d.cts.map +1 -0
- package/dist/WebSocketSubscriptionAPI-bApRHac8.d.cts +34 -0
- package/dist/WebSocketSubscriptionAPI-bApRHac8.d.cts.map +1 -0
- package/dist/WebSocketSubscriptionAPI-qUFRFcRI.d.ts +34 -0
- package/dist/WebSocketSubscriptionAPI-qUFRFcRI.d.ts.map +1 -0
- package/dist/apis/base.cjs +30 -60
- package/dist/apis/base.cjs.map +1 -1
- package/dist/apis/base.d.cts +2 -22
- package/dist/apis/base.d.ts +2 -22
- package/dist/apis/base.js +28 -34
- package/dist/apis/base.js.map +1 -1
- package/dist/apis/market/MarketExecuteAPI.cjs +164 -190
- package/dist/apis/market/MarketExecuteAPI.cjs.map +1 -1
- package/dist/apis/market/MarketExecuteAPI.d.cts +2 -61
- package/dist/apis/market/MarketExecuteAPI.d.ts +2 -61
- package/dist/apis/market/MarketExecuteAPI.js +162 -164
- package/dist/apis/market/MarketExecuteAPI.js.map +1 -1
- package/dist/apis/market/MarketQueryAPI.cjs +157 -181
- package/dist/apis/market/MarketQueryAPI.cjs.map +1 -1
- package/dist/apis/market/MarketQueryAPI.d.cts +2 -124
- package/dist/apis/market/MarketQueryAPI.d.ts +2 -124
- package/dist/apis/market/MarketQueryAPI.js +155 -155
- package/dist/apis/market/MarketQueryAPI.js.map +1 -1
- package/dist/apis/market/index.cjs +8 -36
- package/dist/apis/market/index.cjs.map +1 -1
- package/dist/apis/market/index.d.cts +3 -19
- package/dist/apis/market/index.d.ts +3 -19
- package/dist/apis/market/index.js +6 -8
- package/dist/apis/market/index.js.map +1 -1
- package/dist/apis/market/types.cjs +0 -19
- package/dist/apis/market/types.d.cts +2 -41
- package/dist/apis/market/types.d.ts +2 -41
- package/dist/apis/market/types.js +1 -1
- package/dist/apis/perp/PerpExecuteAPI.cjs +6 -31
- package/dist/apis/perp/PerpExecuteAPI.cjs.map +1 -1
- package/dist/apis/perp/PerpExecuteAPI.d.cts +2 -12
- package/dist/apis/perp/PerpExecuteAPI.d.ts +2 -12
- package/dist/apis/perp/PerpExecuteAPI.js +5 -6
- package/dist/apis/perp/PerpExecuteAPI.js.map +1 -1
- package/dist/apis/perp/PerpQueryAPI.cjs +20 -44
- package/dist/apis/perp/PerpQueryAPI.cjs.map +1 -1
- package/dist/apis/perp/PerpQueryAPI.d.cts +2 -23
- package/dist/apis/perp/PerpQueryAPI.d.ts +2 -23
- package/dist/apis/perp/PerpQueryAPI.js +18 -18
- package/dist/apis/perp/PerpQueryAPI.js.map +1 -1
- package/dist/apis/perp/index.cjs +8 -33
- package/dist/apis/perp/index.cjs.map +1 -1
- package/dist/apis/perp/index.d.cts +2 -16
- package/dist/apis/perp/index.d.ts +2 -16
- package/dist/apis/perp/index.js +6 -7
- package/dist/apis/perp/index.js.map +1 -1
- package/dist/apis/spot/BaseSpotAPI.cjs +21 -51
- package/dist/apis/spot/BaseSpotAPI.cjs.map +1 -1
- package/dist/apis/spot/BaseSpotAPI.d.cts +2 -18
- package/dist/apis/spot/BaseSpotAPI.d.ts +2 -18
- package/dist/apis/spot/BaseSpotAPI.js +19 -28
- package/dist/apis/spot/BaseSpotAPI.js.map +1 -1
- package/dist/apis/spot/SpotExecuteAPI.cjs +72 -104
- package/dist/apis/spot/SpotExecuteAPI.cjs.map +1 -1
- package/dist/apis/spot/SpotExecuteAPI.d.cts +2 -27
- package/dist/apis/spot/SpotExecuteAPI.d.ts +2 -27
- package/dist/apis/spot/SpotExecuteAPI.js +70 -85
- package/dist/apis/spot/SpotExecuteAPI.js.map +1 -1
- package/dist/apis/spot/SpotQueryAPI.cjs +34 -71
- package/dist/apis/spot/SpotQueryAPI.cjs.map +1 -1
- package/dist/apis/spot/SpotQueryAPI.d.cts +2 -35
- package/dist/apis/spot/SpotQueryAPI.d.ts +2 -35
- package/dist/apis/spot/SpotQueryAPI.js +32 -45
- package/dist/apis/spot/SpotQueryAPI.js.map +1 -1
- package/dist/apis/spot/index.cjs +11 -36
- package/dist/apis/spot/index.cjs.map +1 -1
- package/dist/apis/spot/index.d.cts +3 -23
- package/dist/apis/spot/index.d.ts +3 -23
- package/dist/apis/spot/index.js +9 -8
- package/dist/apis/spot/index.js.map +1 -1
- package/dist/apis/spot/types.cjs +0 -19
- package/dist/apis/spot/types.d.cts +2 -27
- package/dist/apis/spot/types.d.ts +2 -27
- package/dist/apis/spot/types.js +1 -1
- package/dist/apis/subaccount/SubaccountExecuteAPI.cjs +32 -56
- package/dist/apis/subaccount/SubaccountExecuteAPI.cjs.map +1 -1
- package/dist/apis/subaccount/SubaccountExecuteAPI.d.cts +2 -26
- package/dist/apis/subaccount/SubaccountExecuteAPI.d.ts +2 -26
- package/dist/apis/subaccount/SubaccountExecuteAPI.js +30 -30
- package/dist/apis/subaccount/SubaccountExecuteAPI.js.map +1 -1
- package/dist/apis/subaccount/SubaccountQueryAPI.cjs +48 -72
- package/dist/apis/subaccount/SubaccountQueryAPI.cjs.map +1 -1
- package/dist/apis/subaccount/SubaccountQueryAPI.d.cts +2 -44
- package/dist/apis/subaccount/SubaccountQueryAPI.d.ts +2 -44
- package/dist/apis/subaccount/SubaccountQueryAPI.js +46 -46
- package/dist/apis/subaccount/SubaccountQueryAPI.js.map +1 -1
- package/dist/apis/subaccount/index.cjs +32 -64
- package/dist/apis/subaccount/index.cjs.map +1 -1
- package/dist/apis/subaccount/index.d.cts +3 -27
- package/dist/apis/subaccount/index.d.ts +3 -27
- package/dist/apis/subaccount/index.js +30 -39
- package/dist/apis/subaccount/index.js.map +1 -1
- package/dist/apis/subaccount/types.cjs +0 -19
- package/dist/apis/subaccount/types.d.cts +2 -9
- package/dist/apis/subaccount/types.d.ts +2 -9
- package/dist/apis/subaccount/types.js +1 -1
- package/dist/apis/types.cjs +0 -19
- package/dist/apis/types.d.cts +2 -9
- package/dist/apis/types.d.ts +2 -9
- package/dist/apis/types.js +1 -1
- package/dist/apis/ws/WebSocketExecuteAPI.cjs +42 -70
- package/dist/apis/ws/WebSocketExecuteAPI.cjs.map +1 -1
- package/dist/apis/ws/WebSocketExecuteAPI.d.cts +2 -48
- package/dist/apis/ws/WebSocketExecuteAPI.d.ts +2 -48
- package/dist/apis/ws/WebSocketExecuteAPI.js +40 -44
- package/dist/apis/ws/WebSocketExecuteAPI.js.map +1 -1
- package/dist/apis/ws/WebSocketQueryAPI.cjs +19 -39
- package/dist/apis/ws/WebSocketQueryAPI.cjs.map +1 -1
- package/dist/apis/ws/WebSocketQueryAPI.d.cts +2 -23
- package/dist/apis/ws/WebSocketQueryAPI.d.ts +2 -23
- package/dist/apis/ws/WebSocketQueryAPI.js +17 -13
- package/dist/apis/ws/WebSocketQueryAPI.js.map +1 -1
- package/dist/apis/ws/WebSocketSubscriptionAPI.cjs +40 -58
- package/dist/apis/ws/WebSocketSubscriptionAPI.cjs.map +1 -1
- package/dist/apis/ws/WebSocketSubscriptionAPI.d.cts +2 -37
- package/dist/apis/ws/WebSocketSubscriptionAPI.d.ts +2 -37
- package/dist/apis/ws/WebSocketSubscriptionAPI.js +38 -32
- package/dist/apis/ws/WebSocketSubscriptionAPI.js.map +1 -1
- package/dist/apis/ws/index.cjs +18 -39
- package/dist/apis/ws/index.cjs.map +1 -1
- package/dist/apis/ws/index.d.cts +2 -22
- package/dist/apis/ws/index.d.ts +2 -22
- package/dist/apis/ws/index.js +13 -10
- package/dist/apis/ws/index.js.map +1 -1
- package/dist/base-B92wTsrc.d.ts +20 -0
- package/dist/base-B92wTsrc.d.ts.map +1 -0
- package/dist/base-BYkH_-5-.d.cts +20 -0
- package/dist/base-BYkH_-5-.d.cts.map +1 -0
- package/dist/client.cjs +53 -77
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +28 -49
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.ts +28 -49
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +46 -46
- package/dist/client.js.map +1 -1
- package/dist/context-YHVv2kD4.d.cts +44 -0
- package/dist/context-YHVv2kD4.d.cts.map +1 -0
- package/dist/context-YfcGQ0Sr.d.ts +44 -0
- package/dist/context-YfcGQ0Sr.d.ts.map +1 -0
- package/dist/context.cjs +92 -122
- package/dist/context.cjs.map +1 -1
- package/dist/context.d.cts +2 -42
- package/dist/context.d.ts +2 -42
- package/dist/context.js +90 -105
- package/dist/context.js.map +1 -1
- package/dist/createNadoClient.cjs +15 -32
- package/dist/createNadoClient.cjs.map +1 -1
- package/dist/createNadoClient.d.cts +5 -32
- package/dist/createNadoClient.d.cts.map +1 -0
- package/dist/createNadoClient.d.ts +5 -32
- package/dist/createNadoClient.d.ts.map +1 -0
- package/dist/createNadoClient.js +13 -8
- package/dist/createNadoClient.js.map +1 -1
- package/dist/index-BFQPcj2w.d.cts +9 -0
- package/dist/index-BFQPcj2w.d.cts.map +1 -0
- package/dist/index-CSG04f_b.d.cts +12 -0
- package/dist/index-CSG04f_b.d.cts.map +1 -0
- package/dist/index-Cc2RdeRK.d.cts +19 -0
- package/dist/index-Cc2RdeRK.d.cts.map +1 -0
- package/dist/index-DIX4yJe-.d.ts +9 -0
- package/dist/index-DIX4yJe-.d.ts.map +1 -0
- package/dist/index-DVJ1Mu6s.d.ts +9 -0
- package/dist/index-DVJ1Mu6s.d.ts.map +1 -0
- package/dist/index-DkTJs2nZ.d.cts +9 -0
- package/dist/index-DkTJs2nZ.d.cts.map +1 -0
- package/dist/index-Dw9iFeeU.d.ts +19 -0
- package/dist/index-Dw9iFeeU.d.ts.map +1 -0
- package/dist/index-Mhjd1FK8.d.ts +12 -0
- package/dist/index-Mhjd1FK8.d.ts.map +1 -0
- package/dist/index-RtQYDuRY.d.ts +19 -0
- package/dist/index-RtQYDuRY.d.ts.map +1 -0
- package/dist/index-jTtf55U_.d.cts +19 -0
- package/dist/index-jTtf55U_.d.cts.map +1 -0
- package/dist/index.cjs +50 -44
- package/dist/index.d.cts +15 -32
- package/dist/index.d.ts +15 -32
- package/dist/index.js +9 -10
- package/dist/types-B-tOIIKl.d.ts +29 -0
- package/dist/types-B-tOIIKl.d.ts.map +1 -0
- package/dist/types-B6oFoDTo.d.ts +11 -0
- package/dist/types-B6oFoDTo.d.ts.map +1 -0
- package/dist/types-BFFzjzRy.d.ts +43 -0
- package/dist/types-BFFzjzRy.d.ts.map +1 -0
- package/dist/types-BWRdhQd_.d.cts +11 -0
- package/dist/types-BWRdhQd_.d.cts.map +1 -0
- package/dist/types-C5DKLOen.d.ts +11 -0
- package/dist/types-C5DKLOen.d.ts.map +1 -0
- package/dist/types-CCj4QJO8.d.cts +29 -0
- package/dist/types-CCj4QJO8.d.cts.map +1 -0
- package/dist/types-D27__G6_.d.cts +11 -0
- package/dist/types-D27__G6_.d.cts.map +1 -0
- package/dist/types-YBdM1sun.d.cts +43 -0
- package/dist/types-YBdM1sun.d.cts.map +1 -0
- package/package.json +11 -11
- package/dist/apis/market/types.cjs.map +0 -1
- package/dist/apis/market/types.js.map +0 -1
- package/dist/apis/spot/types.cjs.map +0 -1
- package/dist/apis/spot/types.js.map +0 -1
- package/dist/apis/subaccount/types.cjs.map +0 -1
- package/dist/apis/subaccount/types.js.map +0 -1
- package/dist/apis/types.cjs.map +0 -1
- package/dist/apis/types.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,33 +1,8 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_apis_base = require("../base.cjs");
|
|
3
|
+
//#region src/apis/perp/PerpExecuteAPI.ts
|
|
4
|
+
var PerpExecuteAPI = class extends require_apis_base.BaseNadoAPI {};
|
|
5
|
+
//#endregion
|
|
6
|
+
exports.PerpExecuteAPI = PerpExecuteAPI;
|
|
19
7
|
|
|
20
|
-
// src/apis/perp/PerpExecuteAPI.ts
|
|
21
|
-
var PerpExecuteAPI_exports = {};
|
|
22
|
-
__export(PerpExecuteAPI_exports, {
|
|
23
|
-
PerpExecuteAPI: () => PerpExecuteAPI
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(PerpExecuteAPI_exports);
|
|
26
|
-
var import_base = require("../base.cjs");
|
|
27
|
-
var PerpExecuteAPI = class extends import_base.BaseNadoAPI {
|
|
28
|
-
};
|
|
29
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
-
0 && (module.exports = {
|
|
31
|
-
PerpExecuteAPI
|
|
32
|
-
});
|
|
33
8
|
//# sourceMappingURL=PerpExecuteAPI.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/apis/perp/PerpExecuteAPI.ts"],"sourcesContent":["import { BaseNadoAPI } from '../base';\n\nexport class PerpExecuteAPI extends BaseNadoAPI {}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PerpExecuteAPI.cjs","names":["BaseNadoAPI"],"sources":["../../../src/apis/perp/PerpExecuteAPI.ts"],"sourcesContent":["import { BaseNadoAPI } from '../base';\n\nexport class PerpExecuteAPI extends BaseNadoAPI {}\n"],"mappings":";;;AAEA,IAAa,iBAAb,cAAoCA,kBAAAA,YAAY,CAAC"}
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import '../../context.cjs';
|
|
4
|
-
import '@nadohq/engine-client';
|
|
5
|
-
import '@nadohq/indexer-client';
|
|
6
|
-
import '@nadohq/trigger-client';
|
|
7
|
-
import 'viem';
|
|
8
|
-
|
|
9
|
-
declare class PerpExecuteAPI extends BaseNadoAPI {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { PerpExecuteAPI };
|
|
1
|
+
import { t as PerpExecuteAPI } from "../../PerpExecuteAPI-C0APgWq4.cjs";
|
|
2
|
+
export { PerpExecuteAPI };
|
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import '../../context.js';
|
|
4
|
-
import '@nadohq/engine-client';
|
|
5
|
-
import '@nadohq/indexer-client';
|
|
6
|
-
import '@nadohq/trigger-client';
|
|
7
|
-
import 'viem';
|
|
8
|
-
|
|
9
|
-
declare class PerpExecuteAPI extends BaseNadoAPI {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { PerpExecuteAPI };
|
|
1
|
+
import { t as PerpExecuteAPI } from "../../PerpExecuteAPI-DPNJdARF.js";
|
|
2
|
+
export { PerpExecuteAPI };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
// src/apis/perp/PerpExecuteAPI.ts
|
|
2
1
|
import { BaseNadoAPI } from "../base.js";
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
//#region src/apis/perp/PerpExecuteAPI.ts
|
|
3
|
+
var PerpExecuteAPI = class extends BaseNadoAPI {};
|
|
4
|
+
//#endregion
|
|
5
|
+
export { PerpExecuteAPI };
|
|
6
|
+
|
|
8
7
|
//# sourceMappingURL=PerpExecuteAPI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/apis/perp/PerpExecuteAPI.ts"],"sourcesContent":["import { BaseNadoAPI } from '../base';\n\nexport class PerpExecuteAPI extends BaseNadoAPI {}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PerpExecuteAPI.js","names":[],"sources":["../../../src/apis/perp/PerpExecuteAPI.ts"],"sourcesContent":["import { BaseNadoAPI } from '../base';\n\nexport class PerpExecuteAPI extends BaseNadoAPI {}\n"],"mappings":";;AAEA,IAAa,iBAAb,cAAoC,YAAY,CAAC"}
|
|
@@ -1,47 +1,23 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_apis_base = require("../base.cjs");
|
|
3
|
+
//#region src/apis/perp/PerpQueryAPI.ts
|
|
4
|
+
var PerpQueryAPI = class extends require_apis_base.BaseNadoAPI {
|
|
5
|
+
/**
|
|
6
|
+
* Gets the latest index & mark price for a perp product
|
|
7
|
+
* @param params
|
|
8
|
+
*/
|
|
9
|
+
async getPerpPrices(params) {
|
|
10
|
+
return this.context.indexerClient.getPerpPrices(params);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Gets the latest index & mark price for multiple perp products
|
|
14
|
+
* @param params
|
|
15
|
+
*/
|
|
16
|
+
async getMultiProductPerpPrices(params) {
|
|
17
|
+
return this.context.indexerClient.getMultiProductPerpPrices(params);
|
|
18
|
+
}
|
|
9
19
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.PerpQueryAPI = PerpQueryAPI;
|
|
19
22
|
|
|
20
|
-
// src/apis/perp/PerpQueryAPI.ts
|
|
21
|
-
var PerpQueryAPI_exports = {};
|
|
22
|
-
__export(PerpQueryAPI_exports, {
|
|
23
|
-
PerpQueryAPI: () => PerpQueryAPI
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(PerpQueryAPI_exports);
|
|
26
|
-
var import_base = require("../base.cjs");
|
|
27
|
-
var PerpQueryAPI = class extends import_base.BaseNadoAPI {
|
|
28
|
-
/**
|
|
29
|
-
* Gets the latest index & mark price for a perp product
|
|
30
|
-
* @param params
|
|
31
|
-
*/
|
|
32
|
-
async getPerpPrices(params) {
|
|
33
|
-
return this.context.indexerClient.getPerpPrices(params);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Gets the latest index & mark price for multiple perp products
|
|
37
|
-
* @param params
|
|
38
|
-
*/
|
|
39
|
-
async getMultiProductPerpPrices(params) {
|
|
40
|
-
return this.context.indexerClient.getMultiProductPerpPrices(params);
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 && (module.exports = {
|
|
45
|
-
PerpQueryAPI
|
|
46
|
-
});
|
|
47
23
|
//# sourceMappingURL=PerpQueryAPI.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/apis/perp/PerpQueryAPI.ts"],"sourcesContent":["import {\n GetIndexerMultiProductPerpPricesParams,\n GetIndexerPerpPricesParams,\n} from '@nadohq/indexer-client';\nimport { BaseNadoAPI } from '../base';\n\nexport class PerpQueryAPI extends BaseNadoAPI {\n /**\n * Gets the latest index & mark price for a perp product\n * @param params\n */\n async getPerpPrices(params: GetIndexerPerpPricesParams) {\n return this.context.indexerClient.getPerpPrices(params);\n }\n\n /**\n * Gets the latest index & mark price for multiple perp products\n * @param params\n */\n async getMultiProductPerpPrices(\n params: GetIndexerMultiProductPerpPricesParams,\n ) {\n return this.context.indexerClient.getMultiProductPerpPrices(params);\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PerpQueryAPI.cjs","names":["BaseNadoAPI"],"sources":["../../../src/apis/perp/PerpQueryAPI.ts"],"sourcesContent":["import {\n GetIndexerMultiProductPerpPricesParams,\n GetIndexerPerpPricesParams,\n} from '@nadohq/indexer-client';\nimport { BaseNadoAPI } from '../base';\n\nexport class PerpQueryAPI extends BaseNadoAPI {\n /**\n * Gets the latest index & mark price for a perp product\n * @param params\n */\n async getPerpPrices(params: GetIndexerPerpPricesParams) {\n return this.context.indexerClient.getPerpPrices(params);\n }\n\n /**\n * Gets the latest index & mark price for multiple perp products\n * @param params\n */\n async getMultiProductPerpPrices(\n params: GetIndexerMultiProductPerpPricesParams,\n ) {\n return this.context.indexerClient.getMultiProductPerpPrices(params);\n }\n}\n"],"mappings":";;;AAMA,IAAa,eAAb,cAAkCA,kBAAAA,YAAY;;;;;CAK5C,MAAM,cAAc,QAAoC;EACtD,OAAO,KAAK,QAAQ,cAAc,cAAc,MAAM;CACxD;;;;;CAMA,MAAM,0BACJ,QACA;EACA,OAAO,KAAK,QAAQ,cAAc,0BAA0B,MAAM;CACpE;AACF"}
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { BaseNadoAPI } from '../base.cjs';
|
|
4
|
-
import '@nadohq/shared';
|
|
5
|
-
import '../../context.cjs';
|
|
6
|
-
import '@nadohq/engine-client';
|
|
7
|
-
import '@nadohq/trigger-client';
|
|
8
|
-
import 'viem';
|
|
9
|
-
|
|
10
|
-
declare class PerpQueryAPI extends BaseNadoAPI {
|
|
11
|
-
/**
|
|
12
|
-
* Gets the latest index & mark price for a perp product
|
|
13
|
-
* @param params
|
|
14
|
-
*/
|
|
15
|
-
getPerpPrices(params: GetIndexerPerpPricesParams): Promise<_nadohq_indexer_client.IndexerPerpPrices>;
|
|
16
|
-
/**
|
|
17
|
-
* Gets the latest index & mark price for multiple perp products
|
|
18
|
-
* @param params
|
|
19
|
-
*/
|
|
20
|
-
getMultiProductPerpPrices(params: GetIndexerMultiProductPerpPricesParams): Promise<_nadohq_indexer_client.GetIndexerMultiProductPerpPricesResponse>;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { PerpQueryAPI };
|
|
1
|
+
import { t as PerpQueryAPI } from "../../PerpQueryAPI-RGhdNhoJ.cjs";
|
|
2
|
+
export { PerpQueryAPI };
|
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { BaseNadoAPI } from '../base.js';
|
|
4
|
-
import '@nadohq/shared';
|
|
5
|
-
import '../../context.js';
|
|
6
|
-
import '@nadohq/engine-client';
|
|
7
|
-
import '@nadohq/trigger-client';
|
|
8
|
-
import 'viem';
|
|
9
|
-
|
|
10
|
-
declare class PerpQueryAPI extends BaseNadoAPI {
|
|
11
|
-
/**
|
|
12
|
-
* Gets the latest index & mark price for a perp product
|
|
13
|
-
* @param params
|
|
14
|
-
*/
|
|
15
|
-
getPerpPrices(params: GetIndexerPerpPricesParams): Promise<_nadohq_indexer_client.IndexerPerpPrices>;
|
|
16
|
-
/**
|
|
17
|
-
* Gets the latest index & mark price for multiple perp products
|
|
18
|
-
* @param params
|
|
19
|
-
*/
|
|
20
|
-
getMultiProductPerpPrices(params: GetIndexerMultiProductPerpPricesParams): Promise<_nadohq_indexer_client.GetIndexerMultiProductPerpPricesResponse>;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { PerpQueryAPI };
|
|
1
|
+
import { t as PerpQueryAPI } from "../../PerpQueryAPI-tJbMmCcO.js";
|
|
2
|
+
export { PerpQueryAPI };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
// src/apis/perp/PerpQueryAPI.ts
|
|
2
1
|
import { BaseNadoAPI } from "../base.js";
|
|
2
|
+
//#region src/apis/perp/PerpQueryAPI.ts
|
|
3
3
|
var PerpQueryAPI = class extends BaseNadoAPI {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
PerpQueryAPI
|
|
4
|
+
/**
|
|
5
|
+
* Gets the latest index & mark price for a perp product
|
|
6
|
+
* @param params
|
|
7
|
+
*/
|
|
8
|
+
async getPerpPrices(params) {
|
|
9
|
+
return this.context.indexerClient.getPerpPrices(params);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Gets the latest index & mark price for multiple perp products
|
|
13
|
+
* @param params
|
|
14
|
+
*/
|
|
15
|
+
async getMultiProductPerpPrices(params) {
|
|
16
|
+
return this.context.indexerClient.getMultiProductPerpPrices(params);
|
|
17
|
+
}
|
|
21
18
|
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { PerpQueryAPI };
|
|
21
|
+
|
|
22
22
|
//# sourceMappingURL=PerpQueryAPI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/apis/perp/PerpQueryAPI.ts"],"sourcesContent":["import {\n GetIndexerMultiProductPerpPricesParams,\n GetIndexerPerpPricesParams,\n} from '@nadohq/indexer-client';\nimport { BaseNadoAPI } from '../base';\n\nexport class PerpQueryAPI extends BaseNadoAPI {\n /**\n * Gets the latest index & mark price for a perp product\n * @param params\n */\n async getPerpPrices(params: GetIndexerPerpPricesParams) {\n return this.context.indexerClient.getPerpPrices(params);\n }\n\n /**\n * Gets the latest index & mark price for multiple perp products\n * @param params\n */\n async getMultiProductPerpPrices(\n params: GetIndexerMultiProductPerpPricesParams,\n ) {\n return this.context.indexerClient.getMultiProductPerpPrices(params);\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PerpQueryAPI.js","names":[],"sources":["../../../src/apis/perp/PerpQueryAPI.ts"],"sourcesContent":["import {\n GetIndexerMultiProductPerpPricesParams,\n GetIndexerPerpPricesParams,\n} from '@nadohq/indexer-client';\nimport { BaseNadoAPI } from '../base';\n\nexport class PerpQueryAPI extends BaseNadoAPI {\n /**\n * Gets the latest index & mark price for a perp product\n * @param params\n */\n async getPerpPrices(params: GetIndexerPerpPricesParams) {\n return this.context.indexerClient.getPerpPrices(params);\n }\n\n /**\n * Gets the latest index & mark price for multiple perp products\n * @param params\n */\n async getMultiProductPerpPrices(\n params: GetIndexerMultiProductPerpPricesParams,\n ) {\n return this.context.indexerClient.getMultiProductPerpPrices(params);\n }\n}\n"],"mappings":";;AAMA,IAAa,eAAb,cAAkC,YAAY;;;;;CAK5C,MAAM,cAAc,QAAoC;EACtD,OAAO,KAAK,QAAQ,cAAc,cAAc,MAAM;CACxD;;;;;CAMA,MAAM,0BACJ,QACA;EACA,OAAO,KAAK,QAAQ,cAAc,0BAA0B,MAAM;CACpE;AACF"}
|
package/dist/apis/perp/index.cjs
CHANGED
|
@@ -1,35 +1,10 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_apis_perp_PerpExecuteAPI = require("./PerpExecuteAPI.cjs");
|
|
3
|
+
const require_apis_perp_PerpQueryAPI = require("./PerpQueryAPI.cjs");
|
|
4
|
+
let ts_mixer = require("ts-mixer");
|
|
5
|
+
//#region src/apis/perp/index.ts
|
|
6
|
+
var PerpAPI = class extends (0, ts_mixer.Mixin)(require_apis_perp_PerpExecuteAPI.PerpExecuteAPI, require_apis_perp_PerpQueryAPI.PerpQueryAPI) {};
|
|
7
|
+
//#endregion
|
|
8
|
+
exports.PerpAPI = PerpAPI;
|
|
19
9
|
|
|
20
|
-
// src/apis/perp/index.ts
|
|
21
|
-
var perp_exports = {};
|
|
22
|
-
__export(perp_exports, {
|
|
23
|
-
PerpAPI: () => PerpAPI
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(perp_exports);
|
|
26
|
-
var import_ts_mixer = require("ts-mixer");
|
|
27
|
-
var import_PerpExecuteAPI = require("./PerpExecuteAPI.cjs");
|
|
28
|
-
var import_PerpQueryAPI = require("./PerpQueryAPI.cjs");
|
|
29
|
-
var PerpAPI = class extends (0, import_ts_mixer.Mixin)(import_PerpExecuteAPI.PerpExecuteAPI, import_PerpQueryAPI.PerpQueryAPI) {
|
|
30
|
-
};
|
|
31
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
PerpAPI
|
|
34
|
-
});
|
|
35
10
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/apis/perp/index.ts"],"sourcesContent":["import { Mixin } from 'ts-mixer';\nimport { PerpExecuteAPI } from './PerpExecuteAPI';\nimport { PerpQueryAPI } from './PerpQueryAPI';\n\nexport class PerpAPI extends Mixin(PerpExecuteAPI, PerpQueryAPI) {}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["PerpExecuteAPI","PerpQueryAPI"],"sources":["../../../src/apis/perp/index.ts"],"sourcesContent":["import { Mixin } from 'ts-mixer';\nimport { PerpExecuteAPI } from './PerpExecuteAPI';\nimport { PerpQueryAPI } from './PerpQueryAPI';\n\nexport class PerpAPI extends Mixin(PerpExecuteAPI, PerpQueryAPI) {}\n"],"mappings":";;;;;AAIA,IAAa,UAAb,eAAA,GAAA,SAAA,OAAmCA,iCAAAA,gBAAgBC,+BAAAA,YAAY,EAAE,CAAC"}
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { PerpQueryAPI } from './PerpQueryAPI.cjs';
|
|
4
|
-
import '../base.cjs';
|
|
5
|
-
import '@nadohq/shared';
|
|
6
|
-
import '../../context.cjs';
|
|
7
|
-
import '@nadohq/engine-client';
|
|
8
|
-
import '@nadohq/indexer-client';
|
|
9
|
-
import '@nadohq/trigger-client';
|
|
10
|
-
import 'viem';
|
|
11
|
-
|
|
12
|
-
declare const PerpAPI_base: ts_mixer_dist_types_types.Class<any[], PerpExecuteAPI & PerpQueryAPI, typeof PerpExecuteAPI & typeof PerpQueryAPI>;
|
|
13
|
-
declare class PerpAPI extends PerpAPI_base {
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { PerpAPI };
|
|
1
|
+
import { t as PerpAPI } from "../../index-BFQPcj2w.cjs";
|
|
2
|
+
export { PerpAPI };
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import { PerpQueryAPI } from './PerpQueryAPI.js';
|
|
4
|
-
import '../base.js';
|
|
5
|
-
import '@nadohq/shared';
|
|
6
|
-
import '../../context.js';
|
|
7
|
-
import '@nadohq/engine-client';
|
|
8
|
-
import '@nadohq/indexer-client';
|
|
9
|
-
import '@nadohq/trigger-client';
|
|
10
|
-
import 'viem';
|
|
11
|
-
|
|
12
|
-
declare const PerpAPI_base: ts_mixer_dist_types_types.Class<any[], PerpExecuteAPI & PerpQueryAPI, typeof PerpExecuteAPI & typeof PerpQueryAPI>;
|
|
13
|
-
declare class PerpAPI extends PerpAPI_base {
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { PerpAPI };
|
|
1
|
+
import { t as PerpAPI } from "../../index-DVJ1Mu6s.js";
|
|
2
|
+
export { PerpAPI };
|
package/dist/apis/perp/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
// src/apis/perp/index.ts
|
|
2
|
-
import { Mixin } from "ts-mixer";
|
|
3
1
|
import { PerpExecuteAPI } from "./PerpExecuteAPI.js";
|
|
4
2
|
import { PerpQueryAPI } from "./PerpQueryAPI.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
3
|
+
import { Mixin } from "ts-mixer";
|
|
4
|
+
//#region src/apis/perp/index.ts
|
|
5
|
+
var PerpAPI = class extends Mixin(PerpExecuteAPI, PerpQueryAPI) {};
|
|
6
|
+
//#endregion
|
|
7
|
+
export { PerpAPI };
|
|
8
|
+
|
|
10
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/apis/perp/index.ts"],"sourcesContent":["import { Mixin } from 'ts-mixer';\nimport { PerpExecuteAPI } from './PerpExecuteAPI';\nimport { PerpQueryAPI } from './PerpQueryAPI';\n\nexport class PerpAPI extends Mixin(PerpExecuteAPI, PerpQueryAPI) {}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/apis/perp/index.ts"],"sourcesContent":["import { Mixin } from 'ts-mixer';\nimport { PerpExecuteAPI } from './PerpExecuteAPI';\nimport { PerpQueryAPI } from './PerpQueryAPI';\n\nexport class PerpAPI extends Mixin(PerpExecuteAPI, PerpQueryAPI) {}\n"],"mappings":";;;;AAIA,IAAa,UAAb,cAA6B,MAAM,gBAAgB,YAAY,EAAE,CAAC"}
|
|
@@ -1,54 +1,24 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_apis_base = require("../base.cjs");
|
|
3
|
+
let _nadohq_shared = require("@nadohq/shared");
|
|
4
|
+
let viem = require("viem");
|
|
5
|
+
//#region src/apis/spot/BaseSpotAPI.ts
|
|
6
|
+
var BaseSpotAPI = class extends require_apis_base.BaseNadoAPI {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves the ERC20 token contract for a spot product
|
|
9
|
+
*/
|
|
10
|
+
async getTokenContractForProduct(params) {
|
|
11
|
+
let tokenAddress;
|
|
12
|
+
if ("productId" in params) tokenAddress = (await this.context.contracts.spotEngine.read.getConfig([params.productId])).token;
|
|
13
|
+
else tokenAddress = params.tokenAddress;
|
|
14
|
+
return (0, viem.getContract)({
|
|
15
|
+
abi: _nadohq_shared.ERC20_ABI,
|
|
16
|
+
address: (0, _nadohq_shared.getValidatedAddress)(tokenAddress),
|
|
17
|
+
client: this.context.walletClient ?? this.context.publicClient
|
|
18
|
+
});
|
|
19
|
+
}
|
|
9
20
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.BaseSpotAPI = BaseSpotAPI;
|
|
19
23
|
|
|
20
|
-
// src/apis/spot/BaseSpotAPI.ts
|
|
21
|
-
var BaseSpotAPI_exports = {};
|
|
22
|
-
__export(BaseSpotAPI_exports, {
|
|
23
|
-
BaseSpotAPI: () => BaseSpotAPI
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(BaseSpotAPI_exports);
|
|
26
|
-
var import_shared = require("@nadohq/shared");
|
|
27
|
-
var import_viem = require("viem");
|
|
28
|
-
var import_base = require("../base.cjs");
|
|
29
|
-
var BaseSpotAPI = class extends import_base.BaseNadoAPI {
|
|
30
|
-
/**
|
|
31
|
-
* Retrieves the ERC20 token contract for a spot product
|
|
32
|
-
*/
|
|
33
|
-
async getTokenContractForProduct(params) {
|
|
34
|
-
let tokenAddress;
|
|
35
|
-
if ("productId" in params) {
|
|
36
|
-
const config = await this.context.contracts.spotEngine.read.getConfig([
|
|
37
|
-
params.productId
|
|
38
|
-
]);
|
|
39
|
-
tokenAddress = config.token;
|
|
40
|
-
} else {
|
|
41
|
-
tokenAddress = params.tokenAddress;
|
|
42
|
-
}
|
|
43
|
-
return (0, import_viem.getContract)({
|
|
44
|
-
abi: import_shared.ERC20_ABI,
|
|
45
|
-
address: (0, import_shared.getValidatedAddress)(tokenAddress),
|
|
46
|
-
client: this.context.walletClient ?? this.context.publicClient
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
-
0 && (module.exports = {
|
|
52
|
-
BaseSpotAPI
|
|
53
|
-
});
|
|
54
24
|
//# sourceMappingURL=BaseSpotAPI.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/apis/spot/BaseSpotAPI.ts"],"sourcesContent":["import {\n ContractInstance,\n ERC20_ABI,\n getValidatedAddress,\n} from '@nadohq/shared';\nimport { getContract } from 'viem';\nimport { BaseNadoAPI } from '../base';\nimport { ProductIdOrTokenAddress } from './types';\n\nexport class BaseSpotAPI extends BaseNadoAPI {\n /**\n * Retrieves the ERC20 token contract for a spot product\n */\n async getTokenContractForProduct(\n params: ProductIdOrTokenAddress,\n ): Promise<ContractInstance<typeof ERC20_ABI>> {\n let tokenAddress: string;\n if ('productId' in params) {\n const config = await this.context.contracts.spotEngine.read.getConfig([\n params.productId,\n ]);\n tokenAddress = config.token;\n } else {\n tokenAddress = params.tokenAddress;\n }\n\n return getContract({\n abi: ERC20_ABI,\n address: getValidatedAddress(tokenAddress),\n client: this.context.walletClient ?? this.context.publicClient,\n });\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseSpotAPI.cjs","names":["BaseNadoAPI","ERC20_ABI"],"sources":["../../../src/apis/spot/BaseSpotAPI.ts"],"sourcesContent":["import {\n ContractInstance,\n ERC20_ABI,\n getValidatedAddress,\n} from '@nadohq/shared';\nimport { getContract } from 'viem';\nimport { BaseNadoAPI } from '../base';\nimport { ProductIdOrTokenAddress } from './types';\n\nexport class BaseSpotAPI extends BaseNadoAPI {\n /**\n * Retrieves the ERC20 token contract for a spot product\n */\n async getTokenContractForProduct(\n params: ProductIdOrTokenAddress,\n ): Promise<ContractInstance<typeof ERC20_ABI>> {\n let tokenAddress: string;\n if ('productId' in params) {\n const config = await this.context.contracts.spotEngine.read.getConfig([\n params.productId,\n ]);\n tokenAddress = config.token;\n } else {\n tokenAddress = params.tokenAddress;\n }\n\n return getContract({\n abi: ERC20_ABI,\n address: getValidatedAddress(tokenAddress),\n client: this.context.walletClient ?? this.context.publicClient,\n });\n }\n}\n"],"mappings":";;;;;AASA,IAAa,cAAb,cAAiCA,kBAAAA,YAAY;;;;CAI3C,MAAM,2BACJ,QAC6C;EAC7C,IAAI;EACJ,IAAI,eAAe,QAIjB,gBAAe,MAHM,KAAK,QAAQ,UAAU,WAAW,KAAK,UAAU,CACpE,OAAO,SACT,CAAC,GACqB;OAEtB,eAAe,OAAO;EAGxB,QAAA,GAAA,KAAA,aAAmB;GACjB,KAAKC,eAAAA;GACL,UAAA,GAAA,eAAA,qBAA6B,YAAY;GACzC,QAAQ,KAAK,QAAQ,gBAAgB,KAAK,QAAQ;EACpD,CAAC;CACH;AACF"}
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { ProductIdOrTokenAddress } from './types.cjs';
|
|
4
|
-
import '../../context.cjs';
|
|
5
|
-
import '@nadohq/engine-client';
|
|
6
|
-
import '@nadohq/indexer-client';
|
|
7
|
-
import '@nadohq/trigger-client';
|
|
8
|
-
import 'viem';
|
|
9
|
-
import '../types.cjs';
|
|
10
|
-
|
|
11
|
-
declare class BaseSpotAPI extends BaseNadoAPI {
|
|
12
|
-
/**
|
|
13
|
-
* Retrieves the ERC20 token contract for a spot product
|
|
14
|
-
*/
|
|
15
|
-
getTokenContractForProduct(params: ProductIdOrTokenAddress): Promise<ContractInstance<typeof ERC20_ABI>>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { BaseSpotAPI };
|
|
1
|
+
import { t as BaseSpotAPI } from "../../BaseSpotAPI-BeTjhXT_.cjs";
|
|
2
|
+
export { BaseSpotAPI };
|
|
@@ -1,18 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { ProductIdOrTokenAddress } from './types.js';
|
|
4
|
-
import '../../context.js';
|
|
5
|
-
import '@nadohq/engine-client';
|
|
6
|
-
import '@nadohq/indexer-client';
|
|
7
|
-
import '@nadohq/trigger-client';
|
|
8
|
-
import 'viem';
|
|
9
|
-
import '../types.js';
|
|
10
|
-
|
|
11
|
-
declare class BaseSpotAPI extends BaseNadoAPI {
|
|
12
|
-
/**
|
|
13
|
-
* Retrieves the ERC20 token contract for a spot product
|
|
14
|
-
*/
|
|
15
|
-
getTokenContractForProduct(params: ProductIdOrTokenAddress): Promise<ContractInstance<typeof ERC20_ABI>>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { BaseSpotAPI };
|
|
1
|
+
import { t as BaseSpotAPI } from "../../BaseSpotAPI-Ck64kyYt.js";
|
|
2
|
+
export { BaseSpotAPI };
|
|
@@ -1,32 +1,23 @@
|
|
|
1
|
-
// src/apis/spot/BaseSpotAPI.ts
|
|
2
|
-
import {
|
|
3
|
-
ERC20_ABI,
|
|
4
|
-
getValidatedAddress
|
|
5
|
-
} from "@nadohq/shared";
|
|
6
|
-
import { getContract } from "viem";
|
|
7
1
|
import { BaseNadoAPI } from "../base.js";
|
|
2
|
+
import { ERC20_ABI, getValidatedAddress } from "@nadohq/shared";
|
|
3
|
+
import { getContract } from "viem";
|
|
4
|
+
//#region src/apis/spot/BaseSpotAPI.ts
|
|
8
5
|
var BaseSpotAPI = class extends BaseNadoAPI {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
return getContract({
|
|
23
|
-
abi: ERC20_ABI,
|
|
24
|
-
address: getValidatedAddress(tokenAddress),
|
|
25
|
-
client: this.context.walletClient ?? this.context.publicClient
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
BaseSpotAPI
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves the ERC20 token contract for a spot product
|
|
8
|
+
*/
|
|
9
|
+
async getTokenContractForProduct(params) {
|
|
10
|
+
let tokenAddress;
|
|
11
|
+
if ("productId" in params) tokenAddress = (await this.context.contracts.spotEngine.read.getConfig([params.productId])).token;
|
|
12
|
+
else tokenAddress = params.tokenAddress;
|
|
13
|
+
return getContract({
|
|
14
|
+
abi: ERC20_ABI,
|
|
15
|
+
address: getValidatedAddress(tokenAddress),
|
|
16
|
+
client: this.context.walletClient ?? this.context.publicClient
|
|
17
|
+
});
|
|
18
|
+
}
|
|
31
19
|
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { BaseSpotAPI };
|
|
22
|
+
|
|
32
23
|
//# sourceMappingURL=BaseSpotAPI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/apis/spot/BaseSpotAPI.ts"],"sourcesContent":["import {\n ContractInstance,\n ERC20_ABI,\n getValidatedAddress,\n} from '@nadohq/shared';\nimport { getContract } from 'viem';\nimport { BaseNadoAPI } from '../base';\nimport { ProductIdOrTokenAddress } from './types';\n\nexport class BaseSpotAPI extends BaseNadoAPI {\n /**\n * Retrieves the ERC20 token contract for a spot product\n */\n async getTokenContractForProduct(\n params: ProductIdOrTokenAddress,\n ): Promise<ContractInstance<typeof ERC20_ABI>> {\n let tokenAddress: string;\n if ('productId' in params) {\n const config = await this.context.contracts.spotEngine.read.getConfig([\n params.productId,\n ]);\n tokenAddress = config.token;\n } else {\n tokenAddress = params.tokenAddress;\n }\n\n return getContract({\n abi: ERC20_ABI,\n address: getValidatedAddress(tokenAddress),\n client: this.context.walletClient ?? this.context.publicClient,\n });\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseSpotAPI.js","names":[],"sources":["../../../src/apis/spot/BaseSpotAPI.ts"],"sourcesContent":["import {\n ContractInstance,\n ERC20_ABI,\n getValidatedAddress,\n} from '@nadohq/shared';\nimport { getContract } from 'viem';\nimport { BaseNadoAPI } from '../base';\nimport { ProductIdOrTokenAddress } from './types';\n\nexport class BaseSpotAPI extends BaseNadoAPI {\n /**\n * Retrieves the ERC20 token contract for a spot product\n */\n async getTokenContractForProduct(\n params: ProductIdOrTokenAddress,\n ): Promise<ContractInstance<typeof ERC20_ABI>> {\n let tokenAddress: string;\n if ('productId' in params) {\n const config = await this.context.contracts.spotEngine.read.getConfig([\n params.productId,\n ]);\n tokenAddress = config.token;\n } else {\n tokenAddress = params.tokenAddress;\n }\n\n return getContract({\n abi: ERC20_ABI,\n address: getValidatedAddress(tokenAddress),\n client: this.context.walletClient ?? this.context.publicClient,\n });\n }\n}\n"],"mappings":";;;;AASA,IAAa,cAAb,cAAiC,YAAY;;;;CAI3C,MAAM,2BACJ,QAC6C;EAC7C,IAAI;EACJ,IAAI,eAAe,QAIjB,gBAAe,MAHM,KAAK,QAAQ,UAAU,WAAW,KAAK,UAAU,CACpE,OAAO,SACT,CAAC,GACqB;OAEtB,eAAe,OAAO;EAGxB,OAAO,YAAY;GACjB,KAAK;GACL,SAAS,oBAAoB,YAAY;GACzC,QAAQ,KAAK,QAAQ,gBAAgB,KAAK,QAAQ;EACpD,CAAC;CACH;AACF"}
|