{"name":"@ethereumjs/util","version":"8.0.0-rc.1","description":"A collection of utility functions for Ethereum","keywords":["ethereum","utilities","utils"],"homepage":"https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/util#readme","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aissue+label%3A%22package%3A+util%22"},"repository":{"type":"git","url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git"},"license":"MPL-2.0","author":{"name":"EthereumJS Team"},"contributors":[{"name":"Tim Coulter","email":"tim@timothyjcoulter.com","url":"https://github.com/tcoulter"},{"name":"Nick Dodson","url":"https://github.com/SilentCicero"},{"name":"Mr. Chico","url":"https://github.com/MrChico"},{"name":"Dũng Trần","email":"tad88.dev@gmail.com","url":"https://github.com/tad88dev"},{"name":"Alex Beregszaszi","email":"alex@rtfs.hu","url":"https://github.com/axic"},{"name":"Taylor Gerring","url":"https://github.com/tgerring"},{"name":"Kirill Fomichev","email":"fanatid@ya.ru","url":"https://github.com/fanatid"},{"name":"kumavis","email":"aaron@kumavis.me","url":"https://github.com/kumavis"},{"name":"Alexander Sinyagin","email":"sinyagin.alexander@gmail.com","url":"https://github.com/asinyagin"}],"main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"../../config/cli/ts-build.sh","clean":"../../config/cli/clean-package.sh","coverage":"../../config/cli/coverage.sh","docs:build":"npx typedoc --options typedoc.js","lint":"../../config/cli/lint.sh","lint:diff":"../../config/cli/lint-diff.sh","lint:fix":"../../config/cli/lint-fix.sh","prepublishOnly":"../../config/cli/prepublish.sh","tape":"tape -r ts-node/register","test":"npm run test:node && npm run test:browser","test:browser":"karma start karma.conf.js","test:node":"npm run tape -- test/*.spec.ts","tsc":"../../config/cli/ts-compile.sh"},"dependencies":{"@ethereumjs/rlp":"^4.0.0-beta.2","ethereum-cryptography":"^1.1.2"},"devDependencies":{"@types/bn.js":"^5.1.0","@types/secp256k1":"^4.0.1"},"engines":{"node":">=14"},"readme":"# @ethereumjs/util\n\n[![NPM Package][util-npm-badge]][util-npm-link]\n[![GitHub Issues][util-issues-badge]][util-issues-link]\n[![Actions Status][util-actions-badge]][util-actions-link]\n[![Code Coverage][util-coverage-badge]][util-coverage-link]\n[![Discord][discord-badge]][discord-link]\n\nA collection of utility functions for Ethereum. It can be used in Node.js and in the browser with [browserify](http://browserify.org/).\n\n## Installation\n\nTo obtain the latest version, simply require the project using `npm`:\n\n```shell\nnpm install @ethereumjs/util\n```\n\n## Usage\n\n```js\nimport assert from 'assert'\nimport { isValidChecksumAddress, unpadBuffer } from '@ethereumjs/util'\n\nassert.ok(isValidChecksumAddress('0x2F015C60E0be116B1f0CD534704Db9c92118FB6A'))\n\nassert.ok(unpadBuffer(Buffer.from('000000006600', 'hex')).equals(Buffer.from('6600', 'hex')))\n```\n\n## API\n\n### Documentation\n\nRead the [API docs](docs/).\n\n### Modules\n\n- [account](src/account.ts)\n  - Account class\n  - Private/public key and address-related functionality (creation, validation, conversion)\n- [address](src/address.ts)\n  - Address class and type\n- [bytes](src/bytes.ts)\n  - Byte-related helper and conversion functions\n- [constants](src/constants.ts)\n  - Exposed constants\n    - e.g. `KECCAK256_NULL_S` for string representation of Keccak-256 hash of null\n- hash\n  - This module has been removed with `v8`, please use [ethereum-cryptography](https://github.com/ethereum/js-ethereum-cryptography) directly instead\n- [signature](src/signature.ts)\n  - Signing, signature validation, conversion, recovery\n- [types](src/types.ts)\n  - Helpful TypeScript types\n- [internal](src/internal.ts)\n  - Internalized helper methods\n\n### BigInt Support\n\nStarting with v8 the usage of [BN.js](https://github.com/indutny/bn.js/) for big numbers has been removed from the library and replaced with the usage of the native JS [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) data type (introduced in `ES2020`).\n\nPlease note that number-related API signatures have changed along with this version update and the minimal build target has been updated to `ES2020`.\n\n### ethjs-util methods\n\nThe following methods are available by an internalized version of the [ethjs-util](https://github.com/ethjs/ethjs-util) package (`MIT` license), see [internal.ts](src/internal.ts). The original package is not maintained any more and the original functionality will be replaced by own implementations over time (starting with the `v7.1.3` release, October 2021).\n\n- arrayContainsArray\n- getBinarySize\n- stripHexPrefix\n- isHexPrefixed\n- isHexString\n- padToEven\n- fromAscii\n- fromUtf8\n- toUtf8\n- toAscii\n- getKeys\n\nThey can be imported by name:\n\n```typescript\nimport { stripHexPrefix } from '@ethereumjs/util'\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. If you want to join for work or carry out improvements on the libraries, please review our [contribution guidelines](https://ethereumjs.readthedocs.io/en/latest/contributing.html) first.\n\n## License\n\n[MPL-2.0](<https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)>)\n\n[util-npm-badge]: https://img.shields.io/npm/v/@ethereumjs/util.svg\n[util-npm-link]: https://www.npmjs.org/package/@ethereumjs/util\n[util-issues-badge]: https://img.shields.io/github/issues/ethereumjs/ethereumjs-monorepo/package:%20util?label=issues\n[util-issues-link]: https://github.com/ethereumjs/ethereumjs-monorepo/issues?q=is%3Aopen+is%3Aissue+label%3A\"package%3A+util\"\n[util-actions-badge]: https://github.com/ethereumjs/ethereumjs-monorepo/workflows/Util/badge.svg\n[util-actions-link]: https://github.com/ethereumjs/ethereumjs-monorepo/actions?query=workflow%3A%22Util%22\n[util-coverage-badge]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/branch/master/graph/badge.svg?flag=util\n[util-coverage-link]: https://codecov.io/gh/ethereumjs/ethereumjs-monorepo/tree/master/packages/util\n[discord-badge]: https://img.shields.io/static/v1?logo=discord&label=discord&message=Join&color=blue\n[discord-link]: https://discord.gg/TNwARpR\n","readmeFilename":"README.md","gitHead":"9bfb0749bb3d6c828ebca56f2fb44c135a92f6de","_id":"@ethereumjs/util@8.0.0-rc.1","_nodeVersion":"16.15.0","_npmVersion":"8.5.5","dist":{"integrity":"sha512-J0NWn8m3sZpOIeJU+v/cTmGZRQWq6FhFGO+hr13QMz+BSr4/zk2qa+JtaTaC5cGROZXKtw/5krsb3ObaOEcZdA==","shasum":"adf2b25cf3660c1e086f7df52acd9312d7477770","tarball":"http://registry-npm.ywwl.com/@ethereumjs/util/download/@ethereumjs/util-8.0.0-rc.1.tgz","fileCount":48,"unpackedSize":179133,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBEIzIUv/Y/SEORR1DGgJA62+Rbws77s9K7jqUJU1psOAiAu2SYC+wgTlQBK00+SN8PGrOpbJ/8xenpwzRyMjJ8uSw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCMJ/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqyOg/9EDD0SfvZJRriRjhp6/CuR24UYOLSgQJt7V55F7CAHQIvTIva\r\nioF/+j8i/gLNlIILuFigRDCeZUGsORPa7lpngNhBruoYHLi4hVXuKbLqdpf1\r\nYsP3VPwz8v6lZtrNqb54zjyqz8vn5KomgjLDh4eHUzHL/40oZ5M+xPekJJt+\r\nqSVbQ2AgkAl80aKWRcLGCihborODHMNfzdMqdjrWBqTt1xu/FL1SsCSQE2S9\r\nfXSOe4N3hjrmO3U06BoEtK9xl4gRVCPWxOmRGw1i6eep7tnzd87QHCXUrGfh\r\n9VDbDXNvsttrP+CbpMByuNM1VYTT5Qbx6ol6HNVIJZTGHxuvxMuu3DwEXHFJ\r\nDzcinUHIHc69gE9IdSqAEsX1trRJ5/4Q84glF4awty7qwRnnMSb9dHvUUL18\r\naAn2ar3Qj0GK0hGrHX17lOLRzn2b1vRrJcIctQs/0qZnVma9VjpIfVsePvC+\r\nkVWgUOdeKmBVhVZrMcadoPqa+5cZPF/cyPaFTlVvHjjiO4eVlG/n0Un5rZVa\r\nnzr4kPHy+PBrVHhRbnvviBa9j8g3TXNyCP9rQE+LUTssLMyV4YgLnp1Ax2bQ\r\ncKEH/JNapjLtMsR1PF/2oD5IucNfyYZjkoLcON5snB3AN/8k/W+B9OmeBkg3\r\ny2wxAyCSZXs6GJiRtJRGwjjPlAfINaLp4/w=\r\n=quy7\r\n-----END PGP SIGNATURE-----\r\n","size":42434,"noattachment":false,"key":"/@ethereumjs/util/-/@ethereumjs/util-8.0.0-rc.1.tgz"},"_npmUser":{"name":"holgerd77","email":"Holger.Drewes@gmail.com"},"directories":{},"maintainers":[{"name":"axic","email":"alex@rtfs.hu"},{"name":"holgerd77","email":"Holger.Drewes@gmail.com"},{"name":"ralxz","email":"ryan@ryanio.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/util_8.0.0-rc.1_1661518463261_0.128374969872056"},"_hasShrinkwrap":false,"publish_time":1661518463401,"_cnpm_publish_time":1661518463401,"dist-tags":{"alpha":"10.0.0-alpha.1","beta":"8.0.0-beta.3","latest":"10.1.3","nightly":"10.1.1-nightly.2","rc":"10.0.0-rc.1"}}