@gmx-io/sdk 1.7.0 → 1.8.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/build/cjs/src/clients/v2/index.js +4 -0
- package/build/cjs/src/utils/yield/api.js +13 -0
- package/build/cjs/src/utils/yield/types.js +2 -0
- package/build/esm/src/clients/v2/index.js +4 -0
- package/build/esm/src/utils/yield/api.js +9 -0
- package/build/esm/src/utils/yield/types.js +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/types/src/clients/v2/index.d.ts +3 -0
- package/build/types/src/utils/yield/api.d.ts +5 -0
- package/build/types/src/utils/yield/types.d.ts +29 -0
- package/package.json +1 -1
|
@@ -26,6 +26,7 @@ const api_15 = require("../../utils/subaccount/api");
|
|
|
26
26
|
const sdkClient_1 = require("../../utils/subaccount/sdkClient");
|
|
27
27
|
const api_16 = require("../../utils/tokens/api");
|
|
28
28
|
const api_17 = require("../../utils/trades/api");
|
|
29
|
+
const api_18 = require("../../utils/yield/api");
|
|
29
30
|
var signer_1 = require("../../utils/signer");
|
|
30
31
|
Object.defineProperty(exports, "PrivateKeySigner", { enumerable: true, get: function () { return signer_1.PrivateKeySigner; } });
|
|
31
32
|
var http_2 = require("../../utils/http/http");
|
|
@@ -129,6 +130,9 @@ class GmxApiSdk {
|
|
|
129
130
|
fetchPerformanceSnapshots(params) {
|
|
130
131
|
return (0, api_10.fetchApiPerformanceSnapshots)(this.ctx, params);
|
|
131
132
|
}
|
|
133
|
+
fetchGmPoolYieldPnl(params) {
|
|
134
|
+
return (0, api_18.fetchApiGmPoolYieldPnl)(this.ctx, params);
|
|
135
|
+
}
|
|
132
136
|
fetchBuybackWeeklyStats() {
|
|
133
137
|
return (0, api_4.fetchApiBuybackWeeklyStats)(this.ctx);
|
|
134
138
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchApiGmPoolYieldPnl = void 0;
|
|
4
|
+
async function fetchApiGmPoolYieldPnl(ctx, params) {
|
|
5
|
+
return ctx.api.fetchJson("/v1/yield/gm-pools", {
|
|
6
|
+
query: {
|
|
7
|
+
period: params?.period,
|
|
8
|
+
pools: params?.pools,
|
|
9
|
+
includeComponents: params?.includeComponents,
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
exports.fetchApiGmPoolYieldPnl = fetchApiGmPoolYieldPnl;
|
|
@@ -21,6 +21,7 @@ import { fetchSubaccountStatus, prepareSubaccountApproval, signSubaccountApprova
|
|
|
21
21
|
import { activateSdkSubaccount, clearSdkSubaccount, executeExpressOrderWithSubaccount, generateSdkSubaccount, getSdkSubaccountApprovalMessage, hasActiveSdkSubaccount, prepareWithSubaccount, refreshSdkSubaccountState, signOrderWithSubaccount, submitOrderWithSubaccount, } from "../../utils/subaccount/sdkClient";
|
|
22
22
|
import { fetchApiTokens } from "../../utils/tokens/api";
|
|
23
23
|
import { fetchApiTrades, searchApiTrades } from "../../utils/trades/api";
|
|
24
|
+
import { fetchApiGmPoolYieldPnl } from "../../utils/yield/api";
|
|
24
25
|
export { isPrepareOrderError, parsePrepareOrderError };
|
|
25
26
|
export { PrivateKeySigner } from "../../utils/signer";
|
|
26
27
|
export { HttpError } from "../../utils/http/http";
|
|
@@ -121,6 +122,9 @@ export class GmxApiSdk {
|
|
|
121
122
|
fetchPerformanceSnapshots(params) {
|
|
122
123
|
return fetchApiPerformanceSnapshots(this.ctx, params);
|
|
123
124
|
}
|
|
125
|
+
fetchGmPoolYieldPnl(params) {
|
|
126
|
+
return fetchApiGmPoolYieldPnl(this.ctx, params);
|
|
127
|
+
}
|
|
124
128
|
fetchBuybackWeeklyStats() {
|
|
125
129
|
return fetchApiBuybackWeeklyStats(this.ctx);
|
|
126
130
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|