@riocrypto/common-server 1.0.1939 → 1.0.1941
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.
|
@@ -14,6 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.buildBitsoClient = void 0;
|
|
16
16
|
const secret_manager_client_1 = require("./secret-manager-client");
|
|
17
|
+
const axios_1 = __importDefault(require("axios"));
|
|
17
18
|
const axios_with_logging_1 = __importDefault(require("./axios-with-logging"));
|
|
18
19
|
const common_1 = require("@riocrypto/common");
|
|
19
20
|
const crypto_js_1 = __importDefault(require("crypto-js"));
|
|
@@ -335,7 +336,7 @@ class BitsoClient {
|
|
|
335
336
|
},
|
|
336
337
|
};
|
|
337
338
|
const signedRequestConfig = this.signRequest(requestConfig);
|
|
338
|
-
const res = yield (0,
|
|
339
|
+
const res = yield (0, axios_1.default)(signedRequestConfig);
|
|
339
340
|
const data = res.data;
|
|
340
341
|
if (!data.success) {
|
|
341
342
|
throw new Error("Error getting Bitso fees");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FireblocksSDK, VaultAccountResponse } from "fireblocks-sdk";
|
|
1
|
+
import { ExchangeResponse, FireblocksSDK, VaultAccountResponse } from "fireblocks-sdk";
|
|
2
2
|
import { Crypto } from "@riocrypto/common";
|
|
3
3
|
declare class FireblocksClient {
|
|
4
4
|
fireblocks: FireblocksSDK;
|
|
@@ -18,6 +18,7 @@ declare class FireblocksClient {
|
|
|
18
18
|
}): Promise<string>;
|
|
19
19
|
getVaultCryptoBalance(vaultId: string, crypto: Crypto): Promise<number>;
|
|
20
20
|
getVaultAccount(vaultId: string): Promise<VaultAccountResponse>;
|
|
21
|
+
getExchangeAccount(exchangeId: string): Promise<ExchangeResponse>;
|
|
21
22
|
getVaultCryptoAddress(vaultId: string, crypto: Crypto): Promise<string>;
|
|
22
23
|
getTotalVaultUSDBalance(vaultId: string): Promise<number>;
|
|
23
24
|
getTotalExchangesUSDBalance(): Promise<number>;
|
|
@@ -128,6 +128,12 @@ class FireblocksClient {
|
|
|
128
128
|
return vaultAccount;
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
+
getExchangeAccount(exchangeId) {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
+
const exchangeAccount = yield this.fireblocks.getExchangeAccountById(exchangeId);
|
|
134
|
+
return exchangeAccount;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
131
137
|
getVaultCryptoAddress(vaultId, crypto) {
|
|
132
138
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
139
|
const response = yield this.fireblocks.getDepositAddresses(vaultId, crypto);
|