{"bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"dist":{"shasum":"d06a98c3c49cc574b14a1be1732ee9f5caf4b806","tarball":"https://registry.npmjs.org/@truffle/hdwallet-provider/-/hdwallet-provider-1.0.41-0.tgz","fileCount":6,"integrity":"sha512-HMl2towpGynir+lF0VGNUQMonCbr7DYoQ4e22bicqNM9dU68R/TvxmFfeNk9dfTjZMSokyOobqQLvMzFnswLow==","signatures":[{"sig":"MEUCIDVGJHy+iVokh1r/MB+wXskxUPIk8EcP0CZ6opkIULmZAiEA/kS5a3PI6IDWoNmiwyPtZl+JwT8jjsrQ5wZGl5914No=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22821,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfLZOhCRA9TVsSAnZWagAAGR0P/jhWNhv9P2FOr6oJK5/W\npfdmBvhtp623p5I3dH3umyOcjS8tSbc/dRB4GZjWy8SKajnnX/bF01Ei1kB9\n5tKtjjklA5AHcgNzusc4jX43K7pnYdLYBfbpWK9WfUDoTKWOWpOPTU+eFxZH\npQwXZqN7gr7Wd4EntA0qOMGWpdZiuCqrm+7Wmt9wXDHLkwiodGchHZeRCI+t\nIjCgkyL01DKZE3Al+Hwnzx8UYi4WGq0guHLJVWbNLeT7/Eje1P2YaV7aNq/K\nbBPODy4hOt9daw7ZO547QBnBDbCwnQF1Xqxzqi1ALMQdWNxSGs2BTTwKxsPp\nR5J4OzeEEWQnwgE5zCNGFkQfQQFH6+w+wi9n9cyL/9tkT2ewP3rI2LEIvJIg\nQmmllT3FfCrYhQRibPDo7cpRHjpHE8K40tCXD7kQW7YYY3/AuOft9TUFoM1a\ntM4A2xHVu1kk6p1YHi0A5IWDUyVoeSpkwUH0Y3iUhWxSSHClqcjvO9oXAf1R\nt6nvi6RpQQ/YNnvNlDRXv56G7ZhrsG/hgAfpgzJKFlS0iNiMCx9nMj0XYuO6\nj4qevVPTPN6guFYelSvZVHMWgDkFuQj/OQm+Q6JU1cqS93/OIltbrYLYDFKZ\nAR5WE9Q3jwYHYUJ4weuiCBxYhs1jdSxxCLjZTKNyTvZ1SuMf8Sxuj7lAOqnB\nDRR/\r\n=Snh4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","name":"@truffle/hdwallet-provider","types":"dist/index.d.ts","author":{"name":"Tim Coulter","email":"tim@trufflesuite.com"},"readme":"# @truffle/hdwallet-provider\nHD Wallet-enabled Web3 provider. Use it to sign transactions for addresses derived from a 12 or 24 word mnemonic.\n\n## Install\n\n```\n$ npm install @truffle/hdwallet-provider\n```\n\n## Requirements\n```\nNode >= 7.6\nWeb3 ^1.2.0\n```\n\n## General Usage\n\nYou can use this provider wherever a Web3 provider is needed, not just in Truffle. For Truffle-specific usage, see next section.\n\n```javascript\nconst HDWalletProvider = require(\"@truffle/hdwallet-provider\");\nconst Web3 = require(\"web3\");\nconst mnemonic = \"mountains supernatural bird...\"; // 12 word mnemonic\nlet provider = new HDWalletProvider(mnemonic, \"http://localhost:8545\");\n\n// Or, alternatively pass in a zero-based address index.\nprovider = new HDWalletProvider(mnemonic, \"http://localhost:8545\", 5);\n\n// Or, use your own hierarchical derivation path\nprovider = new HDWalletProvider(mnemonic, \"http://localhost:8545\", 5, 1, true, \"m/44'/137'/0'/0/\");\n\n\n// HDWalletProvider is compatible with Web3. Use it at Web3 constructor, just like any other Web3 Provider\nconst web3 = new Web3(provider);\n\n// Or, if web3 is alreay initialized, you can call the 'setProvider' on web3, web3.eth, web3.shh and/or web3.bzz\nweb3.setProvider(provider)\n\n// ...\n// Write your code here.\n// ...\n\n// At termination, `provider.engine.stop()' should be called to finish the process elegantly.\nprovider.engine.stop();\n```\n\nBy default, the `HDWalletProvider` will use the address of the first address that's generated from the mnemonic. If you pass in a specific index, it'll use that address instead.\n\nParameters:\n\n| Parameter | Type | Default | Required | Description |\n| ------ | ---- | ------- | ----------- | ----------- |\n| `mnemonic` | *`string*` | null | [x] | 12 word mnemonic which addresses are created from. |\n| `provider` | `string\\|object` | `null` | [x] | URI or Ethereum client to send all other non-transaction-related Web3 requests |\n| `address_index` | `number` | `0` | [ ] | If specified, will tell the provider to manage the address at the index specified |\n| `num_addresses` | `number` | `1` | [ ] | If specified, will create `number` addresses when instantiated |\n| `shareNonce` | `boolean` | `true` | [ ] | If false, a new WalletProvider will track its own nonce-state |\n| `wallet_hdpath` | `string` | `\"m/44'/60'/0'/0/\"` | [ ] | If specified, will tell the wallet engine what derivation path should use to derive addresses. |\n\n\n### Private Keys\n\nInstead of a mnemonic, you can alternatively provide a private key or array of private keys as the first parameter. When providing an array, `address_index` and `num_addresses` are fully supported.\n\n```javascript\nconst HDWalletProvider = require(\"@truffle/hdwallet-provider\");\n//load single private key as string\nlet provider = new HDWalletProvider(\"3f841bf589fdf83a521e55d51afddc34fa65351161eead24f064855fc29c9580\", \"http://localhost:8545\");\n\n// Or, pass an array of private keys, and optionally use a certain subset of addresses\nconst privateKeys = [\n  \"3f841bf589fdf83a521e55d51afddc34fa65351161eead24f064855fc29c9580\",\n  \"9549f39decea7b7504e15572b2c6a72766df0281cea22bd1a3bc87166b1ca290\",\n];\nprovider = new HDWalletProvider(privateKeys, \"http://localhost:8545\", 0, 2); //start at address_index 0 and load both addresses\n```\n**NOTE: This is just an example. NEVER hard code production/mainnet private keys in your code or commit them to git. They should always be loaded from environment variables or a secure secret management system.**\n\n## Truffle Usage\n\nYou can easily use this within a Truffle configuration. For instance:\n\ntruffle-config.js\n```javascript\nconst HDWalletProvider = require(\"@truffle/hdwallet-provider\");\n\nconst mnemonic = \"mountains supernatural bird ...\";\n\nmodule.exports = {\n  networks: {\n    development: {\n      host: \"localhost\",\n      port: 8545,\n      network_id: \"*\" // Match any network id\n    },\n    ropsten: {\n      // must be a thunk, otherwise truffle commands may hang in CI\n      provider: () =>\n        new HDWalletProvider(mnemonic, \"https://ropsten.infura.io/v3/YOUR-PROJECT-ID\",\n            0, 1, true, \"m/44'/1'/0'/0/\"\n        ),\n      network_id: '3',\n    }\n  }\n};\n```\n","license":"MIT","scripts":{"test":"yarn build && mocha --exit -r ts-node/register test/**/*.test.ts","build":"tsc","prepare":"yarn build"},"_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"homepage":"https://github.com/trufflesuite/truffle/tree/master/packages/hdwallet-provider#readme","keywords":["etheruem","hd","mnemonic","provider","wallet"],"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/hdwallet-provider","type":"git"},"_npmVersion":"6.14.4","description":"HD Wallet-enabled Web3 provider","directories":{},"maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"haltman","email":"harry.j.altman@gmail.com"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"}],"_nodeVersion":"10.21.0","dependencies":{"bindings":"^1.5.0","@types/web3":"^1.0.20","any-promise":"^1.3.0","ethereumjs-tx":"^1.0.0","ethereumjs-util":"^6.1.0","ethereum-protocol":"^1.0.1","ethereumjs-wallet":"^0.6.3","source-map-support":"^0.5.19","ethereum-cryptography":"^0.1.3","@trufflesuite/web3-provider-engine":"15.0.13-0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"mocha":"8.0.1","ts-node":"8.10.2","typescript":"3.9.6","@types/bip39":"^2.4.2","@types/mocha":"^5.2.7","ganache-core":"2.11.2","@types/ethereumjs-tx":"^1.0.1","@types/ethereumjs-util":"^5.2.0","@types/ethereum-protocol":"^1.0.0","@types/web3-provider-engine":"^14.0.0"},"_npmOperationalInternal":{"tmp":"tmp/hdwallet-provider_1.0.41-0_1596822433486_0.009024869061653673","host":"s3://npm-registry-packages"},"_id":"@truffle/hdwallet-provider@1.0.41-0","version":"1.0.41-0"}