@riocrypto/common-server 1.0.1989 → 1.0.1991
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.
|
@@ -9,7 +9,7 @@ declare class BitsoClient {
|
|
|
9
9
|
createClabe(): Promise<string>;
|
|
10
10
|
createReceivingAccount(user: User, bankAccount: BankAccount): Promise<string>;
|
|
11
11
|
deleteReceivingAccount(bitsoReceivingAccountId: string): Promise<string>;
|
|
12
|
-
createWithdraw(bitsoReceivingAccountId: string, amount: number, concept: string, rfc?: string): Promise<Object>;
|
|
12
|
+
createWithdraw(bitsoReceivingAccountId: string, amount: number, concept: string, idempotencyKey?: string, rfc?: string): Promise<Object>;
|
|
13
13
|
getWithdrawal(withdrawalId: string): Promise<any>;
|
|
14
14
|
createLimitOrder(asset: string, amount: number, price: number, side: "buy" | "sell"): Promise<{
|
|
15
15
|
oid: string;
|
|
@@ -97,7 +97,7 @@ class BitsoClient {
|
|
|
97
97
|
return data.payload;
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
|
-
createWithdraw(bitsoReceivingAccountId, amount, concept, rfc) {
|
|
100
|
+
createWithdraw(bitsoReceivingAccountId, amount, concept, idempotencyKey, rfc) {
|
|
101
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
102
|
if ([common_1.RioEnv.Sandbox, common_1.RioEnv.Local, common_1.RioEnv.Test].includes(process.env.RIO_ENV)) {
|
|
103
103
|
throw new Error("Bitso withdraw not allowed in sandbox");
|
|
@@ -117,6 +117,7 @@ class BitsoClient {
|
|
|
117
117
|
method: "praxis",
|
|
118
118
|
currency: "mxn",
|
|
119
119
|
asset: "mxn",
|
|
120
|
+
origin_id: idempotencyKey,
|
|
120
121
|
},
|
|
121
122
|
};
|
|
122
123
|
const signedRequestConfig = this.signRequest(requestConfig);
|
|
@@ -6,6 +6,7 @@ interface BitsoMXNWithdrawalAttrs {
|
|
|
6
6
|
bankAccountVerificationId?: string;
|
|
7
7
|
multipartLiquidityOrderId?: string;
|
|
8
8
|
bitsoWithdrawalId: string;
|
|
9
|
+
orderVersion: number;
|
|
9
10
|
status: "processing" | "complete" | "failed";
|
|
10
11
|
}
|
|
11
12
|
interface BitsoMXNWithdrawalDoc extends Document {
|
|
@@ -15,6 +16,7 @@ interface BitsoMXNWithdrawalDoc extends Document {
|
|
|
15
16
|
bankAccountVerificationId?: string;
|
|
16
17
|
multipartLiquidityOrderId?: string;
|
|
17
18
|
bitsoWithdrawalId: string;
|
|
19
|
+
orderVersion: number;
|
|
18
20
|
status: "processing" | "complete" | "failed";
|
|
19
21
|
}
|
|
20
22
|
interface BitsoMXNWithdrawalModel extends Model<BitsoMXNWithdrawalDoc> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1991",
|
|
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.1756",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|