@riocrypto/common-server 1.0.1080 → 1.0.1082
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.
|
@@ -51,7 +51,6 @@ class BitsoClient {
|
|
|
51
51
|
},
|
|
52
52
|
data: {
|
|
53
53
|
alias: "Test CLABE",
|
|
54
|
-
userMail: "javier@riotransfer.co",
|
|
55
54
|
currency: "mxn",
|
|
56
55
|
taxonomy: {
|
|
57
56
|
network: "spei",
|
|
@@ -60,9 +59,9 @@ class BitsoClient {
|
|
|
60
59
|
integration: "stp",
|
|
61
60
|
},
|
|
62
61
|
details: {
|
|
63
|
-
beneficiary: "
|
|
62
|
+
beneficiary: "Juanita Roberts",
|
|
64
63
|
institution_code: "37006",
|
|
65
|
-
clabe: "
|
|
64
|
+
clabe: "123456789123456783",
|
|
66
65
|
},
|
|
67
66
|
},
|
|
68
67
|
};
|
|
@@ -74,15 +73,22 @@ class BitsoClient {
|
|
|
74
73
|
signRequest(requestConfig) {
|
|
75
74
|
var _a;
|
|
76
75
|
const url = new URL(requestConfig.url || "");
|
|
76
|
+
console.log("url", url);
|
|
77
77
|
const requestPath = url.pathname + (url.search || "");
|
|
78
|
+
console.log("requestPath", requestPath);
|
|
78
79
|
const payload = requestConfig.data || "";
|
|
80
|
+
console.log("payload", payload);
|
|
79
81
|
const nonce = new Date().getTime().toString();
|
|
82
|
+
console.log("nonce", nonce);
|
|
80
83
|
const data = nonce +
|
|
81
84
|
(((_a = requestConfig.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()) || "") +
|
|
82
85
|
requestPath +
|
|
83
86
|
payload;
|
|
87
|
+
console.log("data", data);
|
|
84
88
|
const signature = crypto_js_1.default.HmacSHA256(data, this.apiSecret).toString(crypto_js_1.default.enc.Hex);
|
|
89
|
+
console.log("signature", signature);
|
|
85
90
|
const authHeader = `Bitso ${this.apiKey}:${nonce}:${signature}`;
|
|
91
|
+
console.log("authHeader", authHeader);
|
|
86
92
|
if (!requestConfig.headers) {
|
|
87
93
|
requestConfig.headers = {};
|
|
88
94
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1082",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
26
26
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
27
27
|
"@google-cloud/storage": "^6.9.5",
|
|
28
|
-
"@riocrypto/common": "^1.0.
|
|
28
|
+
"@riocrypto/common": "^1.0.921",
|
|
29
29
|
"@types/express": "^4.17.13",
|
|
30
30
|
"axios": "^0.27.2",
|
|
31
31
|
"ccxt": "^3.0.30",
|