Commit Graph

202 Commits

Author SHA1 Message Date
Ivan Socolsky f455b53971
always add changeaddress if specified 2016-04-28 19:58:51 -03:00
Kosta Korenkov 11b32f4ee5 Optionally disable outputs shuffling for createTx 2016-04-16 10:24:32 +03:00
Ivan Socolsky b3e01c0ddd Merge pull request #497 from troggy/fix-build-tx
fix: wrong output value calculation in _buildTx
2016-04-11 14:25:07 -03:00
Ivan Socolsky 4d25161098
assert inputs & outputs are consistent 2016-04-11 10:06:59 -03:00
Kosta Korenkov 2e1cc88c56 fix: wrong output value calculation in _buildTx 2016-04-11 13:10:40 +03:00
Kosta Korenkov 0d9dc85030 fix: do not remove scripts from outputs 2016-04-11 10:04:47 +03:00
Ivan Socolsky bdff2cbc35 sendMax option on createTx 2016-03-11 13:45:10 -03:00
Ivan Socolsky 8d25f23849 get send max info 2016-03-11 13:38:42 -03:00
Ivan Socolsky 8ce304fd4e reduce safety margin to 2% 2016-03-10 18:59:04 -03:00
Ivan Socolsky 8865d42ec3 improve fee computation for P2PKH wallets 2016-03-10 18:58:56 -03:00
Ivan Socolsky ee7d3bad7f allow absolute fee when specifying inputs 2016-03-10 11:47:54 -03:00
Ivan Socolsky c01d1568bb adapt fee to avoid change below dust 2016-03-08 15:28:28 -03:00
Ivan Socolsky 328f6250be improve utxo mocking 2016-03-04 17:50:23 -03:00
Ivan Socolsky dbba3acfa8 new input selection algorithm 2016-03-04 17:50:22 -03:00
Ivan Socolsky f878594d40 rm feeLevel 2016-03-04 11:07:17 -03:00
Ivan Socolsky 682bf7fdd2 make feePerKb required 2016-03-04 11:06:16 -03:00
Ivan Socolsky 446f35426f remove explicit final fee for tx creation 2016-03-04 10:30:26 -03:00
Ivan Socolsky 37f87e4793 accept feeLevel on createTx 2016-03-04 10:30:26 -03:00
Braydon Fuller 7530ee9d0e Wallet Model: Check that "m" and "n" arguments are numbers 2016-02-01 11:21:49 -05:00
Ivan Socolsky 23cddbe47f fix broadcasting new proposals 2016-01-29 10:51:06 -03:00
Ivan Socolsky 6f196aa1b9 allow fee to be specified on proposal creation 2016-01-28 17:53:22 -03:00
Ivan Socolsky 3bef4f30b6 initialize amount field on multiple_output tx proposals 2015-12-16 00:21:58 -03:00
Ivan Socolsky 0bb043d034 simplify proposal creation + allow non-validated outputs (external txps) 2015-12-08 10:30:27 -03:00
Ivan Socolsky 5755b965e8 use TxProposal#fromObj as a factory for proposals 2015-12-08 10:30:26 -03:00
Ivan Socolsky 2211847d0c remove type from txproposal model 2015-12-08 10:30:26 -03:00
Ivan Socolsky 9db456550f create temporary proposal + test 2015-12-08 10:30:26 -03:00
Ivan Socolsky 6deb9e77f6 txproposalv3 -> txproposal 2015-12-08 10:30:26 -03:00
Ivan Socolsky 563ee14dc1 txproposal.js -> txproposal_legacy.js 2015-12-08 10:30:26 -03:00
Ivan Socolsky 63eca6b529 txProposal v3 2015-12-08 10:28:21 -03:00
Ivan Socolsky 1b6980fd1e call toObject before storing models 2015-11-23 17:28:02 -03:00
Ivan Socolsky 80d1d31130 Merge pull request #330 from troggy/txp/manual-outputs
Add EXTERNAL proposal type
2015-11-20 15:10:40 -03:00
Matias Alejo Garcia f8248a0eba Merge pull request #403 from isocolsky/fix/multi-output-no-change
Fix/multi output no change
2015-11-18 16:03:51 -03:00
Ivan Socolsky 5794883eb0 allow either script or toAddress 2015-11-16 18:39:51 -03:00
Ivan Socolsky 6476de0461 remove unused elements in output order array 2015-11-16 17:59:48 -03:00
Kosta Korenkov 2bdc6cf19d Make API.createTx accept preselected inputs
Add EXTERNAL tx type

It will allow clients to specify inputs and outputs when creating proposals

Extract _validateOutputs method

Use for-loop to simplify and make it fail-fast.

Do not validate outputs for EXTERNAL tx type

Outputs may be of any kind (e.g. OP_RETURN). It is assumed that outputs are validated by caller.

Move output validation to a single place

Check tx and estimate fees for EXTERNAL proposal

Set amount for external proposals

Use changeAddress to determine network

Do not shuffle outputs for EXTERNAL txp

Fix input selection to respect fees

Add more inputs, if we selected exactly the amount to spend, so we avoid 'Insufficient funds for a fee' error

Properly handle UTXO with 0 satoshis

Minor fixes

ignore invalid utxos
2015-11-11 21:23:44 +03:00
Ivan Socolsky fa58b5b778 restore derivation strategy on txps 2015-11-11 11:59:34 -03:00
Ivan Socolsky 414b4403c4 remove unused method 2015-11-06 12:05:33 -03:00
Ivan Socolsky 714b95b32c remove derivationStrategy field from txp 2015-11-06 12:02:41 -03:00
Ivan Socolsky e55983b151 mv Utils.buildTx -> TxProposal 2015-11-03 13:01:12 -03:00
Ivan Socolsky 2bec543c6f mv Utils.deriveAddress -> Address.derive 2015-11-03 12:21:31 -03:00
Ivan Socolsky 795097bf04 refactor constants+defaults+utils -> common 2015-10-30 17:16:20 -03:00
Ivan Socolsky eb006c3db3 remove bitcore-wallet-utils dependency 2015-10-30 15:24:47 -03:00
Ivan Socolsky 0b43b3b85c cache address activity 2015-10-28 13:23:13 -03:00
Ivan Socolsky b23f412bf3 getLatestNotifications + tests 2015-10-15 16:01:23 -03:00
Matias Alejo Garcia 95e41050bd add log 2015-09-14 14:59:49 -03:00
Matias Alejo Garcia 0a09dac821 Merge pull request #357 from isocolsky/ref/bip44
Ref/bip44
2015-09-10 15:46:41 -03:00
Matias Alejo Garcia a8607fa11b better insight error handling
add check to getPending

add check to getPending

add tests

rm log

store TXID upon tx completion

monitor accepted txs

change delay

change _checkTxInBlockchain

change _checkTxInBlockchain

rm useless params, refactor txid param

complete tx at fetch
2015-09-09 15:14:11 -03:00
Ivan Socolsky 69ae9a63e7 add script type to address 2015-09-07 17:46:45 -03:00
Ivan Socolsky 595a54322b correctly build tx proposal on P2PKH 2015-09-05 18:49:43 -03:00
Ivan Socolsky 45b7b65e99 allow p2pkh addresses in 1-of-1 2015-09-05 01:18:09 -03:00