pinax-network / substreams-js Goto Github PK
View Code? Open in Web Editor NEWSubstreams Javascript consumer
License: Apache License 2.0
Substreams Javascript consumer
License: Apache License 2.0
Implement Rollup to build
SessionInit
ModulesProgress
InitialSnapshotData
InitialSnapshotComplete
BlockScopedData
RpcError: 3 INVALID_ARGUMENT: validate request: negative start block -1 is not accepted
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
output_map
parameter
Added
output_module
to Substreams Request
production
vs. development
mode
Added
production_mode
to Substreams Request
InitialSnapshots
in development mode
initial_store_snapshot_for_modules
has been renamed todebug_initial_store_snapshot_for_modules
,snapshot_data
todebug_snapshot_data
andsnapshot_complete
todebug_snapshot_complete
.
store_*
module when in development
modedebug-modules-output
The new substreams CLI flag -debug-modules-output can be used to control which modules' output is actually displayed by the CLI.
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;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.