Wrapper
npm install --save @aragon/wrapper
import AragonWrapper, { providers } from '@aragon/wrapper'
const AragonWrapper = require('@aragon/wrapper').default
const providers = require('@aragon/wrapper').providers
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.ipfs.fetchTimeout
Number The timeout before a request to IPFS is automatically failed in milliseconds (optional, default 10s)options.cache.forceLocalStorage
boolean On browser environments, downgrade to localStorage even if IndexedDB is available (optional)
const aragon = new Aragon(
'0xdeadbeef',
{ apm: { ensRegistryAddress: '0x...' } }
)
// Initialises the wrapper
await aragon.init({
accounts: {
providedAccounts: ['0xbeefdead', '0xbeefbeef'],
},
})
Initialise the wrapper.
Parameters
Initialise user-controlled accounts.
Parameters
Initialise the ACL.
Parameters
Get proxy metadata (
appId
, address of the kernel, ...).Parameters
Check if an object is an app.
Parameters
Initialise apps observable.
Returns void
Initialise forwarder observable.
Returns void
Initialise connected network details observable.
Run an app.
Parameters
Get the available accounts for the current user.
Calculate the transaction path for a transaction to
destination
that invokes methodName
with params
.Parameters
Calculate the transaction path for a transaction to
destination
that invokes methodName
with params
.Parameters
Modify the identity metadata for an address using the highest priority provider.
Parameters
Resolve the identity metadata for an address using the highest priority provider.
Parameters
Request an identity modification using the highest priority provider.
Parameters
Remove specific local identities.
Parameters
Search identites using the highest priority provider.
Parameters
Set the current GUI style of the client to the apps.
Parameters
appearance
string Eitherlight
ordark
. Other values could be passed in the future (e.g.black
for OLED screens). Apps should display a corresponding theme, unlesstheme
has also been set.theme
Object An entire theme (e.g. aragonUI's light theme) 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 ofappearance
.
Returns void.
Do you have a question? Leave your comments here at our Discourse forum 👇
Last modified 6mo ago