@reyaxyz/api-sdk 0.148.13 → 0.149.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/README.md CHANGED
@@ -6,5 +6,5 @@
6
6
 
7
7
  | Statements | Branches | Functions | Lines |
8
8
  | --------------------------- | ----------------------- | ------------------------- | ----------------- |
9
- | ![Statements](https://img.shields.io/badge/statements-1.23%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-6.47%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-0.47%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-1.24%25-red.svg?style=flat) |
9
+ | ![Statements](https://img.shields.io/badge/statements-1.25%25-red.svg?style=flat) | ![Branches](https://img.shields.io/badge/branches-6.47%25-red.svg?style=flat) | ![Functions](https://img.shields.io/badge/functions-0.48%25-red.svg?style=flat) | ![Lines](https://img.shields.io/badge/lines-1.25%25-red.svg?style=flat) |
10
10
 
@@ -86,29 +86,6 @@ var LpClient = /** @class */ (function (_super) {
86
86
  });
87
87
  });
88
88
  };
89
- LpClient.prototype.getLpPoolTransactionHistory = function (params) {
90
- return __awaiter(this, void 0, void 0, function () {
91
- var uri;
92
- return __generator(this, function (_a) {
93
- uri = "/api/lp-pools/".concat(params.id, "/transaction-history");
94
- return [2 /*return*/, this.get(uri, {
95
- limit: params.limit,
96
- address: params.address,
97
- })];
98
- });
99
- });
100
- };
101
- LpClient.prototype.getLpPositions = function (params) {
102
- return __awaiter(this, void 0, void 0, function () {
103
- var uri;
104
- return __generator(this, function (_a) {
105
- uri = "/api/lp-pools/".concat(params.id, "/positions");
106
- return [2 /*return*/, this.get(uri, {
107
- address: params.address,
108
- })];
109
- });
110
- });
111
- };
112
89
  LpClient.prototype.getLpPoolWithdrawBalance = function (params) {
113
90
  return __awaiter(this, void 0, void 0, function () {
114
91
  var uri;
@@ -120,31 +97,6 @@ var LpClient = /** @class */ (function (_super) {
120
97
  });
121
98
  });
122
99
  };
