Class: Stake

January 17, 2020 · View on GitHub

@daostack/clientGlobalsStake

Class: Stake

Hierarchy

  • Stake

Implements

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

+ new Stake(idOrOpts: string | IStakeStaticState, context: Arc): Stake

Defined in stake.ts:149

Parameters:

NameType
idOrOptsstring | IStakeStaticState
contextArc

Returns: Stake

Properties

context

context: Arc

Defined in stake.ts:153


id

id: string | undefined

Defined in stake.ts:148


staticState

staticState: IStakeStaticState | undefined

Defined in stake.ts:149

Methods

fetchStaticState

fetchStaticState(): Promise‹IStakeStaticState

Defined in stake.ts:207

Returns: Promise‹IStakeStaticState


setStaticState

setStaticState(opts: IStakeStaticState): void

Defined in stake.ts:203

Parameters:

NameType
optsIStakeStaticState

Returns: void


state

state(apolloQueryOptions: IApolloQueryOptions): Observable‹IStakeState

Defined in stake.ts:163

Parameters:

NameTypeDefault
apolloQueryOptionsIApolloQueryOptions{}

Returns: Observable‹IStakeState


search(context: Arc, options: IStakeQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹Stake[]›

Defined in stake.ts:57

Stake.search(context, options) searches for stake entities

Parameters:

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

Returns: Observable‹Stake[]›

an observable of Stake objects

Object literals

Static fragments

fragments: object

Defined in stake.ts:35

StakeFields

StakeFields: any = gqlfragment StakeFields on ProposalStake { id createdAt dao { id } staker proposal { id } outcome amount }

Defined in stake.ts:36