{"bugs":{"url":"https://github.com/trufflesuite/ganache-core/issues"},"dist":{"shasum":"97f63d7c515492b016e46bc73e70777d71f6f13e","tarball":"https://registry.npmjs.org/ganache-core/-/ganache-core-2.3.2-beta.0.tgz","fileCount":41,"integrity":"sha512-LumsHo2zzE0S7K7i0m8abROeXNs71RKMB2GKB3QTlfntxC0RIE9KVvfnCaq4IyqbdY9Q3SyOFF68rqDgmi0B9g==","signatures":[{"sig":"MEUCIETorIo9orD/j6ty9Tst50FCvCOUrGFxjm+WAkPs2asRAiEAitTgW3yqEtMDibA89EsFFmkSt7WAKlqtHG0FC2Zqk9o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1614860,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9GAoCRA9TVsSAnZWagAAXOIQAJ94n7xRsKU8b2nY4Ted\nYjiD1ji4G3axkrGx2Det0RT5a7abpEXY07y2fLQiHOM2gYaKkTFFVGYX8ZJW\n82BzxlyUBpi60p/+BK6JSHSM2cgCj3i1wF7r2TPzwRczuHCEm586xclsosF5\ngM5pQLugqZZrQqFx9SSHn6s69MxbCoR3x0tP6Ve77RlEFwqWpqefw2Txwr6w\n0gd8yLmqRif9qmVwEefqRtMRlOhs56psAMPJheAjiWoHlcv0UfpIWsBBfx+F\nKuIADQemW5k/A3uiALlz9/UNsEsWX7JRVIwyBU5Txh1erG53424b04G1vKh3\nij+Wg3DV4RIo+LTvucQrPlHidDvvMdELMeN/trCW5BarUm+xoatR4WU6+Rfa\nSKYYELqY+hV16HWmHX/fXHOylO5GvanJAvQw8BofK+A1OcJsWuPwTitX4IdU\nK2qXqJzp5NQ0gVcBmT0apdsKOQ6tldAEqQpdAUmz8RIILM2Do8VCPp76LeIz\nRzadBKBbRmtLaUVUPg7ajogLU5Vu0sCSYPFUTDnpNJxjfXcnxaIqG0SMLhdp\n3GLXR68e6d6B1CQeKLISd/YW5XZaq8u7tlMStj4TWgh5t5nLFoZZ1femtdjo\nf5EJe5Uj7338O0LU/7swA1SkLZJOw13e3N3OjC1P9+8/x5yfQGc2D1YCoKJU\nj3Gf\r\n=mLEG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","name":"ganache-core","husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"[![npm](https://img.shields.io/npm/v/ganache-core.svg)]()\r\n[![npm](https://img.shields.io/npm/dm/ganache-core.svg)]()\r\n[![Build Status](https://travis-ci.org/trufflesuite/ganache-core.svg?branch=master)](https://travis-ci.org/trufflesuite/ganache-core)\r\n# Ganache Core\r\n\r\nThis is the core code that powers the Ganache application and the the Ganache command line tool.\r\n\r\n# INSTALL\r\n\r\n`ganache-core` is written in Javascript and distributed as a Node package via `npm`. Make sure you have Node.js (>= v8.9.0) installed, and your environment is capable of installing and compiling `npm` modules.\r\n\r\n**macOS** Make sure you have the XCode Command Line Tools installed. These are needed in general to be able to compile most C based languages on your machine, as well as many npm modules.\r\n\r\n**Windows** See our [Windows install instructions](https://github.com/ethereumjs/testrpc/wiki/Installing-TestRPC-on-Windows).\r\n\r\n**Ubuntu/Linux** Follow the basic instructions for installing [Node.js](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions) and make sure that you have `npm` installed, as well as the `build-essential` `apt` package (it supplies `make` which you will need to compile most things). Use the official Node.js packages, *do not use the package supplied by your distribution.*\r\n\r\n\r\n```Bash\r\nnpm install ganache-core\r\n```\r\n\r\n# USAGE\r\n\r\nAs a Web3 provider:\r\n\r\n```javascript\r\nvar Ganache = require(\"ganache-core\");\r\nweb3.setProvider(Ganache.provider());\r\n```\r\n\r\nAs a general http server:\r\n\r\n```javascript\r\nvar Ganache = require(\"ganache-core\");\r\nvar server = Ganache.server();\r\nserver.listen(port, function(err, blockchain) {...});\r\n```\r\n\r\nBoth `.provider()` and `.server()` take a single object which allows you to specify behavior of the Ganache instance. This parameter is optional. Available options are:\r\n\r\n* `\"accounts\"`: `Array` of `Object`'s. Each object should have a balance key with a hexadecimal value. The key `secretKey` can also be specified, which represents the account's private key. If no `secretKey`, the address is auto-generated with the given balance. If specified, the key is used to determine the account's address.\r\n* `\"debug\"`: `boolean` - Output VM opcodes for debugging\r\n* `\"logger\"`: `Object` - Object, like `console`, that implements a `log()` function.\r\n* `\"mnemonic\"`: Use a specific HD wallet mnemonic to generate initial addresses.\r\n* `\"port\"`: Port number to listen on when running as a server.\r\n* `\"seed\"`: Use arbitrary data to generate the HD wallet mnemonic to be used.\r\n* `\"default_balance_ether\"`: `number` - The default account balance, specified in ether.\r\n* `\"total_accounts\"`: `number` - Number of accounts to generate at startup.\r\n* `\"fork\"`: `string` or `object` - When a `string`, same as `--fork` option above. Can also be a Web3 Provider object, optionally used in conjunction with the `fork_block_number` option below.\r\n* `\"fork_block_number\"`: `string` or `number` - Block number the provider should fork from, when the `fork` option is specified. If the `fork` option is specified as a string including the `@` sign and a block number, the block number in the `fork` parameter takes precedence.\r\n* `\"network_id\"`: `integer` - Same as `--networkId` option above.\r\n* `\"time\"`: `Date` - Date that the first block should start. Use this feature, along with the `evm_increaseTime` method to test time-dependent code.\r\n* `\"locked\"`: `boolean` - whether or not accounts are locked by default.\r\n* `\"unlocked_accounts\"`: `Array` - array of addresses or address indexes specifying which accounts should be unlocked.\r\n* `\"db_path\"`: `String` - Specify a path to a directory to save the chain database. If a database already exists, that chain will be initialized instead of creating a new one.\r\n* `\"db\"`: `Object` - Specify an alternative database instance, for instance [MemDOWN](https://github.com/level/memdown).\r\n* `\"ws\"`: Enable a websocket server. This is `true` by default.\r\n* `\"vmErrorsOnRPCResponse\"`: Whether to report runtime errors from EVM code as RPC errors. This is `true` by default to replicate the error reporting behavior of previous versions of ganache.\r\n* `\"hdPath\"`: The hierarchical deterministic path to use when generating accounts. Default: \"m/44'/60'/0'/0/\"\r\n* `\"allowUnlimitedContractSize\"`: Allows unlimited contract sizes while debugging. By setting this to `true`, the check within the EVM for contract size limit of 24KB (see [EIP-170](https://git.io/vxZkK)) is bypassed. Setting this to `true` **will** cause `ganache-core` to behave differently than production environments. (default: `false`; **ONLY** set to `true` during debugging).\r\n* `\"gasPrice\"`: Sets the default gas price for transactions if not otherwise specified. Must be specified as a hex string in wei. Defaults to `\"0x77359400\"`, or 2 gwei.\r\n* `\"gasLimit\"`: Sets the block gas limit. Must be specified as a hex string. Defaults to `\"0x6691b7\"`.\r\n* `\"keepAliveTimeout\"`: If using `.server()` - Sets the HTTP server's `keepAliveTimeout` in milliseconds. See the [NodeJS HTTP docs](https://nodejs.org/api/http.html#http_server_keepalivetimeout) for details. `5000` by default.\r\n\r\n# IMPLEMENTED METHODS\r\n\r\nThe RPC methods currently implemented are:\r\n\r\n* `bzz_hive` (stub)\r\n* `bzz_info` (stub)\r\n* `debug_traceTransaction`\r\n* `eth_accounts`\r\n* `eth_blockNumber`\r\n* `eth_call`\r\n* `eth_coinbase`\r\n* `eth_estimateGas`\r\n* `eth_gasPrice`\r\n* `eth_getBalance`\r\n* `eth_getBlockByNumber`\r\n* `eth_getBlockByHash`\r\n* `eth_getBlockTransactionCountByHash`\r\n* `eth_getBlockTransactionCountByNumber`\r\n* `eth_getCode` (only supports block number “latest”)\r\n* `eth_getCompilers`\r\n* `eth_getFilterChanges`\r\n* `eth_getFilterLogs`\r\n* `eth_getLogs`\r\n* `eth_getStorageAt`\r\n* `eth_getTransactionByHash`\r\n* `eth_getTransactionByBlockHashAndIndex`\r\n* `eth_getTransactionByBlockNumberAndIndex`\r\n* `eth_getTransactionCount`\r\n* `eth_getTransactionReceipt`\r\n* `eth_hashrate`\r\n* `eth_mining`\r\n* `eth_newBlockFilter`\r\n* `eth_newFilter` (includes log/event filters)\r\n* `eth_protocolVersion`\r\n* `eth_sendTransaction`\r\n* `eth_sendRawTransaction`\r\n* `eth_sign`\r\n* `eth_subscribe` (only for websocket connections. \"syncing\" subscriptions are not yet supported)\r\n* `eth_unsubscribe` (only for websocket connections. \"syncing\" subscriptions are not yet supported)\r\n* `eth_syncing`\r\n* `eth_uninstallFilter`\r\n* `net_listening`\r\n* `net_peerCount`\r\n* `net_version`\r\n* `miner_start`\r\n* `miner_stop`\r\n* `personal_listAccounts`\r\n* `personal_lockAccount`\r\n* `personal_newAccount`\r\n* `personal_importRawKey`\r\n* `personal_unlockAccount`\r\n* `personal_sendTransaction`\r\n* `shh_version`\r\n* `rpc_modules`\r\n* `web3_clientVersion`\r\n* `web3_sha3`\r\n\r\nThere’s also special non-standard methods that aren’t included within the original RPC specification:\r\n\r\n* `evm_snapshot` : Snapshot the state of the blockchain at the current block. Takes no parameters. Returns the integer id of the snapshot created.\r\n* `evm_revert` : Revert the state of the blockchain to a previous snapshot. Takes a single parameter, which is the snapshot id to revert to. If no snapshot id is passed it will revert to the latest snapshot. Returns `true`.\r\n* `evm_increaseTime` : Jump forward in time. Takes one parameter, which is the amount of time to increase in seconds. Returns the total time adjustment, in seconds.\r\n* `evm_mine` : Force a block to be mined. Takes one optional parameter, which is the timestamp a block should setup as the mining time. Mines a block independent of whether or not mining is started or stopped.\r\n\r\n# Unsupported Methods\r\n\r\n* `eth_compileSolidity`: If you'd like Solidity compilation in Javascript, please see the [solc-js project](https://github.com/ethereum/solc-js).\r\n\r\n\r\n# TESTING\r\n\r\nRun tests via:\r\n\r\n```\r\n$ npm test\r\n```\r\n\r\n# LICENSE\r\n[MIT](https://tldrlegal.com/license/mit-license)\r\n","engines":{"node":">=8.9.0"},"gitHead":"2eec5a8f6096f6005ccb2c9d9600baeb8d3d57c7","license":"MIT","scripts":{"test":"npm run _lint && npm run _mocha","_lint":"eslint --ignore-path .gitignore .","build":"webpack-cli --config ./webpack/node/core.webpack.config.js","_mocha":"mocha --check-leaks --recursive --globals _scratch,sanitizedData","format":"prettier --write \"{lib,perf,test}/**/*.js\" && eslint --fix --ignore-path .gitignore .","build-web":"webpack-cli --config ./webpack/web-experimental/core.webpack.config.js","test-build":"cross-env TEST_BUILD=node npm run _mocha","postpublish":"rm npm-shrinkwrap.json && mv npm-shrinkwrap.json.bak npm-shrinkwrap.json && npm install","postshrinkwrap":"json -f npm-shrinkwrap.json -I -e \"d=this.dependencies;d.keccakjs && (delete d.keccakjs.requires.sha3);d.sha3.optional=true;d['scrypt.js'] && (delete d['scrypt.js'].requires.scrypt);d.scrypt.optional=true;d['scrypt.js'] && (d['scrypt.js'].requires['js-scrypt']='0.2.0');\";","prepublishOnly":"npm run test && npm run build && npm run test-build && mv npm-shrinkwrap.json npm-shrinkwrap.json.bak && npm prune --only=prod && npm install json --save-dev --no-shrinkwrap -E && npm shrinkwrap","test-web-experimental":"cross-env TEST_BUILD=web-experimental npm run _mocha"},"_npmUser":{"name":"davidmurdoch","email":"david@davidmurdoch.com"},"homepage":"https://github.com/trufflesuite/ganache-core#readme","prettier":{"printWidth":120,"arrowParens":"always"},"deprecated":"Please update ganache-core to @latest.","repository":{"url":"git+https://github.com/trufflesuite/ganache-core.git","type":"git"},"_npmVersion":"6.4.1","description":"[![npm](https://img.shields.io/npm/v/ganache-core.svg)]()\r [![npm](https://img.shields.io/npm/dm/ganache-core.svg)]()\r [![Build Status](https://travis-ci.org/trufflesuite/ganache-core.svg?branch=master)](https://travis-ci.org/trufflesuite/ganache-core)\r #","directories":{"lib":"./lib"},"lint-staged":{"*.js":["prettier --write","eslint --fix --ignore-path .gitignore","git add"]},"maintainers":[{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"davidmurdoch","email":"david@davidmurdoch.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"tcoulter","email":"tim@timothyjcoulter.com"}],"_nodeVersion":"10.13.0","dependencies":{"tmp":"0.0.33","heap":"0.2.6","pify":"4.0.0","sha3":"1.2.2","web3":"1.0.0-beta.35","async":"2.6.1","bip39":"2.5.0","bn.js":"4.11.8","clone":"2.1.2","debug":"3.1.0","lodash":"4.17.10","scrypt":"6.0.3","levelup":"3.1.1","cachedown":"1.0.0","js-scrypt":"^0.2.0","websocket":"1.0.26","seedrandom":"2.4.4","eth-sig-util":"2.0.2","encoding-down":"5.0.4","ethereumjs-tx":"1.3.7","ethereumjs-vm":"2.4.0","ethereumjs-abi":"0.6.5","level-sublevel":"6.6.4","ethereumjs-util":"5.2.0","ethereumjs-block":"1.2.2","ethereumjs-wallet":"0.6.2","abstract-leveldown":"3.0.0","ethereumjs-account":"2.0.5","source-map-support":"0.5.9","merkle-patricia-tree":"2.3.1","web3-provider-engine":"14.1.0"},"eslintConfig":{"env":{"es6":true,"node":true},"root":true,"rules":{"semi":["error","always"],"curly":["error","all"],"quotes":["error","double"],"max-len":["error",120,{"ignoreRegExpLiterals":true}],"wrap-iife":["error","outside"],"brace-style":["error","1tbs",{"allowSingleLine":false}],"space-before-function-paren":["error","never"]},"extends":"standard","parserOptions":{"sourceType":"module","ecmaVersion":8,"ecmaFeatures":{"impliedStrict":true}}},"_hasShrinkwrap":true,"readmeFilename":"README.md","devDependencies":{"json":"9.0.6","solc":"0.4.24","temp":"0.8.3","husky":"^1.1.3","mocha":"5.2.0","eslint":"5.7.0","memdown":"^1.3.1","request":"^2.88.0","webpack":"4.17.1","prettier":"^1.14.3","browserfs":"1.4.3","cross-env":"5.2.0","portfinder":"^1.0.18","lint-staged":"^8.0.4","webpack-cli":"3.1.0","assert-match":"^1.1.1","eslint-plugin-node":"7.0.1","eslint-plugin-import":"2.14.0","eslint-plugin-promise":"4.0.1","eslint-config-standard":"12.0.0","eslint-plugin-standard":"4.0.0","webpack-bundle-size-analyzer":"2.7.0"},"optionalDependencies":{"sha3":"1.2.2","scrypt":"6.0.3"},"_npmOperationalInternal":{"tmp":"tmp/ganache-core_2.3.2-beta.0_1542742055003_0.9826893925402183","host":"s3://npm-registry-packages"},"_id":"ganache-core@2.3.2-beta.0","version":"2.3.2-beta.0"}