Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vc/multi shares #60

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,21 @@ yarn cli <action> --help
To run you will use the "shares" command

**Input parameters:**

- keystore-path (kp) = 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
- keystore (ks) = The validator keystore file path. Only one keystore file can be specified using this argument
- keystore-path (kp) = The path to the folder containing validator keystore files. If a folder is provided, all keystore files within the provided folder will be split according to the provided arguments. This argument should not be used together with the `keystore` argument
- 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 (in the SSV contract)
- owner-nonce (on) = The validator registration nonce of the account (owner address) within the SSV contract (increments after each validator registration), obtained using the ssv-scanner tool
- multi-shares (ms) = Keystore path will accept multiple keystores from a folder path, all files must have the same password

```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=.. --multi-shares
yarn cli shares --keystore-path=./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/lib/JSEncrypt/jsencrypt.bundle.js

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

4 changes: 2 additions & 2 deletions dist/esbuild/lib/JSEncrypt/jsencrypt.bundle.js.map

Large diffs are not rendered by default.

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.

2 changes: 1 addition & 1 deletion dist/tsc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ssv-keys",
"version": "1.0.4",
"version": "1.0.6",
"description": "Tool for splitting a validator key into a predefined threshold of shares via Shamir-Secret-Sharing (SSS), and encrypt them with a set of operator keys.",
"author": "SSV.Network",
"repository": "https://github.com/bloxapp/ssv-keys",
Expand Down
8 changes: 4 additions & 4 deletions 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.

16 changes: 11 additions & 5 deletions dist/tsc/src/commands/actions/KeySharesAction.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@ import { BaseAction } from './BaseAction';
*/
export declare class KeySharesAction extends BaseAction {
static get options(): any;
/**
* Decrypt and return private key.
*/
execute(): Promise<any>;
private _processFile;
execute(): Promise<string>;
private getKeySharesList;
private validateKeystoreArguments;
private isDirectory;
private processKeystorePath;
private processKeystore;
private validateKeystoreFiles;
private validateSingleKeystore;
private getOperators;
private processFile;
private saveKeyShares;
}
Loading
Loading