Commit Graph

81 Commits

Author SHA1 Message Date
Karel Bílek aeaa33f237 Correcting addresses for multibyte versions
Fixes https://github.com/str4d/insight-ui-zcash/issues/1
2016-11-02 19:03:23 +01:00
Jack Grigg ebb8b5683a
Update network details and address prefixes for release 1.0.0-beta2 2016-10-09 10:04:56 -05:00
Braydon Fuller a50fccef4d Changes behavior of `toJSON` to work as expected with `JSON.stringify`
- see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior
- Updates CONTRIBUTING with changes to Stardard Methods
- Aliases toJSON for toObject
- Removes all `fromJSON` methods, and many cases replaces with `fromObject`
- Constructors expect an object parsed via `JSON.parse` for JSON input
2015-08-13 10:46:08 -04:00
Braydon Fuller ef26931645 Use late definition to resolve circular dependency. 2015-07-08 15:11:06 -04:00
Manuel Araoz e331c4ea49 allow addresses to have surrounding whitespace in validation 2015-03-31 17:54:06 -03:00
Braydon Fuller f034a71929 Network Fixes
- Fixed Address classification for a custom network
- Added ability to remove a custom network
- Increased test coverage for Address
2015-03-28 19:09:58 -04:00
Manuel Araoz e0b1ca0e10 move some script logic from Address to Script 2015-03-18 17:59:09 -03:00
Manuel Araoz a9328d76ff add extra test 2015-03-18 17:22:32 -03:00
Manuel Araoz 62ea45a524 refactor Address<->Script relation 2015-03-18 16:54:16 -03:00
eordano 575993967c Standardize optional parameters to Closure syntax 2015-02-24 15:31:13 -03:00
eordano fcc9081ddd Fix JSDocs from String to string 2015-02-24 15:31:12 -03:00
Trevin Hofmann 374e43bed2 Properly capitalize Base58Check and Base58 2015-02-13 21:40:20 -06:00
Braydon Fuller 904df59493 Added docs link to InvalidArgument message for preconditions.
- Error messages will appear as: "Invalid Argument: First argument is required, please include address data. Documentation: http://bitcore.io/guide/address.html"
2015-02-09 21:46:10 -05:00
Esteban Ordano 41191a285f Add alternative to create an Address
* When by error one has two instances of an address, an address
can't be instantiated from the other
2015-01-10 14:16:51 -03:00
Yemel Jardi 5f59fd0d05 Merge pull request #903 from eordano/fix/addchange
Add `change` when serializing transaction
2015-01-08 17:00:14 -03:00
Esteban Ordano fe86abc093 Add `change` when serializing transaction 2015-01-08 16:39:53 -03:00
Yemel Jardi e57d02c03c Use define immutable helper 2015-01-08 10:57:46 -03:00
Esteban Ordano cfecfa2d8d Merge pull request #904 from braydonf/bug/safari-address
Fixed bugs in Safari and IE. Closes #837 and #784
2015-01-07 09:27:07 -05:00
Braydon Fuller 8b505f0cfa Fixed tests to handle a `defaultNetwork` change
- Updated tests to work for both 'testnet' and 'livenet' as the default network.
- Fixed a bug in Address where the network property was being set as a string.
- Fixed a bug in HDKeys to handle serialized keys when the defaultNetwork changed.
2015-01-06 18:51:31 -05:00
Braydon Fuller ff4a6f549d Fixed bugs in IE11 2015-01-05 23:27:20 -05:00
Braydon Fuller a801663c6d Fixed bug in Safari for PublicKey and Script instance checking in Address 2015-01-05 17:31:51 -05:00
Esteban Ordano 5ef9975ac5 Honor publicKey.network on create multisig address
Closes #870
2014-12-31 02:19:11 -03:00
Esteban Ordano d688222769 Add toAddress(network) functionality to scripts 2014-12-30 15:23:09 -03:00
Manuel Araoz 0914624860 fix releaser script 2014-12-24 11:44:13 -03:00
Esteban Ordano 1ec4c7f512 Minor improvements on Address
* Update JSDocs
* Branch coverage 100%
* Removed duplicated test
* Updated names of tests
2014-12-19 15:41:20 -03:00
Braydon Fuller 6d42e01718 Fix formatting issue with examples 2014-12-18 17:07:01 -05:00
Esteban Ordano 5f5cf15241 Add capability to instantiate an Address from public keys and a threshold 2014-12-16 22:36:50 -03:00
Esteban Ordano 4433bd422b Refactor gulpfile 2014-12-16 17:21:41 -03:00
Esteban Ordano de4d2884c7 Modify Transaction to use Multisig
* Allow `Script#add` to add a Script causing concatenation of opcodes
* Add `Script#equals` to compare scripts
* Add `Script#fromAddress`
* Drop `_payTo` methods
* Add `Script.buildP2SHMultisigIn`

