You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 30, 2024. It is now read-only.
This is the first `TypeScript` release on the library (thanks @the-jackalope for the rewrite! ❤️), see PR [#93](https://github.com/ethereumjs/ethereumjs-wallet/pull/93) for the main PR here. The release comes with various breaking changes.
12
+
13
+
### Libray Import / API Documentation
14
+
15
+
The way submodules are exposed has been changed along the `TypeScript` rewrite and you will likely have to update your imports. Here is an example for the `hdkey` submodule:
16
+
17
+
Node.js / ES5:
18
+
19
+
```js
20
+
const { hdkey } =require('ethereumjs-wallet')
21
+
```
22
+
23
+
ESM / TypeScript:
24
+
25
+
```js
26
+
import { hdkey } from'ethereumjs-wallet'
27
+
```
28
+
29
+
See [README](https://github.com/ethereumjs/ethereumjs-wallet#wallet-api) for examples on the other submodules.
30
+
31
+
Together with the switch to `TypeScript` the previously static documentation has been automated to now being generated with `TypeDoc` to reflect all latest changes, see PR [#98](https://github.com/ethereumjs/ethereumjs-wallet/pull/98). See the new [docs](https://github.com/ethereumjs/ethereumjs-wallet/blob/master/docs/README.md) for an overview on the `TypeScript` based API.
32
+
33
+
### API Changes
34
+
35
+
The API of the library hasn't been changed intentionally but has become more strict on type input by the explcit type definitions from the `TypeScript` code in function signatures together with the introduction of the `ethereumjs-util`[v7](https://github.com/ethereumjs/ethereumjs-util/releases) library within the `Wallet` library, which behaves more strict on type input on the various utility functions.
36
+
37
+
This leads to cases where some input - while not having been the intended way to use the library - might have been worked before through implicit type conversion and is now not possible any more.
38
+
39
+
One example for this is the `Wallet.fromPublicKey()` function, here is the old code of the function:
This function worked in the `v0.6.x` version also with passing in a string, since the `ethereumjs-util``v6``importPublic` method converted the input implicitly to a `Buffer`, the `v1.0.0` version now directly enforces the `fromPublicKey` input to be a `Buffer` first hand.
62
+
63
+
There will likely be more cases like this in the code since the type input of the library hasn't been documented in the older version. So we recommend here to go through all your function signature usages and see if you uses the correct input types. While a bit annoying this is a one-time task you will never have to do again since you can now profit from the clear `TypeScript` input types being both documented and enforced by the `TypeScript` compiler.
64
+
65
+
### Pure JS Crypto Dependencies
66
+
67
+
This library now uses pure JS crypto dependencies which doesn't bring in the need for native compilation on installation. For `scrypt` key derivation [scrypt-js](https://github.com/ricmoo/scrypt-js) from @ricmoo is used (see PR [#125](https://github.com/ethereumjs/ethereumjs-wallet/pull/125)).
68
+
69
+
For BIP-32 key derivation the new [ethereum-cryptography](https://github.com/ethereum/js-ethereum-cryptography) library is used which is a new Ethereum Foundation backed and formally audited libray to provide pure JS cryptographic primitives within the Ethereum ecosystem (see PR [#128](https://github.com/ethereumjs/ethereumjs-wallet/pull/128)).
70
+
71
+
### Removed ProviderEngine
72
+
73
+
Support for Provider Engine has been removed for security reasons, since the package is not very actively maintained and superseded by [`json-rpc-engine`](https://github.com/MetaMask/web3-provider-engine#web3-providerengine).
74
+
75
+
If you need the removed functionality, it should be relatively easily possible to do this integration by adopting the code from [provider-engine.ts](https://github.com/ethereumjs/ethereumjs-wallet/blob/v0.6.x/src/provider-engine.js).
76
+
77
+
See also: PR [#117](https://github.com/ethereumjs/ethereumjs-wallet/pull/117)
78
+
79
+
### Other Changes
80
+
81
+
#### Bug Fixes
82
+
83
+
- Fixes a bug where `salt`, `iv` and/or `uuid` options - being supplied as strings to `Wallet.toV3()` - could lead to errors during encryption and/or output that could not be decrypted,
This is the last release from the `v0.6.x` release series. It adds Node 12 compatibility while maintaining compatibility
110
+
down to Node 6. To be able to do so the `scrypt.js` key derivation library is exchanged with `scryptsy`. While this solution is backwards-compatible the changed library only provides a pure JS implementation and no native bindings. If you need native performance pin your dependency to `v0.6.3` or update to the `v1.0.0` library version to be released shortly after this release.
111
+
112
+
Change Summary:
113
+
114
+
- v0.6.x back patch: added node v12 support, switched to `scryptsy` key derivation library (pure JS implementation),
0 commit comments