{"bugs":{"url":"https://github.com/trufflesuite/ganache-core/issues"},"dist":{"shasum":"de088176cc09895c4f4ef155d7c049e945f95307","tarball":"https://registry.npmjs.org/ganache-core/-/ganache-core-2.1.0-beta.4.tgz","fileCount":73,"integrity":"sha512-rB9P9yIry7do5K/CqTY8JiF5ge+iUStqoUMCKwmjkPnLzGaddSP2mjxyKxfrKsY0wO7kMoReexSGpxN3foFyYA==","signatures":[{"sig":"MEUCIQCsrT4L8a8Fcwm6lfB92xQBbMFIGfqk26x8vgjvCVpFhwIgWz4HAq6dzEhYYhvyV51NjUIpwd8SsVkFmRHKYyXVUig=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":324747},"main":"./index.js","name":"ganache-core","readme":"[![npm](https://img.shields.io/npm/v/ganache-core.svg)]()\n[![npm](https://img.shields.io/npm/dm/ganache-core.svg)]()\n[![Build Status](https://travis-ci.org/trufflesuite/ganache-core.svg?branch=master)](https://travis-ci.org/trufflesuite/ganache-core)\n# Ganache Core\n\nThis is the core code that powers the Ganache application and the the Ganache command line tool.\n\n# INSTALL\n\n`ganache-core` is written in Javascript and distributed as a Node package via `npm`. Make sure you have Node.js (>= v6.11.5) installed, and your environment is capable of installing and compiling `npm` modules.\n\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.\n\n**Windows** See our [Windows install instructions](https://github.com/ethereumjs/testrpc/wiki/Installing-TestRPC-on-Windows).\n\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.*\n\n\n```Bash\nnpm install ganache-core\n```\n\n# USAGE\n\nAs a Web3 provider:\n\n```javascript\nvar Ganache = require(\"ganache-core\");\nweb3.setProvider(Ganache.provider());\n```\n\nAs a general http server:\n\n```javascript\nvar Ganache = require(\"ganache-core\");\nvar server = Ganache.server();\nserver.listen(port, function(err, blockchain) {...});\n```\n\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:\n\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.\n* `\"debug\"`: `boolean` - Output VM opcodes for debugging\n* `\"logger\"`: `Object` - Object, like `console`, that implements a `log()` function.\n* `\"mnemonic\"`: Use a specific HD wallet mnemonic to generate initial addresses.\n* `\"port\"`: Port number to listen on when running as a server.\n* `\"seed\"`: Use arbitrary data to generate the HD wallet mnemonic to be used.\n* `\"default_balance_ether\"`: `number` - The default account balance, specified in ether.\n* `\"total_accounts\"`: `number` - Number of accounts to generate at startup.\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.\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.\n* `\"network_id\"`: `integer` - Same as `--networkId` option above.\n* `\"time\"`: `Date` - Date that the first block should start. Use this feature, along with the `evm_increaseTime` method to test time-dependent code.\n* `\"locked\"`: `boolean` - whether or not accounts are locked by default.\n* `\"unlocked_accounts\"`: `Array` - array of addresses or address indexes specifying which accounts should be unlocked.\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.\n* `\"db\"`: `Object` - Specify an alternative database instance, for instance [MemDOWN](https://github.com/level/memdown).\n* `\"ws\"`: Enable a websocket server. This is `true` by default.\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.\n\n# IMPLEMENTED METHODS\n\nThe RPC methods currently implemented are:\n\n* `bzz_hive` (stub)\n* `bzz_info` (stub)\n* `debug_traceTransaction`\n* `eth_accounts`\n* `eth_blockNumber`\n* `eth_call`\n* `eth_coinbase`\n* `eth_estimateGas`\n* `eth_gasPrice`\n* `eth_getBalance`\n* `eth_getBlockByNumber`\n* `eth_getBlockByHash`\n* `eth_getBlockTransactionCountByHash`\n* `eth_getBlockTransactionCountByNumber`\n* `eth_getCode` (only supports block number “latest”)\n* `eth_getCompilers`\n* `eth_getFilterChanges`\n* `eth_getFilterLogs`\n* `eth_getLogs`\n* `eth_getStorageAt`\n* `eth_getTransactionByHash`\n* `eth_getTransactionByBlockHashAndIndex`\n* `eth_getTransactionByBlockNumberAndIndex`\n* `eth_getTransactionCount`\n* `eth_getTransactionReceipt`\n* `eth_hashrate`\n* `eth_mining`\n* `eth_newBlockFilter`\n* `eth_newFilter` (includes log/event filters)\n* `eth_protocolVersion`\n* `eth_sendTransaction`\n* `eth_sendRawTransaction`\n* `eth_sign`\n* `eth_subscribe` (only for websocket connections. \"syncing\" subscriptions are not yet supported)\n* `eth_unsubscribe` (only for websocket connections. \"syncing\" subscriptions are not yet supported)\n* `eth_syncing`\n* `eth_uninstallFilter`\n* `net_listening`\n* `net_peerCount`\n* `net_version`\n* `miner_start`\n* `miner_stop`\n* `personal_listAccounts`\n* `personal_lockAccount`\n* `personal_newAccount`\n* `personal_importRawKey`\n* `personal_unlockAccount`\n* `personal_sendTransaction`\n* `shh_version`\n* `rpc_modules`\n* `web3_clientVersion`\n* `web3_sha3`\n\nThere’s also special non-standard methods that aren’t included within the original RPC specification:\n\n* `evm_snapshot` : Snapshot the state of the blockchain at the current block. Takes no parameters. Returns the integer id of the snapshot created.\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`.\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.\n* `evm_mine` : Force a block to be mined. Takes no parameters. Mines a block independent of whether or not mining is started or stopped.\n\n# Unsupported Methods\n\n* `eth_compileSolidity`: If you'd like Solidity compilation in Javascript, please see the [solc-js project](https://github.com/ethereum/solc-js).\n\n\n# TESTING\n\nRun tests via:\n\n```\n$ npm test\n```\n\n# LICENSE\n[MIT](https://tldrlegal.com/license/mit-license)\n","gitHead":"08842b51fe86259993b685c8a9b245cc7686aa76","license":"MIT","scripts":{"test":"mocha"},"_npmUser":{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},"homepage":"https://github.com/trufflesuite/ganache-core#readme","deprecated":"Please update ganache-core to @latest.","repository":{"url":"git+https://github.com/trufflesuite/ganache-core.git","type":"git"},"_npmVersion":"5.5.1","description":"[![npm](https://img.shields.io/npm/v/ganache-core.svg)]() [![npm](https://img.shields.io/npm/dm/ganache-core.svg)]() [![Build Status](https://travis-ci.org/trufflesuite/ganache-core.svg?branch=master)](https://travis-ci.org/trufflesuite/ganache-core) # Ga","directories":{"lib":"./lib"},"maintainers":[{"name":"benjamincburns","email":"benjamin.c.burns@gmail.com"},{"name":"cgewecke","email":"christophergewecke@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"tcoulter","email":"tim@timothyjcoulter.com"}],"_nodeVersion":"9.3.0","dependencies":{"tmp":"0.0.31","chai":"^3.5.0","heap":"~0.2.6","pify":"^3.0.0","solc":"0.4.18","temp":"^0.8.3","web3":"^1.0.0-beta.30","async":"^2.5.0","bip39":"~2.4.0","bn.js":"4.11.6","clone":"^2.1.1","mocha":"~3.3.0","yargs":"^7.0.2","lodash":"^4.17.5","levelup":"^1.1.0","cachedown":"^1.0.0","js-scrypt":"^0.2.0","websocket":"^1.0.24","seedrandom":"~2.4.2","prepend-file":"^1.3.1","ethereumjs-tx":"^1.3.0","ethereumjs-vm":"2.3.3","level-sublevel":"^6.6.1","shebang-loader":"0.0.1","ethereumjs-util":"^5.1.5","ethereumjs-block":"~1.2.2","ethereumjs-wallet":"~0.6.0","localstorage-down":"^0.6.7","abstract-leveldown":"^3.0.0","ethereumjs-account":"~2.0.4","merkle-patricia-tree":"^2.2.0","web3-provider-engine":"^13.6.5","fake-merkle-patricia-tree":"~1.0.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"memdown":"^1.3.1","assert-match":"^1.1.1"},"_npmOperationalInternal":{"tmp":"tmp/ganache-core_2.1.0-beta.4_1519729004691_0.015841562104802476","host":"s3://npm-registry-packages"},"_id":"ganache-core@2.1.0-beta.4","version":"2.1.0-beta.4"}