Greatly simplifying the internal transaction object
2014-12-15 18:19:54 -03:00
Braydon Fuller 354c03987a Address: Added toObject method and changed toJSON to return a string 2014-12-12 18:22:31 -05:00
Braydon Fuller 93502d1523 Fix naming 2014-12-12 12:09:15 -05:00
Braydon Fuller 32ac9bb63e Change utility naming 2014-12-12 11:05:22 -05:00
Braydon Fuller 1858766627 Standardized toJSON, fromJSON, toString and fromString interfaces 2014-12-12 09:51:59 -05:00
Braydon Fuller 56161676c3 Address: Change discoverMeta to classifyVersion and add a general address validation example 2014-12-11 10:42:10 -05:00
Braydon Fuller 3b061b057f Address: Added documentation and refactored to accept both a string and network object. 2014-12-10 23:44:17 -05:00
Esteban Ordano 1816ba197f Add check functions to Address 2014-12-09 17:25:36 -03:00
Manuel Araoz 4a6755d0d1 add Script#prepend() 2014-12-02 14:20:57 -03:00
Braydon Fuller 3fc12e87d7 Merge pull request #648 from braydonf/ref/default-networks
Networks: Consistency of network reference and fix hardcoded value
2014-12-02 11:12:20 -05:00
Braydon Fuller d5d88287cd Networks: Consistency of network reference for 'livenet', and removed hardcoded value. 2014-12-02 10:48:21 -05:00
Esteban Ordano 3dbb35a708 Fixes build, add "mainnet" again and fixes uri 2014-12-02 12:40:42 -03:00
Esteban Ordano 2b866a8460 Merge pull request #630 from braydonf/feature/immutable
Immutable Address, PublicKey and PrivateKey
2014-12-02 12:17:03 -03:00
Esteban Ordano 7682cfa359 Merge pull request #644 from braydonf/ref/default-network
Default the network, if not specified, to `networks.defaultNetwork`. Closes #559
2014-12-02 12:16:11 -03:00
Braydon Fuller eb72310a62 Address: Use defaultNetwork if network is not specified 2014-12-01 18:07:39 -05:00
Braydon Fuller 4adf1fcb14 Network: Replaced all instances of mainnet with livenet for consistency 2014-12-01 17:31:39 -05:00
Yemel Jardi db4561f834 Add documentation 2014-12-01 17:18:10 -03:00
Yemel Jardi 80937362be Address constructor allows an address instance 2014-12-01 17:17:10 -03:00
Braydon Fuller 3298a01498 Immutable Address, PublicKey and PrivateKey 2014-12-01 12:44:32 -05:00
Braydon Fuller 95b489c306 JSDoc: Update Address, PublicKey and PrivateKey so that they are documented. 2014-11-26 14:21:45 -05:00
Braydon Fuller 85ce140aeb Keys: Renamed Privkey to PrivateKey and Pubkey to PublicKey 2014-11-25 13:21:53 -05:00
Braydon Fuller deb54c5a20 Address: Return new instance if `this` isn't already instantiated. 2014-11-24 15:47:30 -05:00