Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

b70

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

b70

BIP70 for bcoin

  • 0.8.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

b70

Payment protocol (BIP70) for bcoin.

Usage

const b70 = require('b70');

// Create a payment request.
const req = new b70.PaymentRequest({
  version: 1,
  paymentDetails: {
    network: 'testnet',
    paymentUrl: 'http://bcoin.io/payment',
    memo: 'foobar',
    time: Math.floor(Date.now() / 1000),
    expires: Math.floor(Date.now() / 1000) + 3600,
    outputs: [
      { value: 10000, script: Buffer.alloc(0) },
      { value: 50000, script: Buffer.alloc(0) }
    ],
    merchantData: { foo: 'bar' }
  }
});

// Sign it.
req.setChain([crt]); // Certificate Chain
req.sign(key); // DER formatted private key

// Serialize to protobuf format.
const raw = req.toRaw();

Contribution and License Agreement

If you contribute code to this project, you are implicitly allowing your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work. </legalese>

License

  • Copyright (c) 2017, Christopher Jeffrey (MIT License).

See LICENSE for more info.

Keywords

FAQs

Package last updated on 29 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc