qlc.js

0.0.7 • Public • Published

qlc.js

QLC Chain JavaScript API

Installation

  1. Install via npm npm i qlc.js

  2. Run go-qlc node (https://github.com/qlcchain/go-qlc/releases)

Usage

import { httpProvider } from 'qlc.js/provider/HTTP'; import Client from 'qlc.js/client'; import { methods } from 'qlc.js/common';

rpcUrl = '127.0.0.1:9735';

private HTTP_RPC = new httpProvider(this.rpcUrl); private c = new Client(this.HTTP_RPC, () => {});

async accountInfo(account): Promise<{ result: any ; error?: any }> { try { return await this.c.request( methods.ledger.accountInfo, account ); } catch (error) { return error; } }

API documentation

https://github.com/qlcchain/go-qlc/wiki/RPC-API

Readme

Keywords

none

Package Sidebar

Install

npm i qlc.js

Weekly Downloads

1

Version

0.0.7

License

MIT

Unpacked Size

120 kB

Total Files

42

Last publish

Collaborators

  • goreng
  • gythialy