Wrapper

aragonAPI for Aragon client implementations

Install

npm install --save @aragon/wrapper

Import

ES6

import AragonWrapper, { providers } from '@aragon/wrapper'

ES5 (CommonJS)

const AragonWrapper = require('@aragon/wrapper').default
const providers = require('@aragon/wrapper').providers

API Reference

AragonWrapper

Parameters

Examples

init

Initialise the wrapper.

Parameters

Returns Promisearrow-up-right<void>

Throws Errorarrow-up-right if the daoAddress provided during constructor is detected to not be a Kernelarrow-up-right instance

initAccounts

Initialise user-controlled accounts.

Parameters

Returns Promisearrow-up-right<void>

initAcl

Initialise the ACL.

Parameters

Returns Promisearrow-up-right<void>

getProxyValues

Get proxy metadata (appId, address of the kernel, ...).

Parameters

Returns Promisearrow-up-right<Objectarrow-up-right>

isApp

Check if an object is an app.

Parameters

Returns booleanarrow-up-right

initApps

Initialise apps observable.

Returns void

initForwarders

Initialise forwarder observable.

Returns void

initNetwork

Initialise connected network details observable.

Returns Promisearrow-up-right<void>

runApp

Run an app.

Parameters

Returns Objectarrow-up-right

getAccounts

Get the available accounts for the current user.

Returns Promisearrow-up-right<Arrayarrow-up-right<stringarrow-up-right>> An array of addresses

getTransactionPath

Calculate the transaction path for a transaction to destination that invokes methodName with params.

Parameters

Returns Arrayarrow-up-right<Objectarrow-up-right> An array of Ethereum transactions that describe each step in the path

calculateTransactionPath

Calculate the transaction path for a transaction to destination that invokes methodName with params.

Parameters

Returns Arrayarrow-up-right<Objectarrow-up-right> An array of Ethereum transactions that describe each step in the path

modifyAddressIdentity

Modify the identity metadata for an address using the highest priority provider.

Parameters

Returns a Promisearrow-up-right<void> that resolves if the modification was successful.

resolveAddressIdentity

Resolve the identity metadata for an address using the highest priority provider.

Parameters

Returns a Promisearrow-up-right<Objectarrow-up-right> that resolves with the identity or null if not found.

requestAddressIdentityModification

Request an identity modification using the highest priority provider.

Parameters

Returns a Promisearrow-up-right<void> that delegates resolution to the handler.

removeLocalIdentities

Remove specific local identities.

Parameters

searchIdentities

Search identites using the highest priority provider.

Parameters

Returns a Promisearrow-up-right<Arrayarrow-up-right<stringarrow-up-right>> which resolves with the found identities or an empty array.

setGuiStyle

Set the current GUI style of the client to the apps.

Parameters

  • appearance stringarrow-up-right Either light or dark. Other values could be passed in the future (e.g. black for OLED screens). Apps should display a corresponding theme, unless theme has also been set.

  • theme Objectarrow-up-right An entire theme (e.g. aragonUI's light themearrow-up-right) that should be displayed by app frontends. It is optional and apps should respect it when present. If not possible, apps should respect the value of appearance.

Returns void.

Last updated

Was this helpful?