Skip to content

Commit

Permalink
Bulk Keys support in ssv-keys
Browse files Browse the repository at this point in the history
  • Loading branch information
vadiminc committed Jul 24, 2023
1 parent 40266fa commit 7c9babe
Show file tree
Hide file tree
Showing 48 changed files with 485 additions and 104 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,20 @@ To run you will use the "shares" command

**Input parameters:**

- keystore (ks) = The validator keystore file path
- password (ps) = The keystore file encryption password
- keystore (ks) = The validator keystore file/folder path, if a folder is provided all keystore files within the provided folder will be split according to the provided arguments
- password (ps) = The keystore file encryption password, if a folder was provided the password will be used for all keystore files in the folder
- operator-ids (oids) = Comma-separated list of operator IDs. The amount must be 3f+1 compatible.
- operator-keys (oks) = Comma-separated list of operator keys (same sequence as operator ids). The amount must be 3f+1 compatible.
- output-folder (of) = Target folder path to output the key shares file
- owner-address (oa) = The cluster owner address
- owner-nonce (on) = The nonce of the owner within the SSV contract (increments after each validator registration), obtained using the ssv-scanner tool

```bash
# single file
yarn cli shares --keystore=keystore.json --password=test --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=..
# folder with multiple keystore files
yarn cli shares --keystore=./keystore-files --password=test --operator-ids=1,2,3,4 --operator-keys=LS..,LS..,LS..,LS.. --output-folder=./ --owner-address=... --owner-nonce=..
```

**Output:** Name will start with keyshares-timestamp.json
Expand Down
4 changes: 2 additions & 2 deletions dist/esbuild/main.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/esbuild/main.js.map

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion dist/tsc/src/cli-shared.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/src/cli-shared.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/src/commands/BaseCommand.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ export declare class BaseCommand extends ArgumentParser {
* @param argument
*/
getPromptOptions(argument: any): any;
execute(): Promise<void>;
execute(): Promise<any>;
}
9 changes: 9 additions & 0 deletions dist/tsc/src/commands/BaseCommand.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/src/commands/BaseCommand.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/tsc/src/commands/actions/KeySharesAction.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export declare class KeySharesAction extends BaseAction {
* Decrypt and return private key.
*/
execute(): Promise<any>;
private _processFile;
}
54 changes: 39 additions & 15 deletions dist/tsc/src/commands/actions/KeySharesAction.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tsc/src/commands/actions/KeySharesAction.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion dist/tsc/src/commands/actions/arguments/keystore.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ declare const _default: {
help: string;
};
interactive: {
confirmMessage: string;
confirmConditions: (filePath: string) => Promise<number | false>;
options: {
type: string;
validate: (filePath: string) => boolean | string;
validateSingle: (filePath: string) => any;
};
};
};
Expand Down
16 changes: 12 additions & 4 deletions dist/tsc/src/commands/actions/arguments/keystore.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7c9babe

Please sign in to comment.