/cannabis-api

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

cannabis-Api

Software License npm

Usage example

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

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

Donate

Forked From Felixbruckers Hard Work I CopyPasta Modded This All Hard Work Still Done By Felix His Address Are Below:

Changelog

A Changelog can be found here

License

GNU GPLv3 (see LICENSE)