Skip to content

Interface: RewardsProgram ​

Rewards program interface: the staking rewards a wallet's stake earns.

Methods ​

enter() ​

ts
enter(): Promise<EnterInstruction<Address, string, string, string, string, string, []>>;

The rewards enter for the wallet's stake, which makes its rewards account. One already there can't be entered again: send it when find answers none.

Returns ​

Promise<EnterInstruction<Address, string, string, string, string, string, []>>


find() ​

ts
find(owner?): Promise<Reward | undefined>;

Fetch a rewards account by owner address (defaults to wallet address); undefined when the owner has none

Parameters ​

ParameterType
owner?Address

Returns ​

Promise<Reward | undefined>


get() ​

ts
get(addr): Promise<Reward>;

Fetch a rewards account by address

Parameters ​

ParameterType
addrAddress

Returns ​

Promise<Reward>


getAddress() ​

ts
getAddress(owner?): Promise<Address>;

Derive the rewards account PDA address for a given owner (defaults to wallet address)

Parameters ​

ParameterType
owner?Address

Returns ​

Promise<Address>


getReflectionAddress() ​

ts
getReflectionAddress(): Promise<Address>;

The program's reflection account address

Returns ​

Promise<Address>