account: remove address methods.
This commit is contained in:
parent
f1f5a2e5d3
commit
508ece491f
@ -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}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user