Skip to content

Commit 522bff3

Browse files
committed
SSV keys deprecation
1 parent 4171f41 commit 522bff3

File tree

11 files changed

+229
-596
lines changed

11 files changed

+229
-596
lines changed

docs/based-applications/developers/BA-SDK/module-reference/api-module.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,57 @@ console.log(JSON.stringify(strategies));
374374
```
375375
["4","5"]
376376
```
377+
378+
379+
380+
381+
### `getParticipantWeights(bAppId)`
382+
383+
Accepts a bApp ID (contract address) and returns the participant weights for that Based Application.
384+
385+
**Input:**
386+
387+
| Input parameter | Input type | Description |
388+
|----------------|------------|-------------|
389+
| bappId | string | The contract address of the Based Application |
390+
391+
**Example:**
392+
393+
```typescript
394+
const bAppId = "0x1234567890abcdef1234567890abcdef12345678"
395+
const weights = await sdk.api.getParticipantWeights({ bAppId })
396+
```
397+
398+
**Example output:**
399+
400+
```json
401+
[
402+
{
403+
"id": "17",
404+
"tokenWeights": [
405+
{
406+
"token": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
407+
"weight": 0.16666666666666666
408+
}
409+
]
410+
},
411+
{
412+
"id": "18",
413+
"tokenWeights": [
414+
{
415+
"token": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
416+
"weight": 0.3333333333333333
417+
}
418+
]
419+
},
420+
{
421+
"id": "19",
422+
"tokenWeights": [
423+
{
424+
"token": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
425+
"weight": 0.5
426+
}
427+
]
428+
}
429+
]
430+
```

docs/developers/SSV-SDK/examples/bulk-register-validators.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,27 @@ This page show show to register any amount of validators to the SSV network.&#x2
1212
Prerequisite: This tutorial assumes you already have keystores generated, or will use the [code illustrated here](create-validator-keys.md) to generate them pragmatically.
1313
:::
1414

15-
#### 1. Import <a href="#id-1-installation" id="id-1-installation"></a>
15+
16+
Bulk Register flow:
17+
18+
![Get Started](/img/get-started-2.avif)
19+
20+
Running a distributed validator is a process composed of these steps (outlined in the above schema):
21+
22+
1. Select the cluster of operators to manage your validators.
23+
2. Split your validator keys to shares.
24+
3. Retrieve your cluster’s latest snapshot data.
25+
4. Register your validatora to the SSV network.
26+
27+
#### a. Import <a href="#id-1-installation" id="id-1-installation"></a>
1628

1729
```typescript
1830
import { SSVSDK, chains } from '@ssv-labs/ssv-sdk'
1931
import { parseEther, createPublicClient, createWalletClient, http } from 'viem'
2032
import { privateKeyToAccount } from 'viem/accounts'
2133
```
2234

23-
#### 2. Instantiation[](https://coruscating-salmiakki-327f4b.netlify.app/build/SSV-SDK/get-started#3-instantiation) <a href="#id-3-instantiation" id="id-3-instantiation"></a>
35+
#### b. Instantiation[](https://coruscating-salmiakki-327f4b.netlify.app/build/SSV-SDK/get-started#3-instantiation) <a href="#id-3-instantiation" id="id-3-instantiation"></a>
2436

2537
To instantiate the SDK, provide a number of parameters:
2638

@@ -55,7 +67,7 @@ const sdk = new SSVSDK({
5567
})
5668
```
5769

58-
#### 3. Usage[](https://coruscating-salmiakki-327f4b.netlify.app/build/SSV-SDK/get-started#4-usage) <a href="#id-4-usage" id="id-4-usage"></a>
70+
#### c. Usage[](https://coruscating-salmiakki-327f4b.netlify.app/build/SSV-SDK/get-started#4-usage) <a href="#id-4-usage" id="id-4-usage"></a>
5971

6072
Next we can use that keystore to generate our keyshare transaction payload:
6173

docs/developers/SSV-SDK/examples/generate-and-validate-keyshares.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ sidebar_position: 4
44

55
# Generate and validate keyshares
66

7-
This page shows how to generate keyshares from a set of keystore files.&#x20;
87

9-
These keyshares will then be validated with a different function to ensure they will register correctly.&#x20;
8+
This part of the SDK enable users to programmatically generate validator keys and split them into threshold of shares via [Shamir-Secret-Sharing (SSS)](https://en.wikipedia.org/wiki/Shamir's\_Secret\_Sharing), encrypted with a set of operator keys.
9+
10+
The shares and the signature are constructed as **sharesData** which is used during [validator registration](/developers/smart-contracts/ssvnetwork) through the SSV smart contract in order to facilitate their distribution from stakers to operators.
11+
12+
In addition to the generation of shares, the SDK also takes the keyshares file and the operator IDs, and validates that the following registration will succeed.
1013

1114
### Generate keyshares
1215

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
---
2+
sidebar_label: 'Code examples and snippets'
3+
sidebar_position: 5
4+
---
5+
16
# Code examples and snippets
27

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1+
---
2+
sidebar_label: 'Integration Guides'
3+
sidebar_position: 6
4+
---
5+
6+
17
# Integration Guides

docs/developers/integration-guides/staking-services.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 2
2+
sidebar_position: 6
33
---
44

55
# Staking Services
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
sidebar_label: 'Keyshares file structure'
3+
sidebar_position: 7
4+
---
5+
6+
# Keyshares file structure
7+
8+
9+
### An example of `keyshares.json` structure:
10+
```json
11+
{
12+
"version": "v1.1.0",
13+
"createdAt": "2025-05-14T10:23:43.794Z",
14+
"shares": [
15+
{
16+
"data": {
17+
"ownerNonce": 0,
18+
"ownerAddress": "OWNER_ADDRESS",
19+
"publicKey": "VALIDATOR_PUBKEY",
20+
"operators": [
21+
{
22+
"id": 1,
23+
"operatorKey": "OPERATOR_PUBKEY"
24+
},
25+
{...},
26+
{...},
27+
{...}
28+
]
29+
},
30+
"payload": {
31+
"publicKey": "VALIDATOR_PUBKEY",
32+
"operatorIds": [1,2,3,4],
33+
"sharesData": "ENCRYPTED_SHARES_DATA"
34+
}
35+
}
36+
]
37+
}
38+
```

docs/developers/security.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
sidebar_label: 'Security'
3+
sidebar_position: 8
4+
---
5+
16
# Security
27

38
## Bug Bounty Program

docs/developers/testnet.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
sidebar_label: 'Testnet'
3+
sidebar_position: 9
4+
---
5+
16
# Testnet
27

38
The ssv.network testnet is live on the Hoodi network with the goal of serving as a testing environment for protocol development and for teams building on top of ssv.network.

docs/developers/tools/ssv-keys.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ sidebar_label: 'SSV Keys'
33
sidebar_position: 2
44
---
55

6-
:::warning
6+
:::danger
77
Please note: SSV Keys SDK will soon be deprecated as it is becoming part of the SSV SDK.
8+
9+
The same functionality should be done programatically with [this guide.](../SSV-SDK/examples/generate-and-validate-keyshares.md)
810
:::
911

1012
# SSV Keys SDK

0 commit comments

Comments
 (0)