@riocrypto/common-server 1.0.945 → 1.0.946
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.
|
@@ -10,7 +10,8 @@ declare class FireblocksClient {
|
|
|
10
10
|
getExchangeCryptoBalance(crypto: Crypto): Promise<number>;
|
|
11
11
|
getExchangeFiatBalance(): Promise<number>;
|
|
12
12
|
getTransactions(crypto: Crypto, nextPage?: string): Promise<any>;
|
|
13
|
-
getDepositAddress(crypto: Crypto): Promise<string>;
|
|
13
|
+
getDepositAddress(vaultId: string, crypto: Crypto): Promise<string>;
|
|
14
|
+
createVault(userId: string): Promise<string>;
|
|
14
15
|
}
|
|
15
16
|
export declare const buildFireblocksClient: () => Promise<FireblocksClient>;
|
|
16
17
|
export {};
|
|
@@ -118,12 +118,18 @@ class FireblocksClient {
|
|
|
118
118
|
return transactionData;
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
|
-
getDepositAddress(crypto) {
|
|
121
|
+
getDepositAddress(vaultId, crypto) {
|
|
122
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
123
|
-
let addresses = yield this.fireblocks.getDepositAddresses(
|
|
123
|
+
let addresses = yield this.fireblocks.getDepositAddresses(vaultId, crypto);
|
|
124
124
|
return addresses[0].address;
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
|
+
createVault(userId) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
const vault = yield this.fireblocks.createVaultAccount(`Rio user ${userId}`);
|
|
130
|
+
return vault.id;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
127
133
|
}
|
|
128
134
|
const buildFireblocksClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
129
135
|
const FIREBLOCKS_PRIVATE_KEY = yield secret_manager_client_1.secretManagerClient.getSecretValue("FIREBLOCKS_PRIVATE_KEY");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.946",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
25
25
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
26
26
|
"@google-cloud/storage": "^6.9.5",
|
|
27
|
-
"@riocrypto/common": "^1.0.
|
|
27
|
+
"@riocrypto/common": "^1.0.814",
|
|
28
28
|
"@types/express": "^4.17.13",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"ccxt": "^3.0.30",
|