Commit Graph

114 Commits

Author SHA1 Message Date
Ivan Socolsky 04b8d2afa2
persist feeLevel as part of txp 2016-08-22 20:34:22 -03:00
Ivan Socolsky 827bb03d0c
restore legacy txproposal model 2016-08-04 12:42:03 -03:00
Ivan Socolsky bc9354bf1f
remove tx legacy code 2016-07-26 17:47:15 -03:00
Ivan Socolsky 49929942e7
accept id as arg for tx creation 2016-07-26 11:00:52 -03:00
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 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 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
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 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 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 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
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 595a54322b correctly build tx proposal on P2PKH 2015-09-05 18:49:43 -03:00
Kosta Korenkov 20af02e24f Allow arbitrary customData for tx proposals
This way Copay addons may attach related data to proposals
2015-09-03 12:52:12 +03:00
Ivan Socolsky 3f1bae6f25 Merge pull request #340 from matiu/feat/rawTx
add transaction raw HEX if tx status is "accepted"
2015-09-02 13:36:03 -03:00
Matias Alejo Garcia 9de8cfcbf2 add raw HEX if tx is "accepted" 2015-09-02 12:38:28 -03:00
Ivan Socolsky 094e19bc31 use constants form BWU 2015-08-31 17:13:46 -03:00
Ivan Socolsky 3ac0bc5e27 switch tests to bip44 2015-08-28 14:54:36 -03:00
Ivan Socolsky 7d9e43fccc initialize version field from #create method 2015-08-27 10:47:32 -03:00