@xinfin/sdk-client-common
v1.0.0
Published
`@xinfin/sdk-client-common` provides a set of base classes for creating custom JS clients on top of the built-in one.
Downloads
2
Keywords
Readme
Aragon JS SDK Client common utilities
@xinfin/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 @xinfin/sdk-client-common.
npm install @xinfin/sdk-client-common
yarn add @xinfin/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 "@xinfin/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