Skip to main content

Connect

Connect to a Chronik node via chronik-client.

Import ChronikClientNode (soon to become ChronikClient) and provide it the Chronik URL in the constructor:

import { ChronikClientNode } from 'chronik-client';
const chronik = new ChronikClientNode("https://chronik.pay2stay.com/xec");

Try it out!

You can try it out in this React component:

Live Editor
function DemoConnect() {
  return <Json fn={async () => {
    const chronik = new ChronikClientNode("https://chronik.pay2stay.com/xec");
    return await chronik.blockchainInfo();
  }} />;
}
Result
Loading...