A js client for use with hnsd's DNS API. Depends on handshake-org/hnsd#102.
Add package with
npm install https://github.com/rithvikvibhu/hnsd-client
Then use it like:
const { HnsdClient } = require('hnsd-client');
// Create a client instance
const client = new HnsdClient({
host: '127.0.0.1',
port: 5349,
});
await client.open();
// Query for info
const chain = await client.getChain(); // {tip: {...}, synced, progress}
const peers = await client.getPeers(); // [{host, agent}, ...]