{"name":"ethereumjs-vm","version":"4.0.0-beta.1","description":"An Ethereum VM implementation","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build:dist":"ethereumjs-config-build","prepublishOnly":"npm run lint && npm run build:dist && npm run testBuildIntegrity","coverage":"nyc npm run coverageTests && nyc report --reporter=text-lcov > .nyc_output/lcov.info","coverageTests":"npm run build:dist && tape './tests/api/**/*.js' ./tests/tester.js -s --dist","coveralls":"npm run coverage && if [ -n \"$COVERALLS_REPO_TOKEN\" ]; then coveralls <.nyc_output/lcov.info; fi","docs:build":"typedoc lib","testVM":"node ./tests/tester -v","testStateByzantium":"npm run build:dist && node ./tests/tester -s --fork='Byzantium' --dist","testStateConstantinople":"npm run build:dist && node ./tests/tester -s --fork='Constantinople' --dist","testStatePetersburg":"npm run build:dist && node ./tests/tester -s --fork='Petersburg' --dist","testBuildIntegrity":"npm run build:dist && node ./tests/tester -s --dist --test='stackOverflow'","testBlockchain":"npm run build:dist && node --stack-size=1500 ./tests/tester -b --fork='Petersburg' --dist --excludeDir='GeneralStateTests'","testBlockchainGeneralStateTests":"npm run build:dist && node --stack-size=1500 ./tests/tester -b --dist --dir='GeneralStateTests'","testAPI":"npm run build:dist && tape './tests/api/**/*.js'","testAPI:browser":"npm run build:dist && karma start karma.conf.js","test":"echo \"[INFO] Generic test cmd not used. See package.json for more specific test run cmds.\"","tslint":"ethereumjs-config-tslint","tslint:fix":"ethereumjs-config-tslint-fix","lint":"ethereumjs-config-lint","lint:fix":"ethereumjs-config-lint-fix","format":"ethereumjs-config-format","format:fix":"ethereumjs-config-format-fix","formatTest":"node ./scripts/formatTest","tsc":"ethereumjs-config-tsc"},"husky":{"hooks":{"pre-push":"npm run lint"}},"repository":{"type":"git","url":"git+https://github.com/ethereumjs/ethereumjs-vm.git"},"keywords":["ethereum","VM"],"dependencies":{"async":"^2.1.2","async-eventemitter":"^0.2.2","core-js-pure":"^3.0.1","ethereumjs-account":"^3.0.0","ethereumjs-block":"~2.2.0","ethereumjs-blockchain":"^3.4.0","ethereumjs-common":"1.2.1","ethereumjs-util":"^6.1.0","fake-merkle-patricia-tree":"^1.0.1","functional-red-black-tree":"^1.0.1","merkle-patricia-tree":"^2.3.2","rustbn.js":"~0.2.0","safe-buffer":"^5.1.1","util.promisify":"^1.0.0"},"devDependencies":{"@ethereumjs/config-nyc":"^1.1.1","@ethereumjs/config-prettier":"^1.1.1","@ethereumjs/config-tsc":"^1.1.1","@ethereumjs/config-tslint":"^1.1.1","@types/bn.js":"^4.11.5","@types/core-js":"^2.5.0","@types/lru-cache":"^5.1.0","@types/node":"^11.13.4","browserify":"^16.2.3","coveralls":"^3.0.0","ethereumjs-testing":"git+https://github.com/ethereumjs/ethereumjs-testing.git#v1.2.7","ethereumjs-tx":"1.3.7","husky":"^2.1.0","karma":"^4.0.1","karma-browserify":"^6.0.0","karma-chrome-launcher":"^2.2.0","karma-detect-browsers":"^2.3.3","karma-firefox-launcher":"^1.1.0","karma-tap":"^4.1.4","level":"^4.0.0","level-mem":"^3.0.1","minimist":"^1.1.1","nyc":"^12.0.2","prettier":"^1.16.4","rlp":"^2.2.3","standard":"^10.0.0","tap-spec":"^5.0.0","tape":"4.6.3","tslint":"^5.16.0","typedoc":"^0.14.2","typedoc-plugin-markdown":"^1.2.1","typescript":"^3.4.3","typestrict":"^1.0.2"},"author":{"name":"mjbecze","email":"mjbecze@gmail.com"},"contributors":[{"name":"Alex Beregszaszi","email":"alex@rtfs.hu"}],"license":"MPL-2.0","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-vm/issues"},"homepage":"https://github.com/ethereumjs/ethereumjs-vm","nyc":{"exclude":["tests"]},"standard":{"ignore":["dist/**","examples/runcode-browserify.js"]},"readme":"# SYNOPSIS\n\n[![NPM Package](https://img.shields.io/npm/v/ethereumjs-vm.svg?style=flat-square)](https://www.npmjs.org/package/ethereumjs-vm)\n[![Build Status](https://img.shields.io/circleci/project/github/ethereumjs/ethereumjs-vm/master.svg)](https://circleci.com/gh/ethereumjs/ethereumjs-vm)\n[![Coverage Status](https://img.shields.io/coveralls/ethereumjs/ethereumjs-vm.svg?style=flat-square)](https://coveralls.io/r/ethereumjs/ethereumjs-vm)\n[![Gitter](https://img.shields.io/gitter/room/ethereum/ethereumjs.svg?style=flat-square)](https://gitter.im/ethereum/ethereumjs)\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\nImplements Ethereum's VM in Javascript.\n\n#### Fork Support\n\nThe VM currently supports the following hardfork rules:\n\n- `Byzantium`\n- `Constantinople`\n- `Petersburg` (default)\n- `Istanbul` (`DRAFT`)\n\nIf you are still looking for a [Spurious Dragon](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-607.md) compatible version of this library install the latest of the `2.2.x` series (see [Changelog](./CHANGELOG.md)).\n\n##### Istanbul Harfork Support\n\nWith the `v4.0.0` release we are starting to add implementations of EIPs being\ncandidates or accepted for inclusion within the `Istanbul` hardfork. You can\nactivate a preliminary `Istanbul` VM by using the `istanbul` `hardfork` option\nflag.\n\nCurrently supported `Istanbul` EIPs:\n\n- [EIP-1108](https://eips.ethereum.org/EIPS/eip-1803) (Candidate): `alt_bn128` Gas Cost Reductions, see PR [#540](https://github.com/ethereumjs/ethereumjs-vm/pull/540)\n\nNote that this is highly experimental and solely meant for experimental purposes,\nsince `Istanbul` scope is not yet finalized and most EIPs are still in a `DRAFT`\nstate and likely subject to updates and changes.\n\nA final `Istanbul` VM will be released along a major version bump to likely\n`v5.0.0` or `v6.0.0`.\n\nHave a look at the corresponding issue to follow the discussion and current state on\n[Istanbul planning](https://github.com/ethereumjs/ethereumjs-vm/issues/501).\n\n# INSTALL\n\n`npm install ethereumjs-vm`\n\n# USAGE\n\n```javascript\nconst BN = require('bn.js')\nvar VM = require('ethereumjs-vm').default\n\n// Create a new VM instance\n// For explicity setting the HF use e.g. `new VM({ hardfork: 'petersburg' })`\nconst vm = new VM()\n\nconst STOP = '00'\nconst ADD = '01'\nconst PUSH1 = '60'\n\n// Note that numbers added are hex values, so '20' would be '32' as decimal e.g.\nconst code = [PUSH1, '03', PUSH1, '05', ADD, STOP]\n\nvm.on('step', function(data) {\n  console.log(`Opcode: ${data.opcode.name}\\tStack: ${data.stack}`)\n})\n\nvm.runCode(\n  {\n    code: Buffer.from(code.join(''), 'hex'),\n    gasLimit: new BN(0xffff),\n  },\n  function(err, results) {\n    console.log('Returned : ' + results.return.toString('hex'))\n    console.log('gasUsed  : ' + results.gasUsed.toString())\n    console.log('Error    : ' + err)\n  },\n)\n```\n\nAlso more examples can be found here\n\n- [examples](./examples)\n- [old blog post](https://wanderer.github.io/ethereum/nodejs/code/2014/08/12/running-contracts-with-vm/)\n\n# BROWSER\n\nTo build for standalone use in the browser, install `browserify` and check [run-transactions-simple example](https://github.com/ethereumjs/ethereumjs-vm/tree/master/examples/run-transactions-simple). This will give you a global variable `EthVM` to use. The generated file will be at `./examples/run-transactions-simple/build.js`.\n\n# API\n\n## VM\n\nFor documentation on `VM` instantiation, exposed API and emitted `events` see generated [API docs](./docs/README.md).\n\n## StateManger\n\nThe API for the `StateManager` is currently in `Beta`, separate documentation can be found [here](./docs/classes/statemanager.md), see also [release notes](https://github.com/ethereumjs/ethereumjs-vm/releases/tag/v2.5.0) from the `v2.5.0` VM release for details on the `StateManager` rewrite.\n\n# Internal Structure\n\nThe VM processes state changes at many levels.\n\n- **runBlockchain**\n  - for every block, runBlock\n- **runBlock**\n  - for every tx, runTx\n  - pay miner and uncles\n- **runTx**\n  - check sender balance\n  - check sender nonce\n  - runCall\n  - transfer gas charges\n- **runCall**\n  - checkpoint state\n  - transfer value\n  - load code\n  - runCode\n  - materialize created contracts\n  - revert or commit checkpoint\n- **runCode**\n  - iterate over code\n  - run op codes\n  - track gas usage\n- **OpFns**\n  - run individual op code\n  - modify stack\n  - modify memory\n  - calculate fee\n\nThe opFns for `CREATE`, `CALL`, and `CALLCODE` call back up to `runCall`.\n\n# DEVELOPMENT\n\nDeveloper documentation - currently mainly with information on testing and debugging - can be found [here](./developer.md).\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\n[MPL-2.0](https://www.mozilla.org/MPL/2.0/)\n","readmeFilename":"README.md","gitHead":"df5a1b5d6865aecd1937f98f20320353efa5fdc0","_id":"ethereumjs-vm@4.0.0-beta.1","_npmVersion":"6.4.1","_nodeVersion":"8.15.1","_npmUser":{"name":"holgerd77","email":"Holger.Drewes@gmail.com"},"dist":{"integrity":"sha512-+Qc1x9rQNYWIMbYCQqWGwUG6MMo7leler1pkzFXqhX4diBs/zbk6Lyb0ePutj4SkXzBadXQFCUYRAOz4b5j8Wg==","shasum":"d9c60f8ac0f5473a071b85eda9ad3b7159022976","tarball":"http://registry-npm.ywwl.com/ethereumjs-vm/download/ethereumjs-vm-4.0.0-beta.1.tgz","fileCount":97,"unpackedSize":434961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdCglaCRA9TVsSAnZWagAAEH8P/RvhgN1GHAMs/o1JWHxU\ncWvu8FddPeR5JqEVCtOTIbtfPcK2gBELaMlm77jEmfEMeAZQK/0ScrghtVsm\nasFfJJRu4Kg4zhobKmYL6fcVh7rX4EAujkoALsQJC2GtlvxQbmAXhw5+0MQS\n7/nwG+5ZLMg2upi1rvuILHC+2lkxlkYYTWOIJgYgx8V6IA5Om6iYHvVXgZQB\nBqZ6zoHiQNPicLYJCjjvTy9u0gokTtIdu8HVcBphvZFDxl20lWBwtlRJ2tpQ\n7wBafCDG1MkaxuQTdBFvh4xT1OHffCWGdToZmVEB4JV4E1+8iP62xOvtWBjd\n+aCO+DIUHh+34kVMbS61fw8vPTMauKSYgjjPoVXPKkfKeRIZlqg1xaKhBUHP\nE7cs0ZmVVS6wfxUYBCRMI9MbImAp7KgDiaEbrlBnTMuDCY74X3CBGY1Z3KyB\nJrSYmaeUneIyapMDO5JSECEdcdKuhhOeZbx87yNuV1CL+meQueCsTY53xeK4\nQpde6pAadCV8MQOl8g5ElpNfbWmVZIGK2j45Dq3WdYLvSFDm0N4gqL5sGLnZ\nh3dXx8yqhDUOI7a+WoxWm8ptXhLbp5WxJ6OYkACXOzLHzdzIArf0RMasC84l\nXhbutH9xW0RZJJTXQyKTjYQ+Cgip3J/Txmag2u/uX3tk+E2f0CSiekzFjCoY\n6HsW\r\n=S/Gz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9YeartIifYFtTaoNHgsZnjZeXe985Cmqb+dQGciXmLQIgHuyeOQUQPID6xiYRnWWOYnhJcYgaPm7lDIPYDVg1gI8="}],"size":88549,"noattachment":false,"key":"/ethereumjs-vm/-/ethereumjs-vm-4.0.0-beta.1.tgz"},"maintainers":[{"email":"alex@rtfs.hu","name":"axic"},{"email":"Holger.Drewes@gmail.com","name":"holgerd77"},{"email":"j-wasinger@hotmail.com","name":"jwasinger"},{"email":"null_radix@riseup.net","name":"null_radix"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ethereumjs-vm_4.0.0-beta.1_1560938842338_0.255891226074233"},"_hasShrinkwrap":false,"publish_time":1560938842441,"_cnpm_publish_time":1560938842441,"dist-tags":{"beta":"4.0.0-beta.1","latest":"4.2.0"}}