@riocrypto/common-server 1.0.1069 → 1.0.1071
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.
|
@@ -69,8 +69,7 @@ const buildBistoClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
69
69
|
throw new common_1.SecretManagerError();
|
|
70
70
|
}
|
|
71
71
|
const env = process.env.RIO_ENV === common_1.RioEnv.Production ||
|
|
72
|
-
process.env.RIO_ENV === common_1.RioEnv.Staging
|
|
73
|
-
process.env.RIO_ENV === common_1.RioEnv.Development
|
|
72
|
+
process.env.RIO_ENV === common_1.RioEnv.Staging
|
|
74
73
|
? "production"
|
|
75
74
|
: "sandbox";
|
|
76
75
|
return new BitsoClient(BITSO_API_KEY, BITSO_API_SECRET, env);
|
|
@@ -5,6 +5,7 @@ declare class ClusterClient {
|
|
|
5
5
|
private axios;
|
|
6
6
|
constructor(baseUrl: string, clusterApiKey: string);
|
|
7
7
|
getNewQuote(orderId: string, quote: Quote): Promise<Quote>;
|
|
8
|
+
createBitsoBankAccount(userId: string): Promise<Quote>;
|
|
8
9
|
getBalance(asset: Crypto | Fiat): Promise<number>;
|
|
9
10
|
}
|
|
10
11
|
export declare const buildClusterClient: () => Promise<ClusterClient>;
|
|
@@ -55,6 +55,18 @@ class ClusterClient {
|
|
|
55
55
|
return response.data;
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
+
createBitsoBankAccount(userId) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
const response = yield this.axios.post(`${this.baseUrl}/api/bank/accounts/bitso`, {
|
|
61
|
+
userId,
|
|
62
|
+
}, {
|
|
63
|
+
headers: {
|
|
64
|
+
"x-api-key": this.clusterApiKey,
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
return response.data;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
58
70
|
getBalance(asset) {
|
|
59
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
72
|
const rioResponse = yield this.axios.get(`${this.baseUrl}/api/wallet/balances/${asset}`, {
|