From 82a17de5c42313d9c6a02598bb78dbab08b373bf Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Mon, 14 Apr 2014 13:09:01 +1000 Subject: [PATCH 1/3] Orders modules by name --- src/index.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/index.js b/src/index.js index b98749e..683f139 100644 --- a/src/index.js +++ b/src/index.js @@ -3,24 +3,24 @@ var T = require('./transaction') module.exports = { Address: require('./address'), - crypto: require('./crypto'), - Key: Key.ECKey, - ECKey: Key.ECKey, - ECPubKey: Key.ECPubKey, - Message: require('./message'), + base58: require('./base58'), + base58check: require('./base58check'), BigInteger: require('./jsbn/jsbn'), - Crypto: require('crypto-js'), //should we expose this at all? - Script: require('./script'), + convert: require('./convert'), + crypto: require('./crypto'), + CryptoJS: require('crypto-js'), + ecdsa: require('./ecdsa'), + ECKey: Key.ECKey, + ECPointFp: require('./jsbn/ec').ECPointFp, + ECPubKey: Key.ECPubKey, + Key: Key.ECKey, + Message: require('./message'), Opcode: require('./opcode'), + HDWallet: require('./hdwallet'), + Script: require('./script'), Transaction: T.Transaction, TransactionIn: T.TransactionIn, TransactionOut: T.TransactionOut, - ECPointFp: require('./jsbn/ec').ECPointFp, - Wallet: require('./wallet'), network: require('./network'), - ecdsa: require('./ecdsa'), - HDWallet: require('./hdwallet.js'), - base58: require('./base58'), - base58check: require('./base58check'), - convert: require('./convert') + Wallet: require('./wallet') } From addf4528d4aef634a9c28de059f636be9352e933 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Mon, 14 Apr 2014 13:15:04 +1000 Subject: [PATCH 2/3] Removes Key module (use ECKey) --- src/index.js | 1 - test/misc.js | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 683f139..82e3646 100644 --- a/src/index.js +++ b/src/index.js @@ -13,7 +13,6 @@ module.exports = { ECKey: Key.ECKey, ECPointFp: require('./jsbn/ec').ECPointFp, ECPubKey: Key.ECPubKey, - Key: Key.ECKey, Message: require('./message'), Opcode: require('./opcode'), HDWallet: require('./hdwallet'), diff --git a/test/misc.js b/test/misc.js index 121f479..0b162d8 100644 --- a/test/misc.js +++ b/test/misc.js @@ -9,7 +9,7 @@ var ECPointFp = bitcoinjs.ECPointFp var convert = require('../src/convert') it('Keys & Key Management', function () { - var p1 = bitcoinjs.Key().getPub().toBytes() + var p1 = bitcoinjs.ECKey().getPub().toBytes() assert.equal(p1.length, 65) var p1_q = ECPointFp.decodeFrom(ecparams.getCurve(), p1) @@ -26,7 +26,7 @@ it('Keys & Key Management', function () { }) it('Signing and Verifying', function () { - var s1 = bitcoinjs.Key() + var s1 = bitcoinjs.ECKey() var sig_a = s1.sign(BigInteger.ZERO) assert.ok(sig_a, 'Sign null') From db115e1b272a39aa5318d936bd09859fecae38db Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Mon, 14 Apr 2014 16:19:17 +1000 Subject: [PATCH 3/3] CryptoJS no longer exported by default --- src/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/index.js b/src/index.js index 82e3646..e65d0e5 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,6 @@ module.exports = { BigInteger: require('./jsbn/jsbn'), convert: require('./convert'), crypto: require('./crypto'), - CryptoJS: require('crypto-js'), ecdsa: require('./ecdsa'), ECKey: Key.ECKey, ECPointFp: require('./jsbn/ec').ECPointFp,