{"bugs":{"url":"https://github.com/trufflesuite/ganache/issues"},"dist":{"shasum":"8b7a31c10a30864b5ce8639a786817b0506727a2","tarball":"https://registry.npmjs.org/@ganache/rlp/-/rlp-0.1.1-rc.0.tgz","fileCount":12,"integrity":"sha512-oUYpO1ZAbwDiaqozJ49XcK3iXPVoprm8lICZl6X5TVK3pnJLpusn47Hvbiadq3Aban+STXGnJ2rU0rKk6r1V0Q==","signatures":[{"sig":"MEUCIDzBKMkcDA8McNFTcLMlRCWcmaqWo/rkbdf3go1yx0iiAiEA/bcMv7wfY0ULVWQc1/QHBfXCBQwt8Hmibj6z3Ydabr8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":40992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh313hCRA9TVsSAnZWagAAbO4P/19oIhzbPifF6s0g8H4O\ngWPWf7O0vSe0GW+dn0CPsTptXUDULR4QC7pn4ypCnhObqdpuIlIo0SnCVyOE\nn6/JGZ/Tmq1L03FuthrFyKt69j2/44X1sgsdPzMm1JpPPw8GL1czM2oQqzYL\nFXuOqNQ/RFX5EauHSXsqEra/PdlO/VosVXhrHKhmpfh/lis/eZX6OQcVdLyu\nCNABPfZyTkQZhPK1F202LbMa1jIVgpQmoS6Ocy092WMT8UEgJPM9hm4+i065\nob/BwaCA2OP3Cx3B+m0rNGAWOqzymXlfCGNonqqqDONnkt31lGrG6APeb8IG\nLglL8o5c+EdS2Q8hKH2Vxgc2gp6u4Z148rn32WyNi2SafWUQRHZC30MRlCuo\nTm3if0blenOZs1YprngvLkoTGINgkZQ1hwKK7Bwifmdsq9HIk/6hHWWIgvKt\n1RJ1KcIcuiSfli2O/kqEK2q4GIBIcj51X2lx80NZekDDe3YixV6iQiSW/jc+\nGzBgSBEf0eOfJ+QLwDGAZsnSOv0mWOJ6vv0EmoEA6kFm3XiBKdRgbU/tT02P\nygCOezHjIk44Caj2yIqeSnb86jsuGyIOMxdCpXE3YNlBLU36KUVQpSnlrFI0\n9y6vEhxT0xCKG3Ix8WN9ZWY4RHEXjTEJWvVvF+i/HxUybaSrCLVliIW6z7Xe\npC3Y\r\n=IUGh\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":"b02135d151819b81667de25c4c3983784886438d","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.18.2+x64 (linux)","description":"Recursive Length Prefix Encoding Module","directories":{"lib":"lib","test":"test"},"maintainers":[{"name":"truffle-cicd","email":"david+truffle@trufflesuite.com"},{"name":"davidmurdoch","email":"david@davidmurdoch.com"},{"name":"micaiahreid","email":"micaiahreid@gmail.com"}],"_nodeVersion":"14.18.2","dependencies":{"rlp":"2.2.6","@ganache/utils":"0.1.1-rc.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.5.2","@types/mocha":"9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rlp_0.1.1-rc.0_1642028512741_0.2114763614695334","host":"s3://npm-registry-packages"},"_id":"@ganache/rlp@0.1.1-rc.0","version":"0.1.1-rc.0"}