|
|
@ -32,8 +32,10 @@ |
|
|
|
'use strict'; |
|
|
|
var coinUtil = require('../util'); |
|
|
|
var VersionedData = require('../util/VersionedData'); |
|
|
|
var EncodedData = require('../util/EncodedData'); |
|
|
|
var networks = require('../networks'); |
|
|
|
var Script = require('./Script'); |
|
|
|
var util = require('util'); |
|
|
|
|
|
|
|
function Address(version, hash) { |
|
|
|
if (hash && hash.length && hash.length != 20) |
|
|
@ -41,8 +43,8 @@ function Address(version, hash) { |
|
|
|
Address.super(this, arguments); |
|
|
|
} |
|
|
|
|
|
|
|
Address.prototype = Object.create(VersionedData.prototype) |
|
|
|
VersionedData.applyEncodingsTo(Address); |
|
|
|
util.inherits(Address, VersionedData); |
|
|
|
EncodedData.applyEncodingsTo(Address); |
|
|
|
|
|
|
|
// create a pubKeyHash address
|
|
|
|
Address.fromPubKey = function(pubKey, network) { |
|
|
|