@riocrypto/common-server 1.0.1191 → 1.0.1193

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.
@@ -7,6 +7,7 @@ declare class FireblocksClient {
7
7
  withdrawFromExchange(crypto: Crypto, address: string, amountCrypto: number): Promise<void>;
8
8
  withdrawFromVault(crypto: Crypto, address: string, amountCrypto: number): Promise<string>;
9
9
  getVaultCryptoBalance(vaultId: string, crypto: Crypto): Promise<number>;
10
+ getVaultCryptoAddress(vaultId: string, crypto: Crypto): Promise<string>;
10
11
  getTotalVaultUSDBalance(vaultId: string): Promise<number>;
11
12
  getExchangeCryptoBalance(crypto: Crypto): Promise<number>;
12
13
  getExchangeFiatBalance(): Promise<number>;
@@ -82,6 +82,12 @@ class FireblocksClient {
82
82
  return Number(vaultAsset.available) || 0;
83
83
  });
84
84
  }
85
+ getVaultCryptoAddress(vaultId, crypto) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ const response = yield this.fireblocks.getDepositAddresses(vaultId, crypto);
88
+ return response[0].address;
89
+ });
90
+ }
85
91
  getTotalVaultUSDBalance(vaultId) {
86
92
  return __awaiter(this, void 0, void 0, function* () {
87
93
  const vaultAccount = yield this.fireblocks.getVaultAccountById(vaultId);
@@ -9,7 +9,7 @@ interface AdminAttrs {
9
9
  acceptingTasks?: boolean;
10
10
  assignedTaskTypes: AdminTaskType[];
11
11
  privileges: string[];
12
- userId?: string;
12
+ userAuthId?: string;
13
13
  }
14
14
  interface AdminModel extends Model<AdminDoc> {
15
15
  build(attrs: AdminAttrs): AdminDoc;
@@ -24,7 +24,7 @@ interface AdminDoc extends Document {
24
24
  acceptingTasks?: boolean;
25
25
  assignedTaskTypes: AdminTaskType[];
26
26
  privileges: string[];
27
- userId?: string;
27
+ userAuthId?: string;
28
28
  }
29
29
  declare const buildAdmin: (mongoose: Mongoose) => AdminModel;
30
30
  export { buildAdmin, AdminDoc };
@@ -43,7 +43,7 @@ const buildAdmin = (mongoose) => {
43
43
  required: true,
44
44
  },
45
45
  ],
46
- userId: {
46
+ userAuthId: {
47
47
  type: String,
48
48
  required: true,
49
49
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1191",
3
+ "version": "1.0.1193",
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.1073",
29
+ "@riocrypto/common": "^1.0.1078",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^0.27.2",
32
32
  "ccxt": "^3.0.30",