connect()
This file documents the main exports of the library.
connect(location, connector, options)
Connects and returns an Organization
for location
.
location
String
The Ethereum address or ENS domain of an Aragon organization.
connector
Connector
or [String, Object]
or String
Accepts a Connector
instance, and either a string or a tuple for embedded connectors and their config.
options
Object
The optional configuration object.
options.ipfs
The IPFS gateway and cached results. Defaults to 'https://ipfs.eth.aragon.network/ipfs/{cid}{path}'
and 40
respectively.
returns
Promise<Organization>
An Organization
instance.
This function can throw the following errors:
An unsupported or invalid connector was provided.
The Ethereum provider doesn’t seem to be valid.
The provided location doesn’t seem to be valid.
The network is incorrect or unsupported.
Example
Last updated