4 releases
0.1.3 | Mar 22, 2023 |
---|---|
0.1.2 | Mar 15, 2023 |
0.1.1 | Jan 10, 2023 |
0.1.0 | Jan 10, 2023 |
#14 in #streamingfast
58KB
742 lines
substreams-sink-kv
This crate is a simple wrapper around formatting substreams output to a kv store.
Create a kv_out module in your substreams
// lib.rs
use substreams_sink_kv::pb::kv::KvOperations;
...
pub fn kv_out(
... some stores ...
) -> Result<KvOperations, Error> {
let mut kv_ops: KvOperations = Default::default();
// process your data, push to your KV
kv_ops.push_new(someKey, someValue, ordinal);
kv_ops.push_delete(anotherKey, anotherOrdinal);
Ok(kv_ops)
}
lib.rs
:
A library for writing Substream Sink Wasm Query handlers.
Dependencies
~3MB
~59K SLoC