0.24.0 • Published 5 years ago

bitcoin-invoice-components v0.24.0

Weekly downloads
4
License
MIT
Repository
github
Last release
5 years ago

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, and only preserves functionality for BIP70 invoice components. For general components, see badger-components-react.

Install

$ 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
$ npm install --save styled-components react react-dom

Add to React Project

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
0.24.0

5 years ago

0.23.0

5 years ago

0.23.0-beta

5 years ago

0.23.0-alpha

5 years ago

0.22.0-debug

5 years ago

0.21.0-beta3

5 years ago

0.21.0-beta2

5 years ago

0.22.0

5 years ago

0.21.0

5 years ago

0.20.0-link06

5 years ago

0.20.0-link05

5 years ago

0.20.0-link04

5 years ago

0.20.0-link03

5 years ago

0.20.0-link02

5 years ago

0.20.0-link01

5 years ago

0.20.0

5 years ago

0.18.0-currency

5 years ago

0.20.0-beta

5 years ago

0.21.0-beta

5 years ago

0.19.0-beta

5 years ago

0.17.0

5 years ago

0.18.0

5 years ago

0.15.0

5 years ago

0.16.0

5 years ago

0.14.0

5 years ago

0.13.0

5 years ago

0.12.0

5 years ago

0.11.0

5 years ago