{"bugs":{"url":"https://github.com/trufflesuite/ganache-core/issues"},"dist":{"shasum":"eb2d4a4fdede16f77429f3bdc5b1e4eee2b05ba6","tarball":"https://registry.npmjs.org/@ganache/rlp/-/rlp-0.1.1-canary.1335.tgz","fileCount":12,"integrity":"sha512-yjGtdnrYxXDOIX4zaW44WRNNCV/7R4KfEGCcYBCbfe+9mduprZTPUdtMB5MGjdpvjyQufU7NeKGgSQSNWS83Gw==","signatures":[{"sig":"MEYCIQDxZnhxaAfupx9fptZhgm9vX4SiltzE8408uNUF6Z3NuwIhANL4to3mGh7f4laZ8C4ReRdyJ3bjrqUwTzPy5L6T2vwk","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":98300,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhE/k2CRA9TVsSAnZWagAAaGkQAJXLqNuPLK2qeOA0F4yP\nMC7L/+ZqgKtvutqcRIxaFE2TnVFb2wgAG82J/0o5vwIZnZlhM05tYCpDH+6L\nUrOyJjUZqKZprHqR4Ku3yT7FbJeOG/l1skCIFWTQlxVb6+8cx+bxFHX6qehq\nWx6Ra3hYv38c/C2Z+RYsTqtq0BeUpAgHboyACwpmUgAbd+o3vHSRrTTbD/h2\ncCN9tZL8Me5vhPjAt6ArJ4ovbOoiULofQtp3I8i6mymRGLjpbKjPagldUzjE\nytpRshih6jMU1LYIYvPdt/W3m3Q5grpyrzhHXCfUco6U5mx4U4oBPw0RLCFf\nRsGYY+4o9fTDzODS3uA8K+gxg+SDKneewJlNzHhnPRJcSINPNR/y8HFt+eFr\nK0nJWimv1BSrJ5B+HT1wNmBozxr8Dc4B/qMMhVbWVdByoPz9kgZy/BnA7cr7\nh20UbeLgPNcUYm+5tFV3EfEUiVx3191kWUjrmJJwyyRnhx559ocfkGVLNz9r\nRHSbMvhlxyjohUdPAx+qcEbZwPOXub3/QCRPo4h9AhFv69su5EYMjNqOiGIn\n9CYgUS+jY2YLjeTBntJbaEkWYH3EHyqPTeq1EVrGiJHIJREBOuvYgKUfR3B8\nhUf3eVuE06okgKqaX4EOMWzyE0CabnGAjONMHbtF41/YrKfWB8+pz01X86rB\n9wj0\r\n=VQgy\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":"215bb16c732909eb9ff49cf0b4307e37f08147ff","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-core/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-core.git","type":"git","directory":"src/packages/rlp"},"_npmVersion":"lerna/4.0.0/node@v14.17.4+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.17.4","dependencies":{"rlp":"2.2.6","@ganache/utils":"0.1.1-canary.1335"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"nyc":"15.1.0","mocha":"8.4.0","ts-node":"9.1.1","cross-env":"7.0.3","typescript":"4.1.3","ttypescript":"1.5.12","@types/mocha":"8.2.2"},"_npmOperationalInternal":{"tmp":"tmp/rlp_0.1.1-canary.1335_1628698934165_0.06368534450031449","host":"s3://npm-registry-packages"},"_id":"@ganache/rlp@0.1.1-canary.1335","version":"0.1.1-canary.1335"}