Go to file
Justin Langston dc7e7fcdab
Merge pull request #46 from matiu/bug/required_fee_rate
update field name to required_fee_rate
2018-02-27 17:05:34 -05:00
docs Merge pull request #25 from braydonf/readme1 2016-04-26 17:22:20 -03:00
lib update field name to required_fee_rate 2018-02-27 19:01:11 -03:00
test update field name to required_fee_rate 2018-02-27 19:01:11 -03:00
.coveralls.yml Add coveralls token 2015-01-19 01:48:29 -05:00
.gitignore Rename to payment-protocol 2015-01-19 01:48:29 -05:00
.jshintrc Initial commit for bitcore-paymentprotocol 2015-01-19 01:48:29 -05:00
.travis.yml update travis.yml 2017-10-25 10:21:13 -03:00
CONTRIBUTING.md Initial commit for bitcore-paymentprotocol 2015-01-19 01:48:29 -05:00
LICENSE Initial commit for bitcore-paymentprotocol 2015-01-19 01:48:29 -05:00
README.md Update readme 2015-10-23 11:02:57 -04:00
bower.json Bump package version to 1.2.2 2017-03-15 12:42:29 -03:00
gulpfile.js Update to bitcore-build 2015-01-19 01:48:29 -05:00
index.js Update package 2015-01-19 01:48:29 -05:00
package.json bump 2018-02-27 19:01:53 -03:00
update-rootcerts.js remote preprocesor macros 2017-10-24 21:43:05 -03:00

README.md

Bitcore Payment Protocol

NPM Package Build Status Coverage Status

A module for bitcore that implements Payment Protocol and other related BIPs.

Getting Started

This library is distributed in both the npm and bower packaging systems.

npm install bitcore-lib
npm install bitcore-payment-protocol
bower install bitcore-lib
bower install bitcore-payment-protocol

There are many examples of how to use it on the developer guide section for payment protocol. For example, the following code would verify a payment request:

var PaymentProtocol = require('bitcore-payment-protocol');

var body = PaymentProtocol.PaymentRequest.decode(rawbody);
var request = new PaymentProtocol().makePaymentRequest(body);

var version = pr.get('payment_details_version');
var pki_type = pr.get('pki_type');
var pki_data = pr.get('pki_data');
var serializedDetails = pr.get('serialized_payment_details');
var signature = pr.get('signature');

// Verify the signature
var verified = request.verify();

Contributing

See CONTRIBUTING.md on the main bitcore repo for information about how to contribute.

License

Code released under the MIT license.

Copyright 2013-2015 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.