# Class: EpochRewards

A type to hold data for the EpochRewards sysvar.

# Table of contents

# Constructors

# Accessors

# Constructors

# constructor

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

# Parameters

Name Type Description
distributionStartingBlockHeight bigint -
numPartitions bigint -
parentBlockhash string -
totalPoints bigint -
totalRewards bigint -
distributedRewards bigint -
active boolean Whether the rewards period (including calculation and distribution) is active

# Defined in

internal.d.ts:254 (opens new window)

# Accessors

# active

get active(): boolean

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

# Returns

boolean

# Defined in

internal.d.ts:294 (opens new window)

set active(val): void

# Parameters

Name Type
val boolean

# Returns

void

# Defined in

internal.d.ts:295 (opens new window)


# distributedRewards

get distributedRewards(): bigint

The rewards currently distributed for the current epoch, in lamports

# Returns

bigint

# Defined in

internal.d.ts:288 (opens new window)

set distributedRewards(val): void

# Parameters

Name Type
val bigint

# Returns

void

# Defined in

internal.d.ts:289 (opens new window)


# distributionStartingBlockHeight

get distributionStartingBlockHeight(): bigint

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

# Returns

bigint

# Defined in

internal.d.ts:259 (opens new window)

set distributionStartingBlockHeight(val): void

# Parameters

Name Type
val bigint

# Returns

void

# Defined in

internal.d.ts:260 (opens new window)


# numPartitions

get numPartitions(): bigint

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

# Returns

bigint

# Defined in

internal.d.ts:265 (opens new window)

set numPartitions(val): void

# Parameters

Name Type
val bigint

# Returns

void

# Defined in

internal.d.ts:266 (opens new window)


# parentBlockhash

get parentBlockhash(): string

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

# Returns

string

# Defined in

internal.d.ts:271 (opens new window)

set parentBlockhash(val): void

# Parameters

Name Type
val string

# Returns

void

# Defined in

internal.d.ts:272 (opens new window)


# totalPoints

get totalPoints(): bigint

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

# Returns

bigint

# Defined in

internal.d.ts:278 (opens new window)

set totalPoints(val): void

# Parameters

Name Type
val bigint

# Returns

void

# Defined in

internal.d.ts:279 (opens new window)


# totalRewards

get totalRewards(): bigint

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

# Defined in

internal.d.ts:285 (opens new window)

set totalRewards(val): void

# Parameters

Name Type
val bigint

# Returns

void

# Defined in

internal.d.ts:286 (opens new window)