{"bugs":{"url":"https://github.com/trufflesuite/ganache/issues"},"dist":{"shasum":"1e8bb3eaab26de20f8a56932678db789e7f1ee4a","tarball":"https://registry.npmjs.org/@ganache/rlp/-/rlp-0.1.1-beta.0.tgz","fileCount":12,"integrity":"sha512-QBs0PqoXkQuY6EKtoou+lLqzZoOTyXC7Mh5orhY2/3JbzYtPRDip/gJ8TAJhBcRJNKKfiHo4+AD7hevSB1Olhw==","signatures":[{"sig":"MEUCIFLGp8B6YbMPrdA3bf4WDKnB+Oe1DZw3JWATBXWcrYcmAiEApcDgJgrdk6qrLFP2WQ0gT07DhnKRnsAJcd2LLbUyDak=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":128307,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl+pNCRA9TVsSAnZWagAAMuUP/R9G8NDA2sCldyciHWTO\nPxNjEZABXxR/la+sISegEANCPnAPpyAFbe95RRgSIZNMgicCl40mlUVVZ6op\nqd2NHqk8D58tCdqwLSJuD+i86NjlxaX2D06D00GV9WyfOyeiR1RUyu4dyk7R\n9j23YrI3tPwoGYl7/77wMfbTsR1z5J+/LZ+WV/fVmgDntjjzpLR0L+rlJCY3\n6l8koiYb/SsB841W3VxkCocjyW52u7vNeyVu3mcaMIbcYXq0vi5mrOF3Gkip\nDzTwBUFVAQ5XWqh2dX2KPosoONkkrFrVWIRX1ohthYUsBVYCIEDC4KSau32j\ncvLgpS3hShPHepcgr4sLlY+vgx+1opEzy1hWUw7E1alXeelxAy94FVPyljDy\n5ZoWQ3UDwWZvSIiH6Qf4f96OkVN2K3M5ws/dhPwPy3J0u0p6CnaRVDi8MLKN\nNg0qa57z+XAaEpwCREvltN9RU/aAifmE5Dad0wsMtuLdp2BhDNRYMWebmhTI\n7cKnlMZo4vH2xby3dVV251KU2WcJQ58jrxaBFhJjOvomfIRRmQfbdKB2cG9I\n8s5CosnahTjMtTA/849DWPnL7E/DgkaKMFiEptkRM93O3xt6KgP2Y+DhFwi5\noLri5H6v9I+ZVSas1A6J3J/Mfhrq+2DzhVYhW9zTc5XFpVkB4D8tbQP6Rvb8\nYKZq\r\n=chtb\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":"3a2646f7aeed85e8ad0af20cb12c239109ba9005","license":"MIT","scripts":{"tsc":"ttsc --build","test":"nyc npm run mocha","mocha":"cross-env TS_NODE_COMPILER=ttypescript 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.1+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.1","dependencies":{"rlp":"2.2.6","@ganache/utils":"0.1.1-beta.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"9.1.3","ts-node":"9.1.1","cross-env":"7.0.3","typescript":"4.1.3","ttypescript":"1.5.12","@types/mocha":"9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rlp_0.1.1-beta.0_1637345869272_0.7666563907163855","host":"s3://npm-registry-packages"},"_id":"@ganache/rlp@0.1.1-beta.0","version":"0.1.1-beta.0"}