@riocrypto/common-server 1.0.1590 → 1.0.1591

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.
@@ -5,7 +5,7 @@ declare class FireblocksClient {
5
5
  constructor(privateKey: string, apiKey: string);
6
6
  estimateWithdrawFee(crypto: Crypto, address: string, amountCrypto: number): Promise<string | number | undefined>;
7
7
  withdrawFromExchange(crypto: Crypto, address: string, amountCrypto: number): Promise<void>;
8
- withdrawFromVault(crypto: Crypto, address: string, amountCrypto: number): Promise<string>;
8
+ withdrawFromVault(crypto: Crypto, address: string, amountCrypto: number, vaultId?: string): Promise<string>;
9
9
  getVaultCryptoBalance(vaultId: string, crypto: Crypto): Promise<number>;
10
10
  getVaultCryptoAddress(vaultId: string, crypto: Crypto): Promise<string>;
11
11
  getTotalVaultUSDBalance(vaultId: string): Promise<number>;
@@ -27,7 +27,6 @@ class FireblocksClient {
27
27
  return __awaiter(this, void 0, void 0, function* () {
28
28
  let fee;
29
29
  const cachedResponse = cache2.get(`estimateWithdrawFee(${crypto}, ${address}, ${amountCrypto})`);
30
- console.log(`estimateWithdrawFee(${crypto}, ${address}, ${amountCrypto})`, cachedResponse);
31
30
  if (cachedResponse) {
32
31
  fee = cachedResponse;
33
32
  }
@@ -76,7 +75,7 @@ class FireblocksClient {
76
75
  });
77
76
  });
78
77
  }
79
- withdrawFromVault(crypto, address, amountCrypto) {
78
+ withdrawFromVault(crypto, address, amountCrypto, vaultId) {
80
79
  return __awaiter(this, void 0, void 0, function* () {
81
80
  if ([common_1.RioEnv.Sandbox, common_1.RioEnv.Local].includes(process.env.RIO_ENV)) {
82
81
  throw new Error("Withdrawals are disabled in sandbox mode.");
@@ -85,7 +84,7 @@ class FireblocksClient {
85
84
  assetId: crypto,
86
85
  source: {
87
86
  type: fireblocks_sdk_1.PeerType.VAULT_ACCOUNT,
88
- id: "2",
87
+ id: vaultId ? vaultId : "2",
89
88
  },
90
89
  destination: {
91
90
  type: fireblocks_sdk_1.PeerType.ONE_TIME_ADDRESS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1590",
3
+ "version": "1.0.1591",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@google-cloud/storage": "^6.9.5",
29
29
  "@google-cloud/vision": "^4.0.2",
30
30
  "@hyperdx/node-opentelemetry": "^0.4.2",
31
- "@riocrypto/common": "^1.0.1418",
31
+ "@riocrypto/common": "^1.0.1420",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.6.0",
34
34
  "ccxt": "^3.0.30",