@lido-nestjs/registry 1.0.1 → 1.1.0
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.
|
@@ -9,6 +9,10 @@ export declare class RegistryKeyStorageService {
|
|
|
9
9
|
findUsed(): Promise<RegistryKey[]>;
|
|
10
10
|
/** find all keys by operator */
|
|
11
11
|
findByOperatorIndex(operatorIndex: number): Promise<RegistryKey[]>;
|
|
12
|
+
/** find key by pubkey */
|
|
13
|
+
findByPubkey(key: string): Promise<RegistryKey[]>;
|
|
14
|
+
/** find key by signature */
|
|
15
|
+
findBySignature(depositSignature: string): Promise<RegistryKey[]>;
|
|
12
16
|
/** find key by index */
|
|
13
17
|
findOneByIndex(operatorIndex: number, keyIndex: number): Promise<RegistryKey | null>;
|
|
14
18
|
/** removes key by index */
|
|
@@ -23,6 +23,15 @@ exports.RegistryKeyStorageService = class RegistryKeyStorageService {
|
|
|
23
23
|
async findByOperatorIndex(operatorIndex) {
|
|
24
24
|
return await this.repository.find({ operatorIndex });
|
|
25
25
|
}
|
|
26
|
+
/** find key by pubkey */
|
|
27
|
+
async findByPubkey(key) {
|
|
28
|
+
return await this.repository.find({ key: key.toLocaleLowerCase() });
|
|
29
|
+
}
|
|
30
|
+
/** find key by signature */
|
|
31
|
+
async findBySignature(depositSignature) {
|
|
32
|
+
depositSignature = depositSignature.toLocaleLowerCase();
|
|
33
|
+
return await this.repository.find({ depositSignature });
|
|
34
|
+
}
|
|
26
35
|
/** find key by index */
|
|
27
36
|
async findOneByIndex(operatorIndex, keyIndex) {
|
|
28
37
|
return await this.repository.findOne({ operatorIndex, index: keyIndex });
|
|
@@ -49,7 +58,7 @@ exports.RegistryKeyStorageService = class RegistryKeyStorageService {
|
|
|
49
58
|
const instance = new key_entity.RegistryKey(operatorKey);
|
|
50
59
|
return await this.repository.persist(instance);
|
|
51
60
|
}));
|
|
52
|
-
this.repository.flush();
|
|
61
|
+
await this.repository.flush();
|
|
53
62
|
return result;
|
|
54
63
|
}
|
|
55
64
|
};
|
|
@@ -38,7 +38,7 @@ exports.RegistryOperatorStorageService = class RegistryOperatorStorageService {
|
|
|
38
38
|
const instance = new operator_entity.RegistryOperator(operator);
|
|
39
39
|
return await this.repository.persist(instance);
|
|
40
40
|
}));
|
|
41
|
-
this.repository.flush();
|
|
41
|
+
await this.repository.flush();
|
|
42
42
|
return result;
|
|
43
43
|
}
|
|
44
44
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lido-nestjs/registry",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"@lido-nestjs/decorators": "1.0.0",
|
|
33
33
|
"@lido-nestjs/logger": "1.1.0",
|
|
34
34
|
"@lido-nestjs/utils": "1.1.0",
|
|
35
|
-
"@mikro-orm/core": "^5.0.1",
|
|
36
|
-
"@mikro-orm/nestjs": "^4.3.1",
|
|
37
35
|
"cron": "^2.0.0"
|
|
38
36
|
},
|
|
39
37
|
"peerDependencies": {
|
|
38
|
+
"@mikro-orm/core": "^5.2.0",
|
|
39
|
+
"@mikro-orm/nestjs": "^5.0.2",
|
|
40
40
|
"@nestjs/common": "^8.2.5",
|
|
41
41
|
"@nestjs/core": "^8.2.5",
|
|
42
42
|
"reflect-metadata": "^0.1.13",
|
|
@@ -45,7 +45,9 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@lido-nestjs/execution": "1.7.0",
|
|
48
|
-
"@mikro-orm/
|
|
48
|
+
"@mikro-orm/core": "^5.2.0",
|
|
49
|
+
"@mikro-orm/nestjs": "^5.0.2",
|
|
50
|
+
"@mikro-orm/sqlite": "^5.2.0",
|
|
49
51
|
"@nestjs/common": "^8.2.5",
|
|
50
52
|
"@nestjs/core": "^8.2.5",
|
|
51
53
|
"@nestjs/testing": "^8.2.5",
|