123
- LpClient.prototype.getLpPoolBalanceChartData = function (params) {
124
- return __awaiter(this, void 0, void 0, function () {
125
- var uri;
126
- return __generator(this, function (_a) {
127
- uri = "/api/lp-pools/".concat(params.poolId, "/balance-chart-data");
128
- return [2 /*return*/, this.get(uri, {
129
- timeframeMs: params.filters.timeframeMs,
130
- granularity: params.filters.granularity,
131
- })];
132
- });
133
- });
134
- };
135
- LpClient.prototype.getLpPoolPerformanceChartData = function (params) {
136
- return __awaiter(this, void 0, void 0, function () {
137
- var uri;
138
- return __generator(this, function (_a) {
139
- uri = "/api/lp-pools/".concat(params.poolId, "/performance-chart-data");
140
- return [2 /*return*/, this.get(uri, {
141
- timeframeMs: params.filters.timeframeMs,
142
- granularity: params.filters.granularity,
143
- address: params.address,
144
- })];
145
- });
146
- });
147
- };
148
100
  LpClient.prototype.getLpPoolDepthChartSimulationData = function (params) {
149
101
  return __awaiter(this, void 0, void 0, function () {
150
102
  var uri;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["clients/modules/lp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,0CAMyB;AACzB;IAAsC,4BAAU;IAAhD;;IAoGA,CAAC;IAnGO,6BAAU,GAAhB;;;;gBACQ,GAAG,GAAG,eAAe,CAAC;gBAC5B,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,4BAAS,GAAf,UAAgB,MAAuB;;;;gBAC/B,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,CAAE,CAAC;gBACzC,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,mCAAgB,GAAtB,UACE,MAA8B;;;;gBAExB,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,cAAW,CAAC;gBAClD,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,O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CAAC,OAAO,CAAC,WAAW;wBACvC,OAAO,EAAE,MAAM,CAAC,OAAO;qBACxB,CAAC,EAAC;;;KACJ;IAEK,oDAAiC,GAAvC,UACE,MAA+C;;;;gBAEzC,GAAG,GAAG,wBAAiB,MAAM,CAAC,QAAQ,2BAAwB,CAAC;gBACrE,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,wCAAqB,GAA3B,UACE,MAAmC;;;;gBAE7B,GAAG,GAAG,+CAA+C,CAAC;gBAC5D,sBAAO,IAAI,CAAC,IAAI,CACd,GAAG,EACH,EAAE,EACF;wBACE,OAAO,EAAE,MAAM,CAAC,eAAe;wBAC/B,cAAc,EAAE,MAAM,CAAC,aAAa;wBACpC,eAAe,EAAE,MAAM,CAAC,aAAa;wBACrC,MAAM,EAAE,MAAM,CAAC,MAAM;qBACtB,CACF,EAAC;;;KACH;IAEK,+CAA4B,GAAlC,UACE,MAA0C;;;;gBAEpC,GAAG,GAAG,+CAA+C,CAAC;gBAC5D,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,cAAc,EAAE,MAAM,CAAC,aAAa;qBACrC,CAAC,EAAC;;;KACJ;IACH,eAAC;AAAD,CAAC,AApGD,CAAsC,mBAAU,GAoG/C","sourcesContent":["import {\n GetLpPoolParams,\n GetLpPositionsParams,\n GetLpPoolResult,\n GetLpPoolsResult,\n GetLpPoolTransactionHistoryParams,\n GetLpPoolTransactionHistoryResult,\n GetLpPositionsResult,\n GetLpPoolWithdrawBalanceParams,\n GetLpPoolWithdrawBalanceResult,\n GetLpPoolBalanceChartDataParams,\n GetLpPoolPerformanceChartDataParams,\n getLpPoolDepthChartSimulationDataParams,\n PushBridgeTransactionParams,\n PushBridgeTransactionResult,\n GetPendingBridgeTransactionsParams,\n GetPendingBridgeTransactionsResult,\n GetLpPoolDataRPCParams,\n} from './types';\nimport {\n GetLpPoolBalanceChartDataResult,\n GetLpPoolPerformanceChartDataResult,\n RestClient,\n GetLpPoolDepthChartSimulationDataResult,\n GetLpPoolPositionRPCResponse,\n} from '@reyaxyz/common';\nexport default class LpClient extends RestClient {\n async getLpPools(): Promise<GetLpPoolsResult> {\n const uri = '/api/lp-pools';\n return this.get(uri);\n }\n\n async getLpPool(params: GetLpPoolParams): Promise<GetLpPoolResult> {\n const uri = `/api/lp-pools/${params.id}`;\n return this.get(uri);\n }\n\n async getLpPoolDataRPC(\n params: GetLpPoolDataRPCParams,\n ): Promise<GetLpPoolPositionRPCResponse> {\n const uri = `/api/lp-pools/${params.id}/data-rpc`;\n return this.get(uri, {\n address: params.address,\n });\n }\n\n async getLpPoolTransactionHistory(\n params: GetLpPoolTransactionHistoryParams,\n ): Promise<GetLpPoolTransactionHistoryResult> {\n const uri = `/api/lp-pools/${params.id}/transaction-history`;\n return this.get(uri, {\n limit: params.limit,\n address: params.address,\n });\n }\n\n async getLpPositions(\n params: GetLpPositionsParams,\n ): Promise<GetLpPositionsResult> {\n const uri = `/api/lp-pools/${params.id}/positions`;\n return this.get(uri, {\n address: params.address,\n });\n }\n\n async getLpPoolWithdrawBalance(\n params: GetLpPoolWithdrawBalanceParams,\n ): Promise<GetLpPoolWithdrawBalanceResult> {\n const uri = `/api/lp-pools/${params.id}/withdraw-balance`;\n return this.get(uri, {\n address: params.address,\n });\n }\n\n async getLpPoolBalanceChartData(\n params: GetLpPoolBalanceChartDataParams,\n ): Promise<GetLpPoolBalanceChartDataResult> {\n const uri = `/api/lp-pools/${params.poolId}/balance-chart-data`;\n return this.get(uri, {\n timeframeMs: params.filters.timeframeMs,\n granularity: params.filters.granularity,\n });\n }\n\n async getLpPoolPerformanceChartData(\n params: GetLpPoolPerformanceChartDataParams,\n ): Promise<GetLpPoolPerformanceChartDataResult> {\n const uri = `/api/lp-pools/${params.poolId}/performance-chart-data`;\n return this.get(uri, {\n timeframeMs: params.filters.timeframeMs,\n granularity: params.filters.granularity,\n address: params.address,\n });\n }\n\n async getLpPoolDepthChartSimulationData(\n params: getLpPoolDepthChartSimulationDataParams,\n ): Promise<GetLpPoolDepthChartSimulationDataResult> {\n const uri = `/api/lp-pools/${params.marketId}/depth-simulation-data`;\n return this.get(uri);\n }\n\n async pushBridgeTransaction(\n params: PushBridgeTransactionParams,\n ): Promise<PushBridgeTransactionResult> {\n const uri = `/api/lp-pools/push-pending-transaction/bridge`;\n return this.post(\n uri,\n {},\n {\n tx_hash: params.transactionHash,\n wallet_address: params.walletAddress,\n source_chain_id: params.sourceChainId,\n amount: params.amount,\n },\n );\n }\n\n async getPendingBridgeTransactions(\n params: GetPendingBridgeTransactionsParams,\n ): Promise<GetPendingBridgeTransactionsResult> {\n const uri = `/api/lp-pools/get-pending-transactions/bridge`;\n return this.get(uri, {\n wallet_address: params.walletAddress,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["clients/modules/lp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaA,0CAIyB;AACzB;IAAsC,4BAAU;IAAhD;;IA4DA,CAAC;IA3DO,6BAAU,GAAhB;;;;gBACQ,GAAG,GAAG,eAAe,CAAC;gBAC5B,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,4BAAS,GAAf,UAAgB,MAAuB;;;;gBAC/B,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,CAAE,CAAC;gBACzC,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,mCAAgB,GAAtB,UACE,MAA8B;;;;gBAExB,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,cAAW,CAAC;gBAClD,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,OAAO,EAAE,MAAM,CAAC,OAAO;qBACxB,CAAC,EAAC;;;KACJ;IAEK,2CAAwB,GAA9B,UACE,MAAsC;;;;gBAEhC,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,sBAAmB,CAAC;gBAC1D,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,OAAO,EAAE,MAAM,CAAC,OAAO;qBACxB,CAAC,EAAC;;;KACJ;IAEK,oDAAiC,GAAvC,UACE,MAA+C;;;;gBAEzC,GAAG,GAAG,wBAAiB,MAAM,CAAC,QAAQ,2BAAwB,CAAC;gBACrE,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAC;;;KACtB;IAEK,wCAAqB,GAA3B,UACE,MAAmC;;;;gBAE7B,GAAG,GAAG,+CAA+C,CAAC;gBAC5D,sBAAO,IAAI,CAAC,IAAI,CACd,GAAG,EACH,EAAE,EACF;wBACE,OAAO,EAAE,MAAM,CAAC,eAAe;wBAC/B,cAAc,EAAE,MAAM,CAAC,aAAa;wBACpC,eAAe,EAAE,MAAM,CAAC,aAAa;wBACrC,MAAM,EAAE,MAAM,CAAC,MAAM;qBACtB,CACF,EAAC;;;KACH;IAEK,+CAA4B,GAAlC,UACE,MAA0C;;;;gBAEpC,GAAG,GAAG,+CAA+C,CAAC;gBAC5D,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,cAAc,EAAE,MAAM,CAAC,aAAa;qBACrC,CAAC,EAAC;;;KACJ;IACH,eAAC;AAAD,CAAC,AA5DD,CAAsC,mBAAU,GA4D/C","sourcesContent":["import {\n GetLpPoolParams,\n GetLpPoolResult,\n GetLpPoolsResult,\n GetLpPoolWithdrawBalanceParams,\n GetLpPoolWithdrawBalanceResult,\n PushBridgeTransactionParams,\n PushBridgeTransactionResult,\n GetPendingBridgeTransactionsParams,\n GetPendingBridgeTransactionsResult,\n GetLpPoolDataRPCParams,\n getLpPoolDepthChartSimulationDataParams,\n} from './types';\nimport {\n RestClient,\n GetLpPoolPositionRPCResponse,\n GetLpPoolDepthChartSimulationDataResult,\n} from '@reyaxyz/common';\nexport default class LpClient extends RestClient {\n async getLpPools(): Promise<GetLpPoolsResult> {\n const uri = '/api/lp-pools';\n return this.get(uri);\n }\n\n async getLpPool(params: GetLpPoolParams): Promise<GetLpPoolResult> {\n const uri = `/api/lp-pools/${params.id}`;\n return this.get(uri);\n }\n\n async getLpPoolDataRPC(\n params: GetLpPoolDataRPCParams,\n ): Promise<GetLpPoolPositionRPCResponse> {\n const uri = `/api/lp-pools/${params.id}/data-rpc`;\n return this.get(uri, {\n address: params.address,\n });\n }\n\n async getLpPoolWithdrawBalance(\n params: GetLpPoolWithdrawBalanceParams,\n ): Promise<GetLpPoolWithdrawBalanceResult> {\n const uri = `/api/lp-pools/${params.id}/withdraw-balance`;\n return this.get(uri, {\n address: params.address,\n });\n }\n\n async getLpPoolDepthChartSimulationData(\n params: getLpPoolDepthChartSimulationDataParams,\n ): Promise<GetLpPoolDepthChartSimulationDataResult> {\n const uri = `/api/lp-pools/${params.marketId}/depth-simulation-data`;\n return this.get(uri);\n }\n\n async pushBridgeTransaction(\n params: PushBridgeTransactionParams,\n ): Promise<PushBridgeTransactionResult> {\n const uri = `/api/lp-pools/push-pending-transaction/bridge`;\n return this.post(\n uri,\n {},\n {\n tx_hash: params.transactionHash,\n wallet_address: params.walletAddress,\n source_chain_id: params.sourceChainId,\n amount: params.amount,\n },\n );\n }\n\n async getPendingBridgeTransactions(\n params: GetPendingBridgeTransactionsParams,\n ): Promise<GetPendingBridgeTransactionsResult> {\n const uri = `/api/lp-pools/get-pending-transactions/bridge`;\n return this.get(uri, {\n wallet_address: params.walletAddress,\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/modules/lp/types.ts"],"names":[],"mappings":";;;AAoDA,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,mFAAsB,CAAA;IACtB,iFAAyB,CAAA;IACzB,gFAA6B,CAAA;IAC7B,mFAAkC,CAAA;IAClC,sFAAoC,CAAA;IACpC,qFAAoC,CAAA;AACtC,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC","sourcesContent":["import {\n LpPoolEntity,\n LpPositionEntity,\n LpTransactionHistoryEntity,\n LpBalanceGranularity,\n LpWithdrawBalanceEntity,\n MarketEntity,\n MoneyInOutChainId,\n ReyaChainId,\n Address,\n} from '@reyaxyz/common';\n\nimport { SocketBridgeTransactionPoolStatus } from '@reyaxyz/common';\n\nexport type GetLpPoolsResult = LpPoolEntity[];\n\nexport type GetLpPoolResult = LpPoolEntity;\n\nexport type GetLpPoolParams = {\n id: LpPoolEntity['id'];\n};\n\nexport type GetLpPoolTransactionHistoryResult = LpTransactionHistoryEntity[];\n\nexport type GetLpPositionsParams = {\n id: LpPoolEntity['id'];\n address: string; // wallet address\n};\n\nexport type GetLpPositionsResult = LpPositionEntity[];\n\nexport type GetLpPoolWithdrawBalanceParams = {\n id: LpPoolEntity['id'];\n address: string; // wallet address\n};\n\nexport type GetLpPoolWithdrawBalanceResult = LpWithdrawBalanceEntity;\n\nexport type GetLpPoolTransactionHistoryParams = {\n id: LpPoolEntity['id'];\n address: string; // wallet address\n limit?: number;\n};\n\nexport type GetLpPoolBalanceChartDataParams = {\n poolId: LpPoolEntity['id'];\n filters: {\n timeframeMs: number;\n granularity: LpBalanceGranularity;\n };\n};\n\nexport enum PerformanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type GetLpPoolPerformanceChartDataParams = {\n poolId: LpPoolEntity['id'];\n address: string; // wallet address\n filters: {\n timeframeMs: number;\n granularity: PerformanceGranularity;\n };\n};\n\nexport type getLpPoolDepthChartSimulationDataParams = {\n marketId: MarketEntity['id'];\n};\n\nexport type PushBridgeTransactionParams = {\n transactionHash: string;\n walletAddress: string;\n sourceChainId: MoneyInOutChainId | ReyaChainId;\n amount: number; // amount from bridge input\n};\n\nexport type BridgeTransactionPool = {\n sourceTxHash: string;\n sourceTxExplorerLink: string;\n destinationTxHash?: string;\n destinationTxExplorerLink?: string;\n sourceChainId: MoneyInOutChainId | ReyaChainId;\n destinationChainId: MoneyInOutChainId | ReyaChainId;\n walletAddress: string;\n status: SocketBridgeTransactionPoolStatus;\n amount: number;\n};\n\nexport type PushBridgeTransactionResult = BridgeTransactionPool;\n\nexport type GetPendingBridgeTransactionsParams = {\n walletAddress: string;\n};\n\nexport type GetPendingBridgeTransactionsResult = BridgeTransactionPool[];\n\nexport type GetLpPoolDataRPCParams = {\n id: LpPoolEntity['id'];\n address: Address;\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/modules/lp/types.ts"],"names":[],"mappings":";;;AA0BA,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,mFAAsB,CAAA;IACtB,iFAAyB,CAAA;IACzB,gFAA6B,CAAA;IAC7B,mFAAkC,CAAA;IAClC,sFAAoC,CAAA;IACpC,qFAAoC,CAAA;AACtC,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC","sourcesContent":["import {\n LpPoolEntity,\n LpWithdrawBalanceEntity,\n MarketEntity,\n MoneyInOutChainId,\n ReyaChainId,\n Address,\n} from '@reyaxyz/common';\n\nimport { SocketBridgeTransactionPoolStatus } from '@reyaxyz/common';\n\nexport type GetLpPoolsResult = LpPoolEntity[];\n\nexport type GetLpPoolResult = LpPoolEntity;\n\nexport type GetLpPoolParams = {\n id: LpPoolEntity['id'];\n};\n\nexport type GetLpPoolWithdrawBalanceParams = {\n id: LpPoolEntity['id'];\n address: string; // wallet address\n};\n\nexport type GetLpPoolWithdrawBalanceResult = LpWithdrawBalanceEntity;\n\nexport enum PerformanceGranularity {\n ONE_MINUTE = 60 * 1000,\n ONE_HOUR = 60 * 60 * 1000,\n ONE_DAY = 24 * 60 * 60 * 1000,\n ONE_WEEK = 7 * 24 * 60 * 60 * 1000,\n ONE_MONTH = 30 * 24 * 60 * 60 * 1000,\n ONE_YEAR = 365 * 24 * 60 * 60 * 1000,\n}\n\nexport type getLpPoolDepthChartSimulationDataParams = {\n marketId: MarketEntity['id'];\n};\n\nexport type PushBridgeTransactionParams = {\n transactionHash: string;\n walletAddress: string;\n sourceChainId: MoneyInOutChainId | ReyaChainId;\n amount: number; // amount from bridge input\n};\n\nexport type BridgeTransactionPool = {\n sourceTxHash: string;\n sourceTxExplorerLink: string;\n destinationTxHash?: string;\n destinationTxExplorerLink?: string;\n sourceChainId: MoneyInOutChainId | ReyaChainId;\n destinationChainId: MoneyInOutChainId | ReyaChainId;\n walletAddress: string;\n status: SocketBridgeTransactionPoolStatus;\n amount: number;\n};\n\nexport type PushBridgeTransactionResult = BridgeTransactionPool;\n\nexport type GetPendingBridgeTransactionsParams = {\n walletAddress: string;\n};\n\nexport type GetPendingBridgeTransactionsResult = BridgeTransactionPool[];\n\nexport type GetLpPoolDataRPCParams = {\n id: LpPoolEntity['id'];\n address: Address;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAqD;AACrD,0CA8ByB;AA5BvB,2GAAA,iBAAiB,OAAA;AAYjB,qGAAA,WAAW,OAAA;AACX,2GAAA,iBAAiB,OAAA;AAGjB,8GAAA,oBAAoB,OAAA;AACpB,yHAAA,+BAA+B,OAAA;AAE/B,oIAAA,0CAA0C,OAAA;AAG1C,6HAAA,mCAAmC,OAAA;AAEnC,uHAAA,6BAA6B,OAAA;AAG7B,8GAAA,oBAAoB,OAAA;AAEtB,0DAAwC;AACxC,qEAAmD;AACnD,qDAAmC;AACnC,0DAAwC;AACxC,yDAAuC;AACvC,mEAAiD;AACjD,wDAAsC;AACtC,iFAA+D;AAC/D,4EAA0D;AAC1D,kFAAgE;AAChE,6EAA2D;AAC3D,yEAAuD;AACvD,mFAAiE;AACjE,yFAAuE;AACvE,8EAA4D;AAC5D,+DAA6C;AAC7C,yEAAuD;AACvD,kFAAgE;AAChE,4EAA0D;AAC1D,6DAA2C;AAC3C,0DAAwC","sourcesContent":["// reexporting what we want to share with integrators\nexport {\n Candle,\n CandlesResolution,\n MarketEntity,\n LpTransactionHistoryEntity,\n TradingHistoryEntity,\n OrderHistoryEntity,\n PositionEntity,\n TransactionHistoryType,\n MarginAccountTransactionHistoryType,\n MarginAccountTransactionHistoryEntity,\n MarginAccountEntity,\n LpPositionEntity,\n LpPoolEntity,\n ReyaChainId,\n MoneyInOutChainId,\n GetLpPoolPerformanceChartDataResult,\n GetLpPoolBalanceChartDataResult,\n LpBalanceGranularity,\n MarginAccountBalanceGranularity,\n GetMarginAccountBalanceChartDataResult,\n MarginAccountCollateralsBalanceGranularity,\n GetMarginAccountCollateralsBalanceChartDataResult,\n GetAllMarginAccountsBalanceChartDataResult,\n AllMarginAccountsBalanceGranularity,\n GetFundingRateChartDataResult,\n FundingRateHistoryGranularity,\n MoneyInOutConfigurationPerTokenName,\n UnifiedConditionalOrderType,\n ConditionalOrderType,\n} from '@reyaxyz/common';\nexport * from './modules/account/types';\nexport * from './modules/conditional-orders/types';\nexport * from './modules/lp/types';\nexport * from './modules/markets/types';\nexport * from './modules/tokens/types';\nexport * from './modules/trade.simulation/types';\nexport * from './modules/owner/types';\nexport * from './modules/deposit-existing-MA.simulation/types';\nexport * from './modules/deposit-new-MA.simulation/types';\nexport * from './modules/deposit-passive-pool.simulation/types';\nexport * from './modules/edit-collateral.simulation/types';\nexport * from './modules/withdraw-MA.simulation/types';\nexport * from './modules/withdraw-passive-pool.simulation/types';\nexport * from './modules/transfer-margin-between-MAs.simulation/types';\nexport * from './modules/transfer-MA-Pool.simulation/types';\nexport * from './modules/funding-rate/types';\nexport * from './modules/depth-chart.simulation/types';\nexport * from './modules/deposit-passive-pool.simulation/types';\nexport * from './modules/isolated-order.simulation/types';\nexport * from './modules/rage-trade/types';\nexport * from './modules/lottery/types';\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,qDAAqD;AACrD,0CA4ByB;AA1BvB,2GAAA,iBAAiB,OAAA;AAYjB,qGAAA,WAAW,OAAA;AACX,2GAAA,iBAAiB,OAAA;AACjB,8GAAA,oBAAoB,OAAA;AACpB,yHAAA,+BAA+B,OAAA;AAE/B,oIAAA,0CAA0C,OAAA;AAG1C,6HAAA,mCAAmC,OAAA;AAEnC,uHAAA,6BAA6B,OAAA;AAG7B,8GAAA,oBAAoB,OAAA;AAEtB,0DAAwC;AACxC,qEAAmD;AACnD,qDAAmC;AACnC,0DAAwC;AACxC,yDAAuC;AACvC,mEAAiD;AACjD,wDAAsC;AACtC,iFAA+D;AAC/D,4EAA0D;AAC1D,kFAAgE;AAChE,6EAA2D;AAC3D,yEAAuD;AACvD,mFAAiE;AACjE,yFAAuE;AACvE,8EAA4D;AAC5D,+DAA6C;AAC7C,yEAAuD;AACvD,kFAAgE;AAChE,4EAA0D;AAC1D,6DAA2C;AAC3C,0DAAwC","sourcesContent":["// reexporting what we want to share with integrators\nexport {\n Candle,\n CandlesResolution,\n MarketEntity,\n LpTransactionHistoryEntity,\n TradingHistoryEntity,\n OrderHistoryEntity,\n PositionEntity,\n TransactionHistoryType,\n MarginAccountTransactionHistoryType,\n MarginAccountTransactionHistoryEntity,\n MarginAccountEntity,\n LpPositionEntity,\n LpPoolEntity,\n ReyaChainId,\n MoneyInOutChainId,\n LpBalanceGranularity,\n MarginAccountBalanceGranularity,\n GetMarginAccountBalanceChartDataResult,\n MarginAccountCollateralsBalanceGranularity,\n GetMarginAccountCollateralsBalanceChartDataResult,\n GetAllMarginAccountsBalanceChartDataResult,\n AllMarginAccountsBalanceGranularity,\n GetFundingRateChartDataResult,\n FundingRateHistoryGranularity,\n MoneyInOutConfigurationPerTokenName,\n UnifiedConditionalOrderType,\n ConditionalOrderType,\n} from '@reyaxyz/common';\nexport * from './modules/account/types';\nexport * from './modules/conditional-orders/types';\nexport * from './modules/lp/types';\nexport * from './modules/markets/types';\nexport * from './modules/tokens/types';\nexport * from './modules/trade.simulation/types';\nexport * from './modules/owner/types';\nexport * from './modules/deposit-existing-MA.simulation/types';\nexport * from './modules/deposit-new-MA.simulation/types';\nexport * from './modules/deposit-passive-pool.simulation/types';\nexport * from './modules/edit-collateral.simulation/types';\nexport * from './modules/withdraw-MA.simulation/types';\nexport * from './modules/withdraw-passive-pool.simulation/types';\nexport * from './modules/transfer-margin-between-MAs.simulation/types';\nexport * from './modules/transfer-MA-Pool.simulation/types';\nexport * from './modules/funding-rate/types';\nexport * from './modules/depth-chart.simulation/types';\nexport * from './modules/deposit-passive-pool.simulation/types';\nexport * from './modules/isolated-order.simulation/types';\nexport * from './modules/rage-trade/types';\nexport * from './modules/lottery/types';\n"]}
@@ -1,14 +1,10 @@
1
- import { GetLpPoolParams, GetLpPositionsParams, GetLpPoolResult, GetLpPoolsResult, GetLpPoolTransactionHistoryParams, GetLpPoolTransactionHistoryResult, GetLpPositionsResult, GetLpPoolWithdrawBalanceParams, GetLpPoolWithdrawBalanceResult, GetLpPoolBalanceChartDataParams, GetLpPoolPerformanceChartDataParams, getLpPoolDepthChartSimulationDataParams, PushBridgeTransactionParams, PushBridgeTransactionResult, GetPendingBridgeTransactionsParams, GetPendingBridgeTransactionsResult, GetLpPoolDataRPCParams } from './types';
2
- import { GetLpPoolBalanceChartDataResult, GetLpPoolPerformanceChartDataResult, RestClient, GetLpPoolDepthChartSimulationDataResult, GetLpPoolPositionRPCResponse } from '@reyaxyz/common';
1
+ import { GetLpPoolParams, GetLpPoolResult, GetLpPoolsResult, GetLpPoolWithdrawBalanceParams, GetLpPoolWithdrawBalanceResult, PushBridgeTransactionParams, PushBridgeTransactionResult, GetPendingBridgeTransactionsParams, GetPendingBridgeTransactionsResult, GetLpPoolDataRPCParams, getLpPoolDepthChartSimulationDataParams } from './types';
2
+ import { RestClient, GetLpPoolPositionRPCResponse, GetLpPoolDepthChartSimulationDataResult } from '@reyaxyz/common';
3
3
  export default class LpClient extends RestClient {
4
4
  getLpPools(): Promise<GetLpPoolsResult>;
5
5
  getLpPool(params: GetLpPoolParams): Promise<GetLpPoolResult>;
6
6
  getLpPoolDataRPC(params: GetLpPoolDataRPCParams): Promise<GetLpPoolPositionRPCResponse>;
7
- getLpPoolTransactionHistory(params: GetLpPoolTransactionHistoryParams): Promise<GetLpPoolTransactionHistoryResult>;
8
- getLpPositions(params: GetLpPositionsParams): Promise<GetLpPositionsResult>;
9
7
  getLpPoolWithdrawBalance(params: GetLpPoolWithdrawBalanceParams): Promise<GetLpPoolWithdrawBalanceResult>;
10
- getLpPoolBalanceChartData(params: GetLpPoolBalanceChartDataParams): Promise<GetLpPoolBalanceChartDataResult>;
11
- getLpPoolPerformanceChartData(params: GetLpPoolPerformanceChartDataParams): Promise<GetLpPoolPerformanceChartDataResult>;
12
8
  getLpPoolDepthChartSimulationData(params: getLpPoolDepthChartSimulationDataParams): Promise<GetLpPoolDepthChartSimulationDataResult>;
13
9
  pushBridgeTransaction(params: PushBridgeTransactionParams): Promise<PushBridgeTransactionResult>;
14
10
  getPendingBridgeTransactions(params: GetPendingBridgeTransactionsParams): Promise<GetPendingBridgeTransactionsResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["clients/modules/lp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,iCAAiC,EACjC,iCAAiC,EACjC,oBAAoB,EACpB,8BAA8B,EAC9B,8BAA8B,EAC9B,+BAA+B,EAC/B,mCAAmC,EACnC,uCAAuC,EACvC,2BAA2B,EAC3B,2BAA2B,EAC3B,kCAAkC,EAClC,kCAAkC,EAClC,sBAAsB,EACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,UAAU,EACV,uCAAuC,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AACzB,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;IACxC,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAKvC,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAK5D,gBAAgB,CACpB,MAAM,EAAE,sBAAsB,GAC7B,OAAO,CAAC,4BAA4B,CAAC;IAOlC,wBAAwB,CAC5B,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,8BAA8B,CAAC;IAOpC,iCAAiC,CACrC,MAAM,EAAE,uCAAuC,GAC9C,OAAO,CAAC,uCAAuC,CAAC;IAK7C,qBAAqB,CACzB,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,2BAA2B,CAAC;IAcjC,4BAA4B,CAChC,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,kCAAkC,CAAC;CAM/C"}
@@ -1,33 +1,15 @@
1
- import { LpPoolEntity, LpPositionEntity, LpTransactionHistoryEntity, LpBalanceGranularity, LpWithdrawBalanceEntity, MarketEntity, MoneyInOutChainId, ReyaChainId, Address } from '@reyaxyz/common';
1
+ import { LpPoolEntity, LpWithdrawBalanceEntity, MarketEntity, MoneyInOutChainId, ReyaChainId, Address } from '@reyaxyz/common';
2
2
  import { SocketBridgeTransactionPoolStatus } from '@reyaxyz/common';
3
3
  export type GetLpPoolsResult = LpPoolEntity[];
4
4
  export type GetLpPoolResult = LpPoolEntity;
5
5
  export type GetLpPoolParams = {
6
6
  id: LpPoolEntity['id'];
7
7
  };
8
- export type GetLpPoolTransactionHistoryResult = LpTransactionHistoryEntity[];
9
- export type GetLpPositionsParams = {
10
- id: LpPoolEntity['id'];
11
- address: string;
12
- };
13
- export type GetLpPositionsResult = LpPositionEntity[];
14
8
  export type GetLpPoolWithdrawBalanceParams = {
15
9
  id: LpPoolEntity['id'];
16
10
  address: string;
17
11
  };
18
12
  export type GetLpPoolWithdrawBalanceResult = LpWithdrawBalanceEntity;
19
- export type GetLpPoolTransactionHistoryParams = {
20
- id: LpPoolEntity['id'];
21
- address: string;
22
- limit?: number;
23
- };
24
- export type GetLpPoolBalanceChartDataParams = {
25
- poolId: LpPoolEntity['id'];
26
- filters: {
27
- timeframeMs: number;
28
- granularity: LpBalanceGranularity;
29
- };
30
- };
31
13
  export declare enum PerformanceGranularity {
32
14
  ONE_MINUTE = 60000,
33
15
  ONE_HOUR = 3600000,
@@ -36,14 +18,6 @@ export declare enum PerformanceGranularity {
36
18
  ONE_MONTH = 2592000000,
37
19
  ONE_YEAR = 31536000000
38
20
  }
39
- export type GetLpPoolPerformanceChartDataParams = {
40
- poolId: LpPoolEntity['id'];
41
- address: string;
42
- filters: {
43
- timeframeMs: number;
44
- granularity: PerformanceGranularity;
45
- };
46
- };
47
21
  export type getLpPoolDepthChartSimulationDataParams = {
48
22
  marketId: MarketEntity['id'];
49
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/modules/lp/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,0BAA0B,EAC1B,oBAAoB,EACpB,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,OAAO,EACR,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,iCAAiC,EAAE,MAAM,iBAAiB,CAAC;AAEpE,MAAM,MAAM,gBAAgB,GAAG,YAAY,EAAE,CAAC;AAE9C,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC;AAE3C,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,0BAA0B,EAAE,CAAC;AAE7E,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,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AsB;IAChC,UAAU,QAAY;IACtB,QAAQ,UAAiB;IACzB,OAAO,WAAsB;IAC7B,QAAQ,YAA0B;IAClC,SAAS,aAA2B;IACpC,QAAQ,cAA4B;CACrC;AAED,MAAM,MAAM,uCAAuC,GAAG;IACpD,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,iBAAiB,GAAG,WAAW,CAAC;IAC/C,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,aAAa,EAAE,iBAAiB,GAAG,WAAW,CAAC;IAC/C,kBAAkB,EAAE,iBAAiB,GAAG,WAAW,CAAC;IACpD,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,iCAAiC,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AAEhE,MAAM,MAAM,kCAAkC,GAAG;IAC/C,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG,qBAAqB,EAAE,CAAC;AAEzE,MAAM,MAAM,sBAAsB,GAAG;IACnC,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC"}
@@ -1,4 +1,4 @@
1
- export { Candle, CandlesResolution, MarketEntity, LpTransactionHistoryEntity, TradingHistoryEntity, OrderHistoryEntity, PositionEntity, TransactionHistoryType, MarginAccountTransactionHistoryType, MarginAccountTransactionHistoryEntity, MarginAccountEntity, LpPositionEntity, LpPoolEntity, ReyaChainId, MoneyInOutChainId, GetLpPoolPerformanceChartDataResult, GetLpPoolBalanceChartDataResult, LpBalanceGranularity, MarginAccountBalanceGranularity, GetMarginAccountBalanceChartDataResult, MarginAccountCollateralsBalanceGranularity, GetMarginAccountCollateralsBalanceChartDataResult, GetAllMarginAccountsBalanceChartDataResult, AllMarginAccountsBalanceGranularity, GetFundingRateChartDataResult, FundingRateHistoryGranularity, MoneyInOutConfigurationPerTokenName, UnifiedConditionalOrderType, ConditionalOrderType, } from '@reyaxyz/common';
1
+ export { Candle, CandlesResolution, MarketEntity, LpTransactionHistoryEntity, TradingHistoryEntity, OrderHistoryEntity, PositionEntity, TransactionHistoryType, MarginAccountTransactionHistoryType, MarginAccountTransactionHistoryEntity, MarginAccountEntity, LpPositionEntity, LpPoolEntity, ReyaChainId, MoneyInOutChainId, LpBalanceGranularity, MarginAccountBalanceGranularity, GetMarginAccountBalanceChartDataResult, MarginAccountCollateralsBalanceGranularity, GetMarginAccountCollateralsBalanceChartDataResult, GetAllMarginAccountsBalanceChartDataResult, AllMarginAccountsBalanceGranularity, GetFundingRateChartDataResult, FundingRateHistoryGranularity, MoneyInOutConfigurationPerTokenName, UnifiedConditionalOrderType, ConditionalOrderType, } from '@reyaxyz/common';
2
2
  export * from './modules/account/types';
3
3
  export * from './modules/conditional-orders/types';
4
4
  export * from './modules/lp/types';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"/","sources":["clients/types.ts"],"names":[],"mappings":"AACA,OAAO,EACL,MAAM,EACN,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAC1B,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,EACtB,mCAAmC,EACnC,qCAAqC,EACrC,mBAAmB,EACnB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,mCAAmC,EACnC,+BAA+B,EAC/B,oBAAoB,EACpB,+BAA+B,EAC/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AAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,kDAAkD,CAAC;AACjE,cAAc,wDAAwD,CAAC;AACvE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wCAAwC,CAAC;AACvD,cAAc,iDAAiD,CAAC;AAChE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/api-sdk",
3
- "version": "0.148.13",
3
+ "version": "0.149.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -33,7 +33,7 @@
33
33
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
34
34
  },
35
35
  "dependencies": {
36
- "@reyaxyz/common": "0.252.0",
36
+ "@reyaxyz/common": "0.254.0",
37
37
  "@simplewebauthn/types": "^10.0.0",
38
38
  "axios": "^1.6.2",
39
39
  "bignumber.js": "^9.1.2",
@@ -42,8 +42,8 @@
42
42
  "ws": "^8.16.0"
43
43
  },
44
44
  "packageManager": "pnpm@8.3.1",
45
- "gitHead": "efae1745c0325fb76d5a1d90a0863431c1894a66",
45
+ "gitHead": "8f27e5797e29e8a5d6bd6904ee7a61b2a2ed8766",
46
46
  "devDependencies": {
47
- "@reyaxyz/database": "0.118.1"
47
+ "@reyaxyz/database": "0.118.3"
48
48
  }
49
49
  }
@@ -1,28 +1,20 @@
1
1
  import {
2
2
  GetLpPoolParams,
3
- GetLpPositionsParams,
4
3
  GetLpPoolResult,
5
4
  GetLpPoolsResult,
6
- GetLpPoolTransactionHistoryParams,
7
- GetLpPoolTransactionHistoryResult,
8
- GetLpPositionsResult,
9
5
  GetLpPoolWithdrawBalanceParams,
10
6
  GetLpPoolWithdrawBalanceResult,
11
- GetLpPoolBalanceChartDataParams,
12
- GetLpPoolPerformanceChartDataParams,
13
- getLpPoolDepthChartSimulationDataParams,
14
7
  PushBridgeTransactionParams,
15
8
  PushBridgeTransactionResult,
16
9
  GetPendingBridgeTransactionsParams,
17
10
  GetPendingBridgeTransactionsResult,
18
11
  GetLpPoolDataRPCParams,
12
+ getLpPoolDepthChartSimulationDataParams,
19
13
  } from './types';
20
14
  import {
21
- GetLpPoolBalanceChartDataResult,
22
- GetLpPoolPerformanceChartDataResult,
23
15
  RestClient,
24
- GetLpPoolDepthChartSimulationDataResult,
25
16
  GetLpPoolPositionRPCResponse,
17
+ GetLpPoolDepthChartSimulationDataResult,
26
18
  } from '@reyaxyz/common';
27
19
  export default class LpClient extends RestClient {
28
20
  async getLpPools(): Promise<GetLpPoolsResult> {
@@ -44,25 +36,6 @@ export default class LpClient extends RestClient {
44
36
  });
45
37
  }
46
38
 
47
- async getLpPoolTransactionHistory(
48
- params: GetLpPoolTransactionHistoryParams,
49
- ): Promise<GetLpPoolTransactionHistoryResult> {
50
- const uri = `/api/lp-pools/${params.id}/transaction-history`;
51
- return this.get(uri, {
52
- limit: params.limit,
53
- address: params.address,
54
- });
55
- }
56
-
57
- async getLpPositions(
58
- params: GetLpPositionsParams,
59
- ): Promise<GetLpPositionsResult> {
60
- const uri = `/api/lp-pools/${params.id}/positions`;
61
- return this.get(uri, {
62
- address: params.address,
63
- });
64
- }
65
-
66
39
  async getLpPoolWithdrawBalance(
67
40
  params: GetLpPoolWithdrawBalanceParams,
68
41
  ): Promise<GetLpPoolWithdrawBalanceResult> {
@@ -72,27 +45,6 @@ export default class LpClient extends RestClient {
72
45
  });
73
46
  }
74
47
 
75
- async getLpPoolBalanceChartData(
76
- params: GetLpPoolBalanceChartDataParams,
77
- ): Promise<GetLpPoolBalanceChartDataResult> {
78
- const uri = `/api/lp-pools/${params.poolId}/balance-chart-data`;
79
- return this.get(uri, {
80
- timeframeMs: params.filters.timeframeMs,
81
- granularity: params.filters.granularity,
82
- });
83
- }
84
-
85
- async getLpPoolPerformanceChartData(
86
- params: GetLpPoolPerformanceChartDataParams,
87
- ): Promise<GetLpPoolPerformanceChartDataResult> {
88
- const uri = `/api/lp-pools/${params.poolId}/performance-chart-data`;
89
- return this.get(uri, {
90
- timeframeMs: params.filters.timeframeMs,
91
- granularity: params.filters.granularity,
92
- address: params.address,
93
- });
94
- }
95
-
96
48
  async getLpPoolDepthChartSimulationData(
97
49
  params: getLpPoolDepthChartSimulationDataParams,
98
50
  ): Promise<GetLpPoolDepthChartSimulationDataResult> {
@@ -1,8 +1,5 @@
1
1
  import {
2
2
  LpPoolEntity,
3
- LpPositionEntity,
4
- LpTransactionHistoryEntity,
5
- LpBalanceGranularity,
6
3
  LpWithdrawBalanceEntity,
7
4
  MarketEntity,
8
5
  MoneyInOutChainId,
@@ -20,15 +17,6 @@ export type GetLpPoolParams = {
20
17
  id: LpPoolEntity['id'];
21
18
  };
22
19
 
23
- export type GetLpPoolTransactionHistoryResult = LpTransactionHistoryEntity[];
24
-
25
- export type GetLpPositionsParams = {
26
- id: LpPoolEntity['id'];
27
- address: string; // wallet address
28
- };
29
-
30
- export type GetLpPositionsResult = LpPositionEntity[];
31
-
32
20
  export type GetLpPoolWithdrawBalanceParams = {
33
21
  id: LpPoolEntity['id'];
34
22
  address: string; // wallet address
@@ -36,20 +24,6 @@ export type GetLpPoolWithdrawBalanceParams = {
36
24
 
37
25
  export type GetLpPoolWithdrawBalanceResult = LpWithdrawBalanceEntity;
38
26
 
39
- export type GetLpPoolTransactionHistoryParams = {
40
- id: LpPoolEntity['id'];
41
- address: string; // wallet address
42
- limit?: number;
43
- };
44
-
45
- export type GetLpPoolBalanceChartDataParams = {
46
- poolId: LpPoolEntity['id'];
47
- filters: {
48
- timeframeMs: number;
49
- granularity: LpBalanceGranularity;
50
- };
51
- };
52
-
53
27
  export enum PerformanceGranularity {
54
28
  ONE_MINUTE = 60 * 1000,
55
29
  ONE_HOUR = 60 * 60 * 1000,
@@ -59,15 +33,6 @@ export enum PerformanceGranularity {
59
33
  ONE_YEAR = 365 * 24 * 60 * 60 * 1000,
60
34
  }
61
35
 
62
- export type GetLpPoolPerformanceChartDataParams = {
63
- poolId: LpPoolEntity['id'];
64
- address: string; // wallet address
65
- filters: {
66
- timeframeMs: number;
67
- granularity: PerformanceGranularity;
68
- };
69
- };
70
-
71
36
  export type getLpPoolDepthChartSimulationDataParams = {
72
37
  marketId: MarketEntity['id'];
73
38
  };
@@ -15,8 +15,6 @@ export {
15
15
  LpPoolEntity,
16
16
  ReyaChainId,
17
17
  MoneyInOutChainId,
18
- GetLpPoolPerformanceChartDataResult,
19
- GetLpPoolBalanceChartDataResult,
20
18
  LpBalanceGranularity,
21
19
  MarginAccountBalanceGranularity,
22
20
  GetMarginAccountBalanceChartDataResult,