Payment Protocol (BIP70) for Bitcore
Clone or download
Pull request Compare This branch is 1 commit ahead, 5 commits behind bitpay:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
lib
test
.coveralls.yml
.gitignore
.jshintrc
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
bower.json
gulpfile.js
index.js
package.json
update-rootcerts.js

README.md

Bitcore-Dinero Payment Protocol

NPM Package Build Status Coverage Status

A module for bitcore-dinero 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-dinero
npm install bitcore-payment-protocol-dinero
bower install bitcore-lib-dinero
bower install bitcore-payment-protocol-dinero

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-dinero 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.