-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from bloxapp/v3
Merge v3 to main
- Loading branch information
Showing
141 changed files
with
1,071 additions
and
1,784 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Release v0.0.18 - 2023-05-07 | ||
|
||
This release introduces some significant SDK changes, including a few breaking changes. Please review the notes below and update your code accordingly. | ||
|
||
## Breaking Changes | ||
|
||
### SSVKeys, KeyShares | ||
- Removed multi-version support. | ||
|
||
Old version: | ||
```code | ||
const ssvKeys = new SSVKeys(SSVKeys.VERSION.V3); | ||
``` | ||
|
||
New format: | ||
```code | ||
import { SSVKeys, KeyShares } from 'ssv-keys'; | ||
const ssvKeys = new SSVKeys(); | ||
const keyShares = new KeyShares(); | ||
``` | ||
|
||
- Replaced `operatorIds` and `operatorKeys` with a single array of objects: | ||
|
||
```code | ||
const operators = [{ id, publicKey },...]; | ||
``` | ||
|
||
- Replaced `getPrivateKeyFromKeystoreData` method by `extractKeys` which returns validator privateKey and publicKey. | ||
|
||
```code | ||
const { privateKey, publicKey } = await ssvKeys.extractKeys(keystore, keystorePassword); | ||
``` | ||
|
||
- Replaced `ssvKeys.keyShares.setData` to `keyShares.update` | ||
|
||
Old version: | ||
```code | ||
await ssvKeys.keyShares.setData({ operators }); | ||
```` | ||
New format: | ||
```code | ||
const keyShares = new KeyShares(); | ||
keyShares.update({ operators, publicKey }); | ||
``` | ||
|
||
- Changed `buildShares` function params: | ||
|
||
Old version: | ||
```code | ||
const encryptedShares = await ssvKeys.buildShares(privateKey, operatorIds, operators); | ||
``` | ||
|
||
New format: | ||
```code | ||
const encryptedShares = await ssvKeys.buildShares(privateKey, operators); | ||
``` | ||
|
||
- Changed `buildPayload` interface and params: | ||
|
||
Old version: | ||
```code | ||
const payload = await ssvKeys.buildPayload({ publicKey, operatorIds, encryptedShares }); | ||
``` | ||
|
||
New format: | ||
```code | ||
const payload = keyShares.buildPayload({ publicKey, operators, encryptedShares }); | ||
``` | ||
|
||
- Added `buildSharesFromBytes` to extract shares from a single string: | ||
|
||
```code | ||
const shares = keyShares.buildSharesFromBytes(payload.shares, operators.length); | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
dist/tsc/src/commands/actions/arguments/key-shares-version.d.ts
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
dist/tsc/src/commands/actions/arguments/key-shares-version.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
dist/tsc/src/commands/actions/arguments/key-shares-version.js.map
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.