diff --git a/lib/crypto/bn.js b/lib/crypto/bn.js index 1625d32..1eb8c2a 100644 --- a/lib/crypto/bn.js +++ b/lib/crypto/bn.js @@ -19,16 +19,6 @@ var reversebuf = function(buf) { return buf2; }; -BN.prototype.toJSON = function() { - return this.toString(); -}; - -BN.prototype.fromJSON = function(str) { - var bn = BN(str); - bn.copy(this); - return this; -}; - BN.prototype.fromNumber = function(n) { var bn = BN(n); bn.copy(this); diff --git a/test/crypto/bn.js b/test/crypto/bn.js index 298c8d4..a771ae0 100644 --- a/test/crypto/bn.js +++ b/test/crypto/bn.js @@ -67,23 +67,6 @@ describe('BN', function() { }); - describe('#fromJSON', function() { - - it('should make BN from a string', function() { - BN().fromJSON('5').toString().should.equal('5'); - }); - - }); - - describe('#toJSON', function() { - - it('should make string from a BN', function() { - BN(5).toJSON().should.equal('5'); - BN().fromJSON('5').toJSON().should.equal('5'); - }); - - }); - describe('#fromString', function() { it('should make BN from a string', function() {