Skip to content

API Reference / EpochRewards

Class: EpochRewards

Defined in: internal.d.ts:153

A type to hold data for the EpochRewards sysvar.

Constructors

Constructor

new EpochRewards(distributionStartingBlockHeight, numPartitions, parentBlockhash, totalPoints, totalRewards, distributedRewards, active): EpochRewards

Defined in: internal.d.ts:163

Parameters

distributionStartingBlockHeight

bigint

numPartitions

bigint

parentBlockhash

string

totalPoints

bigint

totalRewards

bigint

distributedRewards

bigint

active

boolean

Whether the rewards period (including calculation and distribution) is active

Returns

EpochRewards

Accessors

active

Get Signature

get active(): boolean

Defined in: internal.d.ts:203

Whether the rewards period (including calculation and distribution) is active

Returns

boolean

Set Signature

set active(val): void

Defined in: internal.d.ts:204

Parameters
val

boolean

Returns

void


distributedRewards

Get Signature

get distributedRewards(): bigint

Defined in: internal.d.ts:197

The rewards currently distributed for the current epoch, in lamports

Returns

bigint

Set Signature

set distributedRewards(val): void

Defined in: internal.d.ts:198

Parameters
val

bigint

Returns

void


distributionStartingBlockHeight

Get Signature

get distributionStartingBlockHeight(): bigint

Defined in: internal.d.ts:168

The starting block height of the rewards distribution in the current epoch

Returns

bigint

Set Signature

set distributionStartingBlockHeight(val): void

Defined in: internal.d.ts:169

Parameters
val

bigint

Returns

void


numPartitions

Get Signature

get numPartitions(): bigint

Defined in: internal.d.ts:174

Number of partitions in the rewards distribution in the current epoch, used to generate an EpochRewardsHasher

Returns

bigint

Set Signature

set numPartitions(val): void

Defined in: internal.d.ts:175

Parameters
val

bigint

Returns

void


parentBlockhash

Get Signature

get parentBlockhash(): string

Defined in: internal.d.ts:180

The blockhash of the parent block of the first block in the epoch, used to seed an EpochRewardsHasher

Returns

string

Set Signature

set parentBlockhash(val): void

Defined in: internal.d.ts:181

Parameters
val

string

Returns

void


totalPoints

Get Signature

get totalPoints(): bigint

Defined in: internal.d.ts:187

The total rewards points calculated for the current epoch, where points equals the sum of (delegated stake * credits observed) for all delegations

Returns

bigint

Set Signature

set totalPoints(val): void

Defined in: internal.d.ts:188

Parameters
val

bigint

Returns

void


totalRewards

Get Signature

get totalRewards(): bigint

Defined in: internal.d.ts:194

The total rewards calculated for the current epoch. This may be greater than the total distributed_rewards at the end of the rewards period, due to rounding and inability to deliver rewards smaller than 1 lamport.

Returns

bigint

Set Signature

set totalRewards(val): void

Defined in: internal.d.ts:195

Parameters
val

bigint

Returns

void