Govern.js API
WARNING
Aragon Govern is beta software which is NOT MAINTAINED anymore. It's a really cool product though with innovative and nifty smart contracts. So although you might run into an error 🐲 here and there, the documentation is definitely worth the read and the play!
And welcome to connect with us through Discord or our technical forum!
Usage with default config
import { dao } from '@aragon/govern'
const response = await dao('0x0...')
console.log(response)
Usage with custom config
import { dao, configure } from '@aragon/govern'
configure({ governURL: 'https://myOwnGovernServer.io' })
const response = await dao('0x0...')
console.log(response)
dao(name) ⇒ Promise<Dao>
Promise<Dao>
Returns details about a DAO by his address.
name
string
The name of the DAO
Example:
import { dao } from '@aragon/govern'
const response = await dao('0x0...')
daos() ⇒ Promise<Dao[]>
Promise<Dao[]>
Returns all DAOs.
Example:
import { daos } from '@aragon/govern'
const response = await daos()
query(query, args) ⇒ Promise<object>
Promise<object>
Returns the desired data.
query
string
GraphQL query
args
object
Object with parameters
Example:
import { query } from '@aragon/govern'
const query = await query(myQuery, {...});
createDao(args, options) ⇒ Promise<TransactionResponse>
Promise<TransactionResponse>
Create
args
CreateDaoParams
Dao name, Dao token, useProxies option
options
CreateDaoOptions
EIP 1193 provider, Dao factory address
Examples:
For Node.js:
import { createDao } from '@aragon/govern'
const result = await createDao(args, options)
configure(config) ⇒ void
void
Overwrites the default configuration of govern.
Example:
import { configure } from '@aragon/govern'
configure({ governURL: 'https://myOwnGovernServer.io' })
Last updated
Was this helpful?