add bitcore.KeyModule back as deprecated

This will allow bitcore.KeyModule to work with existing code, but it prints out
a message that it is deprecated.
This commit is contained in:
Ryan X. Charles 2014-03-13 13:59:04 -04:00
parent 05f6e28642
commit 602442c2ab
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,10 @@ requireWhenAccessed('Block', './Block');
requireWhenAccessed('ScriptInterpreter', './ScriptInterpreter');
requireWhenAccessed('Bloom', './Bloom');
requireWhenAccessed('Key', './Key');
Object.defineProperty(module.exports, 'KeyModule', {get: function() {
console.log('KeyModule is deprecated.');
return require('bindings')('KeyModule');
}});
requireWhenAccessed('SINKey', './SINKey');
requireWhenAccessed('SIN', './SIN');
requireWhenAccessed('PrivateKey', './PrivateKey');