{"name":"ethereumjs-wallet","version":"0.6.5","description":"Utilities for handling Ethereum keys","main":"index.js","scripts":{"coverage":"istanbul cover _mocha","coveralls":"npm run build:dist && npm run coverage && coveralls <coverage/lcov.info","lint":"standard","prepublishOnly":"npm run lint && npm run test:build","test":"mocha ./src/test/*.js","test:build":"npm run build:dist","build:dist":"babel src/ -d ."},"husky":{"hooks":{"pre-push":"npm run lint"}},"repository":{"type":"git","url":"git+https://github.com/ethereumjs/ethereumjs-wallet.git"},"keywords":["ethereum","wallets","keys"],"author":{"name":"Alex Beregszaszi","email":"alex@rtfs.hu"},"license":"MIT","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-wallet/issues"},"homepage":"https://github.com/ethereumjs/ethereumjs-wallet","dependencies":{"scryptsy":"^1.2.1","aes-js":"^3.1.1","bs58check":"^2.1.2","ethereum-cryptography":"^0.1.3","ethereumjs-util":"^6.0.0","randombytes":"^2.0.6","safe-buffer":"^5.1.2","utf8":"^3.0.0","uuid":"^3.3.2"},"devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.7.0","coveralls":"^3.0.0","husky":"^2.1.0","istanbul":"^0.4.5","mocha":"^5.2.0","standard":"^12.0.0"},"standard":{"globals":["describe","it"],"ignore":["./*.js"]},"readme":"# ethereumjs-wallet\n\n[![NPM Package](https://img.shields.io/npm/v/ethereumjs-wallet.svg?style=flat-square)](https://www.npmjs.org/package/ethereumjs-wallet)\n[![Build Status](https://travis-ci.org/ethereumjs/ethereumjs-wallet.svg?branch=master)](https://travis-ci.org/ethereumjs/ethereumjs-wallet)\n[![Coverage Status](https://img.shields.io/coveralls/ethereumjs/ethereumjs-wallet.svg?style=flat-square)](https://coveralls.io/r/ethereumjs/ethereumjs-wallet)\n[![Gitter](https://img.shields.io/gitter/room/ethereum/ethereumjs-lib.svg?style=flat-square)](https://gitter.im/ethereum/ethereumjs-lib) or #ethereumjs on freenode\n\nA lightweight wallet implementation. At the moment it supports key creation and conversion between various formats.\n\nIt is complemented by the following packages:\n- [ethereumjs-tx](https://github.com/ethereumjs/ethereumjs-tx) to sign transactions\n- [ethereumjs-icap](https://github.com/ethereumjs/ethereumjs-icap) to manipulate ICAP addresses\n- [store.js](https://github.com/marcuswestin/store.js) to use browser storage\n\nMotivations are:\n- be lightweight\n- work in a browser\n- use a single, maintained version of crypto library (and that should be in line with `ethereumjs-util` and `ethereumjs-tx`)\n- support import/export between various wallet formats\n- support BIP32 HD keys\n\nFeatures not supported:\n- signing transactions\n- managing storage (neither in node.js or the browser)\n\n## Wallet API\n\nConstructors:\n\n* `generate([icap])` - create an instance based on a new random key (setting `icap` to true will generate an address suitable for the `ICAP Direct mode`)\n* `generateVanityAddress(pattern)` - create an instance where the address is valid against the supplied pattern (**this will be very slow**)\n* `fromPrivateKey(input)` - create an instance based on a raw private key\n* `fromExtendedPrivateKey(input)` - create an instance based on a BIP32 extended private key (xprv)\n* `fromPublicKey(input, [nonStrict])` - create an instance based on a public key (certain methods will not be available)\n* `fromExtendedPublicKey(input)` - create an instance based on a BIP32 extended public key (xpub)\n* `fromV1(input, password)` - import a wallet (Version 1 of the Ethereum wallet format)\n* `fromV3(input, password, [nonStrict])` - import a wallet (Version 3 of the Ethereum wallet format). Set `nonStrict` true to accept files with mixed-caps.\n* `fromEthSale(input, password)` - import an Ethereum Pre Sale wallet\n\nFor the V1, V3 and EthSale formats the input is a JSON serialized string. All these formats require a password.\n\nNote: `fromPublicKey()` only accepts uncompressed Ethereum-style public keys, unless the `nonStrict` flag is set to true.\n\nInstance methods:\n\n* `getPrivateKey()` - return the private key\n* `getPublicKey()` - return the public key\n* `getAddress()` - return the address\n* `getChecksumAddressString()` - return the [address with checksum](https://github.com/ethereum/EIPs/issues/55)\n* `getV3Filename([timestamp])` - return the suggested filename for V3 keystores\n* `toV3(password, [options])` - return the wallet as a JSON string (Version 3 of the Ethereum wallet format)\n\nAll of the above instance methods return a Buffer or JSON. Use the `String` suffixed versions for a string output, such as `getPrivateKeyString()`.\n\nNote: `getPublicKey()` only returns uncompressed Ethereum-style public keys.\n\n## Thirdparty API\n\nImporting various third party wallets is possible through the `thirdparty` submodule:\n\n`var thirdparty = require('ethereumjs-wallet/thirdparty')`\n\nConstructors:\n\n* `fromEtherCamp(passphrase)` - import a brain wallet used by Ether.Camp\n* `fromEtherWallet(input, password)` - import a wallet generated by EtherWallet\n* `fromKryptoKit(seed)` - import a wallet from a KryptoKit seed\n* `fromQuorumWallet(passphrase, userid)` - import a brain wallet used by Quorum Wallet\n\n## HD Wallet API\n\nTo use BIP32 HD wallets, first include the `hdkey` submodule:\n\n`var hdkey = require('ethereumjs-wallet/hdkey')`\n\nConstructors:\n\n* `fromMasterSeed(seed)` - create an instance based on a seed\n* `fromExtendedKey(key)` - create an instance based on a BIP32 extended private or public key\n\nFor the seed  we suggest to use [bip39](https://npmjs.org/package/bip39) to create one from a BIP39 mnemonic.\n\nInstance methods:\n\n* `privateExtendedKey()` - return a BIP32 extended private key (xprv)\n* `publicExtendedKey()` - return a BIP32 extended public key (xpub)\n* `derivePath(path)` - derive a node based on a path (e.g.  m/44'/0'/0/1)\n* `deriveChild(index)` - derive a node based on a child index\n* `getWallet()` - return a `Wallet` instance as seen above\n\n## Provider Engine\n\nThe Wallet can be easily plugged into [provider-engine](https://github.com/metamask/provider-engine) to provide signing:\n\n```js\nconst WalletSubprovider = require('ethereumjs-wallet/provider-engine')\n\n<engine>.addProvider(new WalletSubprovider(<wallet instance>))\n```\n\nNote it only supports the basic wallet. With a HD Wallet, call `getWallet()` first.\n\n### Remarks about `toV3`\n\nThe `options` is an optional object hash, where all the serialization parameters can be fine tuned:\n- uuid - UUID. One is randomly generated.\n- salt - Random salt for the `kdf`. Size must match the requirements of the KDF (key derivation function). Random number generated via `crypto.getRandomBytes` if nothing is supplied.\n- iv - Initialization vector for the `cipher`. Size must match the requirements of the cipher. Random number generated via `crypto.getRandomBytes` if nothing is supplied.\n- kdf - The key derivation function, see below.\n- dklen - Derived key length. For certain `cipher` settings, this must match the block sizes of those.\n- cipher - The cipher to use. Names must match those of supported by `OpenSSL`, e.g. `aes-128-ctr` or `aes-128-cbc`.\n\nDepending on the `kdf` selected, the following options are available too.\n\nFor `pbkdf2`:\n- `c` - Number of iterations. Defaults to 262144.\n- `prf` - The only supported (and default) value is `hmac-sha256`. So no point changing it.\n\nFor `scrypt`:\n- `n` - Iteration count. Defaults to 262144.\n- `r` - Block size for the underlying hash. Defaults to 8.\n- `p` - Parallelization factor. Defaults to 1.\n\nThe following settings are favoured by the Go Ethereum implementation and we default to the same:\n- `kdf`: `scrypt`\n- `dklen`: `32`\n- `n`: `262144`\n- `r`: `8`\n- `p`: `1`\n- `cipher`: `aes-128-ctr`\n\n# EthereumJS\n\nSee our organizational [documentation](https://ethereumjs.readthedocs.io) for an introduction to `EthereumJS` as well as information on current standards and best practices.\n\nIf you want to join for work or do improvements on the libraries have a look at our [contribution guidelines](https://ethereumjs.readthedocs.io/en/latest/contributing.html).\n\n## License\n\nMIT License\n\nCopyright (C) 2016 Alex Beregszaszi\n","readmeFilename":"README.md","gitHead":"567f32935f943e4c7414a3ce2c5be4410f80f846","_id":"ethereumjs-wallet@0.6.5","_nodeVersion":"12.15.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA==","shasum":"685e9091645cee230ad125c007658833991ed474","tarball":"http://registry-npm.ywwl.com/ethereumjs-wallet/download/ethereumjs-wallet-0.6.5.tgz","fileCount":10,"unpackedSize":56337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfECY2CRA9TVsSAnZWagAAAg0QAJcKbKoGBEvWSUCcRPKp\nAyX47fLDMiBbbBJkdOkULyqu2a6XCpS/7o5ln83qRu/Xhwqn/ZNjXftyP3YP\nq3/qFt3hHM3IPtCtJSw49RCvcI1xhhXQPbSEuzodnsar7E5o5QHVxXav82LG\nTviTysYeRGB53qchj7AjYJqWqPcjOhv7rfGRdFAEteURTRE2N3OpGjfgPvRm\n9MuT3ZavVjD1MTwTS0vXjUsKbYzVTqP1gE88LQHDKc1QX3JEValz1cUeMOAm\nSBZi9Fxnwo8ELr3tYseqa7oTsbMrlwXEPXXK6V+CyJJtkFuTf0JPnlrTNlvU\nMWiuibkSqvRxkUpeKssVoG1pI6ghmges8utt7bQ1oMLWG3W/53cY260HTaH2\nfbwhygZJsOOkdM8ogS+QpH74WIuvkusst9/VKMEvVVNQdxhffkAIeevWISjF\nNGhrx8mek2UkBCRb1gygVxOxm/Cv8n1oPfrAr2vaAka1EAQdZGcSNbZidH16\nC/PO0rgdsrEwZvXvBkFyvvFXGx+XTXxw5WaFLZEButoBQ2WVVqvu48AzJIBN\nT2TGkZHf//eLPjabusfpr18MHUzmRFE2yT+HFnhuMGlfXNNj9zKD8RzE6H1o\nhB77Ds7EfpuGVAhGQxbqNSNjOnson0Bm9OrEIqlxbP5gTDpb3zffavIgzGHk\nR7N6\r\n=Bjbc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHiRIHJ159aiV+6s8wOuofkKT10i6q7e4+0SLsIUk9k6AiAm+VrcE4fDyS6h6mRDg+0Yts9uttAU/H3wFHYHicgVCA=="}],"size":16539,"noattachment":false,"key":"/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz"},"maintainers":[{"email":"alex@rtfs.hu","name":"axic"},{"email":"Holger.Drewes@gmail.com","name":"holgerd77"}],"_npmUser":{"name":"holgerd77","email":"Holger.Drewes@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ethereumjs-wallet_0.6.5_1594893878382_0.27924096364535655"},"_hasShrinkwrap":false,"publish_time":1594893878577,"deprecated":"New package name format for new versions: @ethereumjs/wallet. Please update.","_cnpm_publish_time":1594893878577,"dist-tags":{"latest":"1.0.2","v065":"0.6.5"}}