@riocrypto/common-server 1.0.2583 → 1.0.2586
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.
|
@@ -90,6 +90,7 @@ declare class BitsoClient {
|
|
|
90
90
|
}>;
|
|
91
91
|
createCryptoWithdrawal(amount: number, crypto: Crypto, address: string): Promise<Object>;
|
|
92
92
|
getDepositByHash(hash: string): Promise<Object>;
|
|
93
|
+
getDepositByConcepto(concepto: string): Promise<Object>;
|
|
93
94
|
signRequest(requestConfig: AxiosRequestConfig): AxiosRequestConfig;
|
|
94
95
|
}
|
|
95
96
|
export declare const buildBitsoClient: () => Promise<BitsoClient>;
|
|
@@ -465,6 +465,23 @@ class BitsoClient {
|
|
|
465
465
|
return data.payload.find((deposit) => deposit.details.tx_hash === hash);
|
|
466
466
|
});
|
|
467
467
|
}
|
|
468
|
+
getDepositByConcepto(concepto) {
|
|
469
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
470
|
+
const requestConfig = {
|
|
471
|
+
method: "GET",
|
|
472
|
+
url: `${this.baseUrl}/api/v3/fundings`,
|
|
473
|
+
headers: {
|
|
474
|
+
"Content-Type": "application/json",
|
|
475
|
+
},
|
|
476
|
+
};
|
|
477
|
+
const signedRequestConfig = this.signRequest(requestConfig);
|
|
478
|
+
const { data } = yield this.axiosClient(signedRequestConfig);
|
|
479
|
+
if (!data.success) {
|
|
480
|
+
throw new Error("Error getting Bitso deposit");
|
|
481
|
+
}
|
|
482
|
+
return data.payload.find((deposit) => deposit.details.concepto === concepto);
|
|
483
|
+
});
|
|
484
|
+
}
|
|
468
485
|
signRequest(requestConfig) {
|
|
469
486
|
var _a;
|
|
470
487
|
const url = new URL(requestConfig.url || "");
|
|
@@ -6,8 +6,8 @@ interface STPMXNWithdrawalAttrs {
|
|
|
6
6
|
numberOfParts?: number;
|
|
7
7
|
partsCompleted?: number;
|
|
8
8
|
bankAccountVerificationId?: string;
|
|
9
|
-
multipartLiquidityOrderId?: string;
|
|
10
9
|
bulkBankPayoutId?: string;
|
|
10
|
+
internalTransferId?: string;
|
|
11
11
|
STPWithdrawals: {
|
|
12
12
|
id: number;
|
|
13
13
|
amount: number;
|
|
@@ -21,9 +21,9 @@ interface STPMXNWithdrawalDoc extends Document {
|
|
|
21
21
|
type: "transaction" | "bankAccountVerification" | "liquidityOrder" | "internalTransfer";
|
|
22
22
|
orderId?: string;
|
|
23
23
|
bankAccountVerificationId?: string;
|
|
24
|
-
multipartLiquidityOrderId?: string;
|
|
25
24
|
numberOfParts?: number;
|
|
26
25
|
bulkBankPayoutId?: string;
|
|
26
|
+
internalTransferId?: string;
|
|
27
27
|
partsCompleted?: number;
|
|
28
28
|
orderVersion?: number;
|
|
29
29
|
STPWithdrawals: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2586",
|
|
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.
|
|
31
|
+
"@riocrypto/common": "^1.0.2382",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|