Skip to content

A simple lib to watch jsonrpc based websocket blockchain networks

Notifications You must be signed in to change notification settings

c1r5/rpc-ws-blockchain-watcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A blockchain network lib to watch multiple networks

$ yarn add

Example

import { NetworkWatcher, jsonRpcQuery } from "rpc-ws-blockchain-watcher";

const watcher = new NetworkWatcher();

watcher
  .newTarget({
    network_name: "network-node-name",
    message: new jsonRpcQuery({
      id: 0,
      method: "subscribe",
      jsonrpc: "2.0",
      params: {
        query: "$QUERY_EVENT_FILTER",
      },
    }),
    websocketOptions: {
      url: "wss://$hostname/websocket",
    },
  })
  .watch();

About

A simple lib to watch jsonrpc based websocket blockchain networks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published