Daniel Cousens
74ee2f90d0
Adds failing test for #78
11 years ago
Wei Lu
ea723c7caf
remove mocha config file
[fixes #75 ]
11 years ago
Kyle Drake
28e146431c
Many cleanups to Transaction, see detailed.
Default-ize the sequence rather than use a number, and default to bytes
for input. I doubt anybody ever uses this anyways.
Remove weird convenience code, and remove wallet logic. Checking a TX's
affects on a wallet should be managed by the wallet object.
Remove parsing for the weirder SIGHASH types. People use this library
for creating SIGHASH_ALL transactions, and I don't see the need to
support these other types at the moment since this library's more used
for wallets than for hardcore bitcoin tx analysis/creation. They weren't
tested anyways.
Add note about potentially improving performance by providing
pubkey/address. Deriving from the private key is slower, that
information should probably be cached by the end user.
11 years ago
Wei Lu
b7861e4336
replace jsbn's rng with module secure-random
This uses window.crypto.getRandomValues on browser
and crypto.randomBytes on node
11 years ago
Wei Lu
a26c01b8da
Test validateSig. Use validateSig to test transaction signing
11 years ago
Wei Lu
9df37a31b1
test transaction signing (failing)
11 years ago
Wei Lu
be9c19c50c
add tests to addOutput
11 years ago
Wei Lu
2e6ef6cb85
fix and add tests for addInput
11 years ago
Wei Lu
a5ee07f7f6
Add tests to transaction deserialization
lock_time -> locktime
11 years ago
Wei Lu
9f2da415ea
fix script constructor array check
11 years ago
Wei Lu
31cfb11178
new master key resets accounts and addresses
11 years ago
Wei Lu
a7a7999e3f
fix Wallet default constructor
11 years ago
Wei Lu
b2f010428f
store accounts in closure instead of on object
11 years ago
Wei Lu
207163704b
return private key rather than HD wallet node
11 years ago
Wei Lu
9200479159
getPrivateKey derives key on the fly
also added getPrivateKeyFromAddress
11 years ago
Wei Lu
ab9e782d14
private a method to generate change addresses
11 years ago
Wei Lu
1212099bfc
Wallet address derivation follows bip32/bitcoinj keychain structure
Also wallet accepts bytes in constructor
[#60 ]
11 years ago
Wei Lu
44012b47b5
change hd wallet constructor to take bytes
original constructor -> fromSeedString, fromMasterHex -> fromSeedHex
[#60 ]
11 years ago
Kyle Drake
c277fed4e1
cleanup runners, add coverage script, fix typo
11 years ago
Andreas Brekken
29ad6b692e
Message signing does not work with compressed keys. ref #61
11 years ago
Wei Lu
3d6b66e811
move convert methods from util to convert
11 years ago
Wei Lu
45e55a07b0
fix transaction serialization/deserialization
[closes #58 ]
11 years ago
Wei Lu
d2b790fef9
throw error when input to script constructor is not an array
[#58 ]
11 years ago
Wei Lu
a281a5ab53
migrate crypto-js to 3.1.2
11 years ago
Wei Lu
33857437db
add tests for bytes and words conversion
11 years ago
Wei Lu
bf1be94fe3
add tests for checkEncode and checkDecode
11 years ago
Kyle Drake
a6706ea8be
fix spacing
11 years ago
Kyle Drake
09925cff5a
cleanup throw tests, add case for bad input
11 years ago
Kyle Drake
fdc78dad2e
merge weilu's changes
11 years ago
Wei Lu
2f3e597596
reorganize address tests #50
11 years ago
xnova
786198f130
* Fixes address.js to be able to deal with testnet P2SH addresses
* Enhanced address.js testsuite...now also verifies address versions
* Enhances README to show how to run test suite
11 years ago
Andreas Brekken
81b44ef269
Add RFC test vectors for convert.bytesToBase64
11 years ago
Wei Lu
2e97828379
throws exception if specified network is unknown
also move network type tests to hdwallet
11 years ago
Wei Lu
02b3a2b564
HDWallet prod -> mainnet
11 years ago
Wei Lu
eaf84c4283
move address versions into network
Also change address type name:
address_types -> addressVersion
p2sh_types -> p2shVersion
prod -> mainnet
11 years ago
Wei Lu
293c864f4f
HD wallet versions: Bitcoin -> prod, BitcoinTest -> testnet
11 years ago
Wei Lu
cc0a042f2f
squashed commits from #27
11 years ago
Wei Lu
09ee406106
Revert "Merge pull request #27 from xnova/master"
due to broken tests, moved the changes to branch hd-testnet-support
This reverts commit a4ba59e9ba
, reversing
changes made to 36d3d6ebaa
.
11 years ago
xnova
2ca02c47ce
added testcases for new logic
11 years ago
Wei Lu
36d3d6ebaa
use options in wallet contructor & add tests
[#26 ]
11 years ago
Michael Gooden
b8215dea60
Add testnet support to Address and ECKey, more tests.
Signed-off-by: Michael Gooden <me@michaelgooden.net>
11 years ago
Andreas Brekken
966d2ee90d
Remove obsolete bip32.js
11 years ago
Andreas Brekken
5f9e2624f8
Rewrite HD Wallet (BIP0032) with all test vectors
11 years ago
Andreas Brekken
6cc7a23bdd
Begin work to properly cover the test vectors from bip32 docs
11 years ago
Andreas Brekken
f591cc0111
Reformat all tests for more modern mocha syntax (describe, it)
11 years ago
Andreas Brekken
d6290ef5df
Rename test files to match what they test
11 years ago
Pablo Martin
f9cbcbeb2b
missing BIP32_PRIME definition in bip32 tests.
11 years ago
Pablo Martin
740a0fcb7d
test vectors for bip32.
11 years ago
Roman Shtylman
41f0027883
port message to common.js style and add tests
12 years ago
Roman Shtylman
e94636ef25
fix test require so browserify works for testling
12 years ago