{"bugs":{"url":"https://github.com/trufflesuite/ganache/issues"},"dist":{"shasum":"ffd51d3002c173834b163235b04857a513e24a14","tarball":"https://registry.npmjs.org/@ganache/rlp/-/rlp-0.5.2-alpha.0.tgz","fileCount":12,"integrity":"sha512-NgUcAnJtdwth5dX1Bic64jI4mZUHDz8LjGin2+HL5cw57QKO3P0xTWbmwmzUTSCdto3l76leunWJTeF6XKkpWg==","signatures":[{"sig":"MEUCIGZANXwxt3ARhOTpxDKh8Z2+DQh23ktlWLALlnLnhd4pAiEA1njRdFh3YiCdBRqyXRhDkCf/JsHrcLt2ja+nkNcK/HE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41160,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjCOovACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpMFA//ayie7gOyfpz0IaxszarbGCp7sNsoJ+w8BuBSx94xxapLbm1C\r\nPwipY/n9LCZfyraoHBheIss9nPwrmzAGcixo8xh5wTpMP/RdQzEaxwdloXgZ\r\n5IDBl045OXUh5LAvbJocuoM9kVJJv9SSgSRmU/tXOzSQ4bIg6RGxIXojArta\r\nYOjPi+e/U0CyWZJOwMOxV9O2sEAhJCpLICV8O/M7UXYc2cIwT5BSi9ZZAhZN\r\njXU8uhqgskE7DlIXNzUBbYXufXxTcKvdQOmCu2AsDiIKpsrRmTZijvRFAcx8\r\nvzm8csHVzoUYfW8RhaPYtY8hN4F55IrNZyJ5jfmDqeRgG/WsXtcO6z2X3dZe\r\nOQEUWVUIfuah66NiKqH0E3LwMIoDeVU+PqkNJpuuDyW/PDOBUvGdU0NoWkEN\r\nT8HbQ8c/C8ZJrdn+gbyQqYkY72EJ4NbF4tH1UA+c38x2V94qtLEI+nqORb34\r\nvq6rGyhZuyktrc/UtzeIjES+J6U3tYCuEqt0/yUXQMQz8WPY+a7DlLXpdaWE\r\nFIaJDGEMdZa8elrZGXoXAGBLxh0DgUiDS4s15Nn4bB+nOrwO2tN/xrofII8n\r\n4LQZF8YT0HJ0JkodCz8h+mTw4Nqhk+st8kopvKcjuiF20Nvw5Wd1nW4nuhAG\r\nuWv8INpSmMdatKX58MwvaJ9PpWke0rKjhlw=\r\n=Ljwi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"lib/index.js","name":"@ganache/rlp","author":{"name":"David Murdoch"},"readme":"# `@ganache/rlp`\n\n[Recursive Length](https://github.com/ethereum/wiki/wiki/RLP) Prefix Encoding\nfor Node.js.\n\nBased on https://github.com/ethereumjs/rlp, with some additional optimizations\nfor encoding:\n\n```typescript\nfunction encodeRange<\n  T extends EncodingInput | Readonly<EncodingInput>,\n  Start extends RangeOf<T[\"length\"]>\n>(\n  items: T,\n  start: Start,\n  length: Exclude<Remainders<T[\"length\"], Start>, 0>\n): { length: number; output: Buffer[] } {\n  //...;\n}\n```\n\nBegin RLP encoding of `items`, from `start` until `length`. Call `RLP.digest` to\nfinish encoding.\n\nReturns an object containing the total `length` of all data in the encoded parts,\nand `output`, an array of encoded Buffers.\n\n```typescript\nfunction digest(ranges: Readonly<Buffer[]>[], length: number) {\n  // ...\n}\n```\n\nFinishes encoding started by `encodeRange`.\n\nReturns a Buffer of encoded data.\n\nAdditional changes:\n\n- minor optimisations to `encode`\n- `encode` only accepts buffers or nested buffer arrays, strings, number, bigint,\n  and BN support have been removed.\n\n---\n\nThese changes enable encoding data in chunks, avoiding processing the same\ninputs multiple times in common scenarios withing Ganache. Example:\n\n```typescript\ntype EthereumRawTx = [\n  nonce: Buffer,\n  gasPrice: Buffer,\n  gas: Buffer,\n  to: Buffer,\n  value: Buffer,\n  data: Buffer,\n  v: Buffer,\n  r: Buffer,\n  s: Buffer\n];\n// encode the first 6 entries\nconst partialRlp = encodeRange(raw, 0, 6);\n// encode the last 3 entires\nconst signature = encodeRange(raw, 6, 3);\n// combine all entries\nconst serialized = digest(\n  [partialRlp.output, signature.output],\n  partialRlp.length + signature.length\n);\nreturn {\n  // computing the `from` address requires entries 0-6\n  from: computeFromAddress(partialRlp, v.toNumber(), raw, chainId),\n  // hash requires entries 0-9\n  hash: Data.from(keccak(serialized), 32),\n  // serialized uses all entries for storage/transmission\n  serialized\n};\n```\n","source":"index.ts","gitHead":"6529960b2426df095394b426bc998f4236140053","license":"MIT","scripts":{"tsc":"tsc --build","test":"nyc npm run mocha","mocha":"cross-env DE_FILES=true mocha --exit --check-leaks --throw-deprecation --trace-warnings --require ts-node/register 'tests/**/*.test.ts'"},"typings":"typings","_npmUser":{"name":"truffle-cicd","email":"david+truffle@trufflesuite.com"},"homepage":"https://github.com/trufflesuite/ganache/tree/develop/src/packages/rlp#readme","keywords":["ganache","ganache-rlp","ethereum","evm","blockchain","smart contracts","dapps","solidity","vyper","fe","web3","tooling","truffle"],"repository":{"url":"git+https://github.com/trufflesuite/ganache.git","type":"git","directory":"src/packages/rlp"},"_npmVersion":"lerna/4.0.0/node@v14.20.0+x64 (linux)","description":"Recursive Length Prefix Encoding Module","directories":{"lib":"lib","test":"test"},"maintainers":[{"name":"jeff.smale","email":"jeff.smale@consensys.net"},{"name":"truffle-cicd","email":"david+truffle@trufflesuite.com"},{"name":"davidmurdoch","email":"david@davidmurdoch.com"},{"name":"micaiahreid","email":"micaiahreid@gmail.com"}],"_nodeVersion":"14.20.0","dependencies":{"rlp":"2.2.7","@ganache/utils":"0.5.2-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"9.1.3","ts-node":"10.4.0","cross-env":"7.0.3","typescript":"4.6.4","@types/mocha":"9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rlp_0.5.2-alpha.0_1661528623101_0.2583184144023587","host":"s3://npm-registry-packages"},"_id":"@ganache/rlp@0.5.2-alpha.0","version":"0.5.2-alpha.0"}