Properly separate the thirdparty API in the README

This commit is contained in:
Alex Beregszaszi 2016-03-23 14:29:30 +00:00
parent f19b62d76a
commit 299feb250a
1 changed files with 13 additions and 11 deletions

View File

@ -35,17 +35,6 @@ For the V1, V3 and EthSale formats the input is a JSON serialized string. All th
Note: `fromPublicKey()` only accepts uncompressed Ethereum-style public keys, unless the `nonStrict` flag is set to true.
Third party imports:
* `fromEtherCamp(passphrase)` - import a brain wallet used by Ether.Camp
* `fromEtherWallet(input, password)` - import a wallet generated by EtherWallet
* `fromKryptoKit(seed)` - import a wallet from a KryptoKit seed
* `fromQuorumWallet(passphrase, userid)` - import a brain wallet used by Quorum Wallet
To use these, first import the appropriate submodule:
`var thirdparty = require('ethereumjs-wallet/thirdparty')`
Instance methods:
* `getPrivateKey()` - return the private key
@ -57,6 +46,19 @@ Instance methods:
All of the above instance methods return a Buffer or JSON. Use the `String` suffixed versions for a string output, such as `getPrivateKeyString()`.
## Thirdparty API
Importing various third party wallets is possible through the `thirdparty` submodule:
`var thirdparty = require('ethereumjs-wallet/thirdparty')`
Constructors:
* `fromEtherCamp(passphrase)` - import a brain wallet used by Ether.Camp
* `fromEtherWallet(input, password)` - import a wallet generated by EtherWallet
* `fromKryptoKit(seed)` - import a wallet from a KryptoKit seed
* `fromQuorumWallet(passphrase, userid)` - import a brain wallet used by Quorum Wallet
## HD Wallet API
To use BIP32 HD wallets, first include the `hdkey` submodule: