@riocrypto/common-server 1.0.2243 → 1.0.2245

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, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, SettlementTime } from "@riocrypto/common";
1
+ import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, ChainedQuote, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, SettlementTime, STPMXNWithdrawal } from "@riocrypto/common";
2
2
  declare class ClusterClient {
3
3
  private baseUrl;
4
4
  private clusterApiKey;
@@ -117,6 +117,9 @@ declare class ClusterClient {
117
117
  generateSTPDepositCLABE(userId: string): Promise<{
118
118
  CLABE: string;
119
119
  }>;
120
+ getSTPMXNBalance(): Promise<number>;
121
+ createSTPMXNWithdrawal(amount: number, CLABE: string): Promise<void>;
122
+ getSTPMXNWithdrawal(id: string): Promise<STPMXNWithdrawal>;
120
123
  }
121
124
  export declare const buildClusterClient: () => Promise<ClusterClient>;
122
125
  export {};
@@ -535,6 +535,23 @@ class ClusterClient {
535
535
  return response.data;
536
536
  });
537
537
  }
538
+ getSTPMXNBalance() {
539
+ return __awaiter(this, void 0, void 0, function* () {
540
+ const response = yield this.axios.get(`${this.baseUrl}/api/bank/accounts/STP/MXN/balance`, { headers: { "x-cluster-api-key": this.clusterApiKey } });
541
+ return response.data;
542
+ });
543
+ }
544
+ createSTPMXNWithdrawal(amount, CLABE) {
545
+ return __awaiter(this, void 0, void 0, function* () {
546
+ yield this.axios.post(`${this.baseUrl}/api/bank/accounts/STP/MXN/withdrawals`, { amount, CLABE }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
547
+ });
548
+ }
549
+ getSTPMXNWithdrawal(id) {
550
+ return __awaiter(this, void 0, void 0, function* () {
551
+ const response = yield this.axios.get(`${this.baseUrl}/api/bank/accounts/STP/MXN/withdrawals/${id}`, { headers: { "x-cluster-api-key": this.clusterApiKey } });
552
+ return response.data;
553
+ });
554
+ }
538
555
  }
539
556
  const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
540
557
  // Retrieve secrets asynchronously
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2243",
3
+ "version": "1.0.2245",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@google-cloud/secret-manager": "^5.3.0",
29
29
  "@google-cloud/storage": "^6.9.5",
30
30
  "@hyperdx/node-opentelemetry": "^0.7.0",
31
- "@riocrypto/common": "^1.0.1971",
31
+ "@riocrypto/common": "^1.0.1974",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",