@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.
@@ -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;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,9 @@
1
+ export async function fetchApiGmPoolYieldPnl(ctx, params) {
2
+ return ctx.api.fetchJson("/v1/yield/gm-pools", {
3
+ query: {
4
+ period: params?.period,
5
+ pools: params?.pools,
6
+ includeComponents: params?.includeComponents,
7
+ },
8
+ });
9
+ }
@@ -0,0 +1 @@
1
+ export {};