Skip to main content
Version: Next

Client

Obol sdk Client can be used for creating, managing and activating distributed validators.

Extends

  • Base

Constructors

new Client()

new Client(config, signer?): Client

Parameters

ParameterTypeDescription
configobjectClient configurations
config.baseUrl?stringobol-api url
config.chainId?numberBlockchain network ID
signer?SignerethersJS Signer

Returns

Client

Obol-SDK Client instance

An example of how to instantiate obol-sdk Client: obolClient

Overrides

Base.constructor

Defined in

index.ts:66

Methods

acceptObolLatestTermsAndConditions()

acceptObolLatestTermsAndConditions(): Promise<string>

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

Defined in

index.ts:79


createObolRewardsSplit()

createObolRewardsSplit(rewardsSplitPayload): Promise<ClusterValidator>

Deploys OWR and Splitter Proxy.

Parameters

ParameterTypeDescription
rewardsSplitPayloadRewardsSplitPayloadData needed to deploy owr and splitter.

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.

Defined in

index.ts:133


createObolTotalSplit()

createObolTotalSplit(totalSplitPayload): Promise<ClusterValidator>

Deploys Splitter Proxy.

Parameters

ParameterTypeDescription
totalSplitPayloadTotalSplitPayloadData needed to deploy splitter if it doesnt exist.

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.

Defined in

index.ts:254


createClusterDefinition()

createClusterDefinition(newCluster): Promise<string>

Creates a cluster definition which contains cluster configuration.

Parameters

ParameterTypeDescription
newClusterClusterPayloadThe new unique cluster.

Returns

Promise<string>

config_hash.

Throws

On duplicate entries, missing or wrong cluster keys.

An example of how to use createClusterDefinition: createObolCluster

Defined in

index.ts:350


acceptClusterDefinition()

acceptClusterDefinition(operatorPayload, configHash): Promise<ClusterDefinition>

Approves joining a cluster with specific configuration.

Parameters

ParameterTypeDescription
operatorPayloadOperatorPayloadThe operator data including signatures.
configHashstringThe 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

Defined in

index.ts:415


getClusterDefinition()

getClusterDefinition(configHash): Promise<ClusterDefinition>

Parameters

ParameterTypeDescription
configHashstringThe 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

Defined in

index.ts:469


getClusterLock()

getClusterLock(configHash): Promise<ClusterLock>

Parameters

ParameterTypeDescription
configHashstringThe 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

Defined in

index.ts:488