Skip to content

Latest commit

 

History

History
374 lines (220 loc) · 10.3 KB

dao.md

File metadata and controls

374 lines (220 loc) · 10.3 KB

@daostack/clientGlobalsDAO

Class: DAO

Hierarchy

  • DAO

Implements

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

+ new DAO(idOrOpts: Address | IDAOStaticState, context: Arc): DAO

Defined in dao.ts:136

Parameters:

Name Type
idOrOpts Address | IDAOStaticState
context Arc

Returns: DAO

Properties

context

context: Arc

Defined in dao.ts:138


id

id: Address

Defined in dao.ts:135


staticState

staticState: IDAOStaticState | undefined

Defined in dao.ts:136

Methods

createProposal

createProposal(options: IProposalCreateOptions): IOperationObservableITransactionUpdateProposal‹›››

Defined in dao.ts:270

create a new proposal in this DAO

Parameters:

Name Type
options IProposalCreateOptions

Returns: IOperationObservableITransactionUpdateProposal‹›››

a Proposal instance


ethBalance

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

fetchStaticState(): Promise‹IDAOStaticState

Defined in dao.ts:151

Returns: Promise‹IDAOStaticState


member

member(address: Address): Member

Defined in dao.ts:255

Parameters:

Name Type
address Address

Returns: Member


members

members(options: IMemberQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹Member[]›

Defined in dao.ts:246

Parameters:

Name Type Default
options IMemberQueryOptions {}
apolloQueryOptions IApolloQueryOptions {}

Returns: Observable‹Member[]›


nativeReputation

nativeReputation(): Observable‹Reputation

Defined in dao.ts:225

Returns: Observable‹Reputation


proposal

proposal(proposalId: string): Proposal

Defined in dao.ts:307

Parameters:

Name Type
proposalId string

Returns: Proposal


proposals

proposals(options: IProposalQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹Proposal[]›

Defined in dao.ts:296

Parameters:

Name Type Default
options IProposalQueryOptions {}
apolloQueryOptions IApolloQueryOptions {}

Returns: Observable‹Proposal[]›


rewards

rewards(options: IRewardQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹Reward[]›

Defined in dao.ts:311

Parameters:

Name Type Default
options IRewardQueryOptions {}
apolloQueryOptions IApolloQueryOptions {}

Returns: Observable‹Reward[]›


scheme

scheme(options: ISchemeQueryOptions): Promise‹Scheme

Defined in dao.ts:238

Parameters:

Name Type
options ISchemeQueryOptions

Returns: Promise‹Scheme


schemes

schemes(options: ISchemeQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹Scheme[]›

Defined in dao.ts:229

Parameters:

Name Type Default
options ISchemeQueryOptions {}
apolloQueryOptions IApolloQueryOptions {}

Returns: Observable‹Scheme[]›


setStaticState

setStaticState(opts: IDAOStaticState): void

Defined in dao.ts:147

Parameters:

Name Type
opts IDAOStaticState

Returns: void


stakes

stakes(options: IStakeQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹Stake[]›

Defined in dao.ts:329

Parameters:

Name Type Default
options IStakeQueryOptions {}
apolloQueryOptions IApolloQueryOptions {}

Returns: Observable‹Stake[]›


state

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

votes(options: IVoteQueryOptions, apolloQueryOptions: IApolloQueryOptions): Observable‹Vote[]›

Defined in dao.ts:320

Parameters:

Name Type Default
options IVoteQueryOptions {}
apolloQueryOptions IApolloQueryOptions {}

Returns: Observable‹Vote[]›


Static search

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

Object literals

Static fragments

fragments: object

Defined in dao.ts:50

DAOFields

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