{"bugs":{"url":"https://github.com/trufflesuite/ganache/issues"},"dist":{"shasum":"67d42e417b12103a09a9cfb5a08116c8bb95c85c","tarball":"https://registry.npmjs.org/@ganache/rlp/-/rlp-0.5.2-alpha.1.tgz","fileCount":12,"integrity":"sha512-1tzoJH0vn2EuXmLZbk4z3KRVC16I28RrZZM0pM4Iq5jd1FMgQ5piWqiIW719+ANLIYba+dCKM4OgoSrA86PlHw==","signatures":[{"sig":"MEUCIQCsToehFmbbokAZEk8dtSZbBagwdSt5Y6ZCo2kRs8y+eAIgGnHHaLTor1ki5yqVHC6CpTIyQx+1cuaZ9RkpOKKVL90=","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\nwsFzBAEBCAAGBQJjF5Q4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqkgA/8C2KxwYLhEuUNP6DVI1TUJSv7XALDhW6gUVwlKmpYf5uC2pRc\r\njL7gkDQpATb0j+qURGwK7NFdjxjppYux1Vpe/udWQGqETge3peifyZumVLTp\r\n5xXwajLEIo0jHZCOdatbPiQEg6q8FuuZBewQmTY7/44/pxudJbg/YqAOoysn\r\nJJUlRk51tFz0HaxwdC27sDmhpaddnpQh9a4NTI1f/BvazkzKoY+lXzJQtAYM\r\n9XfAl+j+dEaQEEeuq3pS4sHyjrHQwAr5WUSL10iQUJ//9t9C31VBTDmz6SuN\r\nhvlUjRI9eyHCLcRvpIzpVgdI2g4z/tpxr32ScHT5WZNUBiKjxq6vIqOt+bxd\r\nFSqmEkKNeMEtZ70T3Dnr/NpNVAREYHG1kwtrnKTSojYlQrVD+CnLv7j+joRH\r\njDN/z+6dxHeP/IJ3MCIrVHveYuPMFwWcBWy/bOZC8LbHYV6tiYKVhUBrXPUS\r\nqTJ3AFZ1B2jhsjLI7/cEgMOijHMVm56PGSh47bfLcSy0MWGODu0ofk5APrSy\r\n69XD4g+OckjeS5+P6PUMj6OiK/0UcJoRdUm6EdQGehYT4Bnftobb0xUv67Nm\r\nRKDKWnh/XuXwWbmj4mm5PTOYGuzrYIkUClVhcmRXmdSHjlqQBOY9UBMKnppS\r\nIRG1pwsycQj/ZWiNReGNeOVAQyIMd7b/WIE=\r\n=/zXN\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":"86fc1ffd5cb8889a36a3f78fb3d60c9ff89aeeb4","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.1"},"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.1_1662489656700_0.26523400439809586","host":"s3://npm-registry-packages"},"_id":"@ganache/rlp@0.5.2-alpha.1","version":"0.5.2-alpha.1"}