Class: Stake
January 17, 2020 · View on GitHub
@daostack/client › Globals › Stake
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:
| Name | Type |
|---|---|
idOrOpts | string | IStakeStaticState |
context | Arc |
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:
| Name | Type |
|---|---|
opts | IStakeStaticState |
Returns: void
state
▸ state(apolloQueryOptions: IApolloQueryOptions): Observable‹IStakeState›
Defined in stake.ts:163
Parameters:
| Name | Type | Default |
|---|---|---|
apolloQueryOptions | IApolloQueryOptions | {} |
Returns: Observable‹IStakeState›
Static search
▸ search(context: Arc, options: IStakeQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹Stake[]›
Defined in stake.ts:57
Stake.search(context, options) searches for stake entities
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
context | Arc | - | an Arc instance that provides connection information |
options | IStakeQueryOptions | {} | the query options, cf. IStakeQueryOptions |
apolloQueryOptions | IApolloQueryOptions | {} | - |
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