{"name":"it-pb-rpc","template":{"extends":["node"]},"version":"0.2.0","description":"A convenience-wrapper around protocol-buffers and lp-messages functions","main":"src/index.js","types":"src/index.d.ts","author":{"name":"Maciej Krüger","email":"mkg20001@gmail.com"},"license":"MPL-2.0","scripts":{"test":"mocha -A","cov":"nyc mocha"},"devDependencies":{"@types/bl":"^5.0.2","bl":"^5.0.0","buffer":"^6.0.3","it-pair":"^1.0.0","mocha":"*","nyc":"*","uint8arrays":"^3.0.0","mkgs-tool":"^0.1.23"},"dependencies":{"it-handshake":"^2.0.0","it-length-prefixed":"^5.0.3"},"repository":{"type":"git","url":"git+https://github.com/mkg20001/it-pb-rpc.git"},"bugs":{"url":"https://github.com/mkg20001/it-pb-rpc/issues"},"homepage":"https://github.com/mkg20001/it-pb-rpc#readme","gitHead":"cd5fd955e346d4dc8244ed23a44692c08ee0bdb1","_id":"it-pb-rpc@0.2.0","_nodeVersion":"17.3.0","_npmVersion":"8.3.0","dist":{"integrity":"sha512-Rojodsa6yxSTZDqVVF9HXKsISoHtlLNOL0P6b/7oCswiscbjCpt1IB78BxRDHpFL3tg8jFPMNDTP3v6ZjrMf9w==","shasum":"9247489e73e4a7d382d63a74778c1c3308bd9297","tarball":"http://registry-npm.ywwl.com/it-pb-rpc/download/it-pb-rpc-0.2.0.tgz","fileCount":10,"unpackedSize":17407,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0wXrCRA9TVsSAnZWagAAg+QP/jOIdwfoVsj97QrS84wa\nnjhw7rguQ97L9JoSuOatf935akzdzfLLVHKeO4auSGw2Al04Q59ZrYuRCMVf\n9WxkbVq6DaxpSoxtdiMGVo3DCOw5g+xDZL6HfUeDSgSFjG7Mn4O6KF0Y8gEy\nS9Bosr0NMO0Pi1i8byRUPFr1lj8XT6DUZ6ZdJiPMPrSJEK7lAwjRvLSg7nJd\nEab3HcmP+78t2oe33zwTK4VOjXtHJdT0A9RwVHq3ETObKcgYT1GTvycdhcPC\nNOdzMzG2gLIJ6cGTd+wak5H7iozGwmBhhyibUdEkwHcf85X2i3OGzxVBTM60\nfXlauu6mFJLA3/sCRrf6RDAQc4KBY1CSvqaH6sMhrDh6+EOOTa5k4DGiVs9W\n9OEhUKJ37X3Fk1cQRdUuae44FtzJeLDd8b/O8RErntiCxE2vmm0hIs5qPu99\n5Ej+j40PBkALXVSKZp0bbP2hdvewSoerpXSPfMm0ZC/JP+69Pc6Uk93PUuFU\ns3sGDOiMosi4JPd22s7lM0heIGf0ad3MmCjIYAMXknvzDYwu3z8oAMpBcgNi\nkSE/XI0E6QZhQobPzt4msRx8AV1U7bwvW1Sk4jrqOqPrIK6vk1LrwysBpKNa\nXpflKpExFtJTBAu6zLmIuabpOo7lhA/m07fO3cte4XUgdrMHqCfB6nz6/B++\n/I9I\r\n=tJCj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDK8JzxqSFPnhPscm3c1lhEeoKnat475640C4m3G0DLeAiEAmLDhht7sahgBPdSLQLJt7HBtOjxZMIeFSYZ3OkgiX10="}],"size":3427,"noattachment":false,"key":"/it-pb-rpc/-/it-pb-rpc-0.2.0.tgz"},"_npmUser":{"name":"mkg20001","email":"mkg20001@gmail.com"},"directories":{},"maintainers":[{"name":"mkg20001","email":"mkg20001@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/it-pb-rpc_0.2.0_1641219563308_0.34286167382872823"},"_hasShrinkwrap":false,"readme":"# it-pb-rpc\n\nA convinience-wrapper arround protocol-buffers and lp-messages functions\n\n# API\n\n- `wrap(duplex, opts)`: Wraps a duplex, returns below object (opts=Object with encode/decode opts from [it-length-prefixed api](https://www.npmjs.com/package/it-length-prefixed#api))\n  - `.read(bytes)`: async, reads the given amount of bytes\n  - `.readLP()`: async, reads one length-prefixed message\n  - `.readPB(proto)`: async, reads one protocol-buffers length-prefixed message (proto=Object with .encode, .decode functions)\n  - `.write(data)`: writes the given data (data=Buffer or BufferList)\n  - `.writeLP(data)`: writes the given data with a length-prefixe (data=Buffer or BufferList)\n  - `.writePB(data, proto)`: encodes the data, then writes it withg a length-prefix (data=Buffer or BufferList, proto=Object with .encode, .decode functions)\n  - `.pb(proto)`: returns a convinience wrapper for writing messages\n    - `.read()`: reads one length-prefixed message encoded with `proto`\n    - `.write(data)`: writes one length-prefixed message encoded with `proto`\n","publish_time":1641219563484,"_cnpm_publish_time":1641219563484,"dist-tags":{"latest":"0.2.0"}}