Skip to content

foxypool/chia-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.ensureService(constants.makeServiceNames().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)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published