@xinfin/sdk-client-common
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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 like TokenVotingClient.

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

Readme

Keywords

none

Package Sidebar

Install

npm i @xinfin/sdk-client-common

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

372 kB

Total Files

25

Last publish

Collaborators

  • behnammk
  • anilchinchawale
  • rudreshsolanki97