Socket
Book a DemoInstallSign in
Socket

@hyperdivision/btc-transaction-tail

Package Overview
Dependencies
Maintainers
5
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyperdivision/btc-transaction-tail

Tails transactions on the Bitcoin blockchain

Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
10
-9.09%
Maintainers
5
Weekly downloads
 
Created
Source

btc-transaction-tail

Tails transactions on the Bitcoin blockchain

npm install @hyperdivision/btc-transaction-tail

Usage

const Tail = require('@hyperdivision/btc-transaction-tail')

const tail = new Tail({
  since: 424244, // tail chain since this seq (inclusive)
  confirmations: 10, // require this many confirmations
  async filter (addr) {
    return isInterestingAddress(addr)
  },
  async transaction (transaction) {
    console.log('found this transaction', transaction)
  },
  async checkpoint (since) {
    // store this since so you can restart from here
  }
})

;(async function () {
  // tail.index is the current block index
  await tail.start() // start tailing, will throw if an error is hit
})().catch(console.error)

FAQs

Package last updated on 31 Jul 2019

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