Gabe Gattis
1b2c41978f
revert behavior of derive
8 years ago
Braydon Fuller
d32ae41adc
Change name of derive to deriveChild
This is to avoid any accidental upgrades to a bugfixed version without awareness of the change.
8 years ago
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
10 years ago
Manuel Araoz
56c1e8c000
fix test for hdkey cache
10 years ago
eordano
89d78019d8
Fix bug on hdprivate key generation
10 years ago
eordano
eb8f59aa27
Drop duplicated code
10 years ago
eordano
9c3170cb3a
HDPublicKey: Add precondition checks for static methods
10 years ago
eordano
0938eadab5
Add precondition checks to HDPrivateKey.from*
10 years ago
Manuel Araoz
edda8ea723
fix broken tests
10 years ago
Manuel Araoz
85e938ba72
improve code style
10 years ago
Esteban Ordano
7a73f582b4
HDKeys: add toBuffer/fromBuffer to HDPublicKey
10 years ago
Esteban Ordano
28a1eae0be
HDKeys: add toBuffer/fromBuffer to HDPrivateKey
10 years ago
Yemel Jardi
3bd361e27a
Fix hd string path parsing.
10 years ago
Yemel Jardi
f78ebeb46c
Refactor HDPrivateKey path validation
10 years ago
Yemel Jardi
bb3064d336
fix typo
10 years ago
Yemel Jardi
98cfd646e7
Allow creating a new random testnet HDPrivate key
10 years ago
Yemel Jardi
2aa5c65945
Add validations to derivation path
10 years ago
Esteban Ordano
c3a178061c
Adding G7 methods to HDPrivateKEy
10 years ago
Braydon Fuller
b13c4fb0c9
Added inspect prototype G5
10 years ago
Braydon Fuller
94cc10b1a3
Changed *Json to *JSON and returned an object so that methods can be called from other toJSON methods without the double-stringification issue.
10 years ago
Braydon Fuller
c73c56f938
HDKeys: Modified to have immutable properties
10 years ago
Yemel Jardi
d584febea0
Fix tests
10 years ago
Esteban Ordano
ea17a6ace1
Add a preconditions module, and refactor errors
100% code coverage for the preconditions module.
Usage:
```
$.checkState(something === anotherthing, 'Expected something to be
anotherthing');
$.checkArgument(something < 100, 'something', 'must be less than 100');
$.checkArgumentType(something, PrivateKey, 'something'); // The third
argument is a helper to mention the name of the argument
$.checkArgumentType(something, PrivateKey); // but it's optional (will
show up as "(unknown argument)")
```
10 years ago
Esteban Ordano
13fd2592fc
Add autogenerated errors
10 years ago
Esteban Ordano
803027353a
Change errors
10 years ago
Esteban Ordano
a2a51ecc0c
Fix style: move each static function to an appropiate namespace
10 years ago
Esteban Ordano
4c0769fa09
100% test coverage on hdpublickey
10 years ago
Esteban Ordano
edc5b24d69
100% test coverage for HDPrivateKey
10 years ago
Esteban Ordano
5728c30371
Add tests
10 years ago