@bosagora/sdk-client
v1.0.8
Published
`@bosagora/sdk-client` provides easy access to the high level interactions to be made with an Aragon DAO. It consists of three different components:
Downloads
44
Keywords
Readme
Aragon JS SDK Client
@bosagora/sdk-client
provides easy access to the high level interactions to be
made with an Aragon DAO. It consists of three different components:
- General-purpose DAO client
- Custom clients for specific DAO plugins
- Context for holding inheritable configuration
Contributors: See development below
Installation
Use npm or yarn to install @bosagora/sdk-client.
npm install @bosagora/sdk-client
yarn add @bosagora/sdk-client
Usage
The SDK usage is demonstrated in the SDK examples section of the Developer Portal.
React Native
In order for the SDK to be used in restricted environments like react native install the following polyfilesand into your project:
Then import them like the following before you import the Aragon SDK package:
import "@bosagora/shims";
import "react-native-url-polyfill/auto";
import { Client } from "@bosagora/sdk-client";
Development
The building blocks are defined within the src/internal
folder. The high level
client wrappers are implemented in src/client*.ts
Low level networking
See ClientCore
(source):
- Abstract class implementing primitives for:
- Web3, contracts, signing
- IPFS
- GraphQL
- Inherited by classes like
Client
and all plugin classes likeTokenVotingClient
.
Common interfaces, types, enum's
When updating a ClientXXX
(plugin) class:
- Update first all affected enum's, types and interfaces in
src/internal/interfaces/plugins.ts
When updating the Client
class:
- Update first all affected enum's, types and interfaces in
src/internal/interfaces/client.ts
When updating the ClientCore
class:
- Update first all affected enum's, types and interfaces in
src/internal/interfaces/core.ts
Developing a new Plugin client
Create a new class that extends
from ClientCore
, receives a Context
on the
constructor
and follows the structure of TokenVotingClient.
Testing
To execute library tests just run:
yarn test