carbon-js-sdk 0.7.2 → 0.7.3
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,5 +1,6 @@
|
|
|
1
1
|
import { NetworkConfig } from "../constant";
|
|
2
2
|
import { Insights } from "../index";
|
|
3
|
+
import { InsightsQueryResponse } from "../insights";
|
|
3
4
|
import { APIUtils } from "../util";
|
|
4
5
|
declare class InsightsQueryClient {
|
|
5
6
|
readonly apiManager: APIUtils.APIManager<typeof Insights.InsightsEndpoints>;
|
|
@@ -18,6 +19,7 @@ declare class InsightsQueryClient {
|
|
|
18
19
|
PoolHistory(query: Insights.QueryGetPoolHistoryRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolHistoryResponse>>;
|
|
19
20
|
PoolVolume(req: Insights.QueryGetPoolVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolVolumeResponse>>;
|
|
20
21
|
PoolsVolume(req?: Insights.QueryGetPoolsVolumeRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPoolsVolumeResponse>>;
|
|
22
|
+
UserRewardsClaimHistory(req: Insights.QueryGetUserRewardsClaimHistoryRequest): Promise<InsightsQueryResponse<Insights.QueryGetUserRewardsClaimHistoryResponse>>;
|
|
21
23
|
CompetitionList(req?: Insights.QueryGetCompetitionListRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetCompetitionListResponse>>;
|
|
22
24
|
/**
|
|
23
25
|
* endpoint for legacy Demex Trading volume Competition (circa. 2021-2022). Keeping this here as endpoint has not been removed.
|
|
@@ -166,6 +166,14 @@ class InsightsQueryClient {
|
|
|
166
166
|
return response.data;
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
+
UserRewardsClaimHistory(req) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
const routeParams = { address: req.address };
|
|
172
|
+
const request = this.apiManager.path("user/pool/rewards", routeParams, req);
|
|
173
|
+
const response = yield request.get();
|
|
174
|
+
return response.data;
|
|
175
|
+
});
|
|
176
|
+
}
|
|
169
177
|
CompetitionList(req = {}) {
|
|
170
178
|
return __awaiter(this, void 0, void 0, function* () {
|
|
171
179
|
const request = this.apiManager.path("competition/list", {}, req);
|
package/lib/insights/common.d.ts
CHANGED
package/lib/insights/common.js
CHANGED
package/lib/insights/pool.d.ts
CHANGED
|
@@ -92,3 +92,23 @@ export interface QueryGetPoolHistoryResponse {
|
|
|
92
92
|
entries: PositionHistoryEntry[];
|
|
93
93
|
meta: PageMeta;
|
|
94
94
|
}
|
|
95
|
+
export interface QueryGetUserRewardsClaimHistoryRequest extends QueryByPageRequest {
|
|
96
|
+
address: string;
|
|
97
|
+
}
|
|
98
|
+
export interface TokenAmounts {
|
|
99
|
+
denom: string;
|
|
100
|
+
amount: number;
|
|
101
|
+
amountValue: number;
|
|
102
|
+
}
|
|
103
|
+
export interface ClaimTransactionEntry {
|
|
104
|
+
address: string;
|
|
105
|
+
poolId: number;
|
|
106
|
+
height: number;
|
|
107
|
+
timestamp: string;
|
|
108
|
+
hash?: string;
|
|
109
|
+
tokens: TokenAmounts[];
|
|
110
|
+
}
|
|
111
|
+
export interface QueryGetUserRewardsClaimHistoryResponse {
|
|
112
|
+
entries: ClaimTransactionEntry[];
|
|
113
|
+
meta: PageMeta;
|
|
114
|
+
}
|