Socket
Socket
Sign inDemoInstall

@stellarbeat/js-stellar-node-crawler

Package Overview
Dependencies
49
Maintainers
1
Versions
103
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @stellarbeat/js-stellar-node-crawler

Crawl the network for nodes


Version published
Weekly downloads
53
decreased by-24.29%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

code style: prettier test

stellar-js-node-crawler

Crawl the Stellar Network. Identify the nodes and determine their validating status, version, lag,....

How does it work?

See readme in src/README.md for an overview of the functionality and architecture.

install

yarn install

build code

yarn run build: builds code in lib folder

Usage

Create crawler

let myCrawler = createCrawler({
    nodeConfig: getConfigFromEnv(),
    maxOpenConnections: 25,
    maxCrawlTime: 900000
});

The crawler is itself a node and needs to be configured accordingly. You can limit the number of simultaneous open connections to not overwhelm your server and set the maxCrawlTime as a safety if the crawler should be stuck.

Run crawl

let result = await myCrawler.crawl(
			nodes, // [[ip, port], [ip, port]]
			trustedQSet, //a quorumSet the crawler uses the determine the latest closed ledger
		    latestKnownLedger //a previous detected ledger the crawler can use to ignore older externalize messages	
		);

example script

Check out examples/crawl.js for an example on how to crawl the network. You can try it out using the bundled seed file with the following command:
yarn run examples:crawl seed/nodes.json

Another example is the Stellarbeat backend

publish new release

Uses the np package and semantic versioning.

np

FAQs

Last updated on 17 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc