Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

Commit 236478a

Browse files
authored
Merge pull request #117 from ethereumjs/remove-wallet-subprovider
Remove wallet subprovider
2 parents 2121d5a + 8c116e2 commit 236478a

File tree

10 files changed

+62
-203
lines changed

10 files changed

+62
-203
lines changed

README.md

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -82,29 +82,15 @@ Please go to [./docs/classes/ethereumhdkey.md](./docs/classes/ethereumhdkey.md)
8282

8383
## Provider Engine
8484

85-
The Wallet can be easily plugged into [provider-engine](https://github.com/metamask/provider-engine) to provide signing:
85+
Provider Engine is
86+
[not very actively maintained](https://github.com/MetaMask/web3-provider-engine#web3-providerengine)
87+
and support has been removed along `v1.0.0` release, see
88+
issue [#115](https://github.com/ethereumjs/ethereumjs-wallet/issues/115) for context.
8689

87-
Node.js / ES5:
88-
89-
```js
90-
const { WalletSubprovider } = require('ethereumjs-wallet')
91-
92-
<engine>.addProvider(new WalletSubprovider(<wallet instance>))
93-
```
94-
95-
ESM / TypeScript:
96-
97-
```js
98-
import { WalletSubprovider } from 'ethereumjs-wallet'
99-
100-
<engine>.addProvider(new WalletSubprovider(<wallet instance>))
101-
```
102-
103-
Note it only supports the basic wallet. With a HD Wallet, call `getWallet()` first.
104-
105-
Please go to [./docs/classes/walletsubprovider.md](./docs/README.md) for more info.
90+
You can use the the old `src/provider-engine.ts` code (see associated PR) as some boilerplate
91+
for your own integration if needed.
10692

107-
### Remarks about `toV3`
93+
## Remarks about `toV3`
10894

10995
The `options` is an optional object hash, where all the serialization parameters can be fine tuned:
11096

docs/README.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
- [EthereumHDKey](classes/ethereumhdkey.md)
88
- [Wallet](classes/wallet.md)
9-
- [WalletSubprovider](classes/walletsubprovider.md)
109

1110
### Interfaces
1211

@@ -30,9 +29,7 @@
3029

3130
**fromEtherCamp**(passphrase: _`string`_): [Wallet](classes/wallet.md)
3231

33-
_Defined in [thirdparty.ts:169](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/thirdparty.ts#L169)_
34-
35-
Third Party API: Import a brain wallet used by Ether.Camp
32+
_Defined in [thirdparty.ts:169](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/thirdparty.ts#L169)_
3633

3734
**Parameters:**
3835

@@ -50,7 +47,7 @@ Third Party API: Import a brain wallet used by Ether.Camp
5047

5148
**fromEtherWallet**(input: _`string` \| [EtherWalletOptions](interfaces/etherwalletoptions.md)_, password: _`string`_): [Wallet](classes/wallet.md)
5249

53-
_Defined in [thirdparty.ts:121](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/thirdparty.ts#L121)_
50+
_Defined in [thirdparty.ts:121](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/thirdparty.ts#L121)_
5451

5552
**Parameters:**
5653

@@ -69,9 +66,7 @@ _Defined in [thirdparty.ts:121](https://github.com/ethereumjs/ethereumjs-wallet/
6966

7067
**fromKryptoKit**(entropy: _`string`_, password: _`string`_): [Wallet](classes/wallet.md)
7168

72-
_Defined in [thirdparty.ts:176](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/thirdparty.ts#L176)_
73-
74-
Third Party API: Import a wallet from a KryptoKit seed
69+
_Defined in [thirdparty.ts:176](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/thirdparty.ts#L176)_
7570

7671
**Parameters:**
7772

@@ -90,9 +85,7 @@ Third Party API: Import a wallet from a KryptoKit seed
9085

9186
**fromQuorumWallet**(passphrase: _`string`_, userid: _`string`_): [Wallet](classes/wallet.md)
9287

93-
_Defined in [thirdparty.ts:265](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/thirdparty.ts#L265)_
94-
95-
Third Party API: Import a brain wallet used by Quorum Wallet
88+
_Defined in [thirdparty.ts:265](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/thirdparty.ts#L265)_
9689

9790
**Parameters:**
9891

docs/classes/ethereumhdkey.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434

3535
### constructor
3636

37-
**new EthereumHDKey**(\_hdkey?: _`any`_): [EthereumHDKey](ethereumhdkey.md)
37+
**new EthereumHDKey**(\_hdkey: _`any`_): [EthereumHDKey](ethereumhdkey.md)
3838

39-
_Defined in [hdkey.ts:21](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L21)_
39+
_Defined in [hdkey.ts:21](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/hdkey.ts#L21)_
4040

4141
**Parameters:**
4242

@@ -56,7 +56,7 @@ _Defined in [hdkey.ts:21](https://github.com/ethereumjs/ethereumjs-wallet/blob/c
5656

5757
**\_hdkey**: _`any`_
5858

59-
_Defined in [hdkey.ts:23](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L23)_
59+
_Defined in [hdkey.ts:23](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/hdkey.ts#L23)_
6060

6161
---
6262

@@ -68,9 +68,7 @@ _Defined in [hdkey.ts:23](https://github.com/ethereumjs/ethereumjs-wallet/blob/c
6868

6969
**deriveChild**(index: _`number`_): [EthereumHDKey](ethereumhdkey.md)
7070

71-
_Defined in [hdkey.ts:52](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L52)_
72-
73-
Derive a node based on a child index
71+
_Defined in [hdkey.ts:52](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/hdkey.ts#L52)_
7472

7573
**Parameters:**
7674

@@ -88,9 +86,7 @@ Derive a node based on a child index
8886

8987
**derivePath**(path: _`string`_): [EthereumHDKey](ethereumhdkey.md)
9088

91-
_Defined in [hdkey.ts:45](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L45)_
92-
93-
Derives a node based on a path (e.g. m/44'/0'/0/1)
89+
_Defined in [hdkey.ts:45](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/hdkey.ts#L45)_
9490

9591
**Parameters:**
9692

@@ -108,9 +104,7 @@ Derives a node based on a path (e.g. m/44'/0'/0/1)
108104

109105
**getWallet**(): [Wallet](wallet.md)
110106

111-
_Defined in [hdkey.ts:59](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L59)_
112-
113-
Return a `Wallet` instance as seen above
107+
_Defined in [hdkey.ts:59](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/hdkey.ts#L59)_
114108

115109
**Returns:** [Wallet](wallet.md)
116110

@@ -122,9 +116,7 @@ Return a `Wallet` instance as seen above
122116

123117
**privateExtendedKey**(): `Buffer`
124118

125-
_Defined in [hdkey.ts:28](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L28)_
126-
127-
Returns a BIP32 extended private key (xprv)
119+
_Defined in [hdkey.ts:28](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/hdkey.ts#L28)_
128120

129121
**Returns:** `Buffer`
130122

@@ -136,9 +128,7 @@ Returns a BIP32 extended private key (xprv)
136128

137129
**publicExtendedKey**(): `Buffer`
138130

139-
_Defined in [hdkey.ts:38](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L38)_
140-
141-
Return a BIP32 extended public key (xpub)
131+
_Defined in [hdkey.ts:38](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/hdkey.ts#L38)_
142132

143133
**Returns:** `Buffer`
144134

@@ -150,9 +140,7 @@ Return a BIP32 extended public key (xpub)
150140

151141
**fromExtendedKey**(base58Key: _`string`_): [EthereumHDKey](ethereumhdkey.md)
152142

153-
_Defined in [hdkey.ts:19](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L19)_
154-
155-
Create an instance based on a BIP32 extended private or public key.
143+
_Defined in [hdkey.ts:19](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/hdkey.ts#L19)_
156144

157145
**Parameters:**
158146

@@ -170,11 +158,7 @@ Create an instance based on a BIP32 extended private or public key.
170158

171159
**fromMasterSeed**(seedBuffer: _`Buffer`_): [EthereumHDKey](ethereumhdkey.md)
172160

173-
_Defined in [hdkey.ts:12](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L12)_
174-
175-
Creates an instance based on a seed.
176-
177-
For the seed we suggest to use [bip39](https://npmjs.org/package/bip39) to create one from a BIP39 mnemonic.
161+
_Defined in [hdkey.ts:12](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/hdkey.ts#L12)_
178162

179163
**Parameters:**
180164

0 commit comments

Comments
 (0)