Skip to content

Commit

Permalink
improve sanitaze function (#55)
Browse files Browse the repository at this point in the history
* improve sanitaze function

* update build files

* fix lint

* fix lint

* update help messages

* upda operator public key validation and unify the way how to do that

* fix readme

* forgotten commit

* tag 1.0.5-dev

* Vc/multi shares (#59)

* multi-shares logic and improvements in design

* new logic

* fix examples and tests

* import/export improvement

* update examples

* updated tests

* updated tests

* add keyshares construct init new flow

* update build

* Vc/more extended tests and errors (#61)

* add more covered tests and updated errors

* version up to 1.0.7
  • Loading branch information
vadiminc committed Dec 12, 2023
1 parent cc9e5cd commit 0272ae8
Show file tree
Hide file tree
Showing 147 changed files with 12,529 additions and 11,303 deletions.
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.

5 changes: 3 additions & 2 deletions dist/tsc/src/commands/actions/BaseAction.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/BaseAction.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

0 comments on commit 0272ae8

Please sign in to comment.