{"_id":"eth-library-utils","name":"eth-library-utils","dist-tags":{"latest":"1.2.3"},"versions":{"1.2.3":{"name":"eth-library-utils","version":"1.2.3","description":"A collection of utility functions for Ethereum","license":"MPL-2.0","author":{"name":"azeura","email":"azeura@gmail.com"},"keywords":["ethereum","utilities","utils","library"],"engines":{"node":">=10.0.0"},"main":"dist/index.js","types":"dist/index.d.ts","browser":"dist.browser/index.js","scripts":{"build":"npm run build:node && npm run build:browser","docs:build":"npx typedoc --options typedoc.js","tape":"tape -r ts-node/register","test":"npm run test:node","test:browser":"karma start karma.conf.js"},"dependencies":{"@types/bn.js":"^5.1.0","commonjs-assert":"^1.0.3","bn.js":"^5.1.2","create-hash":"^1.1.2","ethereum-cryptography":"^0.1.3","rlp":"^2.2.4"},"devDependencies":{"@types/assert":"^1.5.4","@types/node":"^16.11.7","@types/secp256k1":"^4.0.1","@types/tape":"^4.13.2","eslint":"^6.8.0","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-tap":"^4.2.0","karma-typescript":"^5.5.3","nyc":"^15.1.0","prettier":"^2.0.5","tape":"^4.10.1","ts-node":"^10.2.1","typescript":"^4.4.2"},"repository":{"type":"git","url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git"},"contributors":[{"name":"Tim Aarx","email":"timaarx@gmail.com","url":"https://github.com/taarx"}],"_id":"eth-library-utils@1.2.3","bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues"},"homepage":"https://github.com/ethereumjs/ethereumjs-monorepo#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-Oc7TJGjjOTK4uDocS2mZD0jOp5woysIVp2OhDsqUPpXQW09Izcu+Roz43lcSciXiYqeg7A5xWeQcMXewxSnEbA==","shasum":"3fa129739189102f6bf5b9fb690e73b85d20417d","tarball":"https://registry.npmjs.org/eth-library-utils/-/eth-library-utils-1.2.3.tgz","fileCount":87,"unpackedSize":308485,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCmqo33Wr2tVpodnlL570xVoHvaU+vHO/w6QZORDxkt9wIgdEotQqDHaQli6qfhXi6gTIt8T/ldDLWAWSOmh8Og4uo="}]},"_npmUser":{"name":"absolute268","email":"top89268@gmail.com"},"directories":{},"maintainers":[{"name":"absolute268","email":"top89268@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eth-library-utils_1.2.3_1784108480527_0.2982561120150158"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-15T09:41:20.221Z","1.2.3":"2026-07-15T09:41:20.669Z","modified":"2026-07-15T09:41:20.958Z"},"maintainers":[{"name":"absolute268","email":"top89268@gmail.com"}],"description":"A collection of utility functions for Ethereum","homepage":"https://github.com/ethereumjs/ethereumjs-monorepo#readme","keywords":["ethereum","utilities","utils","library"],"repository":{"type":"git","url":"git+https://github.com/ethereumjs/ethereumjs-monorepo.git"},"contributors":[{"name":"Tim Aarx","email":"timaarx@gmail.com","url":"https://github.com/taarx"}],"author":{"name":"azeura","email":"azeura@gmail.com"},"bugs":{"url":"https://github.com/ethereumjs/ethereumjs-monorepo/issues"},"license":"MPL-2.0","readme":"# eth-library-utils\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# INSTALL\n\n`npm install eth-library-utils`\n\n# USAGE\n\n```js\nimport assert from 'assert'\nimport { isValidChecksumAddress, unpadBuffer, BN } from 'eth-library-utils'\n\nassert.ok(isValidChecksumAddress('0x2F015C60E0be116B1f0CD534704Db9c92118FB6A'))\n\nassert.ok(unpadBuffer(Buffer.from('000000006600', 'hex')).equals(Buffer.from('6600', 'hex')))\n\nassert.ok(new BN('dead', 16).add(new BN('101010', 2)).eqn(57047))\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](src/hash.ts)\n  - Hash functions\n- [object](src/object.ts)\n  - Helper function for creating a binary object (`DEPRECATED`)\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- [externals](src/externals.ts)\n  - Re-exports of `BN`, `rlp`\n\n### eth-library-utils methods\n\nThe following methods are available by an internalized version of the [ethjs-util](https://github.com/ethjs/eth-library-utils) 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```js\nimport { stripHexPrefix } from 'eth-library-utils'\n```\n\n### Re-Exports\n\n`eth-library-utils` re-exports the following commonly-used libraries:\n\n- [BN.js](https://github.com/indutny/bn.js) (version `5.x`)\n- [rlp](https://github.com/ethereumjs/rlp) (version `2.x`)\n\nThey can be imported by name:\n\n```js\nimport { BN, rlp } from 'eth-library-utils'\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\nMPL-2.0\n\n[util-npm-badge]: https://img.shields.io/npm/v/eth-library-utils.svg\n[util-npm-link]: https://www.npmjs.org/package/eth-library-utils\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","_rev":"1-9be8922e118c38730a27b3e7ec9c65c4"}