remove wallet.getPublicKeys().
This commit is contained in:
parent
1db84a0528
commit
a50ee3e0ba
@ -129,9 +129,6 @@ Wallet.prototype._init = function init() {
|
||||
};
|
||||
|
||||
Wallet.prototype.__defineGetter__('prefix', function() {
|
||||
if (this.n !== this.keys.length)
|
||||
throw new Error('Not enough keys to generate prefix');
|
||||
|
||||
return 'bt/' + this.getFullAddress() + '/';
|
||||
});
|
||||
|
||||
@ -253,11 +250,12 @@ Wallet.prototype.getPrivateKey = function getPrivateKey(enc) {
|
||||
|
||||
Wallet.prototype.getFullPublicKey = function getFullPublicKey(enc) {
|
||||
var pub = this.getOwnPublicKey();
|
||||
var keys;
|
||||
|
||||
if (this.type === 'scripthash') {
|
||||
keys = this.getPublicKeys();
|
||||
pub = bcoin.script.encode(bcoin.script.multisig(keys, this.m, this.n));
|
||||
if (this.n !== this.keys.length)
|
||||
throw new Error('Not enough keys to generate address');
|
||||
|
||||
pub = bcoin.script.encode(bcoin.script.multisig(this.keys, this.m, this.n));
|
||||
}
|
||||
|
||||
if (enc === 'base58')
|
||||
@ -283,14 +281,6 @@ Wallet.prototype.getPublicKey = function getPublicKey(enc) {
|
||||
return this.getFullPublicKey(enc);
|
||||
};
|
||||
|
||||
Wallet.prototype.getPublicKeys = function getPublicKeys() {
|
||||
var keys = this.keys.slice().map(utils.toKeyArray);
|
||||
|
||||
keys = utils.sortKeys(keys);
|
||||
|
||||
return keys;
|
||||
};
|
||||
|
||||
Wallet.prototype.getFullHash = function getFullHash() {
|
||||
return Wallet.key2hash(this.getFullPublicKey());
|
||||
};
|
||||
@ -383,7 +373,7 @@ Wallet.prototype.ownOutput = function ownOutput(tx, index) {
|
||||
var scriptHash = this.getFullHash();
|
||||
var hash = this.getOwnHash();
|
||||
var key = this.getOwnPublicKey();
|
||||
var keys = this.getPublicKeys();
|
||||
var keys = this.keys;
|
||||
|
||||
var outputs = tx.outputs.filter(function(output, i) {
|
||||
var s = output.script;
|
||||
@ -417,7 +407,7 @@ Wallet.prototype.ownInput = function ownInput(tx, index) {
|
||||
var hash = this.getOwnHash();
|
||||
var key = this.getOwnPublicKey();
|
||||
var redeem = this.getFullPublicKey();
|
||||
var keys = this.getPublicKeys();
|
||||
var keys = this.keys;
|
||||
|
||||
var inputs = tx.inputs.filter(function(input, i) {
|
||||
var s;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user