{"name":"ethereumjs-common","version":"0.3.0","description":"Resources common to all Ethereum implementations","main":"index.js","scripts":{"coverage":"nyc npm run test && nyc report --reporter=text-lcov > .nyc_output/lcov.info","coveralls":"npm run coverage && coveralls <.nyc_output/lcov.info","lint":"standard","test":"npm run lint && node tests/","build:docs":"documentation build ./index.js --format md --shallow > ./docs/index.md"},"repository":{"type":"git","url":"git+https://github.com/ethereumjs/ethereumjs-common.git"},"keywords":["ethereum","ethereumjs","constants","parameters","genesis","networks","bootstrap"],"nyc":{"exclude":"tests/*.js"},"author":"","license":"MIT","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-common/issues"},"homepage":"https://github.com/ethereumjs-ethereumjs/common","devDependencies":{"coveralls":"^3.0.1","documentation":"^6.3.2","nyc":"^11.7.1","standard":"^11.0.1","tape":"^4.2.0"},"maintainers":[{"email":"alex@rtfs.hu","name":"axic"},{"email":"Holger.Drewes@gmail.com","name":"holgerd77"},{"email":"j-wasinger@hotmail.com","name":"jwasinger"}],"dependencies":{},"gitHead":"4620975adc3e89997c5ebf366ec22ad06a329a4d","_id":"ethereumjs-common@0.3.0","_npmVersion":"5.6.0","_nodeVersion":"8.4.0","_npmUser":{"name":"holgerd77","email":"Holger.Drewes@gmail.com"},"dist":{"integrity":"sha512-uCHwmKWFsGeCcxPJVKJ9uauY+VUqPck8iM7XwjvuxbYoyNeW+FkVZXALO8bgkp3NMO2X7tbSnzqecYDKUPIeYA==","shasum":"ca570c2e1caa40d8ed010326f88eba59614f01e1","tarball":"http://registry-npm.ywwl.com/ethereumjs-common/download/ethereumjs-common-0.3.0.tgz","fileCount":28,"unpackedSize":722391,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbB/0iCRA9TVsSAnZWagAAfqsP/iaQHHKo8S4VPpPC/xcJ\nh3N4tn1milIbvKn5IrfVKLXUc2neir/shc0A14zz4h7B3R35NhHlM74wp5Kd\njESBKcSqs0yFFxe0iFJtWZj/yYWLevf2gK1a0XO4vrSbXF/Rr7VKDUxkz2QC\nxUpEaXXiEbPkSxmtcdT1SS3DwsPnspHFGrn5KjcLkhUf9eCIpqf51g3C23ki\noqAJeQZSvFh4vVB4uApyFZDQaaKjZtjr/lR9xguXKjd9Hmn+bKZEc2jmjJZm\n4NhO21UIOy88Loz1NgWj+o/Y2+8Q2wzpDFsFyehDvuxThJkcKt+2KCxwmX0C\nONztDnxnO96qQjmHMcFYw3ld5gh5IyDBsZRR9YiNAmDnFpGX4LK9N+0/oLVg\nTEHXtJXXOBLNk7guD0y2UkPC1NZQkxnutApnnewtmAFggFu6WVAuib585Zzg\nJla/v02l2ZovfjryvCzJlawUUmLfp7BCAHCwspI9NGVi1Eew6QvtnT0nz5lG\nkp0diUJ/IclMgXCmJe0CXf57n5gPBSpPWvLAFvvzbQLPDawFBggZVvV9iJQq\nLqMo/vzhaJknmbMzZG0lFkfiNnoe6mv+8yNFOoLFYToWjKQekgz+/9TkiQWT\n9zzvLNDVIiiNZ1JIfmLErJT/FdFTpQn55MAUGnauLxR7LfRESwzxE7MXRgnn\nv+xn\r\n=8jJm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBa68hA+VRNcwLBxtRb4d5rNzYkuaBqHZJdv0BDMj7FtAiEAw+pSpEZqodYsUbasx3o16fsVDnqIOJbPBo+DGv/dYBA="}],"size":269873,"noattachment":false,"key":"/ethereumjs-common/-/ethereumjs-common-0.3.0.tgz"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ethereumjs-common_0.3.0_1527250209802_0.7840540339642825"},"_hasShrinkwrap":false,"deprecated":"New package name format for new versions: @ethereumjs/common. Please update.","readme":"# ethereumjs-common\n\n[![NPM Package][common-npm-badge]][common-npm-link]\n[![GitHub Issues][common-issues-badge]][common-issues-link]\n[![Actions Status][common-actions-badge]][common-actions-link]\n[![Code Coverage][common-coverage-badge]][common-coverage-link]\n[![Gitter][gitter-badge]][gitter-link]\n\n[![js-standard-style][js-standard-style-badge]][js-standard-style-link]\n\nResources common to all Ethereum implementations.\n\nSucceeds the old [ethereum/common](https://github.com/ethereumjs/common/) library.\n\n# INSTALL\n\n`npm install ethereumjs-common`\n\n# USAGE\n\nAll parameters can be accessed through the `Common` class which can be required through the\nmain package and instantiated either with just the `chain` (e.g. 'mainnet') or the `chain`\ntogether with a specific `hardfork` provided.\n\nHere are some simple usage examples:\n\n```javascript\nconst Common = require('ethereumjs-common')\n\n// Instantiate with only the chain\nlet c = new Common('ropsten')\nc.param('gasPrices', 'ecAddGas', 'byzantium') // 500\n\n// Chain and hardfork provided\nc = new Common('ropsten', 'byzantium')\nc.param('pow', 'minerReward') // 3000000000000000000\n\n// Access genesis data for Ropsten network\nc.genesis().hash // 0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d\n\n// Get bootstrap nodes for chain/network\nc.bootstrapNodes() // Array with current nodes\n```\n\nIt is encouraged to also explicitly set the `supportedHardforks` if the initializing library\nonly supports a certain range of `hardforks`:\n\n```javascript\nlet c = new Common('ropsten', null, ['byzantium', 'constantinople', 'petersburg'])\n```\n\nThis will e.g. throw an error when a param is requested for an unsupported hardfork and\nlike this prevents unpredicted behaviour.\n\n# API\n\nSee the API documentation for a full list of functions for accessing specific chain and\ndepending hardfork parameters. There are also additional helper functions like\n`paramByBlock (topic, name, blockNumber)` or `hardforkIsActiveOnBlock (hardfork, blockNumber)`\nto ease `blockNumber` based access to parameters.\n\n- [API Docs](./docs/README.md)\n\n# Hardfork Params\n\n## Active Hardforks\n\nThere are currently parameter changes by the following past and future hardfork by the\nlibrary supported:\n\n- `chainstart`\n- `homestead`\n- `dao`\n- `tangerineWhistle`\n- `spuriousDragon`\n- `byzantium`\n- `constantinople`\n- `petersburg` (aka `constantinopleFix`, apply together with `constantinople`)\n- `istanbul`\n- `muirGlacier`\n\n## Future Hardforks\n\nThe `muirGlacier` HF delaying the difficulty bomb and scheduled for January 2020\nis supported by the library since `v1.5.0`.\n\n## Parameter Access\n\nFor hardfork-specific parameter access with the `param()` and `paramByBlock()` functions\nyou can use the following `topics`:\n\n- `gasConfig`\n- `gasPrices`\n- `vm`\n- `pow`\n- `casper`\n- `sharding`\n\nSee one of the hardfork files like `byzantium.json` in the `hardforks` directory\nfor an overview. For consistency, the chain start (`chainstart`) is considered an own\nhardfork.\n\nThe hardfork-specific json files only contain the deltas from `chainstart` and\nshouldn't be accessed directly until you have a specific reason for it.\n\nNote: The list of `gasPrices` and gas price changes on hardforks is consistent\nbut not complete, so there are currently gas price values missing (PRs welcome!).\n\n# Chain Params\n\nSupported chains:\n\n- `mainnet`\n- `ropsten`\n- `rinkeby`\n- `kovan`\n- `goerli` (final configuration since `v1.1.0`)\n- Private/custom chain parameters\n\nThe following chain-specific parameters are provided:\n\n- `name`\n- `chainId`\n- `networkId`\n- `genesis` block header values\n- `hardforks` block numbers\n- `bootstrapNodes` list\n\nTo get an overview of the different parameters have a look at one of the chain-specifc\nfiles like `mainnet.json` in the `chains` directory, or to the `Chain` type in [./src/types.ts](./src/types.ts).\n\n## Working with private/custom chains\n\nThere are two ways to set up a common instance with parameters for a private/custom chain:\n\n1. You can pass a dictionary - conforming to the parameter format described above - with your custom values in\n   the constructor or the `setChain()` method for the `chain` parameter.\n\n2. You can base your custom chain's config in a standard one, using the `Common.forCustomChain` method.\n\n# Bootstrap Nodes\n\nThere is no separate config file for bootstrap nodes like in the old `ethereum-common` library.\nInstead use the `common.bootstrapNodes()` function to get nodes for a specific chain/network.\n\n# Genesis States\n\nNetwork-specific genesis files are located in the `genesisStates` folder.\n\nDue to the large file sizes genesis states are not directly included in the `index.js` file\nbut have to be accessed directly, e.g.:\n\n```javascript\nconst mainnetGenesisState = require('ethereumjs-common/dist/genesisStates/mainnet')\n```\n\nOr by accessing dynamically:\n\n```javascript\nconst genesisStates = require('ethereumjs-common/dist/genesisStates')\nconst mainnetGenesisState = genesisStates.genesisStateByName('mainnet')\nconst mainnetGenesisState = genesisStates.genesisStateById(1) // alternative via network Id\n```\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[MIT](https://opensource.org/licenses/MIT)\n\n[gitter-badge]: https://img.shields.io/gitter/room/ethereum/ethereumjs.svg\n[gitter-link]: https://gitter.im/ethereum/ethereumjs\n[js-standard-style-badge]: https://cdn.rawgit.com/feross/standard/master/badge.svg\n[js-standard-style-link]: https://github.com/feross/standard\n[common-npm-badge]: https://img.shields.io/npm/v/ethereumjs-common.svg\n[common-npm-link]: https://www.npmjs.org/package/ethereumjs-common\n[common-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-vm/package:%20common?label=issues\n[common-issues-link]: https://github.com/ethereumjs/ethereumjs-vm/issues?q=is%3Aopen+is%3Aissue+label%3A\"package%3A+common\"\n[common-actions-badge]: https://github.com/ethereumjs/ethereumjs-vm/workflows/Common%20Test/badge.svg\n[common-actions-link]: https://github.com/ethereumjs/ethereumjs-vm/actions?query=workflow%3A%22Common+Test%22\n[common-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/branch/master/graph/badge.svg?flag=common\n[common-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-vm/tree/master/packages/common\n","publish_time":1527250209940,"_cnpm_publish_time":1527250209940,"dist-tags":{"latest":"1.5.2"}}