-
Notifications
You must be signed in to change notification settings - Fork 8
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 #59
Vc/multi shares #59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -56,7 +57,18 @@ async function main() { | |||
privateKey | |||
}); | |||
|
|||
const keyShares = new KeyShares(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can add an argument of optional list of key share items to the constructor instead of adding after constructed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For higher flexibility of SDK it can be implemented.
@vadiminc please add this possibility
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check comments
README.md
Outdated
|
||
- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove double ``
@@ -56,7 +57,18 @@ async function main() { | |||
privateKey | |||
}); | |||
|
|||
const keyShares = new KeyShares(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For higher flexibility of SDK it can be implemented.
@vadiminc please add this possibility
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "ssv-keys", | |||
"version": "1.0.5-dev", | |||
"version": "1.0.6", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 1.1.0
version, it's breaking changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not possible for now, as it won't support old files format anymore (single shares)
src/lib/KeyShares/KeyShares.ts
Outdated
// Using a helper function to process each item | ||
const processItem = async (item: any) => { | ||
const keySharesItem = new KeySharesItem(); | ||
await keySharesItem.fromJson(item); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From json should be static class method and return class instance.
src/lib/KeyShares/KeyShares.ts
Outdated
// Process each item in the array | ||
for (const item of body.shares) { | ||
const processedItem = await processItem(item); | ||
this.shares.push(processedItem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.shares.push(KeySharesItem.fromJson(item));
* 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
Fixes #<issue_number_goes_here>