@riocrypto/common-server 1.0.2147 → 1.0.2149

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.
@@ -1,4 +1,4 @@
1
- import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider } from "@riocrypto/common";
1
+ import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade } from "@riocrypto/common";
2
2
  declare class ClusterClient {
3
3
  private baseUrl;
4
4
  private clusterApiKey;
@@ -61,6 +61,8 @@ declare class ClusterClient {
61
61
  receiverCLABE: string;
62
62
  amount: number;
63
63
  }): Promise<string>;
64
+ placeEmarketsTrade(externalTradeId: string): Promise<EmarketsFXTrade>;
65
+ getEmarketsTrade(id: string): Promise<EmarketsFXTrade>;
64
66
  }
65
67
  export declare const buildClusterClient: () => Promise<ClusterClient>;
66
68
  export {};
@@ -390,6 +390,26 @@ class ClusterClient {
390
390
  return (_a = response.data) === null || _a === void 0 ? void 0 : _a.url;
391
391
  });
392
392
  }
393
+ placeEmarketsTrade(externalTradeId) {
394
+ return __awaiter(this, void 0, void 0, function* () {
395
+ const response = yield this.axios.post(`${this.baseUrl}/api/emarkets/trades`, { externalTradeId }, {
396
+ headers: {
397
+ "x-cluster-api-key": this.clusterApiKey,
398
+ },
399
+ });
400
+ return response.data;
401
+ });
402
+ }
403
+ getEmarketsTrade(id) {
404
+ return __awaiter(this, void 0, void 0, function* () {
405
+ const response = yield this.axios.get(`${this.baseUrl}/api/emarkets/trades/${id}`, {
406
+ headers: {
407
+ "x-cluster-api-key": this.clusterApiKey,
408
+ },
409
+ });
410
+ return response.data;
411
+ });
412
+ }
393
413
  }
394
414
  const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
395
415
  // Retrieve secrets asynchronously
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2147",
3
+ "version": "1.0.2149",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",