@nadohq/client 0.32.0 → 0.34.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/BaseRewardsAPI-C2Khs1h3.d.cts +17 -0
- package/dist/BaseRewardsAPI-C2Khs1h3.d.cts.map +1 -0
- package/dist/BaseRewardsAPI-DP_NdIBN.d.ts +17 -0
- package/dist/BaseRewardsAPI-DP_NdIBN.d.ts.map +1 -0
- package/dist/{BaseSpotAPI-Dn7FqHTu.d.ts → BaseSpotAPI-BtWEU9Iv.d.ts} +2 -2
- package/dist/{BaseSpotAPI-Dn7FqHTu.d.ts.map → BaseSpotAPI-BtWEU9Iv.d.ts.map} +1 -1
- package/dist/{BaseSpotAPI-DCR0Ukso.d.cts → BaseSpotAPI-_U-2E2i7.d.cts} +2 -2
- package/dist/{BaseSpotAPI-DCR0Ukso.d.cts.map → BaseSpotAPI-_U-2E2i7.d.cts.map} +1 -1
- package/dist/RewardsExecuteAPI-DtKFYDZO.d.cts +25 -0
- package/dist/RewardsExecuteAPI-DtKFYDZO.d.cts.map +1 -0
- package/dist/RewardsExecuteAPI-t-X-0bkJ.d.ts +25 -0
- package/dist/RewardsExecuteAPI-t-X-0bkJ.d.ts.map +1 -0
- package/dist/RewardsQueryAPI-C8b5XQKS.d.cts +33 -0
- package/dist/RewardsQueryAPI-C8b5XQKS.d.cts.map +1 -0
- package/dist/RewardsQueryAPI-CxIm-G-8.d.ts +33 -0
- package/dist/RewardsQueryAPI-CxIm-G-8.d.ts.map +1 -0
- package/dist/{SpotExecuteAPI-8dJfQcjP.d.ts → SpotExecuteAPI-2ux8AQKX.d.ts} +3 -3
- package/dist/{SpotExecuteAPI-8dJfQcjP.d.ts.map → SpotExecuteAPI-2ux8AQKX.d.ts.map} +1 -1
- package/dist/{SpotExecuteAPI-C1E_L4Ov.d.cts → SpotExecuteAPI-DGSIOaWW.d.cts} +3 -3
- package/dist/{SpotExecuteAPI-C1E_L4Ov.d.cts.map → SpotExecuteAPI-DGSIOaWW.d.cts.map} +1 -1
- package/dist/{SpotQueryAPI-By-EKjdC.d.ts → SpotQueryAPI-Bg6a2H-O.d.ts} +3 -3
- package/dist/{SpotQueryAPI-By-EKjdC.d.ts.map → SpotQueryAPI-Bg6a2H-O.d.ts.map} +1 -1
- package/dist/{SpotQueryAPI-C-646O43.d.cts → SpotQueryAPI-Bp6KNIrO.d.cts} +3 -3
- package/dist/{SpotQueryAPI-C-646O43.d.cts.map → SpotQueryAPI-Bp6KNIrO.d.cts.map} +1 -1
- package/dist/{SubaccountExecuteAPI-BXUYFvqZ.d.cts → SubaccountExecuteAPI-BNB-4uUP.d.cts} +2 -2
- package/dist/{SubaccountExecuteAPI-BXUYFvqZ.d.cts.map → SubaccountExecuteAPI-BNB-4uUP.d.cts.map} +1 -1
- package/dist/{SubaccountExecuteAPI-IV4EuQiO.d.ts → SubaccountExecuteAPI-Dho_tprr.d.ts} +2 -2
- package/dist/{SubaccountExecuteAPI-IV4EuQiO.d.ts.map → SubaccountExecuteAPI-Dho_tprr.d.ts.map} +1 -1
- package/dist/{SubaccountQueryAPI-DuPZIksw.d.cts → SubaccountQueryAPI-BV7h4nmZ.d.cts} +1 -1
- package/dist/{SubaccountQueryAPI-DuPZIksw.d.cts.map → SubaccountQueryAPI-BV7h4nmZ.d.cts.map} +1 -1
- package/dist/{SubaccountQueryAPI-De_FQ-Qa.d.ts → SubaccountQueryAPI-CAUa6ANv.d.ts} +1 -1
- package/dist/{SubaccountQueryAPI-De_FQ-Qa.d.ts.map → SubaccountQueryAPI-CAUa6ANv.d.ts.map} +1 -1
- package/dist/{WebSocketExecuteAPI-BbCjkskC.d.ts → WebSocketExecuteAPI-CpP_ILEk.d.ts} +1 -1
- package/dist/{WebSocketExecuteAPI-BbCjkskC.d.ts.map → WebSocketExecuteAPI-CpP_ILEk.d.ts.map} +1 -1
- package/dist/{WebSocketExecuteAPI-DZ_Xauk2.d.cts → WebSocketExecuteAPI-hJMLfP8d.d.cts} +1 -1
- package/dist/{WebSocketExecuteAPI-DZ_Xauk2.d.cts.map → WebSocketExecuteAPI-hJMLfP8d.d.cts.map} +1 -1
- package/dist/{WebSocketQueryAPI-hOXDojO7.d.ts → WebSocketQueryAPI-BsyrKGrK.d.ts} +1 -1
- package/dist/{WebSocketQueryAPI-hOXDojO7.d.ts.map → WebSocketQueryAPI-BsyrKGrK.d.ts.map} +1 -1
- package/dist/{WebSocketQueryAPI-D1i9ToSh.d.cts → WebSocketQueryAPI-zSF8NPwe.d.cts} +1 -1
- package/dist/{WebSocketQueryAPI-D1i9ToSh.d.cts.map → WebSocketQueryAPI-zSF8NPwe.d.cts.map} +1 -1
- package/dist/{WebSocketSubscriptionAPI-B9YYloIc.d.ts → WebSocketSubscriptionAPI-C-xipXc7.d.ts} +1 -1
- package/dist/{WebSocketSubscriptionAPI-B9YYloIc.d.ts.map → WebSocketSubscriptionAPI-C-xipXc7.d.ts.map} +1 -1
- package/dist/{WebSocketSubscriptionAPI-DgIMxfz5.d.cts → WebSocketSubscriptionAPI-DrAbLF80.d.cts} +1 -1
- package/dist/{WebSocketSubscriptionAPI-DgIMxfz5.d.cts.map → WebSocketSubscriptionAPI-DrAbLF80.d.cts.map} +1 -1
- package/dist/apis/rewards/BaseRewardsAPI.cjs +22 -0
- package/dist/apis/rewards/BaseRewardsAPI.cjs.map +1 -0
- package/dist/apis/rewards/BaseRewardsAPI.d.cts +2 -0
- package/dist/apis/rewards/BaseRewardsAPI.d.ts +2 -0
- package/dist/apis/rewards/BaseRewardsAPI.js +21 -0
- package/dist/apis/rewards/BaseRewardsAPI.js.map +1 -0
- package/dist/apis/rewards/RewardsExecuteAPI.cjs +49 -0
- package/dist/apis/rewards/RewardsExecuteAPI.cjs.map +1 -0
- package/dist/apis/rewards/RewardsExecuteAPI.d.cts +2 -0
- package/dist/apis/rewards/RewardsExecuteAPI.d.ts +2 -0
- package/dist/apis/rewards/RewardsExecuteAPI.js +48 -0
- package/dist/apis/rewards/RewardsExecuteAPI.js.map +1 -0
- package/dist/apis/rewards/RewardsQueryAPI.cjs +33 -0
- package/dist/apis/rewards/RewardsQueryAPI.cjs.map +1 -0
- package/dist/apis/rewards/RewardsQueryAPI.d.cts +2 -0
- package/dist/apis/rewards/RewardsQueryAPI.d.ts +2 -0
- package/dist/apis/rewards/RewardsQueryAPI.js +32 -0
- package/dist/apis/rewards/RewardsQueryAPI.js.map +1 -0
- package/dist/apis/rewards/index.cjs +14 -0
- package/dist/apis/rewards/index.cjs.map +1 -0
- package/dist/apis/rewards/index.d.cts +3 -0
- package/dist/apis/rewards/index.d.ts +3 -0
- package/dist/apis/rewards/index.js +13 -0
- package/dist/apis/rewards/index.js.map +1 -0
- package/dist/apis/rewards/types.cjs +0 -0
- package/dist/apis/rewards/types.d.cts +2 -0
- package/dist/apis/rewards/types.d.ts +2 -0
- package/dist/apis/rewards/types.js +1 -0
- package/dist/apis/spot/BaseSpotAPI.d.cts +1 -1
- package/dist/apis/spot/BaseSpotAPI.d.ts +1 -1
- package/dist/apis/spot/SpotExecuteAPI.cjs +1 -0
- package/dist/apis/spot/SpotExecuteAPI.cjs.map +1 -1
- package/dist/apis/spot/SpotExecuteAPI.d.cts +1 -1
- package/dist/apis/spot/SpotExecuteAPI.d.ts +1 -1
- package/dist/apis/spot/SpotExecuteAPI.js +1 -0
- package/dist/apis/spot/SpotExecuteAPI.js.map +1 -1
- package/dist/apis/spot/SpotQueryAPI.d.cts +1 -1
- package/dist/apis/spot/SpotQueryAPI.d.ts +1 -1
- package/dist/apis/spot/index.d.cts +2 -2
- package/dist/apis/spot/index.d.ts +2 -2
- package/dist/apis/spot/types.d.cts +1 -1
- package/dist/apis/spot/types.d.ts +1 -1
- package/dist/apis/subaccount/SubaccountExecuteAPI.d.cts +1 -1
- package/dist/apis/subaccount/SubaccountExecuteAPI.d.ts +1 -1
- package/dist/apis/subaccount/SubaccountQueryAPI.d.cts +1 -1
- package/dist/apis/subaccount/SubaccountQueryAPI.d.ts +1 -1
- package/dist/apis/subaccount/index.d.cts +2 -2
- package/dist/apis/subaccount/index.d.ts +2 -2
- package/dist/apis/subaccount/types.d.cts +1 -1
- package/dist/apis/subaccount/types.d.ts +1 -1
- package/dist/apis/ws/WebSocketExecuteAPI.d.cts +1 -1
- package/dist/apis/ws/WebSocketExecuteAPI.d.ts +1 -1
- package/dist/apis/ws/WebSocketQueryAPI.d.cts +1 -1
- package/dist/apis/ws/WebSocketQueryAPI.d.ts +1 -1
- package/dist/apis/ws/WebSocketSubscriptionAPI.d.cts +1 -1
- package/dist/apis/ws/WebSocketSubscriptionAPI.d.ts +1 -1
- package/dist/apis/ws/index.d.cts +1 -1
- package/dist/apis/ws/index.d.ts +1 -1
- package/dist/client.cjs +2 -0
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +5 -3
- package/dist/client.d.cts.map +1 -1
- package/dist/client.d.ts +5 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +2 -0
- package/dist/client.js.map +1 -1
- package/dist/{index-Dj9Ub1PG.d.cts → index-9wuDqMV2.d.cts} +4 -4
- package/dist/{index-Dj9Ub1PG.d.cts.map → index-9wuDqMV2.d.cts.map} +1 -1
- package/dist/{index-B3HYm75y.d.cts → index-Bckt-gdC.d.cts} +4 -4
- package/dist/{index-B3HYm75y.d.cts.map → index-Bckt-gdC.d.cts.map} +1 -1
- package/dist/{index-B1Dxe-TH.d.ts → index-BqAOMCKi.d.ts} +4 -4
- package/dist/{index-B1Dxe-TH.d.ts.map → index-BqAOMCKi.d.ts.map} +1 -1
- package/dist/{index-DPNd9PR1.d.ts → index-C-qKYLCR.d.ts} +3 -3
- package/dist/index-C-qKYLCR.d.ts.map +1 -0
- package/dist/{index-DqQ5-VOh.d.cts → index-Cn7kpBkt.d.cts} +3 -3
- package/dist/index-Cn7kpBkt.d.cts.map +1 -0
- package/dist/index-DE9RaTAD.d.cts +13 -0
- package/dist/index-DE9RaTAD.d.cts.map +1 -0
- package/dist/index-Dq_AuvDb.d.ts +13 -0
- package/dist/index-Dq_AuvDb.d.ts.map +1 -0
- package/dist/{index-CEwXS1Ek.d.ts → index-EEn1f0QY.d.ts} +4 -4
- package/dist/{index-CEwXS1Ek.d.ts.map → index-EEn1f0QY.d.ts.map} +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.js +2 -1
- package/dist/{types-B6oFoDTo.d.ts → types-BDVasYAf.d.ts} +1 -1
- package/dist/{types-B6oFoDTo.d.ts.map → types-BDVasYAf.d.ts.map} +1 -1
- package/dist/types-BFMFRstW.d.cts +18 -0
- package/dist/types-BFMFRstW.d.cts.map +1 -0
- package/dist/{types-BWRdhQd_.d.cts → types-C0Wevcia.d.cts} +1 -1
- package/dist/{types-BWRdhQd_.d.cts.map → types-C0Wevcia.d.cts.map} +1 -1
- package/dist/{types-pRheTrJ1.d.cts → types-C3rE8vyS.d.cts} +1 -1
- package/dist/{types-pRheTrJ1.d.cts.map → types-C3rE8vyS.d.cts.map} +1 -1
- package/dist/types-CFgxXCy2.d.ts +18 -0
- package/dist/types-CFgxXCy2.d.ts.map +1 -0
- package/dist/{types-DnBjJCnd.d.ts → types-OZlzeknc.d.ts} +1 -1
- package/dist/{types-DnBjJCnd.d.ts.map → types-OZlzeknc.d.ts.map} +1 -1
- package/package.json +7 -7
- package/src/apis/rewards/BaseRewardsAPI.ts +20 -0
- package/src/apis/rewards/RewardsExecuteAPI.ts +77 -0
- package/src/apis/rewards/RewardsQueryAPI.ts +35 -0
- package/src/apis/rewards/index.ts +11 -0
- package/src/apis/rewards/types.ts +15 -0
- package/src/apis/spot/SpotExecuteAPI.ts +4 -0
- package/src/client.ts +3 -0
- package/src/index.ts +1 -0
- package/dist/index-DPNd9PR1.d.ts.map +0 -1
- package/dist/index-DqQ5-VOh.d.cts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-9wuDqMV2.d.cts","names":[],"sources":["../src/apis/subaccount/src/apis/subaccount/index.ts"],"mappings":";;;;;cAUwB,kBAAA;cAEX,aAAA,SAAsB,kBAAA;;;;;;;;EAW3B,0BAAA,CACJ,cAAA,WACC,OAAA,CAAQ,gCAAA;AAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as NadoClientContext } from "./context-CHBPiOx6.cjs";
|
|
2
2
|
import { t as BaseNadoAPI } from "./base-GN5mZk1G.cjs";
|
|
3
|
-
import { t as WebSocketExecuteAPI } from "./WebSocketExecuteAPI-
|
|
4
|
-
import { t as WebSocketQueryAPI } from "./WebSocketQueryAPI-
|
|
5
|
-
import { t as WebSocketSubscriptionAPI } from "./WebSocketSubscriptionAPI-
|
|
3
|
+
import { t as WebSocketExecuteAPI } from "./WebSocketExecuteAPI-hJMLfP8d.cjs";
|
|
4
|
+
import { t as WebSocketQueryAPI } from "./WebSocketQueryAPI-zSF8NPwe.cjs";
|
|
5
|
+
import { t as WebSocketSubscriptionAPI } from "./WebSocketSubscriptionAPI-DrAbLF80.cjs";
|
|
6
6
|
|
|
7
7
|
//#region src/apis/ws/index.d.ts
|
|
8
8
|
/**
|
|
@@ -16,4 +16,4 @@ declare class WebsocketAPI extends BaseNadoAPI {
|
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
export { WebsocketAPI as t };
|
|
19
|
-
//# sourceMappingURL=index-
|
|
19
|
+
//# sourceMappingURL=index-Bckt-gdC.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-Bckt-gdC.d.cts","names":[],"sources":["../src/apis/ws/src/apis/ws/index.ts"],"mappings":";;;;;;;;;AASA;cAAa,YAAA,SAAqB,WAAA;EAAA,SACvB,KAAA,EAAO,iBAAA;EAAA,SACP,OAAA,EAAS,mBAAA;EAAA,SACT,YAAA,EAAc,wBAAA;cAEX,OAAA,EAAS,iBAAA;AAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as CreateStandardLinkedSignerResult } from "./types-
|
|
2
|
-
import { t as SubaccountExecuteAPI } from "./SubaccountExecuteAPI-
|
|
3
|
-
import { t as SubaccountQueryAPI } from "./SubaccountQueryAPI-
|
|
1
|
+
import { t as CreateStandardLinkedSignerResult } from "./types-BDVasYAf.js";
|
|
2
|
+
import { t as SubaccountExecuteAPI } from "./SubaccountExecuteAPI-Dho_tprr.js";
|
|
3
|
+
import { t as SubaccountQueryAPI } from "./SubaccountQueryAPI-CAUa6ANv.js";
|
|
4
4
|
|
|
5
5
|
//#region src/apis/subaccount/index.d.ts
|
|
6
6
|
declare const SubaccountAPI_base: import("ts-mixer/dist/types/types").Class<any[], SubaccountExecuteAPI & SubaccountQueryAPI, typeof SubaccountExecuteAPI & typeof SubaccountQueryAPI>;
|
|
@@ -16,4 +16,4 @@ declare class SubaccountAPI extends SubaccountAPI_base {
|
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
export { SubaccountAPI as t };
|
|
19
|
-
//# sourceMappingURL=index-
|
|
19
|
+
//# sourceMappingURL=index-BqAOMCKi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-BqAOMCKi.d.ts","names":[],"sources":["../src/apis/subaccount/src/apis/subaccount/index.ts"],"mappings":";;;;;cAUwB,kBAAA;cAEX,aAAA,SAAsB,kBAAA;;;;;;;;EAW3B,0BAAA,CACJ,cAAA,WACC,OAAA,CAAQ,gCAAA;AAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as SpotExecuteAPI } from "./SpotExecuteAPI-
|
|
2
|
-
import { t as SpotQueryAPI } from "./SpotQueryAPI-
|
|
1
|
+
import { t as SpotExecuteAPI } from "./SpotExecuteAPI-2ux8AQKX.js";
|
|
2
|
+
import { t as SpotQueryAPI } from "./SpotQueryAPI-Bg6a2H-O.js";
|
|
3
3
|
|
|
4
4
|
//#region src/apis/spot/index.d.ts
|
|
5
5
|
declare const SpotAPI_base: import("ts-mixer/dist/types/types").Class<any[], SpotExecuteAPI & SpotQueryAPI, typeof SpotExecuteAPI & typeof SpotQueryAPI>;
|
|
@@ -9,4 +9,4 @@ declare const SpotAPI_base: import("ts-mixer/dist/types/types").Class<any[], Spo
|
|
|
9
9
|
declare class SpotAPI extends SpotAPI_base {}
|
|
10
10
|
//#endregion
|
|
11
11
|
export { SpotAPI as t };
|
|
12
|
-
//# sourceMappingURL=index-
|
|
12
|
+
//# sourceMappingURL=index-C-qKYLCR.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-C-qKYLCR.d.ts","names":[],"sources":["../src/apis/spot/src/apis/spot/index.ts"],"mappings":";;;;cAE8C,YAAA;;;AAAA;cAKjC,OAAA,SAAgB,YAAmC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as SpotExecuteAPI } from "./SpotExecuteAPI-
|
|
2
|
-
import { t as SpotQueryAPI } from "./SpotQueryAPI-
|
|
1
|
+
import { t as SpotExecuteAPI } from "./SpotExecuteAPI-DGSIOaWW.cjs";
|
|
2
|
+
import { t as SpotQueryAPI } from "./SpotQueryAPI-Bp6KNIrO.cjs";
|
|
3
3
|
|
|
4
4
|
//#region src/apis/spot/index.d.ts
|
|
5
5
|
declare const SpotAPI_base: import("ts-mixer/dist/types/types").Class<any[], SpotExecuteAPI & SpotQueryAPI, typeof SpotExecuteAPI & typeof SpotQueryAPI>;
|
|
@@ -9,4 +9,4 @@ declare const SpotAPI_base: import("ts-mixer/dist/types/types").Class<any[], Spo
|
|
|
9
9
|
declare class SpotAPI extends SpotAPI_base {}
|
|
10
10
|
//#endregion
|
|
11
11
|
export { SpotAPI as t };
|
|
12
|
-
//# sourceMappingURL=index-
|
|
12
|
+
//# sourceMappingURL=index-Cn7kpBkt.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Cn7kpBkt.d.cts","names":[],"sources":["../src/apis/spot/src/apis/spot/index.ts"],"mappings":";;;;cAE8C,YAAA;;;AAAA;cAKjC,OAAA,SAAgB,YAAmC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as RewardsExecuteAPI } from "./RewardsExecuteAPI-DtKFYDZO.cjs";
|
|
2
|
+
import { t as RewardsQueryAPI } from "./RewardsQueryAPI-C8b5XQKS.cjs";
|
|
3
|
+
|
|
4
|
+
//#region src/apis/rewards/index.d.ts
|
|
5
|
+
declare const RewardsAPI_base: import("ts-mixer/dist/types/types").Class<any[], RewardsExecuteAPI & RewardsQueryAPI, typeof RewardsExecuteAPI & typeof RewardsQueryAPI>;
|
|
6
|
+
/**
|
|
7
|
+
* Combined rewards API for querying cash incentives progress and claiming rewards onchain
|
|
8
|
+
* through the Airdrop contract.
|
|
9
|
+
*/
|
|
10
|
+
declare class RewardsAPI extends RewardsAPI_base {}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { RewardsAPI as t };
|
|
13
|
+
//# sourceMappingURL=index-DE9RaTAD.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-DE9RaTAD.d.cts","names":[],"sources":["../src/apis/rewards/src/apis/rewards/index.ts"],"mappings":";;;;cAEoD,eAAA;;;AAAA;;cAMvC,UAAA,SAAmB,eAAyC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as RewardsExecuteAPI } from "./RewardsExecuteAPI-t-X-0bkJ.js";
|
|
2
|
+
import { t as RewardsQueryAPI } from "./RewardsQueryAPI-CxIm-G-8.js";
|
|
3
|
+
|
|
4
|
+
//#region src/apis/rewards/index.d.ts
|
|
5
|
+
declare const RewardsAPI_base: import("ts-mixer/dist/types/types").Class<any[], RewardsExecuteAPI & RewardsQueryAPI, typeof RewardsExecuteAPI & typeof RewardsQueryAPI>;
|
|
6
|
+
/**
|
|
7
|
+
* Combined rewards API for querying cash incentives progress and claiming rewards onchain
|
|
8
|
+
* through the Airdrop contract.
|
|
9
|
+
*/
|
|
10
|
+
declare class RewardsAPI extends RewardsAPI_base {}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { RewardsAPI as t };
|
|
13
|
+
//# sourceMappingURL=index-Dq_AuvDb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-Dq_AuvDb.d.ts","names":[],"sources":["../src/apis/rewards/src/apis/rewards/index.ts"],"mappings":";;;;cAEoD,eAAA;;;AAAA;;cAMvC,UAAA,SAAmB,eAAyC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as NadoClientContext } from "./context-D1xmE2Rd.js";
|
|
2
2
|
import { t as BaseNadoAPI } from "./base-D11I3QiM.js";
|
|
3
|
-
import { t as WebSocketExecuteAPI } from "./WebSocketExecuteAPI-
|
|
4
|
-
import { t as WebSocketQueryAPI } from "./WebSocketQueryAPI-
|
|
5
|
-
import { t as WebSocketSubscriptionAPI } from "./WebSocketSubscriptionAPI-
|
|
3
|
+
import { t as WebSocketExecuteAPI } from "./WebSocketExecuteAPI-CpP_ILEk.js";
|
|
4
|
+
import { t as WebSocketQueryAPI } from "./WebSocketQueryAPI-BsyrKGrK.js";
|
|
5
|
+
import { t as WebSocketSubscriptionAPI } from "./WebSocketSubscriptionAPI-C-xipXc7.js";
|
|
6
6
|
|
|
7
7
|
//#region src/apis/ws/index.d.ts
|
|
8
8
|
/**
|
|
@@ -16,4 +16,4 @@ declare class WebsocketAPI extends BaseNadoAPI {
|
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
18
18
|
export { WebsocketAPI as t };
|
|
19
|
-
//# sourceMappingURL=index-
|
|
19
|
+
//# sourceMappingURL=index-EEn1f0QY.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-EEn1f0QY.d.ts","names":[],"sources":["../src/apis/ws/src/apis/ws/index.ts"],"mappings":";;;;;;;;;AASA;cAAa,YAAA,SAAqB,WAAA;EAAA,SACvB,KAAA,EAAO,iBAAA;EAAA,SACP,OAAA,EAAS,mBAAA;EAAA,SACT,YAAA,EAAc,wBAAA;cAEX,OAAA,EAAS,iBAAA;AAAA"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_apis_market_index = require("./apis/market/index.cjs");
|
|
3
3
|
const require_apis_perp_index = require("./apis/perp/index.cjs");
|
|
4
|
+
const require_apis_rewards_index = require("./apis/rewards/index.cjs");
|
|
4
5
|
const require_apis_spot_index = require("./apis/spot/index.cjs");
|
|
5
6
|
const require_apis_subaccount_index = require("./apis/subaccount/index.cjs");
|
|
6
7
|
const require_context = require("./context.cjs");
|
|
@@ -9,6 +10,7 @@ const require_createNadoClient = require("./createNadoClient.cjs");
|
|
|
9
10
|
exports.MarketAPI = require_apis_market_index.MarketAPI;
|
|
10
11
|
exports.NadoClient = require_client.NadoClient;
|
|
11
12
|
exports.PerpAPI = require_apis_perp_index.PerpAPI;
|
|
13
|
+
exports.RewardsAPI = require_apis_rewards_index.RewardsAPI;
|
|
12
14
|
exports.SpotAPI = require_apis_spot_index.SpotAPI;
|
|
13
15
|
exports.SubaccountAPI = require_apis_subaccount_index.SubaccountAPI;
|
|
14
16
|
exports.createClientContext = require_context.createClientContext;
|
package/dist/index.d.cts
CHANGED
|
@@ -2,10 +2,12 @@ import { i as createClientContext, n as CreateNadoClientContextOpts, r as NadoCl
|
|
|
2
2
|
import { a as CancelTriggerProductOrdersParams, c as PlaceOrdersParams, i as CancelTriggerOrdersParams, l as PlaceTriggerOrderParams, n as CancelOrdersParams, o as GetTriggerOrdersParams, r as CancelProductOrdersParams, s as PlaceOrderParams, t as CancelAndPlaceOrderParams, u as PlaceTriggerOrdersParams } from "./types-YBdM1sun.cjs";
|
|
3
3
|
import { t as MarketAPI } from "./index-D2pKqx7b.cjs";
|
|
4
4
|
import { t as PerpAPI } from "./index-Bx-PsDsb.cjs";
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { n as
|
|
8
|
-
import { t as
|
|
5
|
+
import { n as GetClaimedAirdropAmountsParams, t as AirdropAddressParams } from "./types-BFMFRstW.cjs";
|
|
6
|
+
import { t as RewardsAPI } from "./index-DE9RaTAD.cjs";
|
|
7
|
+
import { a as MintMockERC20Params, c as TransferQuoteParams, i as GetTokenWalletBalanceParams, l as WithdrawCollateralParams, n as BurnNlpParams, o as MintNlpParams, r as GetTokenAllowanceParams, s as ProductIdOrTokenAddress, t as ApproveAllowanceParams, u as WithdrawCollateralV2Params } from "./types-C3rE8vyS.cjs";
|
|
8
|
+
import { t as SpotAPI } from "./index-Cn7kpBkt.cjs";
|
|
9
|
+
import { n as LinkSignerParams, r as LiquidateSubaccountParams, t as CreateStandardLinkedSignerResult } from "./types-C0Wevcia.cjs";
|
|
10
|
+
import { t as SubaccountAPI } from "./index-9wuDqMV2.cjs";
|
|
9
11
|
import { NadoClient } from "./client.cjs";
|
|
10
12
|
import { createNadoClient } from "./createNadoClient.cjs";
|
|
11
13
|
export * from "@nadohq/shared";
|
|
@@ -13,4 +15,4 @@ export * from "@nadohq/engine-client";
|
|
|
13
15
|
export * from "@nadohq/indexer-client";
|
|
14
16
|
export * from "@nadohq/mobile-client";
|
|
15
17
|
export * from "@nadohq/trigger-client";
|
|
16
|
-
export { ApproveAllowanceParams, BurnNlpParams, CancelAndPlaceOrderParams, CancelOrdersParams, CancelProductOrdersParams, CancelTriggerOrdersParams, CancelTriggerProductOrdersParams, CreateNadoClientContextAccountOpts, CreateNadoClientContextOpts, CreateStandardLinkedSignerResult, GetTokenAllowanceParams, GetTokenWalletBalanceParams, GetTriggerOrdersParams, LinkSignerParams, LiquidateSubaccountParams, MarketAPI, MintMockERC20Params, MintNlpParams, NadoClient, NadoClientContext, PerpAPI, PlaceOrderParams, PlaceOrdersParams, PlaceTriggerOrderParams, PlaceTriggerOrdersParams, ProductIdOrTokenAddress, SpotAPI, SubaccountAPI, TransferQuoteParams, WithdrawCollateralParams, WithdrawCollateralV2Params, createClientContext, createNadoClient };
|
|
18
|
+
export { AirdropAddressParams, ApproveAllowanceParams, BurnNlpParams, CancelAndPlaceOrderParams, CancelOrdersParams, CancelProductOrdersParams, CancelTriggerOrdersParams, CancelTriggerProductOrdersParams, CreateNadoClientContextAccountOpts, CreateNadoClientContextOpts, CreateStandardLinkedSignerResult, GetClaimedAirdropAmountsParams, GetTokenAllowanceParams, GetTokenWalletBalanceParams, GetTriggerOrdersParams, LinkSignerParams, LiquidateSubaccountParams, MarketAPI, MintMockERC20Params, MintNlpParams, NadoClient, NadoClientContext, PerpAPI, PlaceOrderParams, PlaceOrdersParams, PlaceTriggerOrderParams, PlaceTriggerOrdersParams, ProductIdOrTokenAddress, RewardsAPI, SpotAPI, SubaccountAPI, TransferQuoteParams, WithdrawCollateralParams, WithdrawCollateralV2Params, createClientContext, createNadoClient };
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,12 @@ import { i as createClientContext, n as CreateNadoClientContextOpts, r as NadoCl
|
|
|
2
2
|
import { a as CancelTriggerProductOrdersParams, c as PlaceOrdersParams, i as CancelTriggerOrdersParams, l as PlaceTriggerOrderParams, n as CancelOrdersParams, o as GetTriggerOrdersParams, r as CancelProductOrdersParams, s as PlaceOrderParams, t as CancelAndPlaceOrderParams, u as PlaceTriggerOrdersParams } from "./types-BFFzjzRy.js";
|
|
3
3
|
import { t as MarketAPI } from "./index-IIzvROYs.js";
|
|
4
4
|
import { t as PerpAPI } from "./index-DIlwbefm.js";
|
|
5
|
-
import {
|
|
6
|
-
import { t as
|
|
7
|
-
import { n as
|
|
8
|
-
import { t as
|
|
5
|
+
import { n as GetClaimedAirdropAmountsParams, t as AirdropAddressParams } from "./types-CFgxXCy2.js";
|
|
6
|
+
import { t as RewardsAPI } from "./index-Dq_AuvDb.js";
|
|
7
|
+
import { a as MintMockERC20Params, c as TransferQuoteParams, i as GetTokenWalletBalanceParams, l as WithdrawCollateralParams, n as BurnNlpParams, o as MintNlpParams, r as GetTokenAllowanceParams, s as ProductIdOrTokenAddress, t as ApproveAllowanceParams, u as WithdrawCollateralV2Params } from "./types-OZlzeknc.js";
|
|
8
|
+
import { t as SpotAPI } from "./index-C-qKYLCR.js";
|
|
9
|
+
import { n as LinkSignerParams, r as LiquidateSubaccountParams, t as CreateStandardLinkedSignerResult } from "./types-BDVasYAf.js";
|
|
10
|
+
import { t as SubaccountAPI } from "./index-BqAOMCKi.js";
|
|
9
11
|
import { NadoClient } from "./client.js";
|
|
10
12
|
import { createNadoClient } from "./createNadoClient.js";
|
|
11
13
|
export * from "@nadohq/shared";
|
|
@@ -13,4 +15,4 @@ export * from "@nadohq/engine-client";
|
|
|
13
15
|
export * from "@nadohq/indexer-client";
|
|
14
16
|
export * from "@nadohq/mobile-client";
|
|
15
17
|
export * from "@nadohq/trigger-client";
|
|
16
|
-
export { ApproveAllowanceParams, BurnNlpParams, CancelAndPlaceOrderParams, CancelOrdersParams, CancelProductOrdersParams, CancelTriggerOrdersParams, CancelTriggerProductOrdersParams, CreateNadoClientContextAccountOpts, CreateNadoClientContextOpts, CreateStandardLinkedSignerResult, GetTokenAllowanceParams, GetTokenWalletBalanceParams, GetTriggerOrdersParams, LinkSignerParams, LiquidateSubaccountParams, MarketAPI, MintMockERC20Params, MintNlpParams, NadoClient, NadoClientContext, PerpAPI, PlaceOrderParams, PlaceOrdersParams, PlaceTriggerOrderParams, PlaceTriggerOrdersParams, ProductIdOrTokenAddress, SpotAPI, SubaccountAPI, TransferQuoteParams, WithdrawCollateralParams, WithdrawCollateralV2Params, createClientContext, createNadoClient };
|
|
18
|
+
export { AirdropAddressParams, ApproveAllowanceParams, BurnNlpParams, CancelAndPlaceOrderParams, CancelOrdersParams, CancelProductOrdersParams, CancelTriggerOrdersParams, CancelTriggerProductOrdersParams, CreateNadoClientContextAccountOpts, CreateNadoClientContextOpts, CreateStandardLinkedSignerResult, GetClaimedAirdropAmountsParams, GetTokenAllowanceParams, GetTokenWalletBalanceParams, GetTriggerOrdersParams, LinkSignerParams, LiquidateSubaccountParams, MarketAPI, MintMockERC20Params, MintNlpParams, NadoClient, NadoClientContext, PerpAPI, PlaceOrderParams, PlaceOrdersParams, PlaceTriggerOrderParams, PlaceTriggerOrdersParams, ProductIdOrTokenAddress, RewardsAPI, SpotAPI, SubaccountAPI, TransferQuoteParams, WithdrawCollateralParams, WithdrawCollateralV2Params, createClientContext, createNadoClient };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MarketAPI } from "./apis/market/index.js";
|
|
2
2
|
import { PerpAPI } from "./apis/perp/index.js";
|
|
3
|
+
import { RewardsAPI } from "./apis/rewards/index.js";
|
|
3
4
|
import { SpotAPI } from "./apis/spot/index.js";
|
|
4
5
|
import { SubaccountAPI } from "./apis/subaccount/index.js";
|
|
5
6
|
import { createClientContext } from "./context.js";
|
|
@@ -10,4 +11,4 @@ export * from "@nadohq/engine-client";
|
|
|
10
11
|
export * from "@nadohq/indexer-client";
|
|
11
12
|
export * from "@nadohq/mobile-client";
|
|
12
13
|
export * from "@nadohq/trigger-client";
|
|
13
|
-
export { MarketAPI, NadoClient, PerpAPI, SpotAPI, SubaccountAPI, createClientContext, createNadoClient };
|
|
14
|
+
export { MarketAPI, NadoClient, PerpAPI, RewardsAPI, SpotAPI, SubaccountAPI, createClientContext, createNadoClient };
|
|
@@ -8,4 +8,4 @@ type LiquidateSubaccountParams = OptionalSignatureParams<OptionalSubaccountOwner
|
|
|
8
8
|
type CreateStandardLinkedSignerResult = AccountWithPrivateKey;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { LinkSignerParams as n, LiquidateSubaccountParams as r, CreateStandardLinkedSignerResult as t };
|
|
11
|
-
//# sourceMappingURL=types-
|
|
11
|
+
//# sourceMappingURL=types-BDVasYAf.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-BDVasYAf.d.ts","names":[],"sources":["../src/apis/subaccount/src/apis/subaccount/types.ts"],"mappings":";;;;;KAOY,gBAAA,GAAmB,uBAAA,CAC7B,uBAAA,CAAwB,sBAAA;AAAA,KAGd,yBAAA,GAA4B,uBAAA,CACtC,uBAAA,CAAwB,+BAAA;AAAA,KAGd,gCAAA,GAAmC,qBAAqB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
|
|
3
|
+
//#region src/apis/rewards/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Identifies an Airdrop contract to read from or write to. The address is returned by the indexer
|
|
6
|
+
* as `wallet.claim.airdropAddress` of a cash incentives event.
|
|
7
|
+
*/
|
|
8
|
+
interface AirdropAddressParams {
|
|
9
|
+
/** Airdrop contract holding the reward. */
|
|
10
|
+
airdropAddress: Address;
|
|
11
|
+
}
|
|
12
|
+
interface GetClaimedAirdropAmountsParams extends AirdropAddressParams {
|
|
13
|
+
/** Wallet to look up the claimed amounts for. */
|
|
14
|
+
address: Address;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { GetClaimedAirdropAmountsParams as n, AirdropAddressParams as t };
|
|
18
|
+
//# sourceMappingURL=types-BFMFRstW.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-BFMFRstW.d.cts","names":[],"sources":["../src/apis/rewards/src/apis/rewards/types.ts"],"mappings":";;;;;AAMA;;UAAiB,oBAAA;EAEf;EAAA,cAAA,EAAgB,OAAO;AAAA;AAAA,UAGR,8BAAA,SAAuC,oBAAoB;;EAE1E,OAAA,EAAS,OAAA;AAAA"}
|
|
@@ -8,4 +8,4 @@ type LiquidateSubaccountParams = OptionalSignatureParams<OptionalSubaccountOwner
|
|
|
8
8
|
type CreateStandardLinkedSignerResult = AccountWithPrivateKey;
|
|
9
9
|
//#endregion
|
|
10
10
|
export { LinkSignerParams as n, LiquidateSubaccountParams as r, CreateStandardLinkedSignerResult as t };
|
|
11
|
-
//# sourceMappingURL=types-
|
|
11
|
+
//# sourceMappingURL=types-C0Wevcia.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-C0Wevcia.d.cts","names":[],"sources":["../src/apis/subaccount/src/apis/subaccount/types.ts"],"mappings":";;;;;KAOY,gBAAA,GAAmB,uBAAA,CAC7B,uBAAA,CAAwB,sBAAA;AAAA,KAGd,yBAAA,GAA4B,uBAAA,CACtC,uBAAA,CAAwB,+BAAA;AAAA,KAGd,gCAAA,GAAmC,qBAAqB"}
|
|
@@ -27,4 +27,4 @@ interface MintMockERC20Params {
|
|
|
27
27
|
}
|
|
28
28
|
//#endregion
|
|
29
29
|
export { MintMockERC20Params as a, TransferQuoteParams as c, GetTokenWalletBalanceParams as i, WithdrawCollateralParams as l, BurnNlpParams as n, MintNlpParams as o, GetTokenAllowanceParams as r, ProductIdOrTokenAddress as s, ApproveAllowanceParams as t, WithdrawCollateralV2Params as u };
|
|
30
|
-
//# sourceMappingURL=types-
|
|
30
|
+
//# sourceMappingURL=types-C3rE8vyS.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-C3rE8vyS.d.cts","names":[],"sources":["../src/apis/spot/src/apis/spot/types.ts"],"mappings":";;;;;KAUY,uBAAA;EAEN,SAAA;AAAA;EAGA,YAAY;AAAA;AAAA,KAGb,gBAAA;EACH,OAAA;AAAA,IACE,uBAAuB;AAAA,KAEf,sBAAA,GAAyB,uBAAA;EACnC,MAAA,EAAQ,YAAY;AAAA;AAAA,KAGV,2BAAA,GAA8B,gBAAgB;AAAA,KAE9C,uBAAA,GAA0B,gBAAgB;AAAA,KAE1C,wBAAA,GAA2B,uBAAA,CACrC,uBAAA,CAAwB,8BAAA;AAAA,KAGd,0BAAA,GAA6B,uBAAA,CACvC,uBAAA,CAAwB,gCAAA;AAAA,KAGd,mBAAA,GAAsB,uBAAA,CAChC,uBAAA,CAAwB,yBAAA;AAAA,KAGd,aAAA,GAAgB,uBAAA,CAC1B,uBAAA,CAAwB,mBAAA;AAAA,KAGd,aAAA,GAAgB,uBAAA,CAC1B,uBAAA,CAAwB,mBAAA;AAAA,UAGT,mBAAA;EACf,SAAA;EACA,MAAA,EAAQ,YAAY;AAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
|
|
3
|
+
//#region src/apis/rewards/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Identifies an Airdrop contract to read from or write to. The address is returned by the indexer
|
|
6
|
+
* as `wallet.claim.airdropAddress` of a cash incentives event.
|
|
7
|
+
*/
|
|
8
|
+
interface AirdropAddressParams {
|
|
9
|
+
/** Airdrop contract holding the reward. */
|
|
10
|
+
airdropAddress: Address;
|
|
11
|
+
}
|
|
12
|
+
interface GetClaimedAirdropAmountsParams extends AirdropAddressParams {
|
|
13
|
+
/** Wallet to look up the claimed amounts for. */
|
|
14
|
+
address: Address;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { GetClaimedAirdropAmountsParams as n, AirdropAddressParams as t };
|
|
18
|
+
//# sourceMappingURL=types-CFgxXCy2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CFgxXCy2.d.ts","names":[],"sources":["../src/apis/rewards/src/apis/rewards/types.ts"],"mappings":";;;;;AAMA;;UAAiB,oBAAA;EAEf;EAAA,cAAA,EAAgB,OAAO;AAAA;AAAA,UAGR,8BAAA,SAAuC,oBAAoB;;EAE1E,OAAA,EAAS,OAAA;AAAA"}
|
|
@@ -27,4 +27,4 @@ interface MintMockERC20Params {
|
|
|
27
27
|
}
|
|
28
28
|
//#endregion
|
|
29
29
|
export { MintMockERC20Params as a, TransferQuoteParams as c, GetTokenWalletBalanceParams as i, WithdrawCollateralParams as l, BurnNlpParams as n, MintNlpParams as o, GetTokenAllowanceParams as r, ProductIdOrTokenAddress as s, ApproveAllowanceParams as t, WithdrawCollateralV2Params as u };
|
|
30
|
-
//# sourceMappingURL=types-
|
|
30
|
+
//# sourceMappingURL=types-OZlzeknc.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-
|
|
1
|
+
{"version":3,"file":"types-OZlzeknc.d.ts","names":[],"sources":["../src/apis/spot/src/apis/spot/types.ts"],"mappings":";;;;;KAUY,uBAAA;EAEN,SAAA;AAAA;EAGA,YAAY;AAAA;AAAA,KAGb,gBAAA;EACH,OAAA;AAAA,IACE,uBAAuB;AAAA,KAEf,sBAAA,GAAyB,uBAAA;EACnC,MAAA,EAAQ,YAAY;AAAA;AAAA,KAGV,2BAAA,GAA8B,gBAAgB;AAAA,KAE9C,uBAAA,GAA0B,gBAAgB;AAAA,KAE1C,wBAAA,GAA2B,uBAAA,CACrC,uBAAA,CAAwB,8BAAA;AAAA,KAGd,0BAAA,GAA6B,uBAAA,CACvC,uBAAA,CAAwB,gCAAA;AAAA,KAGd,mBAAA,GAAsB,uBAAA,CAChC,uBAAA,CAAwB,yBAAA;AAAA,KAGd,aAAA,GAAgB,uBAAA,CAC1B,uBAAA,CAAwB,mBAAA;AAAA,KAGd,aAAA,GAAgB,uBAAA,CAC1B,uBAAA,CAAwB,mBAAA;AAAA,UAGT,mBAAA;EACf,SAAA;EACA,MAAA,EAAQ,YAAY;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadohq/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Nado SDK client — unified API for trading, market data, and collateral management on Nado",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"module": "./dist/index.js",
|
|
42
42
|
"types": "./dist/index.d.ts",
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@nadohq/engine-client": "^0.
|
|
45
|
-
"@nadohq/indexer-client": "^0.
|
|
46
|
-
"@nadohq/mobile-client": "^0.
|
|
47
|
-
"@nadohq/shared": "^0.
|
|
48
|
-
"@nadohq/trigger-client": "^0.
|
|
44
|
+
"@nadohq/engine-client": "^0.34.0",
|
|
45
|
+
"@nadohq/indexer-client": "^0.34.0",
|
|
46
|
+
"@nadohq/mobile-client": "^0.34.0",
|
|
47
|
+
"@nadohq/shared": "^0.34.0",
|
|
48
|
+
"@nadohq/trigger-client": "^0.34.0",
|
|
49
49
|
"ts-mixer": "6.0.4"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"bignumber.js": "11.1.1",
|
|
57
57
|
"viem": "2.52.0"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "a8dd2f31219463c5a4565ee535064ec2e2bdfb6b"
|
|
60
60
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AIRDROP_ABI, ContractInstance } from '@nadohq/shared';
|
|
2
|
+
import { getContract } from 'viem';
|
|
3
|
+
import { BaseNadoAPI } from '../base';
|
|
4
|
+
import { AirdropAddressParams } from './types';
|
|
5
|
+
|
|
6
|
+
export class BaseRewardsAPI extends BaseNadoAPI {
|
|
7
|
+
/**
|
|
8
|
+
* Builds a contract instance for an Airdrop contract. Airdrop addresses are not part of the core
|
|
9
|
+
* Nado deployment; they are returned by the indexer alongside a claim proof.
|
|
10
|
+
*/
|
|
11
|
+
protected getAirdropContract({
|
|
12
|
+
airdropAddress,
|
|
13
|
+
}: AirdropAddressParams): ContractInstance<typeof AIRDROP_ABI> {
|
|
14
|
+
return getContract({
|
|
15
|
+
abi: AIRDROP_ABI,
|
|
16
|
+
address: airdropAddress,
|
|
17
|
+
client: this.context.walletClient ?? this.context.publicClient,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AirdropClaimProof,
|
|
3
|
+
claimAirdropRewards,
|
|
4
|
+
isWriteableContract,
|
|
5
|
+
toBigNumber,
|
|
6
|
+
WalletNotProvidedError,
|
|
7
|
+
} from '@nadohq/shared';
|
|
8
|
+
import { Hash } from 'viem';
|
|
9
|
+
import { BaseRewardsAPI } from './BaseRewardsAPI';
|
|
10
|
+
|
|
11
|
+
export class RewardsExecuteAPI extends BaseRewardsAPI {
|
|
12
|
+
/**
|
|
13
|
+
* Claims every currently claimable cash incentives reward for the connected wallet in a single
|
|
14
|
+
* transaction, fetching the merkle proofs from the indexer itself.
|
|
15
|
+
*
|
|
16
|
+
* The Airdrop contract verifies proofs against `msg.sender`, so this can only ever claim for the
|
|
17
|
+
* connected wallet. Rewards that were already settled onchain are dropped before submitting,
|
|
18
|
+
* since the indexer keeps reporting them as claimable, as are rewards whose week the contract
|
|
19
|
+
* does not know about yet.
|
|
20
|
+
*
|
|
21
|
+
* @returns Hash of the submitted claim transaction.
|
|
22
|
+
* @throws `WalletNotProvidedError` when no wallet client is available to sign with.
|
|
23
|
+
* @throws When the indexer reports nothing claimable, or when no claimable reward is ready to
|
|
24
|
+
* claim onchain because each has either already been claimed or is not yet registered on the
|
|
25
|
+
* airdrop contract.
|
|
26
|
+
*/
|
|
27
|
+
async claimCashIncentives(): Promise<Hash> {
|
|
28
|
+
const walletAddress = this.getWalletClientAddress();
|
|
29
|
+
const { events } = await this.context.indexerClient.getCashIncentives({
|
|
30
|
+
address: walletAddress,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const claimableRewards = events
|
|
34
|
+
.map((event) => event.wallet.claim)
|
|
35
|
+
.filter((claim) => claim.status === 'claimable');
|
|
36
|
+
|
|
37
|
+
// Every reward currently comes from the same airdrop contract, so they claim in one transaction
|
|
38
|
+
const airdropAddress = claimableRewards[0]?.airdropAddress;
|
|
39
|
+
if (!airdropAddress) {
|
|
40
|
+
throw new Error(
|
|
41
|
+
'No claimable cash incentives rewards found for this wallet.',
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const airdropContract = this.getAirdropContract({ airdropAddress });
|
|
46
|
+
if (!isWriteableContract(airdropContract)) {
|
|
47
|
+
throw new WalletNotProvidedError();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Indexed by week, 1-based, with an unused slot 0, so the last valid week is `length - 1`
|
|
51
|
+
const claimed = await airdropContract.read.getClaimed([walletAddress]);
|
|
52
|
+
|
|
53
|
+
const unclaimedProofs: AirdropClaimProof[] = [];
|
|
54
|
+
for (const { week, totalAmount, proof } of claimableRewards) {
|
|
55
|
+
// A reward can be published by the indexer before its merkle root is registered onchain, so
|
|
56
|
+
// skip those weeks rather than failing and blocking the weeks that are ready to claim
|
|
57
|
+
if (week < 1 || week >= claimed.length) {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
// Claimed amounts are cumulative, so anything below the entitlement is still claimable
|
|
61
|
+
if (toBigNumber(claimed[week]).lt(toBigNumber(totalAmount))) {
|
|
62
|
+
unclaimedProofs.push({ week, totalAmount, proof });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (unclaimedProofs.length === 0) {
|
|
67
|
+
throw new Error(
|
|
68
|
+
`No cash incentives rewards are ready to claim from the airdrop contract at ${airdropAddress}. Each claimable reward has either already been claimed onchain, or is not yet registered on the contract (it reports ${claimed.length - 1} week(s)).`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return claimAirdropRewards({
|
|
73
|
+
airdropContract,
|
|
74
|
+
claimProofs: unclaimedProofs,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { GetIndexerCashIncentivesParams } from '@nadohq/indexer-client';
|
|
2
|
+
import { BaseRewardsAPI } from './BaseRewardsAPI';
|
|
3
|
+
import { GetClaimedAirdropAmountsParams } from './types';
|
|
4
|
+
|
|
5
|
+
export class RewardsQueryAPI extends BaseRewardsAPI {
|
|
6
|
+
/**
|
|
7
|
+
* Gets cash incentives progress and claim state for a wallet. Each event's `wallet.claim` is
|
|
8
|
+
* tagged on `status`, and carries the merkle proof needed to claim onchain when that status is
|
|
9
|
+
* `claimable`.
|
|
10
|
+
*
|
|
11
|
+
* @param params
|
|
12
|
+
*/
|
|
13
|
+
async getCashIncentives(params: GetIndexerCashIncentivesParams) {
|
|
14
|
+
return this.context.indexerClient.getCashIncentives(params);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Gets the cumulative amounts already claimed by a wallet from an airdrop contract, in raw token
|
|
19
|
+
* units, indexed directly by `week`.
|
|
20
|
+
*
|
|
21
|
+
* Weeks are 1-based, so index 0 is always zero and the array length is one greater than the
|
|
22
|
+
* number of reward events. A week is fully claimed when its entry equals the `totalAmount` of the
|
|
23
|
+
* corresponding claim proof; a smaller value means there is still an amount to claim, since
|
|
24
|
+
* entries are cumulative rather than per-transaction.
|
|
25
|
+
*
|
|
26
|
+
* @param params
|
|
27
|
+
*/
|
|
28
|
+
async getClaimedAirdropAmounts({
|
|
29
|
+
address,
|
|
30
|
+
...rest
|
|
31
|
+
}: GetClaimedAirdropAmountsParams): Promise<readonly bigint[]> {
|
|
32
|
+
const airdrop = this.getAirdropContract(rest);
|
|
33
|
+
return airdrop.read.getClaimed([address]);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Mixin } from 'ts-mixer';
|
|
2
|
+
import { RewardsExecuteAPI } from './RewardsExecuteAPI';
|
|
3
|
+
import { RewardsQueryAPI } from './RewardsQueryAPI';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Combined rewards API for querying cash incentives progress and claiming rewards onchain
|
|
7
|
+
* through the Airdrop contract.
|
|
8
|
+
*/
|
|
9
|
+
export class RewardsAPI extends Mixin(RewardsExecuteAPI, RewardsQueryAPI) {}
|
|
10
|
+
|
|
11
|
+
export * from './types';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Address } from 'viem';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Identifies an Airdrop contract to read from or write to. The address is returned by the indexer
|
|
5
|
+
* as `wallet.claim.airdropAddress` of a cash incentives event.
|
|
6
|
+
*/
|
|
7
|
+
export interface AirdropAddressParams {
|
|
8
|
+
/** Airdrop contract holding the reward. */
|
|
9
|
+
airdropAddress: Address;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface GetClaimedAirdropAmountsParams extends AirdropAddressParams {
|
|
13
|
+
/** Wallet to look up the claimed amounts for. */
|
|
14
|
+
address: Address;
|
|
15
|
+
}
|
|
@@ -20,6 +20,10 @@ import {
|
|
|
20
20
|
|
|
21
21
|
export class SpotExecuteAPI extends BaseSpotAPI {
|
|
22
22
|
async deposit(params: DepositCollateralParams) {
|
|
23
|
+
if (!isWriteableContract(this.context.contracts.endpoint)) {
|
|
24
|
+
throw new WalletNotProvidedError();
|
|
25
|
+
}
|
|
26
|
+
|
|
23
27
|
return depositCollateral({
|
|
24
28
|
endpoint: this.context.contracts.endpoint,
|
|
25
29
|
subaccountName: params.subaccountName,
|
package/src/client.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { WalletClientWithAccount } from '@nadohq/shared';
|
|
2
2
|
import { MarketAPI } from './apis/market';
|
|
3
3
|
import { PerpAPI } from './apis/perp';
|
|
4
|
+
import { RewardsAPI } from './apis/rewards';
|
|
4
5
|
import { SpotAPI } from './apis/spot';
|
|
5
6
|
import { SubaccountAPI } from './apis/subaccount';
|
|
6
7
|
import { WebsocketAPI } from './apis/ws';
|
|
@@ -16,6 +17,7 @@ export class NadoClient {
|
|
|
16
17
|
subaccount!: SubaccountAPI;
|
|
17
18
|
spot!: SpotAPI;
|
|
18
19
|
perp!: PerpAPI;
|
|
20
|
+
rewards!: RewardsAPI;
|
|
19
21
|
ws!: WebsocketAPI;
|
|
20
22
|
|
|
21
23
|
constructor(context: NadoClientContext) {
|
|
@@ -65,6 +67,7 @@ export class NadoClient {
|
|
|
65
67
|
this.subaccount = new SubaccountAPI(context);
|
|
66
68
|
this.spot = new SpotAPI(context);
|
|
67
69
|
this.perp = new PerpAPI(context);
|
|
70
|
+
this.rewards = new RewardsAPI(context);
|
|
68
71
|
this.ws = new WebsocketAPI(context);
|
|
69
72
|
}
|
|
70
73
|
}
|
package/src/index.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DPNd9PR1.d.ts","names":[],"sources":["../src/apis/spot/src/apis/spot/index.ts"],"mappings":";;;;cAE8C,YAAA;;;AAAA;cAKjC,OAAA,SAAgB,YAAmC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DqQ5-VOh.d.cts","names":[],"sources":["../src/apis/spot/src/apis/spot/index.ts"],"mappings":";;;;cAE8C,YAAA;;;AAAA;cAKjC,OAAA,SAAgB,YAAmC"}
|