Simple Summary

Aragon is seeing a level of experimentation that the Aragon Client has not been able to fully address. Developers want to create their own front-end interfaces, access to the organization data (permissions, apps), and handlers for organizations' logic (transaction path, radspec, evmscripts). This document aims to explain the motivations for these use cases, and the design of a node SDK to address the existing limitations. On top of the node SDK we will create a React hooks API that will feel natural to use when building frontend applications.

Proposed Solution

Having a generic low-level library that has the core components to interact with Aragon organizations and is compatible with all environments (Node.js, browser, React). The library will connect to a data source via a connector and use an optional signer to write to the blockchain. The library will handle any required data transformations from the connector to provide a clear and user-friendly API. We will support a few connectors by default (Ethereum, The Graph, raw JSON) and it will be possible to implement your own custom connector by conforming to the connector interface (e.g. connect to your database).

The main data type of the library will be the Organization that will hold all the data about an organization (Apps, Permissions, Roles). It will provide a few handlers to fetch the data or subscribe to the changes. Finally to improve the experience of interacting with organizations, a few core utilities will be available—the first of which will be transaction path resolution for intents.

Architecture

Data

Aragon organizations consist of their on-chain and off-chain data. The on-chain data is what we will focus most of our efforts on in the first iteration of the new tooling. We are looking to initially stay agnostic about the off-chain information on purpose, to allow for experimentation to lead our designs and give the developer more freedom.

We will communicate with the blockchain using a connector to read data. Having the data we will give a friendly API to:

  1. Fetch the organization information (apps, permissions)
  2. Generate a transaction request object that could be formated toWeb3(), toEthers() or toRpc()

The connector could be a subgraph on The Graph, an Ethereum provider, or a custom connector (e.g. PostgreSQL database).

Logic

There are functionalities like transaction pathing, encoders, or radspec that are important to expose to the end developers but are hidden away or difficult to re-use from the core libraries. Having access to these important pieces of organization logic is crucial to gain more flexibility and build the full experience of interacting with an Aragon organization.

User Interface

Up to now, the development stack has been heavily oriented to developers building Aragon apps in the constraints of the Aragon Client. This was a clear limitation for developers looking to create their own user-facing front-ends for their organizations, where they have a much better context about the particular interactions and information they'd like to expose. With the new React API, we look to break those limitations and give more flexibility via a Hooks interface that should feel at home for modern React developers.

Designs

On-chain Architecture of Organizations

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/54a0690d-8d2e-4d75-881c-618bb2c97f91/Screen_Shot_2020-05-01_at_7.38.19_PM.png