Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit 78780ea

Browse files
authored
Merge pull request #181 from Bitcoin-com/stage
3.3.0
2 parents e8d324b + c9519eb commit 78780ea

6 files changed

Lines changed: 18 additions & 14 deletions

File tree

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,15 @@ Paid downloads, streaming media, in-app purchases, tokens and more ways for you
2020

2121
## Install / develop
2222

23-
Make sure that you have the Gatsby CLI program installed:
24-
2523
```sh
26-
npm install
27-
npm start
24+
yarn install
25+
yarn start
2826
```
2927

3028
## Build / deploy
3129

3230
```sh
33-
npm run build
31+
yarn run build
3432
> deploy `/public` folder somewhere.
3533
```
3634

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "developer.bitcoin.com",
33
"description": "Bitcoin.com developer resources and documentation",
4-
"version": "3.2.7",
4+
"version": "3.3.0",
55
"author": "Peter <peter@bitcoin.com> and Gabriel Cardona <gabriel@bitcoin.com>",
66
"dependencies": {
77
"badger-components-react": "^0.1.3",

src/data/docs/badger/badger-components-react.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,13 @@ Simple Badger Button to display the price in local currency, satoshi amount, and
3636
- `currency: string` - Default `USD` - [ISO Country Code](https://en.wikipedia.org/wiki/ISO_4217) to charge in
3737
- `showSatoshis: boolean` Default `true` - Show the value in BCH Satoshis below the button
3838
- `border: boolean` - Default `true` - Border around button and text
39+
- `opReturn: string[]` - Optional - OP_RETURN message
3940
- `text: string` - Optional - Text between the button and border
4041
- `successFn: Function` - Optional -Callback function when payment is successful
4142
- `failFn: Function` - Optional - Callback function when payment fails or is cancelled
4243

4344
<spacer></spacer>
44-
<badger-button to="bitcoincash:pp8skudq3x5hzw8ew7vzsw8tn4k8wxsqsv0lt0mf3g" price="0.01" currency="CAD" text="Badger Button"></badger-button>
45+
<badger-button to="bitcoincash:pp8skudq3x5hzw8ew7vzsw8tn4k8wxsqsv0lt0mf3g" price="0.001" currency="CAD" text="Badger Button"></badger-button>
4546

4647
#### Badger Badge
4748

@@ -56,11 +57,12 @@ Supports the following props.
5657
- `border: boolean` - Default `true` - Border around button and text
5758
- `text: string` - Default `Payment Total` - Text between the button and border
5859
- `tag: string` - Default `Badger Pay` - Text on the button
60+
- `opReturn: string[]` - Optional - OP_RETURN message
5961
- `successFn: Function` - Optional - Callback function when payment is successful
6062
- `failFn: Function` - Optional - Callback function when payment fails or is cancelled
6163

6264
<spacer></spacer>
63-
<badger-badge to="bitcoincash:pp8skudq3x5hzw8ew7vzsw8tn4k8wxsqsv0lt0mf3g" price="0.01" currency="CAD" text="Badger Badger"></badger-button>
65+
<badger-badge to="bitcoincash:pp8skudq3x5hzw8ew7vzsw8tn4k8wxsqsv0lt0mf3g" price="0.001" currency="USD" text="Badger Badger"></badger-button>
6466

6567
#### Code Examples
6668

@@ -83,6 +85,7 @@ const Example = props => {
8385
price={0.01} // Price in currency
8486
currency={'CAD'} // Currency to convert from
8587
to={'bitcoincash:pp8skudq3x5hzw8ew7vzsw8tn4k8wxsqsv0lt0mf3g'} // Payment address
88+
opReturn={['0x6d02', 'Hello BadgerBadge!']}
8689
tag={'Badger Pay'} // Text on button
8790
text={'Payment Total'} // Text at top of badge
8891
showBrand={true} // Show link to badger website
@@ -95,6 +98,7 @@ const Example = props => {
9598
price={0.003}
9699
currency={'USD'}
97100
to={'bitcoincash:pp8skudq3x5hzw8ew7vzsw8tn4k8wxsqsv0lt0mf3g'}
101+
opReturn={['0x6d02', 'Donated with Badger']}
98102
text={'Badger Pay'}
99103
showSatoshis={true}
100104
border={true}
@@ -110,13 +114,14 @@ export default Example
110114

111115
### Creating Custom Badger Integrations
112116

113-
The library contains a Higher Order Component (HOC) `BadgerBase` which contains all of the required Badger interaction logic. This allows for any component to integrate with Badger easily.
117+
The library contains a Higher Order Component (HOC) `BadgerBase` which contains all of the required Badger interaction logic. This allows the creation of custom Badger integrations and components easily.
114118

115119
Components wrapped in `BadgerBase` support the following props
116120

117121
- `to: BCH Address` - Required - Bitcoin Cash address to send BCH to
118122
- `price: number` - Required - Price in chosen currency, will be turned into satoshis
119123
- `currency: string` - Default `USD` - [ISO Country Code](https://en.wikipedia.org/wiki/ISO_4217) to charge in
124+
- `opReturn: string[]` - Optional - OP_RETURN message to send with transaction
120125

121126
And get the following props added to them for use in custom integration component
122127

src/data/docs/bitbox/address.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,8 @@ Detect an addess from an OutputScript.
484484

485485
#### Arguments
486486

487-
1. scriptPubKey`Buffer`: scriptPubKey
487+
1. scriptPubKey `Buffer`: scriptPubKey
488+
2. network `String` **optional**: defaults to "mainnet"
488489

489490
#### Result
490491

src/data/docs/bitbox/hdnode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Create HDNode from Seed Buffer
1010

1111
#### Arguments
1212

13-
1. rootSeed `Buffer` root seed buffer
14-
2. network `string` optional network. default: 'bitcoin'
13+
1. rootSeed `Buffer`: root seed buffer
14+
2. network `String` **optional**: network. default: 'mainnet'
1515

1616
#### Result
1717

src/data/docs/bitbox/transactionBuilder.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Create new Transaction Builder.
1010

1111
#### Arguments
1212

13-
1. network `String`: Defaults to "bitcoincash"
13+
1. network `String`: Defaults to "mainnet"
1414

1515
#### Result
1616

@@ -19,7 +19,7 @@ TransactionBuilder `TransactionBuilder`
1919
#### Examples
2020

2121
// instance of transaction builder
22-
let transactionBuilder = new BITBOX.TransactionBuilder('bitcoincash');
22+
let transactionBuilder = new BITBOX.TransactionBuilder('mainnet');
2323

2424
### `hashTypes`
2525

0 commit comments

Comments
 (0)