Merge pull request #79 from matiu/features/package-improvements
Features/package improvements
This commit is contained in:
commit
667c605e6d
|
@ -14,6 +14,7 @@ var Sync = require('./Sync');
|
|||
var sockets = require('../app/controllers/socket.js');
|
||||
var BlockExtractor = require('./BlockExtractor.js');
|
||||
var buffertools = require('buffertools');
|
||||
var Address = bitcore.Address;
|
||||
|
||||
// var bitcoreUtil = require('bitcore/util/util');
|
||||
// var Deserialize = require('bitcore/Deserialize');
|
||||
|
@ -158,7 +159,7 @@ HistoricSync.prototype.getBlockFromFile = function(cb) {
|
|||
|
||||
try {
|
||||
var s = new Script(o.s);
|
||||
var addrs = self.sync.txDb.getAddrStr(s);
|
||||
var addrs = new Address.fromScriptPubKey(s, config.network);
|
||||
|
||||
// support only for p2pubkey p2pubkeyhash and p2sh
|
||||
if (addrs.length === 1) {
|
||||
|
|
|
@ -30,6 +30,7 @@ Rpc._parseTxResult = function(info) {
|
|||
// Outputs => add total
|
||||
var valueOutSat = 0;
|
||||
info.vout.forEach( function(o) {
|
||||
o.value = o.value.toFixed(8);
|
||||
valueOutSat += o.value * bitcore.util.COIN;
|
||||
delete o.scriptPubKey.hex;
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "insight-bitcore-api",
|
||||
"description": "An open-source bitcoin blockchain API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the bitcoin network and build your own services with it.",
|
||||
"version": "0.1.10",
|
||||
"version": "0.1.11",
|
||||
"author": {
|
||||
"name": "Ryan X Charles",
|
||||
"email": "ryan@bitpay.com"
|
||||
|
@ -46,6 +46,7 @@
|
|||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"bin": "insight.js",
|
||||
"scripts": {
|
||||
"start": "node node_modules/grunt-cli/bin/grunt"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue