KAI Chain module
Get events using filter
import KardiaClient from 'kardia-js-sdk';
import keccak256 from 'keccak256';
const RPC_ENDPOINT = 'YOUR_RPC_ENDPOINT';
const kardiaClient = new KardiaClient({ endpoint: RPC_ENDPOINT });
const kaiChain = kardiaClient.kaiChain;
const topic = keccak256('Transfer(address,address,uint256)');
const filterId = await kaiChain.newFilter({
fromBlock: 200000,
topics: [topic]
})
// To get all logs
const allLogs = await kaiChain.getFilterLogs(filterId);
// To get logs since last poll
const logs = await kaiChain.getFilterChanges(filterId);
Last updated