{"bugs":{"url":"https://github.com/trufflesuite/ganache/issues"},"dist":{"shasum":"b5346419ef5cd244d630182de026a399327e154a","tarball":"https://registry.npmjs.org/@ganache/rlp/-/rlp-0.1.1-canary.1340.tgz","fileCount":12,"integrity":"sha512-1rejWQVZ3tDDxYI7LAuCGWbWFRzgpGGlU3Vplnsz43mYyn0hT5eW760ToZJdoexhG/ppApthMEWfYWM7vnXrJQ==","signatures":[{"sig":"MEYCIQCBY8aOScdzowlE0OPGfeMlFE2L2QtzJH0u8FI7VBUb5AIhAInCyh59I1UnEOkES8kBwac/xIzoX8XloSm1at5kJT6g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":98309,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJCZCCRA9TVsSAnZWagAAxSwP/RXtcoBCD07g1CDKLrn4\n92xXmFDhfvsyOjjTQQvU9sNv17an7Ovfn6VAcotevvdM3Q1PUMb7Nl7bi28t\nHohmVCWlSBMocb9TE5TsHY9IQOJ0WME7VOeNLPEVbk8clComiNU/y1gSZcej\nm+35CSb1zSti84q/12IFFMrlPVx5Lg5GHYggVDLCf+vumByL+rO7lWG8kkbi\n+DVnQvZgjS2xn0SwPR//a41lPC1tGnPDIcfKNzws+hkNlLqgJ+HkqATgwK+W\nhm+WW2VBYrm/k7bMLgog2ke7sHsNZsrJnnVkdpIjQppTAOHYaGuC4ys/TrMJ\nWsZeHJeVV6E35RNBO7Y2el78vraipCIhu2PbCwYo9alyhIa0C5XG8fkU81/t\nR93cgPE5Y595i8jKACw/I5DcswgbVGjbPvJvC2dA0DFEnqseiLWDYwxIM0kj\n0oHvHIw1U/ydN9SARY7kK/tsMhnp1cZqKdmhvZ5Sjhe4MIVO+80GZLNgUHvc\nBXpsospNT8a33NjUPseNJsjBYtWuh+Dwe4khtXfdTnPIPXPVlq4BIM2CMQYI\nxYBlchqk/qMc5vUdxzOasWvXQklawUlc6FaJi8syfLjl73I6lUnnjuiyZK7J\nQoqG5YfqpW2dQ4q/RLevDMSf7A33BLt69M/nW7YcwriloxS7rM6noI8N/2Ud\nRJXr\r\n=+XY6\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":"bca951b6cf4e3a14c6b2bed4c3d7f1acf60a1c99","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.17.5+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.5","dependencies":{"rlp":"2.2.6","@ganache/utils":"0.1.1-canary.1340"},"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.1340_1629759042701_0.06979420513710455","host":"s3://npm-registry-packages"},"_id":"@ganache/rlp@0.1.1-canary.1340","version":"0.1.1-canary.1340"}