@riocrypto/common-server 1.0.1365 → 1.0.1367
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 } from "@riocrypto/common";
|
|
1
|
+
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount } from "@riocrypto/common";
|
|
2
2
|
declare class ClusterClient {
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private clusterApiKey;
|
|
@@ -11,12 +11,13 @@ declare class ClusterClient {
|
|
|
11
11
|
confirmPayment(orderId: string): Promise<void>;
|
|
12
12
|
createBitsoBankAccount(userId: string): Promise<BitsoBankAccount>;
|
|
13
13
|
getBalance(asset: Crypto | Fiat): Promise<number>;
|
|
14
|
-
getUSBankAccounts(userId: string): Promise<{
|
|
14
|
+
getUSBankAccounts(userId: string, fiat: Fiat, country: Country): Promise<{
|
|
15
15
|
id: string;
|
|
16
16
|
bank_name: string;
|
|
17
17
|
account_owner_name: string;
|
|
18
18
|
last_4: string;
|
|
19
19
|
}[]>;
|
|
20
|
+
getBankAccounts(userId: string): Promise<BankAccount[]>;
|
|
20
21
|
getTransactionLimits(userId: string): Promise<{
|
|
21
22
|
limit: number;
|
|
22
23
|
used: number;
|
|
@@ -152,9 +152,19 @@ class ClusterClient {
|
|
|
152
152
|
return rioResponse.data.balance;
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
|
-
getUSBankAccounts(userId) {
|
|
155
|
+
getUSBankAccounts(userId, fiat, country) {
|
|
156
156
|
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
-
const rioResponse = yield this.axios.get(`${this.baseUrl}/api/bank/us/accounts?userId=${userId}`, {
|
|
157
|
+
const rioResponse = yield this.axios.get(`${this.baseUrl}/api/bank/us/accounts?userId=${userId}&fiat=${fiat}&country=${country}`, {
|
|
158
|
+
headers: {
|
|
159
|
+
"x-cluster-api-key": this.clusterApiKey,
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
return rioResponse.data;
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
getBankAccounts(userId) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
const rioResponse = yield this.axios.get(`${this.baseUrl}/api/bank/accounts?userId=${userId}`, {
|
|
158
168
|
headers: {
|
|
159
169
|
"x-cluster-api-key": this.clusterApiKey,
|
|
160
170
|
},
|