account: remove address methods.

This commit is contained in:
Christopher Jeffrey 2016-11-02 17:25:30 -07:00
parent f1f5a2e5d3
commit 508ece491f
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -720,44 +720,6 @@ Account.prototype.syncDepth = co(function* syncDepth(receive, change, nested) {
return result;
});
/**
* Get witness version for a path.
* @param {Path}
* @returns {Number}
*/
Account.prototype.getWitnessVersion = function getWitnessVersion(path) {
if (!this.witness)
return -1;
if (path.branch === 2)
return -1;
return 0;
};
/**
* Get address type for a path.
* @param {Path} path
* @returns {Number}
*/
Account.prototype.getAddressType = function getAddressType(path) {
if (path.branch === 2)
return Script.types.SCRIPTHASH;
if (this.witness) {
if (this.type === Account.types.MULTISIG)
return Script.types.WITNESSSCRIPTHASH;
return Script.types.WITNESSPUBKEYHASH;
}
if (this.type === Account.types.MULTISIG)
return Script.types.SCRIPTHASH;
return Script.types.PUBKEYHASH;
};
/**
* Convert the account to a more inspection-friendly object.
* @returns {Object}