{"name":"it-pb-rpc","template":{"extends":["node"]},"version":"0.1.12","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":"fa022e48960fee1e8e1181c8aa7445c246773b80","_id":"it-pb-rpc@0.1.12","_nodeVersion":"17.3.0","_npmVersion":"8.3.0","dist":{"integrity":"sha512-bRSlbe2JEiqUsaRjR/5TFv2JrduA08SM93QvVDXYyH/16LcDXrPe+Up++jLFYKUTlng4VNkSBw7AFfqdXLR+IQ==","shasum":"230a575dce47bfdc9dd964c00120abfa5e290289","tarball":"http://registry-npm.ywwl.com/it-pb-rpc/download/it-pb-rpc-0.1.12.tgz","fileCount":5,"unpackedSize":9597,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0jwXCRA9TVsSAnZWagAAY6QP/iDJkCZff35Lk6y2jZVh\nD6uyZbCMsTTslz225Fh/TkbqlWBOehxO0gsuLSD9K6RVuFTQtXhKxKZGjSPa\nqXfq8G1BztyanihSTxgen0og5Wn/SsE6YiK7e/3X5zVANP3PgsF7Hwi/rpjM\n2VW/jNtEg8Bys4+6RvMWSZDtIj4XC7u7M6T5us+Tj4AEJGOhKv8L6M473FRp\njH/qi+UZL/u4ZQU5UMrrdJu5fm/4IAAsv2CmhHWgEJusxNSiIAVEw6q1OOWZ\nI0cZSPzGyt4fAmPVcfgKmGJQj6KIfgA7gGs/GBZbyLuMV7S49T8fWTUmMHz2\ne3IpLgtOEb0OfnM07FcFLNLiWqtrT2HD66Pq/rPhc24oe8HGrrmfmPu71IKS\nGXBFreLKZEHE2QD8b4KY6ZFJwr1e4dZHqjmpUMiWqAEFcArFqwmCG4U5wLBx\n66hqF+l3s2OMPgb5j311xgQEqXSgwFx08zffz6U0KzvX00xJPd98+orDLK2P\nP+xsG75uOrPmh94Gle8KPtd5QEKcPKuCu/UCCyskYKhftwf17w07UjAie8ty\n29VkjmV2HF9YI59d0zXxjkg4n9fbiFQcFoYxGg1GfEvL98fE41WdSq3dHeTd\nsjW4NEA825VTBXVLG60UifZ23WlKrjF1UWd6JklnYXNbrC4j1OnFl45wAMOm\nSmjm\r\n=85/T\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCK+5CWLFqPkmdwzBYC/kcdaBRHz+OcMcHhS26jDcjQLgIgR1Cd2d8UDzB4nB5VHvZcWFebSqnGm9u0gzU5lDLL8Sg="}],"size":2874,"noattachment":false,"key":"/it-pb-rpc/-/it-pb-rpc-0.1.12.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.1.12_1641167895798_0.07623577013769633"},"_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":1641167895917,"_cnpm_publish_time":1641167895917,"dist-tags":{"latest":"0.2.0"}}