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

react-watchbchaddress

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-watchbchaddress

notification component for watching transactions to a specified address

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-watchbchaddress

React component for watching transactions to a specified address

watchbchaddress

Installation

grab from NPM

npm i react-watchbchaddress

Usage

You can set the address to watch and the message. One case can be when a user deposits bch to their account on your web app.

  import WatchAddress from 'react-watchbchaddress';

  <WatchAddress
    address="bitcoincash:qrv8w60f40yjhqzfswyc39n78anxjhcx75ppt2df5c"
    text="You have deposited"
    callbackPath="api/test"
  />

the callback will POST the transaction object to the endpoint specified. An example body would look like

[ {
    tx:
     {
      h: '1237cc09307fc8b4073942884c1f7047f23676497834c4846c25a14cd2fe986'
     },
    in: [ [Object] ],
    out: [ [Object], [Object] ],
    _id: '12d3b329223c3f002edcc881'
  }
]

The value will display as satoshis if the value is "low". Otherwise, it will display as BCH.

satoshis

Development

git clone https://github.com/paOol/react-watchbchaddress
cd react-watchbchaddress
npm i
npm run start

then browse to http://localhost:3001

Notes

It's possible to watch several addresses by passing in an array, but that is not the purpose of this component.

You can contribute if you'd like. Having more customizable props such as the position of the notification, styling, etc would make this component much more useful.

Keywords

FAQs

Package last updated on 27 Oct 2018

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