Commit Graph

45 Commits

Author SHA1 Message Date
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 5e58adca5f Removed double errors in publickey. Fixes #1256 2015-06-01 13:40:52 -04:00
Manuel Araoz 951a07c011 fix PublicKey.toObject 2015-05-11 12:24:45 -03:00
Manuel Araoz 62ea45a524 refactor Address<->Script relation 2015-03-18 16:54:16 -03:00
eordano fcc9081ddd Fix JSDocs from String to string 2015-02-24 15:31:12 -03:00
Manuel Aráoz 0031ae8089 Merge pull request #1104 from eordano/fix/1095
Fix bug on HDKeys not returning the correct network when requesting a PrivateKey/PublicKey from the HDKey
2015-02-23 12:29:08 -03:00
eordano a07d90dfbf Fix error on public key for hdpublickey 2015-02-23 12:10:51 -03:00
dskloet 2c5219e32c typo 2015-02-21 19:46:26 +01:00
dskloet 38bae9a1da Fix JS doc annotations in publickey.js 2015-02-21 19:42:38 +01:00
Esteban Ordano 6b05f20397 Add the new operator when BN was used without it 2015-02-05 16:46:18 -03:00
Braydon Fuller 84cc1a0042 Indicate internal use of getID with an underscore. 2015-01-09 10:20:27 -05:00
Braydon Fuller 81fa162a7f Fix .jshintrc and add missing semis 2015-01-09 10:08:01 -05:00
Braydon Fuller b38f7fa319 Added getID to PublicKey
- Tests in BloomFilter in [bitcoin core](https://github.com/bitcoin/bitcoin/blob/master/src/test/bloom_tests.cpp#L85) use the CPubKey.GetID as input into the BloomFilter
- The hash is calculated when generating an Address however the hash itself is not currently available
2015-01-08 19:17:51 -05:00
Yemel Jardi e57d02c03c Use define immutable helper 2015-01-08 10:57:46 -03: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
Yemel Jardi ff844e9935 Change PrivateKey.toString from WIF to hex format 2015-01-02 18:15:17 -03:00
Esteban Ordano 901d836231 Add default network to PublicKey
Closes #871
2014-12-31 02:20:47 -03:00
Esteban Ordano 4980f7a646 Test coverage: last branch untested from PublicKey 2014-12-19 16:44:49 -03:00
Esteban Ordano 36e87d8822 PrivateKey, PublicKey, Network linted
* Added 100% test coverage for them also
2014-12-19 16:18:05 -03:00
Braydon Fuller 6d42e01718 Fix formatting issue with examples 2014-12-18 17:07:01 -05:00
Esteban Ordano ed9a9f6da9 Fix wrong jsdocs 2014-12-16 17:21:41 -03:00
Braydon Fuller e3fa89ce62 PublicKey: Fix formatting issue for inspect 2014-12-16 12:25:01 -05:00
Manuel Araoz 3eba0bc546 address review comments 2014-12-16 13:33:57 -03:00
Manuel Araoz 7683d2c2ed fix post-rebase confilcts 2014-12-16 13:33:57 -03:00
Manuel Araoz ddd11e908c all script_valid tests passing! 2014-12-16 13:33:56 -03:00
Manuel Araoz 0ddec23c02 fix some more tests 2014-12-16 13:33:56 -03:00
Manuel Araoz 6a0512e1bf pass some more tests 2014-12-16 13:33:56 -03:00
Esteban Ordano 48ce24dfbe Fix tests to allow network on public keys 2014-12-15 19:28:59 -03:00
Yemel Jardi 428bcaf4c9 Remove compressed argument from private key and public key constructors 2014-12-15 14:48:17 -03:00
Braydon Fuller c0bbf96dc1 Keys: Added toObject method and changed toJSON to return a string 2014-12-12 18:47:15 -05:00
Braydon Fuller 0e7f5e89f2 Fixed issue with js util naming 2014-12-12 17:54:48 -05:00
Braydon Fuller 4ddf3d117c Keys: Modified and added standardized toJSON/fromJSON prototypes 2014-12-12 13:39:49 -05:00
Esteban Ordano 0c28bc1786 Split buildPKH arguments, add Copy constructor on publickey 2014-12-10 12:46:21 -03:00
Braydon Fuller 012466d411 PublicKey: Remove compressed boolean from validation, not nessassary. 2014-12-04 13:06:10 -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 2b866a8460 Merge pull request #630 from braydonf/feature/immutable
Immutable Address, PublicKey and PrivateKey
2014-12-02 12:17:03 -03:00
Braydon Fuller b06866f86f PublicKey: Added toAddress prototype. Closes #599 2014-12-01 14:15:59 -05:00
Braydon Fuller 3298a01498 Immutable Address, PublicKey and PrivateKey 2014-12-01 12:44:32 -05:00
Braydon Fuller 9a76bf30ff Crypto/Point: Added test coverage and documentation, and refactored validation 2014-12-01 10:14:36 -05:00
Esteban Ordano 950ea6ed1a Add public key 2014-11-30 09:47:44 -03: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 a50655c7d3 Merge branch 'feature/keys-interface-rename-tests' into feature/keys-interface-rename 2014-11-25 17:38:24 -05:00
Braydon Fuller 7de28610a5 Keys: Fix browser data types 2014-11-25 15:30:25 -05:00
Braydon Fuller 2a2dc8196d Crypto: Update ECDSA with to use PrivateKey and PublicKey 2014-11-25 15:10:22 -05:00
Braydon Fuller 85ce140aeb Keys: Renamed Privkey to PrivateKey and Pubkey to PublicKey 2014-11-25 13:21:53 -05:00