@arcblock/token-swap-client
v1.3.6
Published
graphql client to read/write data on token swap service
Downloads
36
Readme
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