# bitcoin-invoice-components

> Integrate bip70 invoices into your react app

Latest version **0.24.0** (published 2020-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install bitcoin-invoice-components
pnpm add bitcoin-invoice-components
yarn add bitcoin-invoice-components
bun add bitcoin-invoice-components
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.24.0 |
| Published | 2020-09-19 |
| First published | 2020-04-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 664.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Joey |
| Maintainers | josephroyking |
| Keywords | badger, bitcoin cash, web payments, react component, BCH, badger button, bch payment |

## Links

- npm: https://www.npmjs.com/package/bitcoin-invoice-components
- Repository: https://github.com/bitcoin-com/badger-components-react
- Homepage: https://github.com/bitcoin-com/bitcoin-invoice-components#readme
- Issues: https://github.com/bitcoin-com/bitcoin-invoice-components/issues
- npm.io page: https://npm.io/package/bitcoin-invoice-components

## Dependencies (8)

- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [react-image](https://npm.io/package/react-image.md) ^4.0.3
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^9.0.0
- [qrcode.react](https://npm.io/package/qrcode.react.md) ^1.0.0
- [bitcoincom-link](https://npm.io/package/bitcoincom-link.md) ^0.1.10
- [lottie-react-web](https://npm.io/package/lottie-react-web.md) ^2.1.4
- [react-copy-to-clipboard](https://npm.io/package/react-copy-to-clipboard.md) ^5.0.2
- [react-circular-progressbar](https://npm.io/package/react-circular-progressbar.md) ^2.0.3

## Recent versions

- 0.24.0 (latest) — 2020-09-19
- 0.23.0-beta (beta) — 2020-08-18
- 0.23.0-alpha (alpha) — 2020-08-18
- 0.22.0-debug-alpha (debug-alpha) — 2020-07-30
- 0.22.0-debug (debug) — 2020-07-30
- 0.21.0-beta3 (beta3) — 2020-07-08
- 0.21.0-beta2 (beta2) — 2020-07-08
- 0.20.0-beta-15min (beta-15min) — 2020-07-07
- 0.20.0-link06 (link06) — 2020-06-23
- 0.20.0-link05 (link05) — 2020-06-23
- 0.20.0-link04 (link04) — 2020-06-18
- 0.20.0-link03 (link03) — 2020-06-18
- 0.20.0-link02 (link02) — 2020-06-18
- 0.20.0-link01 (link01) — 2020-06-18
- 0.23.0 — 2020-08-18
- … 15 more at https://npm.io/package/bitcoin-invoice-components/versions

## README

# Build on Bitcoin Cash (BCH)

 > React component for BIP70 invoices on BCH. BCH and SLP invoices are supported.

This repo is a fork of [badger-components-react](https://www.npmjs.com/package/badger-components-react), and only preserves functionality for BIP70 invoice components. For general components, see [badger-components-react](https://www.npmjs.com/package/badger-components-react).


### Install

```bash
$ npm install --save badger-components-react
```

### Install Peer Dependencies

This library depends on the following three peer dependencies

* `styled-components` ^4.0.0
* `react` ^16.3.0
* `react-dom` ^16.3.0

```bash
$ npm install --save styled-components react react-dom
```

### Add to React Project

```js
import React from 'react'
import { Invoice } from 'bitcoin-invoice-components'

const Example = (props) => {

  // URL structure of your bip70 invoice
  const bip70base = 'https://pay.bitcoin.com/i/'

  // Payment ID of your bip70 invoice
  const paymentId = 'EGKe7SA1TmttK2E3fakdg8'


  return (
    <>
      {/* Minimal Example */}
      <Invoice
        sizeQR={250}
        copyUri
        paymentRequestUrl={`${bip70base}${paymentId}`}
        successFn={() => console.log('success example function called')}
				failFn={() => console.log('fail example function called')}
      />
    </>
  )
};

export default Example
```

---
_Source: https://npm.io/package/bitcoin-invoice-components · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
