@daostack/client › Globals › DAO
- DAO
- createProposal
- ethBalance
- fetchStaticState
- member
- members
- nativeReputation
- proposal
- proposals
- rewards
- scheme
- schemes
- setStaticState
- stakes
- state
- votes
- search
+ new DAO(idOrOpts
: Address | IDAOStaticState, context
: Arc): DAO
Defined in dao.ts:136
Parameters:
Name | Type |
---|---|
idOrOpts |
Address | IDAOStaticState |
context |
Arc |
Returns: DAO
• context: Arc
Defined in dao.ts:138
• id: Address
Defined in dao.ts:135
• staticState: IDAOStaticState | undefined
Defined in dao.ts:136
▸ createProposal(options
: IProposalCreateOptions): IOperationObservable‹ITransactionUpdate‹Proposal‹›››
Defined in dao.ts:270
create a new proposal in this DAO
Parameters:
Name | Type |
---|---|
options |
IProposalCreateOptions |
Returns: IOperationObservable‹ITransactionUpdate‹Proposal‹›››
a Proposal instance
▸ ethBalance(): Observable‹BN›
Defined in dao.ts:343
get (an observable of) the Ether balance of the DAO from the web3Provider
Returns: Observable‹BN›
an observable stream of BN number instances
▸ fetchStaticState(): Promise‹IDAOStaticState›
Defined in dao.ts:151
Returns: Promise‹IDAOStaticState›
▸ member(address
: Address): Member
Defined in dao.ts:255
Parameters:
Name | Type |
---|---|
address |
Address |
Returns: Member
▸ members(options
: IMemberQueryOptions, apolloQueryOptions
: IApolloQueryOptions): Observable‹Member[]›
Defined in dao.ts:246
Parameters:
Name | Type | Default |
---|---|---|
options |
IMemberQueryOptions | {} |
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹Member[]›
▸ nativeReputation(): Observable‹Reputation›
Defined in dao.ts:225
Returns: Observable‹Reputation›
▸ proposal(proposalId
: string): Proposal
Defined in dao.ts:307
Parameters:
Name | Type |
---|---|
proposalId |
string |
Returns: Proposal
▸ proposals(options
: IProposalQueryOptions, apolloQueryOptions
: IApolloQueryOptions): Observable‹Proposal[]›
Defined in dao.ts:296
Parameters:
Name | Type | Default |
---|---|---|
options |
IProposalQueryOptions | {} |
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹Proposal[]›
▸ rewards(options
: IRewardQueryOptions, apolloQueryOptions
: IApolloQueryOptions): Observable‹Reward[]›
Defined in dao.ts:311
Parameters:
Name | Type | Default |
---|---|---|
options |
IRewardQueryOptions | {} |
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹Reward[]›
▸ scheme(options
: ISchemeQueryOptions): Promise‹Scheme›
Defined in dao.ts:238
Parameters:
Name | Type |
---|---|
options |
ISchemeQueryOptions |
Returns: Promise‹Scheme›
▸ schemes(options
: ISchemeQueryOptions, apolloQueryOptions
: IApolloQueryOptions): Observable‹Scheme[]›
Defined in dao.ts:229
Parameters:
Name | Type | Default |
---|---|---|
options |
ISchemeQueryOptions | {} |
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹Scheme[]›
▸ setStaticState(opts
: IDAOStaticState): void
Defined in dao.ts:147
Parameters:
Name | Type |
---|---|
opts |
IDAOStaticState |
Returns: void
▸ stakes(options
: IStakeQueryOptions, apolloQueryOptions
: IApolloQueryOptions): Observable‹Stake[]›
Defined in dao.ts:329
Parameters:
Name | Type | Default |
---|---|---|
options |
IStakeQueryOptions | {} |
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹Stake[]›
▸ state(apolloQueryOptions
: IApolloQueryOptions): Observable‹IDAOState›
Defined in dao.ts:175
get the current state of the DAO
Parameters:
Name | Type | Default |
---|---|---|
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹IDAOState›
an Observable of IDAOState
▸ votes(options
: IVoteQueryOptions, apolloQueryOptions
: IApolloQueryOptions): Observable‹Vote[]›
Defined in dao.ts:320
Parameters:
Name | Type | Default |
---|---|---|
options |
IVoteQueryOptions | {} |
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹Vote[]›
▸ search(context
: Arc, options
: IDAOQueryOptions, apolloQueryOptions
: IApolloQueryOptions): Observable‹DAO[]›
Defined in dao.ts:71
DAO.search(context, options) searches for DAO entities
Parameters:
Name | Type | Default | Description |
---|---|---|---|
context |
Arc | - | an Arc instance that provides connection information |
options |
IDAOQueryOptions | {} | the query options, cf. IDAOQueryOptions |
apolloQueryOptions |
IApolloQueryOptions | {} | - |
Returns: Observable‹DAO[]›
an observable of DAO objects
Defined in dao.ts:50
• DAOFields: any = gql fragment DAOFields on DAO { id name nativeReputation { id, totalSupply } nativeToken { id, name, symbol, totalSupply } numberOfQueuedProposals numberOfPreBoostedProposals numberOfBoostedProposals register reputationHoldersCount }
Defined in dao.ts:51