@riocrypto/common-server 1.0.947 → 1.0.950
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.
|
@@ -12,6 +12,7 @@ declare class FireblocksClient {
|
|
|
12
12
|
getTransactions(vaultId: string, crypto: Crypto, nextPage?: string): Promise<any>;
|
|
13
13
|
getDepositAddress(vaultId: string, crypto: Crypto): Promise<string>;
|
|
14
14
|
createVault(userId: string): Promise<string>;
|
|
15
|
+
createWallet(vaultId: string, crypto: Crypto): Promise<string>;
|
|
15
16
|
}
|
|
16
17
|
export declare const buildFireblocksClient: () => Promise<FireblocksClient>;
|
|
17
18
|
export {};
|
|
@@ -131,6 +131,12 @@ class FireblocksClient {
|
|
|
131
131
|
return vault.id;
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
+
createWallet(vaultId, crypto) {
|
|
135
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
136
|
+
const wallet = yield this.fireblocks.createVaultAsset(vaultId, crypto);
|
|
137
|
+
return wallet.address;
|
|
138
|
+
});
|
|
139
|
+
}
|
|
134
140
|
}
|
|
135
141
|
const buildFireblocksClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
136
142
|
const FIREBLOCKS_PRIVATE_KEY = yield secret_manager_client_1.secretManagerClient.getSecretValue("FIREBLOCKS_PRIVATE_KEY");
|
|
@@ -2,10 +2,16 @@ import mongoose from "mongoose";
|
|
|
2
2
|
interface FireblocksVaultAttrs {
|
|
3
3
|
userId: string;
|
|
4
4
|
fireblocksVaultId: string;
|
|
5
|
+
depositAddresses?: {
|
|
6
|
+
[key: string]: string;
|
|
7
|
+
};
|
|
5
8
|
}
|
|
6
9
|
interface FireblocksVaultDoc extends mongoose.Document {
|
|
7
10
|
userId: string;
|
|
8
11
|
fireblocksVaultId: string;
|
|
12
|
+
depositAddresses?: {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
9
15
|
}
|
|
10
16
|
interface FireblocksVaultModel extends mongoose.Model<FireblocksVaultDoc> {
|
|
11
17
|
build(attrs: FireblocksVaultAttrs): FireblocksVaultDoc;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.950",
|
|
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.815",
|
|
28
28
|
"@types/express": "^4.17.13",
|
|
29
29
|
"axios": "^0.27.2",
|
|
30
30
|
"ccxt": "^3.0.30",
|