Coder Social home page Coder Social logo

maraoz / bitcore-payment-protocol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bitpay/bitcore-payment-protocol

0.0 2.0 0.0 1011 KB

BIP70 Payment Protocol support for bitcore

Home Page: http://bitcore.io

License: MIT License

JavaScript 100.00%

bitcore-payment-protocol's Introduction

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.

bitcore-payment-protocol's People

Contributors

chjj avatar maraoz avatar eordano avatar yemel avatar ryanxcharles avatar martindale avatar linusu avatar gasteve avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.