Client
Defined in: index.ts:67
Obol sdk Client can be used for creating, managing and activating distributed validators.
Extends
Base
Constructors
Constructor
new Client(
config,signer?,provider?):Client
Defined in: index.ts:113
Parameters
config
{ baseUrl?: string; chainId?: number; }
Client configurations
config.baseUrl?
string
obol-api url
config.chainId?
number
Blockchain network ID
Returns
Client
Obol-SDK Client instance
An example of how to instantiate obol-sdk Client: obolClient
Overrides
Base.constructor
Properties
incentives
public
The incentives module, responsible for managing Obol tokens distribution.
provider
public
ProviderType | null | undefined
The blockchain provider, used to interact with the network. It can be null, undefined, or a valid provider instance and defaults to the Signer provider if Signer is passed.
Methods
acceptObolLatestTermsAndConditions()
acceptObolLatestTermsAndConditions():
Promise<string>
Defined in: index.ts:143
Accepts Obol terms and conditions to be able to create or update data.
Returns
Promise<string>
terms and conditions acceptance success message.
Throws
On unverified signature or wrong hash.
An example of how to use acceptObolLatestTermsAndConditions: acceptObolLatestTermsAndConditions
createObolRewardsSplit()
createObolRewardsSplit(
rewardsSplitPayload):Promise<ClusterValidator>
Defined in: index.ts:198
Deploys OWR and Splitter Proxy.
Parameters
Returns
Promise<ClusterValidator>
owr address as withdrawal address and splitter as fee recipient
An example of how to use createObolRewardsSplit: createObolRewardsSplit
Remarks
⚠️ Important: If you're storing the private key in an .env file, ensure it is securely managed and not pushed to version control.
createObolTotalSplit()
createObolTotalSplit(
totalSplitPayload):Promise<ClusterValidator>
Defined in: index.ts:325
Deploys Splitter Proxy.
Parameters
Returns
Promise<ClusterValidator>
splitter address as withdrawal address and splitter as fee recipient too
An example of how to use createObolTotalSplit: createObolTotalSplit
Remarks
⚠️ Important: If you're storing the private key in an .env file, ensure it is securely managed and not pushed to version control.
getOWRTranches()
getOWRTranches(
owrAddress):Promise<OWRTranches>
Defined in: index.ts:430
Read OWR Tranches.
Parameters
owrAddress
string
Address of the Deployed OWR Contract
Returns
Promise<OWRTranches>
owr tranch information about principal and reward reciepient, as well as the principal amount
Remarks
⚠️ Important: If you're storing the private key in an .env file, ensure it is securely managed and not pushed to version control.
createClusterDefinition()
createClusterDefinition(
newCluster):Promise<string>
Defined in: index.ts:448
Creates a cluster definition which contains cluster configuration.
Parameters
Returns
Promise<string>
config_hash.
Throws
On duplicate entries, missing or wrong cluster keys.
An example of how to use createClusterDefinition: createObolCluster
acceptClusterDefinition()
acceptClusterDefinition(
operatorPayload,configHash):Promise<ClusterDefinition>
Defined in: index.ts:513
Approves joining a cluster with specific configuration.
Parameters
configHash
string
The config hash of the cluster which the operator confirms joining to.
Returns
Promise<ClusterDefinition>
The cluster definition.
Throws
On unauthorized, duplicate entries, missing keys, not found cluster or invalid data.
An example of how to use acceptClusterDefinition: acceptClusterDefinition
getClusterDefinition()
getClusterDefinition(
configHash):Promise<ClusterDefinition>
Defined in: index.ts:570
Parameters
configHash
string
The configuration hash returned in createClusterDefinition
Returns
Promise<ClusterDefinition>
The cluster definition for config hash
Throws
On not found config hash.
An example of how to use getClusterDefinition: getObolClusterDefinition
getClusterLock()
getClusterLock(
configHash):Promise<ClusterLock>
Defined in: index.ts:589
Parameters
configHash
string
The configuration hash in cluster-definition
Returns
Promise<ClusterLock>
The matched cluster details (lock) from DB
Throws
On not found cluster definition or lock.
An example of how to use getClusterLock: getObolClusterLock
getClusterLockByHash()
getClusterLockByHash(
lockHash):Promise<ClusterLock>
Defined in: index.ts:605
Parameters
lockHash
string
The configuration hash in cluster-definition
Returns
Promise<ClusterLock>
The matched cluster details (lock) from DB
Throws
On not found cluster definition or lock.
Last updated
Was this helpful?

