@arcblock/token-swap-client

1.3.6 • Public • Published

token-swap-client

styled with prettier docs Gitter

Client library to connect token-swap webapps with token-swap-service

Table of Contents

Install

npm i @arcblock/token-swap-client -S
# OR
yarn add @arcblock/token-swap-client

Usage

const TokenSwapClient = require('@arcblock/token-swap-client');

const client = new TokenSwapClient('http://localhost:8210/api');
console.log({
  queries: client.getQueries(),
  subscriptions: client.getSubscriptions(),
  mutations: client.getMutations(),
});

client.listDeposits().then(console.log);

Debugging

  • If you are in Node.js: DEBUG=@arcblock/token-swap-client node script.js
  • If you are in Browser: localStorage.setItem('DEBUG', '@arcblock/token-swap-client')

Documentation

Query arguments and response structure can be found: QUERIES.md

Package Sidebar

Install

npm i @arcblock/token-swap-client

Weekly Downloads

7

Version

1.3.6

License

Apache-2.0

Unpacked Size

1.79 MB

Total Files

32

Last publish

Collaborators

  • wangshijun
  • polunzh
  • mave99a
  • gxw