JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 661
  • Score
    100M100P100Q106358F
  • License ISC

Returns Protobuf schemas for the data streamed and stored in S3 for a given topic

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 by Bitquery that returns Protocol Buffers (Protobuf) schemas for the Bitquery Protobuf Kafka streams by providing the topic name. Bitquery is an onchain data provider firm that provides blockchain data solutions in the form of GraphQL APIs, Websocket and Kafka streams. 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 i bitquery-protobuf-schema

Usage

The usage for the following package is as follows.

const {loadProto} = require('bitquery-protobuf-schema');

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 Bitquery Protobuf stream.

    const buffer = message.value;
    const decoded = ParsedIdlBlockMessage.decode(buffer);

To get started with the Bitquery Protobuf Kaka streams contact - sales@bitquery.io.

To read more about Bitquery Protobuf Kafka solutions checkout their official documentation.