Package Exports
- bitquery-protobuf-schema
- bitquery-protobuf-schema/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bitquery-protobuf-schema) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
bitquery-protobuf-schema
bitquery-protobuf-schema is an NPM package that returns Protocol Buffers (Protobuf) schemas for data streamed and stored in S3 by providing the topic name. The main purpose of this package is to avoid the hastle of downloading the .proto
files again and again.
Installation
To install the package, use npm:
npm install streaming_protobuf
Usage
The usage for the following package is as follows.
let ParsedIdlBlockMessage;
let topic = '<topic>';
ParsedIdlBlockMessage = await loadProto(topic);
This ParsedIdlBlockMessage
variable can then be used for decoding the recieved Protobuf message as shown below, where message is a singular message recieved from the protobuf stream.
const buffer = message.value;
const decoded = ParsedIdlBlockMessage.decode(buffer);