chia-api

4.0.0 • Public • Published

Chia-Api

Software License npm Discord

Usage example

const { readFileSync } = require('fs');
const { Connection, constants, ApiClient } = require('chia-api');

(async () => {
  const conn = new Connection('localhost:55400', {
    cert: readFileSync('private_daemon.crt'),
    key: readFileSync('private_daemon.key'),
  });
  conn.onMessage((message) => {
    console.log(message);
  });
  conn.addService(constants.SERVICE().walletUi);
  const fullNode = new ApiClient.FullNode({ connection: conn, origin: 'my-cool-service' });
  await fullNode.init();
  const blockchainState = await fullNode.getBlockchainState();
})();

Donate

Changelog

A Changelog can be found here

License

GNU GPLv3 (see LICENSE)

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i chia-api

    Weekly Downloads

    8

    Version

    4.0.0

    License

    GPL-3.0

    Unpacked Size

    65 kB

    Total Files

    17

    Last publish

    Collaborators

    • felixbrucker