@reyaxyz/api-sdk 0.66.4 → 0.67.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.
@@ -143,6 +143,31 @@ var LpClient = /** @class */ (function (_super) {
143
143
  });
144
144
  });
145
145
  };
146
+ LpClient.prototype.pushBridgeTransaction = function (params) {
147
+ return __awaiter(this, void 0, void 0, function () {
148
+ var uri;
149
+ return __generator(this, function (_a) {
150
+ uri = "/api/lp-pools/push-pending-transaction/bridge";
151
+ return [2 /*return*/, this.post(uri, {}, {
152
+ tx_hash: params.transactionHash,
153
+ wallet_address: params.walletAddress,
154
+ source_chain_id: params.sourceChainId,
155
+ amount: params.amount,
156
+ })];
157
+ });
158
+ });
159
+ };
160
+ LpClient.prototype.getPendingBridgeTransactions = function (params) {
161
+ return __awaiter(this, void 0, void 0, function () {
162
+ var uri;
163
+ return __generator(this, function (_a) {
164
+ uri = "/api/lp-pools/get-pending-transactions/bridge";
165
+ return [2 /*return*/, this.get(uri, {
166
+ wallet_address: params.walletAddress,
167
+ })];
168
+ });
169
+ });
170
+ };
146
171
  return LpClient;
147
172
  }(common_1.RestClient));
148
173
  exports.default = LpClient;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["clients/modules/lp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,0CAKyB;AACzB;IAAsC,4BAAU;IAAhD;;IAkEA,CAAC;IAjEO,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;IAE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;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;IACH,eAAC;AAAD,CAAC,AAlED,CAAsC,mBAAU,GAkE/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} from './types';\nimport {\n GetLpPoolBalanceChartDataResult,\n GetLpPoolPerformanceChartDataResult,\n RestClient,\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 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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["clients/modules/lp/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,0CAKyB;AACzB;IAAsC,4BAAU;IAAhD;;IA2FA,CAAC;IA1FO,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,8CAA2B,GAAjC,UACE,MAAyC;;;;gBAEnC,GAAG,GAAG,wBAAiB,MAAM,CAAC,EAAE,yBAAsB,CAAC;gBAC7D,sBAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE;wBACnB,KAAK,EAAE,MAAM,CAAC,KAAK;wBACnB,OAAO,EAAE,MAAM,CAA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B,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,AA3FD,CAAsC,mBAAU,GA2F/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} from './types';\nimport {\n GetLpPoolBalanceChartDataResult,\n GetLpPoolPerformanceChartDataResult,\n RestClient,\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 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 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/modules/lp/types.ts"],"names":[],"mappings":";;;AA+CA,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} 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"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"/","sources":["clients/modules/lp/types.ts"],"names":[],"mappings":";;;AAmDA,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} 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 destinationTxHash: 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"]}
@@ -1,4 +1,4 @@
1
- import { GetLpPoolParams, GetLpPositionsParams, GetLpPoolResult, GetLpPoolsResult, GetLpPoolTransactionHistoryParams, GetLpPoolTransactionHistoryResult, GetLpPositionsResult, GetLpPoolWithdrawBalanceParams, GetLpPoolWithdrawBalanceResult, GetLpPoolBalanceChartDataParams, GetLpPoolPerformanceChartDataParams, getLpPoolDepthChartSimulationDataParams } from './types';
1
+ import { GetLpPoolParams, GetLpPositionsParams, GetLpPoolResult, GetLpPoolsResult, GetLpPoolTransactionHistoryParams, GetLpPoolTransactionHistoryResult, GetLpPositionsResult, GetLpPoolWithdrawBalanceParams, GetLpPoolWithdrawBalanceResult, GetLpPoolBalanceChartDataParams, GetLpPoolPerformanceChartDataParams, getLpPoolDepthChartSimulationDataParams, PushBridgeTransactionParams, PushBridgeTransactionResult, GetPendingBridgeTransactionsParams, GetPendingBridgeTransactionsResult } from './types';
2
2
  import { GetLpPoolBalanceChartDataResult, GetLpPoolPerformanceChartDataResult, RestClient, GetLpPoolDepthChartSimulationDataResult } from '@reyaxyz/common';
