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

#10 in #streamingfast

Download history 5/week @ 2024-01-08 4/week @ 2024-02-12 28/week @ 2024-02-19 28/week @ 2024-02-26 15/week @ 2024-03-04 40/week @ 2024-03-11 30/week @ 2024-03-18 46/week @ 2024-03-25 42/week @ 2024-04-01 9/week @ 2024-04-08 10/week @ 2024-04-15

110 downloads per month

Apache-2.0

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

~2.5MB
~55K SLoC