Go to file
Braydon Fuller 0195d50da7 Build: 0.12.0 2015-08-19 12:39:16 -04:00
docs docs pr->request 2015-03-25 15:39:29 -03:00
lib take into account sig length in getTBSCertificate. fixes #15. 2015-05-03 02:02:26 -07:00
test Rename to payment-protocol 2015-01-19 01:48:29 -05: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 Initial commit for bitcore-paymentprotocol 2015-01-19 01:48:29 -05: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.md 2015-03-06 12:22:24 -03:00
bitcore-payment-protocol.js Build: 0.12.0 2015-08-19 12:39:16 -04:00
bitcore-payment-protocol.js.sig Build: 0.12.0 2015-08-19 12:39:16 -04:00
bitcore-payment-protocol.min.js Build: 0.12.0 2015-08-19 12:39:16 -04:00
bitcore-payment-protocol.min.js.sig Build: 0.12.0 2015-08-19 12:39:16 -04:00
bower.json Build: 0.12.0 2015-08-19 12:39:16 -04: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: 0.12.0 2015-08-19 12:39:16 -04:00

README.md

bitcore payment protocol BIP70 Payment Protocol support for bitcore =======

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-payment-protocol
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.