Usage
import ChainwebStreamClient from '@kadena/chainweb-stream-client';
const client = new ChainwebStreamClient({
network: 'mainnet01',
type: 'event',
id: 'coin',
host: 'http://localhost:4000/',
});
client.on('confirmed', (txn) => console.log('confirmed', txn));
client.connect();
import ChainwebStreamClient from '@kadena/chainweb-stream-client';
const client = new ChainwebStreamClient({
network: 'mainnet01',
type: 'event',
id: 'coin',
host: 'http://localhost:4000/',
});
client.on('confirmed', (txn) => console.log('confirmed', txn));
client.connect();
Find more detailed examples under src/examples
.