carbon-js-sdk 0.7.12 → 0.8.0-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.
- package/lib/clients/InsightsQueryClient.d.ts +1 -1
- package/lib/clients/InsightsQueryClient.js +2 -4
- package/lib/codec/proofs.d.ts +0 -1
- package/lib/codec/proofs.js +0 -6
- package/lib/insights/common.d.ts +1 -1
- package/lib/insights/common.js +1 -1
- package/lib/insights/funding.d.ts +13 -2
- package/package.json +1 -1
|
@@ -47,7 +47,7 @@ declare class InsightsQueryClient {
|
|
|
47
47
|
Leaderboard(req: Insights.GetLeaderboardPathParams, query: Insights.GetLeaderboardQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetLeaderboardResponse>>;
|
|
48
48
|
PositionStats(req: Insights.GetPositionStatsPathParams, query: Insights.GetPositionStatsQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetPositionStatsResponse>>;
|
|
49
49
|
DenomToGeckoIdMap(): Promise<Insights.InsightsQueryResponse<Insights.QueryDenomToGeckoIdMap>>;
|
|
50
|
-
FundingHistory(query: Insights.
|
|
50
|
+
FundingHistory(query: Insights.QueryGetFundingHistoryRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetFundingHistoryResponse>>;
|
|
51
51
|
HistoricalFundingHistory(query: Insights.QueryGetFundingRateRequest): Promise<Insights.InsightsQueryResponse<Insights.QueryGetFundingRateResponse>>;
|
|
52
52
|
ProposalVotes(req: Insights.GetProposalVotesPathParams, query: Insights.GetProposalVotesQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetProposalVotesResponse>>;
|
|
53
53
|
Delegations(req: Insights.GetDelegationsPathParams, query: Insights.GetDelegationsQueryParams): Promise<Insights.InsightsQueryResponse<Insights.QueryGetDelegationsResponse>>;
|
|
@@ -384,7 +384,7 @@ class InsightsQueryClient {
|
|
|
384
384
|
FundingHistory(query) {
|
|
385
385
|
var _a, _b, _c;
|
|
386
386
|
return __awaiter(this, void 0, void 0, function* () {
|
|
387
|
-
const request = this.apiManager.path("market/funding", {}, {
|
|
387
|
+
const request = this.apiManager.path("market/funding/history/all", {}, {
|
|
388
388
|
market: (_a = query.market) !== null && _a !== void 0 ? _a : "",
|
|
389
389
|
limit: (_b = query.limit) !== null && _b !== void 0 ? _b : 100,
|
|
390
390
|
offset: (_c = query.offset) !== null && _c !== void 0 ? _c : 0,
|
|
@@ -394,12 +394,10 @@ class InsightsQueryClient {
|
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
396
|
HistoricalFundingHistory(query) {
|
|
397
|
-
var _a, _b
|
|
397
|
+
var _a, _b;
|
|
398
398
|
return __awaiter(this, void 0, void 0, function* () {
|
|
399
399
|
const request = this.apiManager.path("market/funding/history", {}, {
|
|
400
400
|
market: (_b = (_a = query.market) === null || _a === void 0 ? void 0 : _a.replace('%2F', '/')) !== null && _b !== void 0 ? _b : "",
|
|
401
|
-
limit: (_c = query.limit) !== null && _c !== void 0 ? _c : 100,
|
|
402
|
-
offset: (_d = query.offset) !== null && _d !== void 0 ? _d : 0,
|
|
403
401
|
});
|
|
404
402
|
const response = yield request.get();
|
|
405
403
|
return response.data;
|
package/lib/codec/proofs.d.ts
CHANGED
package/lib/codec/proofs.js
CHANGED
|
@@ -18,7 +18,6 @@ var HashOp;
|
|
|
18
18
|
HashOp[HashOp["RIPEMD160"] = 4] = "RIPEMD160";
|
|
19
19
|
/** BITCOIN - ripemd160(sha256(x)) */
|
|
20
20
|
HashOp[HashOp["BITCOIN"] = 5] = "BITCOIN";
|
|
21
|
-
HashOp[HashOp["SHA512_256"] = 6] = "SHA512_256";
|
|
22
21
|
HashOp[HashOp["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
23
22
|
})(HashOp = exports.HashOp || (exports.HashOp = {}));
|
|
24
23
|
function hashOpFromJSON(object) {
|
|
@@ -41,9 +40,6 @@ function hashOpFromJSON(object) {
|
|
|
41
40
|
case 5:
|
|
42
41
|
case "BITCOIN":
|
|
43
42
|
return HashOp.BITCOIN;
|
|
44
|
-
case 6:
|
|
45
|
-
case "SHA512_256":
|
|
46
|
-
return HashOp.SHA512_256;
|
|
47
43
|
case -1:
|
|
48
44
|
case "UNRECOGNIZED":
|
|
49
45
|
default:
|
|
@@ -65,8 +61,6 @@ function hashOpToJSON(object) {
|
|
|
65
61
|
return "RIPEMD160";
|
|
66
62
|
case HashOp.BITCOIN:
|
|
67
63
|
return "BITCOIN";
|
|
68
|
-
case HashOp.SHA512_256:
|
|
69
|
-
return "SHA512_256";
|
|
70
64
|
default:
|
|
71
65
|
return "UNKNOWN";
|
|
72
66
|
}
|
package/lib/insights/common.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare const InsightsEndpoints: {
|
|
|
35
35
|
"competition/leaderboardleague": string;
|
|
36
36
|
"competition/leaderboardvolume": string;
|
|
37
37
|
"info/denom_gecko_map": string;
|
|
38
|
-
"market/funding": string;
|
|
38
|
+
"market/funding/history/all": string;
|
|
39
39
|
"market/funding/history": string;
|
|
40
40
|
"proposal/votes": string;
|
|
41
41
|
"delegations/delegator": string;
|
package/lib/insights/common.js
CHANGED
|
@@ -47,7 +47,7 @@ exports.InsightsEndpoints = {
|
|
|
47
47
|
//Coin Gecko Tokens api
|
|
48
48
|
"info/denom_gecko_map": "/info/denom_gecko_map",
|
|
49
49
|
//funding
|
|
50
|
-
"market/funding": "/market/funding",
|
|
50
|
+
"market/funding/history/all": "/market/funding/history/all",
|
|
51
51
|
"market/funding/history": "/market/funding/history",
|
|
52
52
|
// Proposal api
|
|
53
53
|
"proposal/votes": "/gov/proposal/:proposalId/votes",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export interface
|
|
1
|
+
export interface FundingRate {
|
|
2
2
|
market: string;
|
|
3
3
|
"1h": string;
|
|
4
4
|
"4h": string;
|
|
@@ -9,9 +9,20 @@ export interface FundingHistory {
|
|
|
9
9
|
"24h": string;
|
|
10
10
|
}
|
|
11
11
|
export interface QueryGetFundingRateResponse {
|
|
12
|
-
entries:
|
|
12
|
+
entries: FundingRate[];
|
|
13
13
|
}
|
|
14
14
|
export interface QueryGetFundingRateRequest {
|
|
15
|
+
market: string;
|
|
16
|
+
}
|
|
17
|
+
export interface FundingHistory {
|
|
18
|
+
market: string;
|
|
19
|
+
fundingRate: number;
|
|
20
|
+
lastFundingAt: string;
|
|
21
|
+
}
|
|
22
|
+
export interface QueryGetFundingHistoryResponse {
|
|
23
|
+
entries: FundingHistory[];
|
|
24
|
+
}
|
|
25
|
+
export interface QueryGetFundingHistoryRequest {
|
|
15
26
|
market?: string;
|
|
16
27
|
limit?: number;
|
|
17
28
|
offset?: number;
|