githubEdit

Client

Defined in: index.ts:67arrow-up-right

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:113arrow-up-right

Parameters

Parameter
Type
Description

config

{ baseUrl?: string; chainId?: number; }

Client configurations

config.baseUrl?

string

obol-api url

config.chainId?

number

Blockchain network ID

signer?

ethersJS Signer

Returns

Client

Obol-SDK Client instance

An example of how to instantiate obol-sdk Client: obolClientarrow-up-right

Overrides

Base.constructor

Properties

Property
Modifier
Type
Description
Defined in

incentives

public

The incentives module, responsible for managing Obol tokens distribution.

exit

public

The exit module, responsible for managing exit validation.

splits

public

The splits module, responsible for managing splits.

eoa

public

The eoa module, responsible for managing EOA operations.

provider

public

ProviderTypearrow-up-right | 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:143arrow-up-right

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: acceptObolLatestTermsAndConditionsarrow-up-right


createObolRewardsSplit()

createObolRewardsSplit(rewardsSplitPayload): Promise<ClusterValidator>

Defined in: index.ts:198arrow-up-right

Deploys OWR and Splitter Proxy.

Parameters

Parameter
Type
Description

rewardsSplitPayload

Data 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: createObolRewardsSplitarrow-up-right

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:325arrow-up-right

Deploys Splitter Proxy.

Parameters

Parameter
Type
Description

totalSplitPayload

Data 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: createObolTotalSplitarrow-up-right

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<OWRTranchesarrow-up-right>

Defined in: index.ts:430arrow-up-right

Read OWR Tranches.

Parameters

Parameter
Type
Description

owrAddress

string

Address of the Deployed OWR Contract

Returns

Promise<OWRTranchesarrow-up-right>

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:448arrow-up-right

Creates a cluster definition which contains cluster configuration.

Parameters

Parameter
Type
Description

newCluster

The new unique cluster.

Returns

Promise<string>

config_hash.

Throws

On duplicate entries, missing or wrong cluster keys.

An example of how to use createClusterDefinition: createObolClusterarrow-up-right


acceptClusterDefinition()

acceptClusterDefinition(operatorPayload, configHash): Promise<ClusterDefinition>

Defined in: index.ts:513arrow-up-right

Approves joining a cluster with specific configuration.

Parameters

Parameter
Type
Description

operatorPayload

The operator data including signatures.

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: acceptClusterDefinitionarrow-up-right


getClusterDefinition()

getClusterDefinition(configHash): Promise<ClusterDefinition>

Defined in: index.ts:570arrow-up-right

Parameters

Parameter
Type
Description

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: getObolClusterDefinitionarrow-up-right


getClusterLock()

getClusterLock(configHash): Promise<ClusterLock>

Defined in: index.ts:589arrow-up-right

Parameters

Parameter
Type
Description

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: getObolClusterLockarrow-up-right


getClusterLockByHash()

getClusterLockByHash(lockHash): Promise<ClusterLock>

Defined in: index.ts:605arrow-up-right

Parameters

Parameter
Type
Description

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?