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

Remove wallet subprovider #117

Merged
merged 3 commits into from
May 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 7 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,29 +82,15 @@ Please go to [./docs/classes/ethereumhdkey.md](./docs/classes/ethereumhdkey.md)

## Provider Engine

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

Node.js / ES5:

```js
const { WalletSubprovider } = require('ethereumjs-wallet')

<engine>.addProvider(new WalletSubprovider(<wallet instance>))
```

ESM / TypeScript:

```js
import { WalletSubprovider } from 'ethereumjs-wallet'

<engine>.addProvider(new WalletSubprovider(<wallet instance>))
```

Note it only supports the basic wallet. With a HD Wallet, call `getWallet()` first.

Please go to [./docs/classes/walletsubprovider.md](./docs/README.md) for more info.
You can use the the old `src/provider-engine.ts` code (see associated PR) as some boilerplate
for your own integration if needed.

### Remarks about `toV3`
## Remarks about `toV3`

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

Expand Down
15 changes: 4 additions & 11 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

- [EthereumHDKey](classes/ethereumhdkey.md)
- [Wallet](classes/wallet.md)
- [WalletSubprovider](classes/walletsubprovider.md)

### Interfaces

Expand All @@ -30,9 +29,7 @@

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

_Defined in [thirdparty.ts:169](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/thirdparty.ts#L169)_

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

**Parameters:**

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

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

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

**Parameters:**

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

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

_Defined in [thirdparty.ts:176](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/thirdparty.ts#L176)_

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

**Parameters:**

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

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

_Defined in [thirdparty.ts:265](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/thirdparty.ts#L265)_

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

**Parameters:**

Expand Down
36 changes: 10 additions & 26 deletions docs/classes/ethereumhdkey.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@

### constructor

⊕ **new EthereumHDKey**(\_hdkey?: _`any`_): [EthereumHDKey](ethereumhdkey.md)
⊕ **new EthereumHDKey**(\_hdkey: _`any`_): [EthereumHDKey](ethereumhdkey.md)

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

**Parameters:**

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

**● \_hdkey**: _`any`_

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

---

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

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

_Defined in [hdkey.ts:52](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L52)_

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

**Parameters:**

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

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

_Defined in [hdkey.ts:45](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L45)_

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

**Parameters:**

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

▸ **getWallet**(): [Wallet](wallet.md)

_Defined in [hdkey.ts:59](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L59)_

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

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

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

▸ **privateExtendedKey**(): `Buffer`

_Defined in [hdkey.ts:28](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L28)_

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

**Returns:** `Buffer`

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

▸ **publicExtendedKey**(): `Buffer`

_Defined in [hdkey.ts:38](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L38)_

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

**Returns:** `Buffer`

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

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

_Defined in [hdkey.ts:19](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L19)_

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

**Parameters:**

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

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

_Defined in [hdkey.ts:12](https://github.com/ethereumjs/ethereumjs-wallet/blob/c748f97/src/hdkey.ts#L12)_

Creates an instance based on a seed.

For the seed we suggest to use [bip39](https://npmjs.org/package/bip39) to create one from a BIP39 mnemonic.
_Defined in [hdkey.ts:12](https://github.com/ethereumjs/ethereumjs-wallet/blob/13fb20d/src/hdkey.ts#L12)_

**Parameters:**

Expand Down
Loading