Class: Reward

January 17, 2020 · View on GitHub

@daostack/clientGlobalsReward

Class: Reward

Hierarchy

  • Reward

Implements

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

+ new Reward(idOrOpts: string | IRewardStaticState, context: Arc): Reward

Defined in reward.ts:155

Parameters:

NameType
idOrOptsstring | IRewardStaticState
contextArc

Returns: Reward

Properties

context

context: Arc

Defined in reward.ts:157


id

id: string

Defined in reward.ts:154


idOrOpts

idOrOpts: string | IRewardStaticState

Defined in reward.ts:157


staticState

staticState: IRewardStaticState | undefined

Defined in reward.ts:155

Methods

fetchStaticState

fetchStaticState(): Promise‹IRewardStaticState

Defined in reward.ts:215

Returns: Promise‹IRewardStaticState


setStaticState

setStaticState(opts: IRewardStaticState): void

Defined in reward.ts:211

Parameters:

NameType
optsIRewardStaticState

Returns: void


state

state(apolloQueryOptions: IApolloQueryOptions): Observable‹IRewardState

Defined in reward.ts:167

Parameters:

NameTypeDefault
apolloQueryOptionsIApolloQueryOptions{}

Returns: Observable‹IRewardState


search(context: Arc, options: IRewardQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹Reward[]›

Defined in reward.ts:71

Reward.search(context, options) searches for reward entities

Parameters:

NameTypeDefaultDescription
contextArc-an Arc instance that provides connection information
optionsIRewardQueryOptions{}the query options, cf. IRewardQueryOptions
apolloQueryOptionsIApolloQueryOptions{}-

Returns: Observable‹Reward[]›

an observable of Reward objects

Object literals

Static fragments

fragments: object

Defined in reward.ts:42

RewardFields

RewardFields: any = gqlfragment RewardFields on GPReward { id createdAt dao { id } beneficiary daoBountyForStaker proposal { id } reputationForVoter reputationForVoterRedeemedAt reputationForProposer reputationForProposerRedeemedAt tokenAddress tokensForStaker tokensForStakerRedeemedAt daoBountyForStakerRedeemedAt }

Defined in reward.ts:43