Create a DV Using the SDK
This is a walkthrough of using the Obol-SDK to propose a four-node distributed validator cluster for creation using the DV Launchpad.
Pre-requisites
You have node.js installed.
Install the package
Install the Obol-SDK package into your development environment
Instantiate the client
The first thing you need to do is create an instance of the Obol SDK client. The client takes two constructor parameters:
The
chainID
for the chain you intend to use.An ethers.js signer object.
Propose the cluster
List the Ethereum addresses of participating operators, along with withdrawal and fee recipient address data for each validator you intend for the operators to create.
Invite the Operators to complete the DKG
Once the Obol-API returns a configHash
string from the createClusterDefinition
method, you can use this identifier to invite the operators to the Launchpad to complete the process
Operators navigate to
https://<NETWORK_NAME_HERE>.launchpad.obol.org/dv?configHash=<CONFIG_HASH_HERE>
and complete the run a DV with others flow.Once the DKG is complete, and operators are using the
--publish
flag, the created cluster details will be posted to the Obol API.The creator will be able to retrieve this data with
obol.getClusterLock(configHash)
, to use for activating the newly created validator.
Retrieve the created Distributed Validators using the SDK
Once the DKG is complete, the proposer of the cluster can retrieve key data such as the validator public keys and their associated deposit data messages.
Reference lock files can be found here.
Activate the DVs using the deposit contract
In order to activate the distributed validators, the cluster operator can retrieve the validators' associated deposit data from the lock file and use it to craft transactions to the deposit()
method on the deposit contract.
Usage Examples
Examples of how our SDK can be used are found here.
Last updated