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

The default config uses the Govern servers deployed by Aragon.

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>

Returns details about a DAO by his address.

ParamTypeDescription

name

string

The name of the DAO

Example:

import { dao } from '@aragon/govern'

const response = await dao('0x0...')

daos() ⇒ Promise<Dao[]>

Returns all DAOs.

Example:

import { daos } from '@aragon/govern'

const response = await daos()

query(query, args) ⇒ Promise<object>

Returns the desired data.

ParamTypeDescription

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>

Create

ParamTypeDescription

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

Overwrites the default configuration of govern.

ParamTypeDescription

config

Object with all config options

Example:

import { configure } from '@aragon/govern'

configure({ governURL: 'https://myOwnGovernServer.io' })

Last updated