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();
})();
- XCH: xch1063ymlv3saaxkh87h287nc3laelnxss0897xdw6g8zj6yvaa4elslg0xfa
- PP: https://www.paypal.me/felixbrucker
A Changelog can be found here
GNU GPLv3 (see LICENSE)