Daniel Cousens
0a232cdb9d
tests: sign test needs to trigger ecurve.Point side effects
2014-09-15 14:25:28 +10:00
Daniel Cousens
c3f8869386
tests: Wallet test was not comprehensive
2014-09-08 23:27:01 +10:00
Daniel Cousens
69dfd3204d
Wallet: add missing variable wallet
2014-09-08 23:21:16 +10:00
Daniel Cousens
6e1517482b
tests: avoid use of deprecated APIs
2014-08-27 12:37:13 +10:00
Daniel Cousens
b727a65ea0
Wallet: refactor to use Array unspents solely, deprecating unspentsMap
2014-08-27 12:37:13 +10:00
Daniel Cousens
06f13db8d7
Wallet: rename outputs to unspentsMap
2014-08-27 12:37:13 +10:00
Daniel Cousens
02e71e430c
Wallet: revert 2f00c9a
2014-08-27 12:37:13 +10:00
Daniel Cousens
33955a7fb5
Wallet: store txHash, vout separately instead of "from: txid:vout"
2014-08-26 18:37:44 +10:00
Daniel Cousens
735feab7ba
Wallet: remove txId:index storage for spent outputs
2014-08-26 18:37:43 +10:00
Daniel Cousens
0f9674e65f
tests: code formatting
2014-08-26 18:37:43 +10:00
Daniel Cousens
82d8e20793
tests: avoid unnecessary .ok
2014-08-20 09:18:28 +10:00
Wei Lu
106e00e6f1
Merge pull request #244 from dcousens/txbuilder
...
Transaction Builder
2014-08-18 18:08:34 +08:00
Daniel Cousens
0782e8e837
tests: fixes test description typos
2014-08-18 09:31:24 +10:00
Daniel Cousens
26b028adcf
Wallet: use TxBuilder instead
2014-08-18 08:54:45 +10:00
Daniel Cousens
2f00c9ab35
Wallet: rework unspents to primarily work on initialization
...
The RegExp for the UTXO validation was removed as the errors are now
more verbose and specific to each case.
2014-08-14 11:17:10 +10:00
Daniel Cousens
7c22067f69
Wallet: clarify getPrivateKeyForAddress method structure
...
This does repeat the O(n) lookup several times, but that can be fixed by
using an O(1) lookup instead (and will be later).
Clarity first.
2014-08-14 11:00:29 +10:00
Daniel Cousens
eaf8cf85af
test: rephrase fail -> throw
2014-07-28 18:13:00 +10:00
Daniel Cousens
2920bb2ee1
tests: remove outdated FIXME in wallet
2014-07-28 18:11:31 +10:00
Wei Lu
f7af487597
wallet: reintroduce output.to to track pending spent utxo
2014-06-28 18:29:47 -07:00
Wei Lu
82b1d8fbdc
wallet: do not delete pending incoming tx from outputs
2014-06-21 19:21:26 +08:00
Wei Lu
79a17d67ec
wallet: do not overestimate fees when network has dustSoftThreshold
2014-06-18 21:16:17 +08:00
Wei Lu
7e31668b69
wallet: rename utxo.receive to utxo.from
2014-06-18 14:34:53 +08:00
Wei Lu
7e98123ccd
wallet.getUnspentOutputs includes the pending field
2014-06-18 14:29:02 +08:00
Wei Lu
79ec61d085
Fix bitcoin dustThreshold and feePerKb values
2014-06-17 22:41:14 +08:00
Daniel Cousens
c0e5393595
Transaction: remove .outpoint object
2014-06-16 14:21:40 +10:00
Daniel Cousens
569e0d4ff1
Wallet: fix processConfirmedTx tests
...
These tests were still passing despite being incorrect.
2014-06-16 14:21:40 +10:00
Daniel Cousens
f85792ba22
Transaction: remove address from txOut
2014-06-16 14:21:39 +10:00
Daniel Cousens
5551c38812
Transaction: use hash Buffer instead of hex string
2014-06-16 14:21:39 +10:00
Daniel Cousens
bdc7131d0e
Transaction: renames getHash to getId
...
In turn also removes the inherent calculation of tx.hash after deserialization.
2014-06-16 14:21:39 +10:00
Daniel Cousens
8b5647b0b9
Transaction: remove TxIn/TxOut exports
2014-06-16 14:21:38 +10:00
Wei Lu
8e00eb6855
Merge branch 'scriptclean'
...
Conflicts:
test/wallet.js
2014-06-14 10:31:19 +08:00
Daniel Cousens
07a0beee90
tests: remove unnecessary linebreaks
2014-06-14 10:08:51 +10:00
Daniel Cousens
7e5af52cd1
Transaction: mass rename from SPK/SS to Input/Output
...
I think it is important we maintain some reasoning that an Input script
is actually a script signature, but in the end, these names are more
coherent and understandable when reasoning with our code. So I think
its OK we break tradition with bitcoind.
2014-06-13 11:36:31 +10:00
Daniel Cousens
41c3b68293
templates: rename to scripts
2014-06-13 10:52:07 +10:00
Daniel Cousens
00cec9ce64
Script: move all templates to templates.js
2014-06-13 10:52:07 +10:00
Wei Lu
f53e35ed28
wallet: delete utxo instead of marking it as spend
2014-06-12 16:48:01 +08:00
Wei Lu
d265b53b03
wallet: processTx -> processConfirmedTx, processPendingTx
2014-06-12 16:47:46 +08:00
Wei Lu
e064e9d29d
wallet.createTx ignores pending utxo
2014-06-12 13:11:28 +08:00
Wei Lu
660c95483d
wallet.processTx accepts isPending flag and passes it on to output
2014-06-12 12:56:50 +08:00
Daniel Cousens
6a73bc02f5
HDNode: rename priv/pub to privKey/pubKey
2014-06-03 19:54:58 +10:00
Daniel Cousens
64e307b13f
HDWallet: rename to HDNode
2014-06-03 17:08:42 +10:00
Daniel Cousens
3bce535e36
Wallet: use assert for consistency
2014-05-31 14:28:16 +10:00
Daniel Cousens
cde285ccfc
Wallet: enforce operator new
2014-05-30 19:01:03 +10:00
Daniel Cousens
4952c5f4e7
HD/Wallet: use network objects, not strings
2014-05-30 19:01:02 +10:00
Daniel Cousens
2df790e2ab
Wallet: remove use of hashLittleEndian
2014-05-30 18:17:32 +10:00
Daniel Cousens
bd3690bdc0
Wallet: remove async interface
2014-05-30 18:17:32 +10:00
Daniel Cousens
50e9a09a8c
Wallet: cleanup createTx control flow
...
Unknowingly this also revealed a subtle bug in the previous
implementation which allowed the creation of transactions even
when no UTXOs existed.
2014-05-30 18:17:18 +10:00
Daniel Cousens
4dd617d5ca
wallet: fix address description typo
2014-05-28 13:25:37 +10:00
Daniel Cousens
8514bbfabd
Address: remove Address.Error
...
By removing Address.Error, we remove a code smell.
This part of the code base was also not under any form of test.
Test data and tests have therefore been added verifying its behaviour in
both Wallet and Address tests.
2014-05-28 13:17:07 +10:00
Daniel Cousens
0468c4710c
Transaction: rename (de)serialize to [to/from]Buffer
2014-05-17 00:09:13 +10:00