Giter Site home page Giter Site logo

substreams-js's Introduction

substreams-js's People

Contributors

0237h avatar chamorin avatar deniscarriere avatar fschoell avatar yaroshkvorets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

cmadh

substreams-js's Issues

Support Response messages

  • session: SessionInit
  • progress: ModulesProgress
  • debugSnapshotData: InitialSnapshotData
  • debugSnapshotComplete: InitialSnapshotComplete
  • data: BlockScopedData

Support Describe & List gRPC

describe

$ grpcurl --plaintext localhost:8000 describe
sf.substreams.sink.kv.v1.Kv is a service:
service Kv {
  rpc Get ( .sf.substreams.sink.kv.v1.GetRequest ) returns ( .sf.substreams.sink.kv.v1.GetResponse );
  rpc GetByPrefix ( .sf.substreams.sink.kv.v1.GetByPrefixRequest ) returns ( .sf.substreams.sink.kv.v1.GetByPrefixResponse );
  rpc GetMany ( .sf.substreams.sink.kv.v1.GetManyRequest ) returns ( .sf.substreams.sink.kv.v1.GetManyResponse );
  rpc Scan ( .sf.substreams.sink.kv.v1.ScanRequest ) returns ( .sf.substreams.sink.kv.v1.ScanResponse );
}

list

$ grpcurl --plaintext localhost:8000 list    
sf.substreams.sink.kv.v1.Kv

Support latest Substreams features

  • support output_map parameter

    Added output_module to Substreams Request

  • production vs. development mode

    Added production_mode to Substreams Request

  • support InitialSnapshots in development mode

    initial_store_snapshot_for_modules has been renamed to debug_initial_store_snapshot_for_modules, snapshot_data to debug_snapshot_data and snapshot_complete to debug_snapshot_complete.

  • throw error when using store_* module when in development mode
  • Support debug-modules-output

    The new substreams CLI flag -debug-modules-output can be used to control which modules' output is actually displayed by the CLI.

Implement ConnectWeb sink KV requests

Support the following Requests

  • Get
  • GetMany
  • Scan
  • GetByPrefix

https://github.com/streamingfast/substreams-sink-kv/blob/main/proto/substreams/sink/kv/v1/read.proto

syntax = "proto3";

package sf.substreams.sink.kv.v1;

option go_package = "github.com/streamingfast/substreams-sink-kv/pb;pbkv";

service Kv {

  // Get returns the requested value as bytes if it exists, grpc_error: NOT_FOUND otherwise.
  rpc Get(GetRequest) returns (GetResponse);

  // GetMany returns the requested values as bytes if all of them exists, grpc_error: NOT_FOUND otherwise.
  rpc GetMany(GetManyRequest) returns (GetManyResponse);

  // GetByPrefix returns the next _limit_ key/value pair that match the requested prefix if any exist, grpc_error: NOT_FOUND otherwise.
  rpc GetByPrefix(GetByPrefixRequest) returns (GetByPrefixResponse);

  // Scan returns then next _limit_ key/value pairs starting lexicographically at the given key, grpc_error: NOT_FOUND otherwise.
  rpc Scan(ScanRequest) returns (ScanResponse);

}

message GetRequest {

  // Key to fetch
  string key = 1;
}


message GetManyRequest {

  // Keys to fetch
  repeated string keys = 1;
}

message GetByPrefixRequest {

  // server may impose a hard limit, trying to go above it would return grpc_error: INVALID_ARGUMENT
  uint64 limit = 1;

  // requested prefix
  string prefix = 2;
}

message ScanRequest {

  // server may impose a hard limit, trying to go above it would return grpc_error: INVALID_ARGUMENT
  uint64 limit = 1;

  // scanning will start at this point, lexicographically
  string begin = 2;

  // If set, scanning will stop when it reaches this point or above, excluding this exact key
  optional string exclusive_end = 3;
}


message GetResponse {

  // Value that was found for the requested key
  bytes value = 1;
}


message GetManyResponse {

  // Values that were found for the requested keys
  repeated bytes values = 1;
}

message GetByPrefixResponse {

  // KV are the key/value pairs that were found with the given prefix
  repeated KV key_values = 1;

  // limit_reached is true if there is at least ONE MORE result than the requested limit
  bool limit_reached = 2;
}

message ScanResponse {

  // KV are the key/value pairs that were found during scan
  repeated KV key_values = 1;

  // limit_reached is true if there is at least ONE MORE result than the requested limit
  bool limit_reached = 2;
}



message KV {
    string key = 1;
    bytes value = 2;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.