@riocrypto/common-server 1.0.1106 → 1.0.1108
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.
|
@@ -13,7 +13,7 @@ declare class FireblocksClient {
|
|
|
13
13
|
getDepositAddress(vaultId: string, crypto: Crypto): Promise<string>;
|
|
14
14
|
createVault(userId: string, name: string, type: "transactional" | "managed"): Promise<string>;
|
|
15
15
|
createWallet(vaultId: string, crypto: Crypto): Promise<string>;
|
|
16
|
-
internalTransfer(crypto: Crypto, sourceVaultId: string, destinationVaultId: string, amountCrypto: number): Promise<string>;
|
|
16
|
+
internalTransfer(crypto: Crypto, sourceVaultId: string, destinationVaultId: string, amountCrypto: number, notes?: string): Promise<string>;
|
|
17
17
|
sweep(vaultId: string, assetId: string, amount: number): Promise<void>;
|
|
18
18
|
}
|
|
19
19
|
export declare const buildFireblocksClient: () => Promise<FireblocksClient>;
|
|
@@ -128,7 +128,7 @@ class FireblocksClient {
|
|
|
128
128
|
}
|
|
129
129
|
createVault(userId, name, type) {
|
|
130
130
|
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
-
const vault = yield this.fireblocks.createVaultAccount(`${name} - ${userId} - ${type}`, false, userId);
|
|
131
|
+
const vault = yield this.fireblocks.createVaultAccount(`${name} - ${userId} - ${type}`, false, userId, true);
|
|
132
132
|
return vault.id;
|
|
133
133
|
});
|
|
134
134
|
}
|
|
@@ -138,7 +138,7 @@ class FireblocksClient {
|
|
|
138
138
|
return wallet.address;
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
|
-
internalTransfer(crypto, sourceVaultId, destinationVaultId, amountCrypto) {
|
|
141
|
+
internalTransfer(crypto, sourceVaultId, destinationVaultId, amountCrypto, notes) {
|
|
142
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
143
143
|
const response = yield this.fireblocks.createTransaction({
|
|
144
144
|
assetId: crypto,
|
|
@@ -152,6 +152,7 @@ class FireblocksClient {
|
|
|
152
152
|
},
|
|
153
153
|
amount: amountCrypto,
|
|
154
154
|
operation: fireblocks_sdk_1.TransactionOperation.TRANSFER,
|
|
155
|
+
note: notes,
|
|
155
156
|
});
|
|
156
157
|
return response.id;
|
|
157
158
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1108",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@aws-sdk/client-s3": "^3.297.0",
|
|
27
27
|
"@everapi/currencyapi-js": "^1.0.6",
|
|
28
28
|
"@google-cloud/storage": "^6.9.5",
|
|
29
|
-
"@riocrypto/common": "^1.0.
|
|
29
|
+
"@riocrypto/common": "^1.0.947",
|
|
30
30
|
"@types/express": "^4.17.13",
|
|
31
31
|
"axios": "^0.27.2",
|
|
32
32
|
"ccxt": "^3.0.30",
|