@riocrypto/common-server 1.0.2487 → 1.0.2489
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.
- package/build/clients/cluster-client.d.ts +3 -1
- package/build/clients/cluster-client.js +12 -0
- package/build/models/bulk-bank-payout.d.ts +0 -4
- package/build/models/bulk-bank-payout.js +0 -6
- package/build/models/bulk-crypto-payout.d.ts +1 -3
- package/build/models/bulk-crypto-payout.js +0 -4
- package/build/models/twap-session.d.ts +4 -4
- package/build/models/twap-session.js +2 -2
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, DeferredPaymentType, TwoWaySettlementType, OrderType, EmarketsSettlementType, EmarketsOrderType } from "@riocrypto/common";
|
|
1
|
+
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, DeferredPaymentType, TwoWaySettlementType, OrderType, EmarketsSettlementType, EmarketsOrderType, BulkBankPayout, BulkCryptoPayout } from "@riocrypto/common";
|
|
2
2
|
declare class ClusterClient {
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private clusterApiKey;
|
|
@@ -168,6 +168,8 @@ declare class ClusterClient {
|
|
|
168
168
|
getSTPMXNBalance(): Promise<number>;
|
|
169
169
|
createSTPMXNWithdrawal(amount: number, CLABE: string, concepto: string, beneficiaryName: string): Promise<void>;
|
|
170
170
|
getSTPMXNWithdrawal(id: string): Promise<STPMXNWithdrawal>;
|
|
171
|
+
createBulkBankPayout(userId: string, payoutBankAccountId: string): Promise<BulkBankPayout>;
|
|
172
|
+
createBulkCryptoPayout(userId: string, payoutAddressId: string): Promise<BulkCryptoPayout>;
|
|
171
173
|
}
|
|
172
174
|
export declare const buildClusterClient: () => Promise<ClusterClient>;
|
|
173
175
|
export {};
|
|
@@ -594,6 +594,18 @@ class ClusterClient {
|
|
|
594
594
|
return response.data;
|
|
595
595
|
});
|
|
596
596
|
}
|
|
597
|
+
createBulkBankPayout(userId, payoutBankAccountId) {
|
|
598
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
599
|
+
const response = yield this.axios.post(`${this.baseUrl}/api/payouts/bank/bulk`, { userId, payoutBankAccountId }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
|
|
600
|
+
return response.data;
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
createBulkCryptoPayout(userId, payoutAddressId) {
|
|
604
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
605
|
+
const response = yield this.axios.post(`${this.baseUrl}/api/payouts/crypto/bulk`, { userId, payoutAddressId }, { headers: { "x-cluster-api-key": this.clusterApiKey } });
|
|
606
|
+
return response.data;
|
|
607
|
+
});
|
|
608
|
+
}
|
|
597
609
|
}
|
|
598
610
|
const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
599
611
|
// Retrieve secrets asynchronously
|
|
@@ -12,8 +12,6 @@ interface BulkBankPayoutAttrs {
|
|
|
12
12
|
reference?: string;
|
|
13
13
|
accountNumber?: string;
|
|
14
14
|
CLABE?: string;
|
|
15
|
-
RUC?: string;
|
|
16
|
-
RFC?: string;
|
|
17
15
|
CCI?: string;
|
|
18
16
|
status: BulkBankPayoutStatus;
|
|
19
17
|
}
|
|
@@ -30,8 +28,6 @@ interface BulkBankPayoutDoc extends Document {
|
|
|
30
28
|
reference?: string;
|
|
31
29
|
accountNumber?: string;
|
|
32
30
|
CLABE?: string;
|
|
33
|
-
RUC?: string;
|
|
34
|
-
RFC?: string;
|
|
35
31
|
CCI?: string;
|
|
36
32
|
status: BulkBankPayoutStatus;
|
|
37
33
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Crypto, BulkCryptoPayoutStatus } from "@riocrypto/common";
|
|
2
2
|
import { Mongoose, Model, Document } from "mongoose";
|
|
3
3
|
interface BulkCryptoPayoutAttrs {
|
|
4
4
|
createdAt: Date;
|
|
@@ -6,7 +6,6 @@ interface BulkCryptoPayoutAttrs {
|
|
|
6
6
|
orderIds: string[];
|
|
7
7
|
amount: number;
|
|
8
8
|
crypto: Crypto;
|
|
9
|
-
country: Country;
|
|
10
9
|
payoutAddressId?: string;
|
|
11
10
|
blockchainAddress?: string;
|
|
12
11
|
status: BulkCryptoPayoutStatus;
|
|
@@ -18,7 +17,6 @@ interface BulkCryptoPayoutDoc extends Document {
|
|
|
18
17
|
orderIds: string[];
|
|
19
18
|
amount: number;
|
|
20
19
|
crypto: Crypto;
|
|
21
|
-
country: Country;
|
|
22
20
|
payoutAddressId?: string;
|
|
23
21
|
blockchainAddress?: string;
|
|
24
22
|
status: BulkCryptoPayoutStatus;
|
|
@@ -16,8 +16,8 @@ interface TWAPSessionAttrs {
|
|
|
16
16
|
clipSize: number;
|
|
17
17
|
interval: number;
|
|
18
18
|
isRunning: boolean;
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
bulkBankPayoutId?: string;
|
|
20
|
+
bulkCryptoPayoutId?: string;
|
|
21
21
|
deferredPaymentType: DeferredPaymentType;
|
|
22
22
|
twoWaySettlementType: TwoWaySettlementType;
|
|
23
23
|
twoWaySettlementDateOffset: number;
|
|
@@ -43,8 +43,8 @@ interface TWAPSessionDoc extends Document {
|
|
|
43
43
|
clipSize: number;
|
|
44
44
|
interval: number;
|
|
45
45
|
isRunning: boolean;
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
bulkBankPayoutId?: string;
|
|
47
|
+
bulkCryptoPayoutId?: string;
|
|
48
48
|
deferredPaymentType: DeferredPaymentType;
|
|
49
49
|
twoWaySettlementType: TwoWaySettlementType;
|
|
50
50
|
twoWaySettlementDateOffset: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2489",
|
|
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.2256",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|