From 602442c2ab56f4a8eee7f375724847a511da68c6 Mon Sep 17 00:00:00 2001 From: "Ryan X. Charles" Date: Thu, 13 Mar 2014 13:59:04 -0400 Subject: [PATCH] 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. --- bitcore.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bitcore.js b/bitcore.js index 993e162..3336406 100644 --- a/bitcore.js +++ b/bitcore.js @@ -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');