Commit Graph

39 Commits

Author SHA1 Message Date
Matias Alejo Garcia
4984d81284 serialize only the list of selected utxos, if available 2014-11-20 19:11:46 -03:00
Sagiv Ofek
9096fc4928 allowing sign keys to be strings
no need to pass array of one element to sign a transaction, you can simply pass the private key string (one or more separated by commas) and convert it to array. make user's life easier :)
2014-11-01 01:25:16 -03:00
Sagiv Ofek
d5618c186f syntax fix - typeof is not a function, it's an operator
following the comment of @shesek here: https://github.com/bitpay/bitcore/pull/500/files#r16642032
`typeof(foo)` should be `typeof foo`
2014-09-06 00:47:44 -04:00
Sagiv Ofek
b4d607bfef updated the code to 1-liner statements
using typeof instead of 2 if checks.
2014-08-24 01:38:31 -04:00
Sagiv Ofek
449e947966 fix bug - 0 fee is not working!
if the user pass 0 fee (in fee or feeSat arguments) - there's a bug in the program that will add fee even if specified 0 fee:

- in case fee or feeSat is 0 the if statement `if (opts.fee || opts.feeSat)` will be false.
from some reason `0 || undefined` in js returns `undefined` and in case a user set the fee to 0 in options this condition will not happen. 

- second fix: `var feeSat = this.givenFeeSat ? ...` fixed since if `this.givenFeeSat` is 0 the condition will return false (and we want true in this case) since `0 ? true : false` will return `false` in js language.
2014-08-23 18:11:28 -04:00
Curtis Lacy
798f8ad1be Revised error message per feedback on PR. 2014-08-18 15:26:06 -04:00
Curtis Lacy
49bd46b8b1 Made the error message when we encounter an unknown script pubkey more clear. 2014-08-18 14:39:06 -04:00
Ryan X. Charles
9937ec6312 Merge pull request #458 from matiu/feature/builder03
Fix loosing signatures after from-toObj roundtrip
2014-07-25 16:29:53 -04:00
Matias Alejo Garcia
1c6ec69c48 fix lossing signatured after from-toObj roundtrip 2014-07-25 16:43:18 -03:00
Matias Alejo Garcia
1b37d88e9a accept amount a strings in setOutput 2014-07-24 20:02:41 -03:00
Manuel Aráoz
cbfd30af16 Merge pull request #453 from matiu/feature/builder01
fix checkMerge, and tests
2014-07-24 18:50:55 -03:00
Matias Alejo Garcia
8660120add fix checkMerge, and tests 2014-07-24 18:46:12 -03:00
Ryan X. Charles
552a18b760 Merge pull request #452 from matiu/feature/txproposal10
TransactionBuilder .fromObj .toObj rewrite
2014-07-24 16:57:36 -04:00
Manuel Araoz
f8d7d1da9d add Transaction#getReceivingAddresses and send 2014-07-24 17:44:56 -03:00
Matias Alejo Garcia
68b1211c4c formated using js-beautify 2014-07-24 17:35:21 -03:00
Matias Alejo Garcia
8e1de31797 test passing. 2014-07-24 17:33:40 -03:00
Matias Alejo Garcia
397fc8607f new to/from Obj. WIP 2014-07-24 16:34:57 -03:00
Linus Unnebäck
3da6fe899f cleanup after removal of soop
Removed some unnecessary parenthesise that hung around after the merge
of #417
2014-07-12 12:14:56 +02:00
Manuel Araoz
87b818badf remove soop exports 2014-07-10 16:08:42 -03:00
Manuel Araoz
6e346d067c remove soop imports 2014-07-10 12:39:09 -03:00
Ryan X. Charles
ca67786a77 ran js-beautify on all bitcore source
js-beautify -s 2 -r *.js

...did not run on bundles, only on source.
2014-06-23 10:57:02 -07:00
Ryan X. Charles
a7270282d3 Merge pull request #384 from manan19/move-scriptForAddress
Move TransactionBuilder.scriptForAddress to Address.getScriptPubKey. Resolves #373
2014-06-19 20:33:36 -07:00
rxl
1170923f86 fix grammar in 'not enough unspent tx outputs' error in tx builder 2014-06-19 17:52:54 -07:00
Manan Patel
d83fc6e4b5 Resolves #373
Move TransactionBuilder.scriptForAddress to Address#getScriptPubKey (instance method)
2014-06-19 08:40:30 -07:00
Gustavo Cortez
1d957b24d9 Exporting a constant on TransactionBuilder for use on Copay (to check available funds to spend). A simple test for this. 2014-06-11 19:00:11 -03:00
Rich Apodaca
8489b50c32 Fixed TransactionBuilder docs 2014-05-08 14:53:18 -07:00
Manuel Aráoz
27b60c9e3f Merge pull request #338 from matiu/bug/snippet
fix snippet
2014-05-08 17:08:11 -03:00
Matias Alejo Garcia
bd91d17f57 fix snippet 2014-05-08 16:39:56 -03:00
olalonde
78ae388553 Replace process.versions tests by browserify's package.json browser field. Fixes #329 2014-05-07 14:14:10 +08:00
Matias Alejo Garcia
f0155a5297 docs in Txbuilder 2014-05-01 11:53:52 -03:00
Ryan X. Charles
1959ce953c Merge pull request #298 from ryanxcharles/feature/bignum
Move bignumber.js to internal
2014-04-29 10:47:55 -04:00
Matias Alejo Garcia
ec2299362c docco documentation 2014-04-29 11:33:20 -03:00
Ryan X. Charles
7f348ca0bd Move BigNumber to internal
...no longer relies on Manuel's repo hostig a version of "bignum" that actually
contained bignumber.js. This moves bignumber.js internally and removes bignum
from the browser build process. Also adds a bitcore.Bignum that links to the
right thing. In node, browser.Bignum is require('bignum'). And in the browser,
bitcore.Bignum is is now Bignumber.js (same as before ... except bignumber.js
is now inside bitcore).
2014-04-28 18:00:59 -04:00
Matias Alejo Garcia
906378aac4 rm spaces 2014-04-22 21:10:39 -03:00
Matias Alejo Garcia
9951b55a4f signature sorting in .sign and .merge in transaction builder 2014-04-22 21:09:22 -03:00
Matias Alejo Garcia
56d81bc0df remove unused code from Script. Update it to do not use scriptSig placeholders 2014-04-22 21:09:22 -03:00
Eric Martindale
433e40f390 Merge branch 'master' of github.com:bitpay/bitcore into clean 2014-04-16 14:36:17 -04:00
Eric Martindale
a2d616da5b Project reorganization. 2014-04-13 13:28:42 -07:00
Eric Martindale
f3b1c2d292 Cleanup main directory. 2014-04-13 13:14:27 -07:00