Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bap-junglebus

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bap-junglebus

BAP indexer to MongoDB using JungleBus

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

bap-junglebus

BAP transaction indexer for JungleBus

BAP-junglebus is a JungleBus compatible Bitcoin Attestation Protocol indexer. It scans all BAP transactions and processes them into a global BAP state using GorillaPool's JungleBus.

global installation

npm install -g bap-junglebus

Set the environment variables. You must at least set a JungleBus subscription.

export BAP_SUBSCRIPTION_ID=""

And optionally overwrite the defaults for the database:

export BAP_MONGO_URL="mongodb://localhost:27017/bap"

Indexing BAP blocks can now be done by running

bap-junglebus

The arguments to the bap-junglebus cli are:

argDescription
-s <subscription id>JungleBus subscription ID

local installation

git clone https://github.com/icellan/bap-junglebus.git

BAP-junglebus can run either with settings from a config file (config.json) or from environment variables.

config.json

{
  "subscriptionId": "...",
  "mongoUrl": "mongodb://..."
}

environment

export BAP_SUBSCRIPTION_ID="..."
export BAP_MONGO_URL="mongo://..."

run

To run the indexer:

./start.sh

testing

yarn test

or

yarn testwatch

Including in your own package or site

npm install bap-junglebus
or
yarn add bap-junglebus

Make sure you set the environment variables before running any scripts:

export BAP_SUBSCRIPTION_ID = '<junglebus subscription id>';
export BAP_MONGO_URL = 'mongodb://localhost:27017/bap';

Index all BAP transactions (also from mempool):

import { watchBAPTransactions } from 'bap-junglebus/src/bap';

(async function() {
  await watchBAPTransactions();
})();

Babel

Make sure babel is set up properly or that es6 is supported by your own package.

Keywords

FAQs

Package last updated on 24 Oct 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc