binance-subgraph-client
[![CircleCI](https://circleci.com/gh/proxima-one/proxima-client-js.svg?style=svg)](https://circleci.com/gh/proxima-one/proxima-client-js) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/facebook/react/blob/master/
Last updated 9 months ago by chasesmith .
ISC · Original npm · Tarball · package.json
$ cnpm install binance-subgraph-client 
SYNC missed versions from official npm registry.

Binance Client JS

CircleCI GitHub license

The Binance client enables access to Proxima index nodes, and provides the tooling to submit and verify queries to the query nodes

npm install binance-subgraph-client

Usage

const Binance = require('binance-subgraph-client')
const binanceSubgraph = Binance.createBinanceSubgraph(subgraph_uri, binance_chain_api_uri)

Using as a query client

const FEES = gql`
  query fees($prove: Boolean) {
    fees(prove: $prove) {
      fees {
        msg_type
        fee
        fee_for
        multi_transfer_fee
        lower_limit_as_multi
      }
      proof {
        root
        proof
      }

    }
  }
`;

function Fees() {
  const {loading, error, data} = useQuery(FEES);
  if (loading) return 'Loading...';
  if (error) return `Error!`;
      return (
        <div>
        {data.fees.fees.map(fee => (
          <p>
            msg_type {fee.msg_type}
          </p>
        ))}
        </div>
      );
}

<ApolloProvider client={binanceSubgraph.client}>
  <Fees/>
</ApolloProvider>,
);

Proving data

const {loading, error, data} = useQuery(FEES);
if (loading) return 'Loading...';
if (error) return `Error!`;
{value, proof, type} = Binance.
binanceSubgraph.audit(value)

Auditing data

const {loading, error, data} = useQuery(FEES);
if (loading) return 'Loading...';
if (error) return `Error!`;
binanceSubgraph.verify(value, proof)
{value, proof, type} = Binance.

Licensing

This project is licensed under MIT licensing guidelines. GitHub license

Current Tags

  • 0.0.4                                ...           latest (8 months ago)

4 Versions

  • 0.0.4                                ...           8 months ago
  • 0.0.3                                ...           9 months ago
  • 0.0.2                                ...           9 months ago
  • 0.0.1                                ...           9 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (33)
Dev Dependencies (13)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |