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

bitpay-nodejs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitpay-nodejs - npm Package Compare versions

Comparing version 0.0.5 to 0.0.7

35

lib/client.js

@@ -36,3 +36,3 @@ const request = require('request')

console.log(options.url);
options.methd = 'GET';
options.method = 'GET';
request(options, function(err, resp, body) {

@@ -49,3 +49,36 @@ if(err) console.log(err);

Client.prototype.getInvoiceData = function(invoiceId, fn) {
var options = new Object(this.httpOptions);
options.url = api+'/invoiceData/'+invoiceId;
console.log(options.url);
options.method = 'GET';
request(options, function(err, resp, body) {
if(err) console.log(err);
result = JSON.parse(body);
if (result.error) {
fn(result.error, null);
} else {
fn(null, result);
}
});
};
Client.prototype.sendNotification = function(invoiceId, fn) {
var options = new Object(this.httpOptions);
options.url = api+'/invoices/'+invoiceId+'/notifications';
console.log(options.url);
options.method = 'POST';
request(options, function(err, resp, body) {
if(err) console.log(err);
result = JSON.parse(body);
if (result.error) {
fn(result.error, null);
} else {
fn(null, result);
}
});
};
module.exports = Client

2

package.json
{
"name": "bitpay-nodejs",
"version": "0.0.5",
"version": "0.0.7",
"description": "A Node.js library for the Bitpay Bitcoin API",

@@ -5,0 +5,0 @@ "main": "bitpay.js",

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