npm install --save @aragon/wrapper
import AragonWrapper, { providers } from '@aragon/wrapper'
const AragonWrapper = require('@aragon/wrapper').default
const providers = require('@aragon/wrapper').providers
daoAddress
string The address of the DAO.options
Object Wrapper options. (optional, default{}
)options.provider
any The Web3 provider to use for blockchain communication. Defaults toweb3.currentProvider
if web3 is injected, otherwise will fallback to wss://rinkeby.eth.aragon.network/ws (optional)options.apm
Object Primarily used to set an alternative ipfs provider (optional, default{}
)options.apm.ensRegistryAddress
String The address of the ENS registry (optional, defaultnull
)
const aragon = new Aragon('0xdeadbeef')
// Initialises the wrapper
await aragon.init({
accounts: {
providedAccounts: ["0xbeefdead", "0xbeefbeef"]
}
})
Initialise the wrapper.
options
Object An optional options object for configuring the wrapper.accounts
Array<string> Options object forinitAccounts()
Returns Promise<void>
Throws Error if the daoAddress
provided during constructor is detected to not be a Kernel
instance
Initialise user-controlled accounts.
options
Object
Returns Promise<void>
Initialise the ACL.
options
Object
Returns Promise<void>
Get proxy metadata (appId
, address of the kernel, ...).
proxyAddress
string The address of the proxy to get metadata from
Check if an object is an app.
app
Object
Returns boolean
Initialise apps observable.
Returns void
Initialise forwarder observable.
Returns void
Initialise connected network details observable.
Returns Promise<void>
Run an app.
sandbox
Object An object that is compatible with the PostMessage API.proxyAddress
string The address of the app proxy.
Returns Object
Get the available accounts for the current user.
Returns Promise<Array<string>> An array of addresses
Calculate the transaction path for a transaction to destination
that invokes methodName
with params
.
Returns Array<Object> An array of Ethereum transactions that describe each step in the path
Calculate the transaction path for a transaction to destination
that invokes methodName
with params
.
Returns Array<Object> An array of Ethereum transactions that describe each step in the path