3
3
  export default class LpClient extends RestClient {
4
4
  getLpPools(): Promise<GetLpPoolsResult>;
@@ -9,5 +9,7 @@ export default class LpClient extends RestClient {
9
9
  getLpPoolBalanceChartData(params: GetLpPoolBalanceChartDataParams): Promise<GetLpPoolBalanceChartDataResult>;
10
10
  getLpPoolPerformanceChartData(params: GetLpPoolPerformanceChartDataParams): Promise<GetLpPoolPerformanceChartDataResult>;
11
11
  getLpPoolDepthChartSimulationData(params: getLpPoolDepthChartSimulationDataParams): Promise<GetLpPoolDepthChartSimulationDataResult>;
12
+ pushBridgeTransaction(params: PushBridgeTransactionParams): Promise<PushBridgeTransactionResult>;
13
+ getPendingBridgeTransactions(params: GetPendingBridgeTransactionsParams): Promise<GetPendingBridgeTransactionsResult>;
12
14
  }
13
15
  //# sourceMappingURL=index.d.ts.map
@@ -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,EACxC,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,+BAA+B,EAC/B,mCAAmC,EACnC,UAAU,EACV,uCAAuC,EACxC,MAAM,iBAAiB,CAAC;AACzB,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;IACxC,UAAU,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAKvC,SAAS,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAA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CAC5B,MAAM,EAAE,8BAA8B,GACrC,OAAO,CAAC,8BAA8B,CAAC;IAOpC,yBAAyB,CAC7B,MAAM,EAAE,+BAA+B,GACtC,OAAO,CAAC,+BAA+B,CAAC;IAQrC,6BAA6B,CACjC,MAAM,EAAE,mCAAmC,GAC1C,OAAO,CAAC,mCAAmC,CAAC;IASzC,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,4 +1,5 @@
1
- import { LpPoolEntity, LpPositionEntity, LpTransactionHistoryEntity, LpBalanceGranularity, LpWithdrawBalanceEntity, MarketEntity } from '@reyaxyz/common';
1
+ import { LpPoolEntity, LpPositionEntity, LpTransactionHistoryEntity, LpBalanceGranularity, LpWithdrawBalanceEntity, MarketEntity, MoneyInOutChainId, ReyaChainId } from '@reyaxyz/common';
2
+ import { SocketBridgeTransactionPoolStatus } from '@reyaxyz/common';
2
3
  export type GetLpPoolsResult = LpPoolEntity[];
3
4
  export type GetLpPoolResult = LpPoolEntity;
4
5
  export type GetLpPoolParams = {
@@ -46,4 +47,24 @@ export type GetLpPoolPerformanceChartDataParams = {
46
47
  export type getLpPoolDepthChartSimulationDataParams = {
47
48
  marketId: MarketEntity['id'];
48
49
  };
50
+ export type PushBridgeTransactionParams = {
51
+ transactionHash: string;
52
+ walletAddress: string;
53
+ sourceChainId: MoneyInOutChainId | ReyaChainId;
54
+ amount: number;
55
+ };
56
+ export type BridgeTransactionPool = {
57
+ sourceTxHash: string;
58
+ destinationTxHash: string;
59
+ sourceChainId: MoneyInOutChainId | ReyaChainId;
60
+ destinationChainId: MoneyInOutChainId | ReyaChainId;
61
+ walletAddress: string;
62
+ status: SocketBridgeTransactionPoolStatus;
63
+ amount: number;
64
+ };
65
+ export type PushBridgeTransactionResult = BridgeTransactionPool;
66
+ export type GetPendingBridgeTransactionsParams = {
67
+ walletAddress: string;
68
+ };
69
+ export type GetPendingBridgeTransactionsResult = BridgeTransactionPool[];
49
70
  //# sourceMappingURL=types.d.ts.map
@@ -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,EACb,MAAM,iBAAiB,CAAC;AAEzB,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,gBAAgB,EAAE,CAAC;AAEtD,MAAM,MAAM,8BAA8B,GAAG;IAC3C,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,uBAAuB,CAAC;AAErE,MAAM,MAAM,iCAAiC,GAAG;IAC9C,EAAE,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,CAAC;IAC3B,OAAO,E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iB,EAAE,MAAM,CAAC;IAC1B,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/api-sdk",
3
- "version": "0.66.4",
3
+ "version": "0.67.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -33,9 +33,9 @@
33
33
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
34
34
  },
35
35
  "dependencies": {
36
- "@reyaxyz/common": "0.66.1",
36
+ "@reyaxyz/common": "0.68.0",
37
37
  "bignumber.js": "^9.1.2"
38
38
  },
39
39
  "packageManager": "pnpm@8.10.4",
40
- "gitHead": "3fdb789141374d425db31abd19a3fab14936db20"
40
+ "gitHead": "e6ce62d9c0199b05188656764491f37f500a26f5"
41
41
  }
@@ -11,6 +11,10 @@ import {
11
11
  GetLpPoolBalanceChartDataParams,
12
12
  GetLpPoolPerformanceChartDataParams,
13
13
  getLpPoolDepthChartSimulationDataParams,
14
+ PushBridgeTransactionParams,
15
+ PushBridgeTransactionResult,
16
+ GetPendingBridgeTransactionsParams,
17
+ GetPendingBridgeTransactionsResult,
14
18
  } from './types';
15
19
  import {
16
20
  GetLpPoolBalanceChartDataResult,
@@ -84,4 +88,29 @@ export default class LpClient extends RestClient {
84
88
  const uri = `/api/lp-pools/${params.marketId}/depth-simulation-data`;
85
89
  return this.get(uri);
86
90
  }
91
+
92
+ async pushBridgeTransaction(
93
+ params: PushBridgeTransactionParams,
94
+ ): Promise<PushBridgeTransactionResult> {
95
+ const uri = `/api/lp-pools/push-pending-transaction/bridge`;
96
+ return this.post(
97
+ uri,
98
+ {},
99
+ {
100
+ tx_hash: params.transactionHash,
101
+ wallet_address: params.walletAddress,
102
+ source_chain_id: params.sourceChainId,
103
+ amount: params.amount,
104
+ },
105
+ );
106
+ }
107
+
108
+ async getPendingBridgeTransactions(
109
+ params: GetPendingBridgeTransactionsParams,
110
+ ): Promise<GetPendingBridgeTransactionsResult> {
111
+ const uri = `/api/lp-pools/get-pending-transactions/bridge`;
112
+ return this.get(uri, {
113
+ wallet_address: params.walletAddress,
114
+ });
115
+ }
87
116
  }
@@ -5,8 +5,12 @@ import {
5
5
  LpBalanceGranularity,
6
6
  LpWithdrawBalanceEntity,
7
7
  MarketEntity,
8
+ MoneyInOutChainId,
9
+ ReyaChainId,
8
10
  } from '@reyaxyz/common';
9
11
 
12
+ import { SocketBridgeTransactionPoolStatus } from '@reyaxyz/common';
13
+
10
14
  export type GetLpPoolsResult = LpPoolEntity[];
11
15
 
12
16
  export type GetLpPoolResult = LpPoolEntity;
@@ -66,3 +70,28 @@ export type GetLpPoolPerformanceChartDataParams = {
66
70
  export type getLpPoolDepthChartSimulationDataParams = {
67
71
  marketId: MarketEntity['id'];
68
72
  };
73
+
74
+ export type PushBridgeTransactionParams = {
75
+ transactionHash: string;
76
+ walletAddress: string;
77
+ sourceChainId: MoneyInOutChainId | ReyaChainId;
78
+ amount: number; // amount from bridge input
79
+ };
80
+
81
+ export type BridgeTransactionPool = {
82
+ sourceTxHash: string;
83
+ destinationTxHash: string;
84
+ sourceChainId: MoneyInOutChainId | ReyaChainId;
85
+ destinationChainId: MoneyInOutChainId | ReyaChainId;
86
+ walletAddress: string;
87
+ status: SocketBridgeTransactionPoolStatus;
88
+ amount: number;
89
+ };
90
+
91
+ export type PushBridgeTransactionResult = BridgeTransactionPool;
92
+
93
+ export type GetPendingBridgeTransactionsParams = {
94
+ walletAddress: string;
95
+ };
96
+
97
+ export type GetPendingBridgeTransactionsResult = BridgeTransactionPool[];