{"bugs":{"url":"https://github.com/trufflesuite/ganache/issues"},"dist":{"shasum":"945f3714d06d84f2db5ee04d613987c7210461ca","tarball":"https://registry.npmjs.org/@ganache/rlp/-/rlp-0.5.3-alpha.0.tgz","fileCount":12,"integrity":"sha512-FeszbFRx5dLxcmQb6pv4EvbDwaAmRWU8l9ft9gRMxRqAYyoktx/G5+anofS+PyBfigGvvcCsoi9pFXs6ca1yVQ==","signatures":[{"sig":"MEQCIBu6VhYoxlHEuHP3An2D/DVW1f011wl8BkNhqJTz7mNYAiA3zzpcSl6M2um3wyzQmw2SuN8pESxsZ2qZ3OJP7DDbIA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":49551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjLi16ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqQDg/9HGtkOyZ31mr63PEO2Zcih+h2ymD4PKAErzLEFf3biLr3WLf8\r\nz3YmSLCoXxEcId5RVC8Tv21j5/7g7KMP3opYyarviwxXHE8N1HDMGkgGhRX3\r\nSUXNkCGo6ZIRbk+6UGofJhvP935sjR5GDJdT4B9S0me8bzvTKSy4NVjoOrV8\r\n2/ldPe1NidgbzY14D1lIC04Qx43mlhNSIlCFPZBvI+MIoJscz/czgfIDmudx\r\nDipy8YuQ/eS2BYEBZAj9yB9GoU4FXIToJvKn2X/qVqOkYHL32jvkNaAloQj+\r\nx7R+rRBrHvSYSSAyS/PbeaN+Fzouogdlt4BkA4BO/TQu5+QebX1a12zyf/wz\r\nThYkPTiwSENNmx3/GIYAUG/W6NtFNGImJY4kuyRTbjLD7fWpcRIDwBf3C/mb\r\nXNp/Dks3R7hhBsylryJ4QtwXUVJzecOcmqaAgzPEY5zHoN4JLT/+G0/rB7zB\r\nmwO9GmZe9txHIITy2qj0JawsnyjWhTDOHV5TP6FmcZB49LPetoYCiVwygbuj\r\nlAu9DNPlGqoHT0geoHu8hdy0RRYNiQnsC77pq6wTdYpU8WTWZVkFTCsGhTxz\r\nWg6SUq6AJZdrNN1OdVsxl+xiRijv7//vewsV76bwmTiXU+d50TBXn/4SETu1\r\nygMjfOGaYKyf1OPOGiVNv8LXYqy1Hw3m9Yo=\r\n=X7Sl\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":"c62e6fdd944db54143e3e0b57fb1643148d85682","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.3-alpha.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"9.1.3","ts-node":"10.9.1","cross-env":"7.0.3","typescript":"4.7.4","@types/mocha":"9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rlp_0.5.3-alpha.0_1663970682546_0.40351370488887905","host":"s3://npm-registry-packages"},"_id":"@ganache/rlp@0.5.3-alpha.0","version":"0.5.3-alpha.0"}