@daostack/client › Globals › Stake
- Stake
+ new Stake(idOrOpts
: string | IStakeStaticState, context
: Arc): Stake
Defined in stake.ts:149
Parameters:
Name | Type |
---|---|
idOrOpts |
string | IStakeStaticState |
context |
Arc |
Returns: Stake
• context: Arc
Defined in stake.ts:153
• id: string | undefined
Defined in stake.ts:148
• staticState: IStakeStaticState | undefined
Defined in stake.ts:149
▸ fetchStaticState(): Promise‹IStakeStaticState›
Defined in stake.ts:207
Returns: Promise‹IStakeStaticState›
▸ setStaticState(opts
: IStakeStaticState): void
Defined in stake.ts:203
Parameters:
Name | Type |
---|---|
opts |
IStakeStaticState |
Returns: void
▸ state(apolloQueryOptions
: IApolloQueryOptions): Observable‹IStakeState›
Defined in stake.ts:163
Parameters:
Name | Type | Default |
---|---|---|
apolloQueryOptions |
IApolloQueryOptions | {} |
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:
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
Defined in stake.ts:35
• StakeFields: any = gqlfragment StakeFields on ProposalStake { id createdAt dao { id } staker proposal { id } outcome amount }
Defined in stake.ts:36