|
|
@ -3,7 +3,7 @@ |
|
|
|
var base58check = require('./encoding/base58check'); |
|
|
|
var Networks = require('./networks'); |
|
|
|
var Hash = require('./crypto/hash'); |
|
|
|
var jsUtil = require('./util/js'); |
|
|
|
var JSUtil = require('./util/js'); |
|
|
|
|
|
|
|
/** |
|
|
|
* Instantiate an address from an address String or Buffer, a public key or script hash Buffer, |
|
|
@ -313,7 +313,7 @@ Address.fromString = function(str, network, type) { |
|
|
|
* @returns {Address} A new valid instance of an Address |
|
|
|
*/ |
|
|
|
Address.fromJSON = function fromJSON(json) { |
|
|
|
if (jsUtil.isValidJson(json)) { |
|
|
|
if (JSUtil.isValidJson(json)) { |
|
|
|
json = JSON.parse(json); |
|
|
|
} |
|
|
|
var hashBuffer = new Buffer(json.hash, 'hex'); |
|
|
|