{"_id":"@biut-block/biutjs-rlp","_rev":"1-afa2e2ff8d88449bf05b4eefe89c28f3","name":"@biut-block/biutjs-rlp","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@biut-block/biutjs-rlp","version":"1.0.0","description":"biutjs blockchain rlp lib","main":"src/index.js","directories":{"test":"test"},"scripts":{"test":"mocha test/test.js"},"repository":{"type":"git","url":"git+https://github.com/BIUT-Block/biutjs-rlp.git"},"keywords":["biutjs","rlp"],"author":{"name":"Weihan"},"license":"ISC","bugs":{"url":"https://github.com/BIUT-Block/biutjs-rlp/issues"},"homepage":"https://github.com/BIUT-Block/biutjs-rlp#README","dependencies":{"describe":"^1.2.0"},"gitHead":"6b5b85e342e01a903a82a5241fef0e8afbf9119a","_id":"@biut-block/biutjs-rlp@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.4","_npmUser":{"name":"zuweihan1992","email":"zuweihan1992@gmail.com"},"dist":{"integrity":"sha512-Dy4xGYKmyaWKvmubpGfDeUXUmDRqt7tUNiTTnkKOtcCZ9eWB/EdZYTT7G6vACfcPho9lXNSQZfhnFUEO/1uw+w==","shasum":"9ca59ed9037f24d1c421ed6c10b57d54c89ee6fa","tarball":"https://registry.npmjs.org/@biut-block/biutjs-rlp/-/biutjs-rlp-1.0.0.tgz","fileCount":5,"unpackedSize":12828,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc1UOECRA9TVsSAnZWagAAl28QAKPPgIFIKJa6O8b7y4Az\nrO8FAW3GGGiRTGXxRTjhvqwtd2E8NE2golflsKIFL85fU9g0RpCpfzwn2nGL\ngRAf8L9Z+krYLMs7ZmpD7I2iImmbadNZ8W3l7Ue/UScGG1CvroxFxZMw/dd+\nY0FH8DAZVm0akiznUS5ZDqrJ85eDBpIvTmVgk0GYe98gjkH7k4g8piH3UP9n\n3gOfvd3bGNb1xjjOTdTCJr2rMTR/0K5EZgwCsJVP7a0x61+1LX/kR9u4gqL/\nJ3qWVJGdMwYFv55Y5ZY718/ePudrPsu2N9lPZvOY9F76aRm3Zj581h10OMgA\nvoSRohVZFk8w9dQkUqd29n6sSk4BKGDW+zGVTekO/TAr65rZemdgE4E2KNB/\n91prahUHtNb8mHf7rOkZ06iJK330dypC4e2+dhusUnIKfZGrsWDABsT/hCUt\nIWpXxV6Y9k/d3W/x8TdtnHb6kJIagJkWJYrci0bGKFxs/OjHlJV7YqGbBWKE\nvo48mNF9uNnad+HD0QBx6fn8kM4v3C0KFWL2JN4AOrTZf81Wk4R7xtGOt5+4\nTfW/XzqLSYj90YVM68OOlJCBrqqyhjB26l8eG5Ty3UKOGU4QRTErc6YB5Ecx\nIumlU/Q9th5vxVLBloaF+CVntNUq0yFfhEIMfB8Y1QSqf9urIY1xXY0yEkgs\nr00A\r\n=gkow\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDw1hNFayd8RvNadN1l2YH8D00GU6+K44BXykrtESzRkAIhAMZfPFYzZ0YRm/Sh28O1lFHD92SvUKU9DOYJQh0xJksr"}]},"maintainers":[{"name":"zuweihan1992","email":"zuweihan1992@gmail.com"},{"name":"tornadoming","email":"ming1992liu@gmail.com"},{"name":"g277321","email":"g277321@gmail.com"},{"name":"feiminhao","email":"fei.minhao1990@gmail.com"},{"name":"abysmli","email":"abysmli@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/biutjs-rlp_1.0.0_1557480324153_0.021161049870731974"},"_hasShrinkwrap":false}},"time":{"created":"2019-05-10T09:25:23.960Z","1.0.0":"2019-05-10T09:25:24.281Z","modified":"2022-04-04T19:14:53.556Z"},"maintainers":[{"name":"zuweihan1992","email":"zuweihan1992@gmail.com"},{"name":"tornadoming","email":"ming1992liu@gmail.com"},{"name":"g277321","email":"g277321@gmail.com"},{"name":"feiminhao","email":"fei.minhao1990@gmail.com"},{"name":"abysmli","email":"abysmli@gmail.com"}],"description":"biutjs blockchain rlp lib","homepage":"https://github.com/BIUT-Block/biutjs-rlp#README","keywords":["biutjs","rlp"],"repository":{"type":"git","url":"git+https://github.com/BIUT-Block/biutjs-rlp.git"},"author":{"name":"Weihan"},"bugs":{"url":"https://github.com/BIUT-Block/biutjs-rlp/issues"},"license":"ISC","readme":"<a name=\"SECJS-RLP\"></a>\r\n\r\n[![JavaScript Style Guide](https://cdn.rawgit.com/standard/standard/master/badge.svg)](https://github.com/standard/standard) \r\n\r\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)]\r\n\r\n* * *\r\n## SECRlpEncode\r\n\r\nThis package is used for SEC blockchain rlp encoding.\r\n\r\n* [SECRlpEncode](#SECRlpEncode)\r\n    * [new SECRlpEncode(config)](#new_SECRlpEncode_new)\r\n    * [.encode(input, buffer, offset)](#SECRlpEncode+encode) ⇒ <code>Buffer</code>\r\n    * [.decode(input, start, end)](#SECRlpEncode+decode) ⇒ <code>Array</code>\r\n    * [.getLength(input)](#SECRlpEncode+getLength) ⇒ <code>Number</code>\r\n\r\n\r\n* * *\r\n<a name=\"new_SECRlpEncode_new\"></a>\r\n\r\n### new SECRlpEncode(config)\r\nnew SECRlpEncode(config)\r\nConstructs a rlp encode class.\r\n\r\n\r\n| Param | Type | Description |\r\n| --- | --- | --- |\r\n| config | <code>TBD</code> | TBD, will be implemented in the future |\r\n\r\n**Example**\r\n```js\r\nconst RLP = require('encode.js')\r\n\r\nconst rlp = new RLP()\r\n```\r\n\r\n\r\n* * *\r\n<a name=\"SECRlpEncode+encode\"></a>\r\n### SECRlpEncode.encode(input, buffer, offset) ⇒ <code>Buffer</code>\r\nReturns input in RLP encoded format\r\n\r\n| Param | Type | Description |\r\n| --- | --- | --- |\r\n| input | <code>{Buffer, String, Integer, Array}</code> | Input data for RLP encode |\r\n| buffer | <code>{Buffer}</code> | Input buffer which is in RLP encoded format |\r\n| offset | <code>{Buffer}</code> | Buffer offset position |\r\n\r\n\r\n\r\n* * *\r\n<a name=\"SECRlpEncode+decode\"></a>\r\n### SECRlpEncode.decode(input, start, end) ⇒ <code>Array</code>\r\nRLP decode for input data\r\n\r\n| Param | Type | Description |\r\n| --- | --- | --- |\r\n| input | <code>{Buffer, String, Integer, Array}</code> | Input should be in RLP encoded structure |\r\n| start | <code>{Integer}</code> | \"input\" data array starting index |\r\n| end | <code>{Integer}</code> | \"input\" data array ending index |\r\n\r\n\r\n\r\n* * *\r\n<a name=\"SECRlpEncode+getLength\"></a>\r\n### SECRlpEncode.getLength(input) ⇒ <code>Number</code>\r\nReturns input's length according to the first several indication bytes\r\n\r\n| Param | Type | Description |\r\n| --- | --- | --- |\r\n| input | <code>{Buffer, String, Integer, Array}</code> | Input should be in RLP encoded data, or the returned length is wrong |\r\n\r\n\r\n\r\n\r\n\r\n\r\n* * *\r\n# 中文简介：\r\n本库函数用于SEC区块链的RLP编码\r\nRLP编码用于存储和传输数据，处理数据则用.json格式文件\r\njson文件由RLP编码过以后，由于json文件的键值被去掉了，仅保留内容，因此剩下了大量的空间\r\n\r\n主要的函数:\r\n1.\tRLP编码: encode(input, buffer, offset) => Buffer\r\n\t输入\"input\"可以是{Buffer,String,Integer,Array}，RLP编码仅对两种数据结构进行处理：列表及字符串\r\n\tNodejs中Array即为列表，其他类型{Buffer,String,Integer}作为字符串处理\r\n\t该函数的输出结果为RLP编码后的input，类型为Buffer\r\n\r\n2.\tRLP解码：decode(input, start, end) => Array\r\n\t输入\"input\"可以是{Buffer,String,Integer,Array}，无论哪种类型，都会被先转换为Buffer类型再进行处理\r\n\t作用与encode相反，将RLP格式的数据进行解码, 输出为Array类型\r\n\r\n3.\t获取长度函数: getLength(input) => Number\r\n\tinput为经过RLP编码后的数据\r\n\t函数根据前几个字节的值获取整个input数据的长度","readmeFilename":"README.md"}