commit
8a9a377d70
2 changed files with 11 additions and 13 deletions
20
src/index.js
20
src/index.js
|
@ -3,24 +3,22 @@ var T = require('./transaction')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
Address: require('./address'),
|
Address: require('./address'),
|
||||||
|
base58: require('./base58'),
|
||||||
|
base58check: require('./base58check'),
|
||||||
|
BigInteger: require('./jsbn/jsbn'),
|
||||||
|
convert: require('./convert'),
|
||||||
crypto: require('./crypto'),
|
crypto: require('./crypto'),
|
||||||
Key: Key.ECKey,
|
ecdsa: require('./ecdsa'),
|
||||||
ECKey: Key.ECKey,
|
ECKey: Key.ECKey,
|
||||||
|
ECPointFp: require('./jsbn/ec').ECPointFp,
|
||||||
ECPubKey: Key.ECPubKey,
|
ECPubKey: Key.ECPubKey,
|
||||||
Message: require('./message'),
|
Message: require('./message'),
|
||||||
BigInteger: require('./jsbn/jsbn'),
|
|
||||||
Crypto: require('crypto-js'), //should we expose this at all?
|
|
||||||
Script: require('./script'),
|
|
||||||
Opcode: require('./opcode'),
|
Opcode: require('./opcode'),
|
||||||
|
HDWallet: require('./hdwallet'),
|
||||||
|
Script: require('./script'),
|
||||||
Transaction: T.Transaction,
|
Transaction: T.Transaction,
|
||||||
TransactionIn: T.TransactionIn,
|
TransactionIn: T.TransactionIn,
|
||||||
TransactionOut: T.TransactionOut,
|
TransactionOut: T.TransactionOut,
|
||||||
ECPointFp: require('./jsbn/ec').ECPointFp,
|
|
||||||
Wallet: require('./wallet'),
|
|
||||||
network: require('./network'),
|
network: require('./network'),
|
||||||
ecdsa: require('./ecdsa'),
|
Wallet: require('./wallet')
|
||||||
HDWallet: require('./hdwallet.js'),
|
|
||||||
base58: require('./base58'),
|
|
||||||
base58check: require('./base58check'),
|
|
||||||
convert: require('./convert')
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ var ECPointFp = bitcoinjs.ECPointFp
|
||||||
var convert = require('../src/convert')
|
var convert = require('../src/convert')
|
||||||
|
|
||||||
it('Keys & Key Management', function () {
|
it('Keys & Key Management', function () {
|
||||||
var p1 = bitcoinjs.Key().getPub().toBytes()
|
var p1 = bitcoinjs.ECKey().getPub().toBytes()
|
||||||
assert.equal(p1.length, 65)
|
assert.equal(p1.length, 65)
|
||||||
|
|
||||||
var p1_q = ECPointFp.decodeFrom(ecparams.getCurve(), p1)
|
var p1_q = ECPointFp.decodeFrom(ecparams.getCurve(), p1)
|
||||||
|
@ -26,7 +26,7 @@ it('Keys & Key Management', function () {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Signing and Verifying', function () {
|
it('Signing and Verifying', function () {
|
||||||
var s1 = bitcoinjs.Key()
|
var s1 = bitcoinjs.ECKey()
|
||||||
var sig_a = s1.sign(BigInteger.ZERO)
|
var sig_a = s1.sign(BigInteger.ZERO)
|
||||||
assert.ok(sig_a, 'Sign null')
|
assert.ok(sig_a, 'Sign null')
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue