Commit graph

211 commits

Author SHA1 Message Date
Daniel Cousens
682ec133bb Migrates Address to stricter API subset 2014-04-18 17:12:29 +10:00
Daniel Cousens
b4f70dcdde Migrates ECKey to stricter API 2014-04-18 06:36:27 +10:00
Daniel Cousens
6de94856e3 Makes ECDSA capitalization consistent 2014-04-09 04:11:13 +10:00
Daniel Cousens
c99a576fbd Migrates all usage of crypto-js/sha256 to ./crypto 2014-04-08 23:07:46 +10:00
Daniel Cousens
81d9c8e759 Renames util.js to crypto.js 2014-04-08 22:00:28 +10:00
Wei Lu
93fe1b4c78 cosmetic standardization
[closes #56]
2014-03-31 11:47:47 +08:00
Daniel Cousens
8f7f50d555 Removes deprecated ECKey.export function 2014-03-29 18:12:02 +11:00
Daniel Cousens
63dd7c7dec Now uses varIntToNum 2014-03-26 19:11:37 +11:00
Wei Lu
8d2525dba1 allow feePerKb to be set to zero 2014-03-26 08:43:34 +08:00
Wei Lu
75218e784f Transaction fee calculation does not need BigInteger 2014-03-26 08:43:33 +08:00
Wei Lu
7bd312de71 get rid of magic numbers in fee estimation 2014-03-26 08:43:33 +08:00
Wei Lu
3d12d3b038 implement and use txOut.scriptPubKey 2014-03-26 08:43:32 +08:00
Wei Lu
b7d65fb757 Transaction is able to estimate fees 2014-03-26 08:43:31 +08:00
Wei Lu
c3880c0cdf script.toAddress -> script.getToAddress 2014-03-26 08:43:31 +08:00
Daniel Cousens
36af0223de Strict comparison operators with 0 2014-03-24 06:22:26 +11:00
Daniel Cousens
a062297be2 Uses Array.prototype.foreach for stricter scoping 2014-03-24 06:22:26 +11:00
Daniel Cousens
87453f1828 Fixes variable redeclarations 2014-03-24 06:22:26 +11:00
Daniel Cousens
ed137a3b9d Various stylistic changes 2014-03-24 06:22:26 +11:00
Daniel Cousens
f580516c06 Removes unused variables 2014-03-24 06:22:26 +11:00
Daniel Cousens
b40374e332 Changes to new version-less ECKey API 2014-03-22 19:12:26 +11:00
Kyle Drake
40881a7dd8
add back SIGHASH code to transaction 2014-03-20 19:15:15 -07:00
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.
2014-03-20 15:40:07 -07:00
Wei Lu
2e6ef6cb85 fix and add tests for addInput 2014-03-17 18:01:09 +08:00
Wei Lu
a5ee07f7f6 Add tests to transaction deserialization
lock_time -> locktime
2014-03-17 16:31:35 +08:00
Pablo Martin
2e26a137d5 require crypto-js/sha256 instead of ./crypto-js/sha256. 2014-03-16 03:02:04 +01:00
Pablo Martin
8f383be325 fix transaction hashing (was using Message.getHash incorrectly). 2014-03-16 02:42:49 +01:00
Wei Lu
3d6b66e811 move convert methods from util to convert 2014-03-11 09:52:48 +08:00
Wei Lu
9c15fa0cbf Merge pull request #57 from bitcoinjs/upgrade-crypto-js
Use crypto-js as a module from npm
2014-03-11 09:14:49 +08:00
Wei Lu
45e55a07b0 fix transaction serialization/deserialization
[closes #58]
2014-03-09 13:46:20 +08:00
Wei Lu
a281a5ab53 migrate crypto-js to 3.1.2 2014-03-09 09:49:24 +08:00
Wei Lu
bde9b13b15 remove isArray shim
[closes #40]
2014-03-03 11:27:19 +08:00
Vitalik Buterin
7919c8cfc5 Added auto-instantiators to classes 2014-01-10 15:17:53 -05:00
Vitalik Buterin
30e8b572d6 Added deterministic signing and added a public key class. Note that getPub should now be replaced with getPub().export('bytes') 2014-01-04 13:26:03 -05:00
vub
1780f4a98f Updated deterministic wallet; theoretically works now if properly combined with server 2013-12-01 21:52:07 -05:00
vub
93e50e9433 Started work on wallet, and added hex serialization 2013-11-20 13:00:49 -05:00
vub
aa22b9d89e Added a new way of adding an output to a transaction 2013-11-02 06:51:27 -04:00
vub
a34bc9e2ea Many small improvements 2013-11-02 06:20:09 -04:00
vub
45ec63d2f1 Whoops... 2013-10-21 15:33:35 -04:00
vub
274112005f Beefed up TransactionIn constructor 2013-10-21 14:07:38 -04:00
vub
f53a4e3ffa Added sign with keys method to transaction and did lots of small cleanups 2013-10-21 14:00:31 -04:00
vub
917822541c Fixed serialization bug 2013-10-15 01:24:13 -04:00
vub
7bfd72c8c4 Replaced bigints with plain integers for transaction values 2013-10-14 07:41:21 -04:00
vub
b8023389fd Reversed txhash 2013-10-08 13:41:20 -04:00
vub
8fb725f796 Made TransactionOut take numbers as input 2013-10-08 07:38:22 -04:00
vub
2bfa783be2 Added hash flipping to serialization and deserialization 2013-10-08 07:05:21 -04:00
vub
50f6333b0e Changed i -> index in Transaction.prototype.sign 2013-10-08 06:48:31 -04:00
vub
038f8d5d99 Removed direct references to Bitcoin 2013-10-08 06:45:13 -04:00
vub
a753f069a5 Fixed bug in numToBytes and util -> conv 2013-10-08 06:34:15 -04:00
vub
f95b08a576 Replaced Crypto.util and util (was a typo) with conv 2013-10-08 05:42:28 -04:00
vub
38ea108183 Bugfix 2013-10-08 05:38:00 -04:00
vub
cb70b4425b Substituted in numToBytes 2013-10-08 03:47:18 -04:00
vub
65abb85668 Added to convert.js and some more multisig methods 2013-10-08 02:55:52 -04:00
vub
e43d23235b Added some transaction methods, and removed all internal use of base64 2013-10-07 15:27:19 -04:00
vub
9922864da4 Added deserialization, made some modifications 2013-10-07 08:21:00 -04:00
Roman Shtylman
981203e982 fix transaction processing for wallets 2013-03-02 12:00:14 -05:00
Roman Shtylman
0faac29134 start to split into node commonjs style modules
- no longer is the global Bitcoin used for modules
- cleaner and more maintainable code
- add more tests
2013-02-17 00:40:14 -05:00
Stefan Thomas
c2ce224d1b Remove debugging statements. Fixes #8. 2012-08-17 02:00:02 +02:00
Stefan Thomas
09e8c6e184 Added comments. 2012-01-11 10:41:52 +01:00
Stefan Thomas
1a7fc9d063 Fixed indents. 2012-01-11 02:40:45 +01:00
Stefan Thomas
27ceffaee3 Split getDescription() into two functions. 2011-08-18 04:57:29 +01:00
Stefan Thomas
8b32d43335 Moved sources into src/ subdirectory. 2011-08-11 18:35:23 +01:00
Renamed from transaction.js (Browse further)