@xinfin/osx-client-common
v1.2.1
Published
`@aragon/sdk-client-common` provides a set of base classes for creating custom JS clients on top of the built-in one.
Downloads
3
Keywords
Readme
Aragon JS SDK Client common utilities
@aragon/sdk-client-common
provides a set of base classes for creating custom
JS clients on top of the built-in one.
- Extendable JS client with built-in Web3, Subgraph and IPFS
- Extendable context for holding inheritable configuration
Installation
Use npm or yarn to install @aragon/sdk-client-common.
npm install @aragon/sdk-client-common
yarn add @aragon/sdk-client-common
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 "@ethersproject/shims";
import "react-native-url-polyfill/auto";
import { Client } from "@aragon/sdk-client-common";
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 the ClientCore
class:
- Update first all affected enum's, types and interfaces in
src/internal/interfaces.ts
Testing
To execute library tests just run:
yarn test