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

melis-api-js

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

melis-api-js - npm Package Compare versions

Comparing version 0.8.24 to 0.8.25

2

package.json

@@ -6,3 +6,3 @@ {

"license": "ISC",
"version": "0.8.24",
"version": "0.8.25",
"main": "src/index.js",

@@ -9,0 +9,0 @@ "keywords": [

@@ -148,2 +148,5 @@ //require('es6-promise').polyfill();

/*
* chain.so
*/
var chainso_provider = function (isTestnet) {

@@ -154,3 +157,3 @@ var network = (isTestnet ? "BTCTEST" : "BTC")

function getData(url, opts) {
console.log("[CHAINSO DEBUG] Request for "+url+" with opts:", opts)
console.log("[CHAINSO DEBUG] Request for " + url + " with opts:", opts)
return fetch(url, opts).then(function (res) {

@@ -235,12 +238,23 @@ console.log("[CHAINSO DEBUG] res:", res)

// https://btc.blockr.io/api/v1/tx/info/60c1f1a3160042152114e2bba45600a5045711c3a8a458016248acec59653471,4addbc5ec75e087a44a34e8c1c3bd05fd495771072879a89a8c9aaa356255cb2
/*
* blockr.io
*/
var blockr_provider = function (isTestnet) {
var baseUrl = "https://" + (isTestnet ? "tbtc" : "btc") + ".blockr.io/api/v1/";
return {
submitTx: (hexTx) => {
const url = baseUrl + "tx/push"
const body = {hex: hexTx}
return fetch(url, {method: 'POST', body: JSON.stringify(body)}).then(res => {
return res.json()
})
},
// https://btc.blockr.io/api/v1/tx/info/60c1f1a3160042152114e2bba45600a5045711c3a8a458016248acec59653471,4addbc5ec75e087a44a34e8c1c3bd05fd495771072879a89a8c9aaa356255cb2
getTxOutputs: function (outs) {
return forEachOut(outs, function (out) {
var url = baseUrl + "tx/info/" + out.tx;
return fetch(url).then(function (res) {
return fetch(url).then(res => {
return res.json()
}).then(function (res) {
}).then(res => {
var vouts = res.data.vouts;

@@ -247,0 +261,0 @@ var vout = vouts[out.n];

@@ -160,2 +160,4 @@ var C = {}

C.UTILS_FEE_INFO = C.PREFIX_UTILS_METHODS + "feeInfo"
C.UTILS_LOG_EX = C.PREFIX_UTILS_METHODS + "logException"
C.UTILS_LOG_DATA = C.PREFIX_UTILS_METHODS + "logData"
C.UTILS_PING = C.PREFIX_UTILS_METHODS + "ping"

@@ -162,0 +164,0 @@ C.UTILS_PONG = C.PREFIX_UTILS_METHODS + "pong"

Sorry, the diff of this file is too big to display

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