Go to file
Matias Alejo Garcia 955459834f
Build: 1.2.2
2017-03-15 12:42:10 -03:00
docs Merge pull request #25 from braydonf/readme1 2016-04-26 17:22:20 -03:00
lib build: upgrade asn1.js to latest at 4.5.2 2016-04-26 16:12:09 -04:00
test test: add comment with cert expiration 2016-04-26 15:24:56 -04: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 build: run tests on nodejs versions 0.12 and v4 2016-04-26 15:17:17 -04: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
bitcore-payment-protocol.js Build: 1.2.2 2017-03-15 12:42:10 -03:00
bitcore-payment-protocol.js.sig Build: 1.2.2 2017-03-15 12:42:10 -03:00
bitcore-payment-protocol.min.js Build: 1.2.2 2017-03-15 12:42:10 -03:00
bitcore-payment-protocol.min.js.sig Build: 1.2.2 2017-03-15 12:42:10 -03:00
bower.json Build: 1.2.2 2017-03-15 12:42:10 -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 Build: 1.2.2 2017-03-15 12:42:10 -03:00
update-rootcerts.js Script to update rootcerts.json 2015-09-16 10:30:18 -04: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.