carbon-js-sdk 0.8.9 → 0.8.11-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NetworkConfig } from "../constant";
|
|
2
2
|
import { Insights } from "../index";
|
|
3
|
-
import { InsightsQueryResponse } from "../insights";
|
|
3
|
+
import { ConnectedWalletParams, ConnectedWalletResponse, InsightsQueryResponse } from "../insights";
|
|
4
4
|
import { APIUtils } from "../util";
|
|
5
5
|
declare class InsightsQueryClient {
|
|
6
6
|
readonly apiManager: APIUtils.APIManager<typeof Insights.InsightsEndpoints>;
|
|
@@ -20,6 +20,7 @@ declare class InsightsQueryClient {
|
|
|
20
20
|
PoolVolume(req: Insights.QueryGetPoolVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolVolumeResponse>>;
|
|
21
21
|
PoolsVolume(req?: Insights.QueryGetPoolsVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolsVolumeResponse>>;
|
|
22
22
|
UserRewardsClaimHistory(req: Insights.QueryGetUserRewardsClaimHistoryRequest): Promise<InsightsQueryResponse<Insights.QueryGetUserRewardsClaimHistoryResponse>>;
|
|
23
|
+
UserWalletConnected(body: ConnectedWalletParams): Promise<ConnectedWalletResponse>;
|
|
23
24
|
CompetitionList(req?: Insights.QueryGetCompetitionListRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetCompetitionListResponse>>;
|
|
24
25
|
/**
|
|
25
26
|
* endpoint for legacy Demex Trading volume Competition (circa. 2021-2022). Keeping this here as endpoint has not been removed.
|
|
@@ -174,6 +174,13 @@ class InsightsQueryClient {
|
|
|
174
174
|
return response.data;
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
+
UserWalletConnected(body) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
const request = this.apiManager.path('user/connected/wallet');
|
|
180
|
+
const response = yield request.post({ body });
|
|
181
|
+
return response.data;
|
|
182
|
+
});
|
|
183
|
+
}
|
|
177
184
|
CompetitionList(req = {}) {
|
|
178
185
|
return __awaiter(this, void 0, void 0, function* () {
|
|
179
186
|
const request = this.apiManager.path("competition/list", {}, req);
|
package/lib/insights/common.d.ts
CHANGED
package/lib/insights/common.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.InsightsEndpoints = {
|
|
|
13
13
|
"user/total": "/user/total",
|
|
14
14
|
"user/growth": "/user/growth",
|
|
15
15
|
"user/volume": "/user/:address/volume",
|
|
16
|
+
"user/connected/wallet": "/user/connected/wallet",
|
|
16
17
|
// Pool api
|
|
17
18
|
"pool/list": "/pool/list",
|
|
18
19
|
"pool/volume": "/pool/:poolId/volume",
|
package/lib/insights/user.d.ts
CHANGED
|
@@ -75,3 +75,10 @@ export interface QueryGetUserVolumeResponse {
|
|
|
75
75
|
entries: UserVolume[];
|
|
76
76
|
meta: ParsedTimeMeta;
|
|
77
77
|
}
|
|
78
|
+
export interface ConnectedWalletParams {
|
|
79
|
+
address: string;
|
|
80
|
+
walletType: string;
|
|
81
|
+
}
|
|
82
|
+
export interface ConnectedWalletResponse {
|
|
83
|
+
status: string;
|
|
84
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carbon-js-sdk",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.11-beta.1",
|
|
4
4
|
"description": "TypeScript SDK for Carbon blockchain",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -92,4 +92,4 @@
|
|
|
92
92
|
"eslint": "^8.42.0",
|
|
93
93
|
"prettier": "2.5.1"
|
|
94
94
|
}
|
|
95
|
-
}
|
|
95
|
+
}
|