@riocrypto/common-server 1.0.2619 → 1.0.2621
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.
|
@@ -19,7 +19,10 @@ declare class FireblocksClient {
|
|
|
19
19
|
getVaultCryptoBalance(vaultId: string, crypto: Crypto): Promise<number>;
|
|
20
20
|
getVaultAccount(vaultId: string): Promise<VaultAccountResponse>;
|
|
21
21
|
getExchangeAccount(exchangeId: string): Promise<ExchangeResponse>;
|
|
22
|
-
getVaultCryptoAddress(vaultId: string, crypto: Crypto): Promise<
|
|
22
|
+
getVaultCryptoAddress(vaultId: string, crypto: Crypto): Promise<{
|
|
23
|
+
address: string;
|
|
24
|
+
memo?: string;
|
|
25
|
+
}>;
|
|
23
26
|
getTotalVaultUSDBalance(vaultId: string): Promise<number>;
|
|
24
27
|
getTotalExchangesUSDBalance(): Promise<number>;
|
|
25
28
|
getExchangeCryptoBalance(crypto: Crypto): Promise<number>;
|
|
@@ -28,7 +31,10 @@ declare class FireblocksClient {
|
|
|
28
31
|
getTransactions(vaultId: string, crypto: Crypto, nextPage?: string): Promise<any>;
|
|
29
32
|
getDepositAddress(vaultId: string, crypto: Crypto): Promise<string>;
|
|
30
33
|
createVault(userId: string, name: string, type: "transactional", number?: number): Promise<string>;
|
|
31
|
-
createWallet(vaultId: string, crypto: Crypto): Promise<
|
|
34
|
+
createWallet(vaultId: string, crypto: Crypto): Promise<{
|
|
35
|
+
address: string;
|
|
36
|
+
memo?: string;
|
|
37
|
+
}>;
|
|
32
38
|
internalTransfer(rioId: string, crypto: Crypto, sourceVaultId: string, destinationVaultId: string, amountCrypto: number, notes?: string): Promise<string>;
|
|
33
39
|
externalTransfer(rioId: string, crypto: Crypto, sourceVaultId: string, destinationAddress: string, amountCrypto: number, notes?: string): Promise<string>;
|
|
34
40
|
transferToExchange(rioId: string, crypto: Crypto, sourceVaultId: string, destinationExchangeId: string, amountCrypto: number, notes?: string): Promise<string>;
|
|
@@ -141,7 +141,10 @@ class FireblocksClient {
|
|
|
141
141
|
getVaultCryptoAddress(vaultId, crypto) {
|
|
142
142
|
return __awaiter(this, void 0, void 0, function* () {
|
|
143
143
|
const response = yield this.fireblocks.getDepositAddresses(vaultId, crypto);
|
|
144
|
-
return
|
|
144
|
+
return {
|
|
145
|
+
address: response[0].address,
|
|
146
|
+
memo: response[0].tag,
|
|
147
|
+
};
|
|
145
148
|
});
|
|
146
149
|
}
|
|
147
150
|
getTotalVaultUSDBalance(vaultId) {
|
|
@@ -300,7 +303,10 @@ class FireblocksClient {
|
|
|
300
303
|
throw new Error("Wallet creation is disabled in sandbox mode.");
|
|
301
304
|
}
|
|
302
305
|
const wallet = yield this.fireblocks.createVaultAsset(vaultId, crypto);
|
|
303
|
-
return
|
|
306
|
+
return {
|
|
307
|
+
address: wallet.address,
|
|
308
|
+
memo: wallet.tag,
|
|
309
|
+
};
|
|
304
310
|
});
|
|
305
311
|
}
|
|
306
312
|
internalTransfer(rioId, crypto, sourceVaultId, destinationVaultId, amountCrypto, notes) {
|
|
@@ -5,7 +5,10 @@ interface FireblocksVaultAttrs {
|
|
|
5
5
|
type: "transactional";
|
|
6
6
|
fireblocksVaultId: string;
|
|
7
7
|
depositAddresses?: {
|
|
8
|
-
[key: string]:
|
|
8
|
+
[key: string]: {
|
|
9
|
+
address: string;
|
|
10
|
+
memo?: string;
|
|
11
|
+
};
|
|
9
12
|
};
|
|
10
13
|
activeOrders?: {
|
|
11
14
|
orderId: string;
|
|
@@ -21,7 +24,10 @@ interface FireblocksVaultDoc extends mongoose.Document {
|
|
|
21
24
|
type: "transactional";
|
|
22
25
|
fireblocksVaultId: string;
|
|
23
26
|
depositAddresses?: {
|
|
24
|
-
[key: string]:
|
|
27
|
+
[key: string]: {
|
|
28
|
+
address: string;
|
|
29
|
+
memo?: string;
|
|
30
|
+
};
|
|
25
31
|
};
|
|
26
32
|
activeOrders?: {
|
|
27
33
|
orderId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@riocrypto/common-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2621",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@google-cloud/secret-manager": "^5.3.0",
|
|
29
29
|
"@google-cloud/storage": "^6.9.5",
|
|
30
30
|
"@hyperdx/node-opentelemetry": "^0.7.0",
|
|
31
|
-
"@riocrypto/common": "^1.0.
|
|
31
|
+
"@riocrypto/common": "^1.0.2424",
|
|
32
32
|
"@types/express": "^4.17.13",
|
|
33
33
|
"axios": "^1.7.4",
|
|
34
34
|
"crypto-js": "^4.2.0",
|