wallet: misc.

This commit is contained in:
Christopher Jeffrey 2016-10-02 02:24:51 -07:00
parent f0223146af
commit 1213782b3e
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
3 changed files with 16 additions and 16 deletions

View File

@ -135,8 +135,8 @@ SPVNode.prototype._init = function _init() {
self.walletdb.addBlock(entry, block.txs).catch(onError);
});
this.walletdb.on('save address', function(address, path) {
self.pool.watch(address.getHash());
this.walletdb.on('path', function(path) {
self.pool.watch(path.hash, 'hex');
});
this.walletdb.on('send', function(tx) {

View File

@ -990,7 +990,7 @@ WalletDB.prototype.savePath = co(function* savePath(wid, path) {
if (this.filter)
this.filter.add(hash, 'hex');
this.emit('save address', path.toAddress(), path);
this.emit('path', path);
wallets = yield this.getWalletsByHash(hash);

View File

@ -53,7 +53,7 @@ WalletKey.fromOptions = function fromOptions(options) {
};
/**
* Instantiate keyring from a private key.
* Instantiate wallet key from a private key.
* @param {Buffer} key
* @param {Boolean?} compressed
* @param {(NetworkType|Network}) network
@ -65,7 +65,7 @@ WalletKey.fromPrivate = function fromPrivate(key, compressed, network) {
};
/**
* Generate a keyring.
* Generate a wallet key.
* @param {(Network|NetworkType)?} network
* @returns {WalletKey}
*/
@ -75,7 +75,7 @@ WalletKey.generate = function(compressed, network) {
};
/**
* Instantiate keyring from a public key.
* Instantiate wallet key from a public key.
* @param {Buffer} publicKey
* @param {(NetworkType|Network}) network
* @returns {WalletKey}
@ -86,7 +86,7 @@ WalletKey.fromPublic = function fromPublic(key, network) {
};
/**
* Instantiate keyring from a public key.
* Instantiate wallet key from a public key.
* @param {Buffer} publicKey
* @param {(NetworkType|Network}) network
* @returns {WalletKey}
@ -97,7 +97,7 @@ WalletKey.fromKey = function fromKey(key, compressed, network) {
};
/**
* Instantiate keyring from script.
* Instantiate wallet key from script.
* @param {Buffer} key
* @param {Script} script
* @param {(NetworkType|Network}) network
@ -109,7 +109,7 @@ WalletKey.fromScript = function fromScript(key, script, compressed, network) {
};
/**
* Instantiate a keyring from a serialized CBitcoinSecret.
* Instantiate a wallet key from a serialized CBitcoinSecret.
* @param {Base58String} secret
* @returns {WalletKey}
*/
@ -153,7 +153,7 @@ WalletKey.fromJSON = function fromJSON(json) {
};
/**
* Instantiate a keyring from serialized data.
* Instantiate a wallet key from serialized data.
* @param {Buffer} data
* @returns {WalletKey}
*/
@ -163,7 +163,7 @@ WalletKey.fromRaw = function fromRaw(data) {
};
/**
* Instantiate a keyring from serialized data.
* Instantiate a wallet key from serialized data.
* @param {Buffer} data
* @returns {WalletKey}
*/
@ -186,7 +186,7 @@ WalletKey.prototype.fromHD = function fromHD(account, key, branch, index) {
};
/**
* Instantiate a keyring from serialized data.
* Instantiate a wallet key from serialized data.
* @param {Buffer} data
* @returns {WalletKey}
*/
@ -196,7 +196,7 @@ WalletKey.fromHD = function fromHD(account, key, branch, index) {
};
/**
* Instantiate a keyring from serialized data.
* Instantiate a wallet key from serialized data.
* @param {Buffer} data
* @returns {WalletKey}
*/
@ -212,7 +212,7 @@ WalletKey.prototype.fromImport = function fromImport(account, data, network) {
};
/**
* Instantiate a keyring from serialized data.
* Instantiate a wallet key from serialized data.
* @param {Buffer} data
* @returns {WalletKey}
*/
@ -222,7 +222,7 @@ WalletKey.fromImport = function fromImport(account, data, network) {
};
/**
* Instantiate a keyring from serialized data.
* Instantiate a wallet key from serialized data.
* @param {Buffer} data
* @returns {WalletKey}
*/
@ -238,7 +238,7 @@ WalletKey.prototype.fromRing = function fromRing(account, ring) {
};
/**
* Instantiate a keyring from serialized data.
* Instantiate a wallet key from serialized data.
* @param {Buffer} data
* @returns {WalletKey}
*/