keyring: add refresh method.
This commit is contained in:
parent
97ecd5c59f
commit
37a3f83334
@ -105,6 +105,21 @@ KeyRing.fromOptions = function fromOptions(options) {
|
|||||||
return new KeyRing().fromOptions(options);
|
return new KeyRing().fromOptions(options);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clear cached key/script hashes.
|
||||||
|
*/
|
||||||
|
|
||||||
|
KeyRing.prototype.refresh = function refresh() {
|
||||||
|
this._keyHash = null;
|
||||||
|
this._keyAddress = null;
|
||||||
|
this._program = null;
|
||||||
|
this._nestedHash = null;
|
||||||
|
this._nestedAddress = null;
|
||||||
|
this._scriptHash160 = null;
|
||||||
|
this._scriptHash256 = null;
|
||||||
|
this._scriptAddress = null;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inject data from private key.
|
* Inject data from private key.
|
||||||
* @private
|
* @private
|
||||||
@ -724,8 +739,8 @@ KeyRing.prototype.verify = function verify(msg, sig) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get script type.
|
* Get witness program version.
|
||||||
* @returns {ScriptType}
|
* @returns {Number}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
KeyRing.prototype.getVersion = function getVersion() {
|
KeyRing.prototype.getVersion = function getVersion() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user