hirosystems / chainhook

Extract transactions from Stacks and Bitcoin and build event driven re-org resistant indexers and databases.
GNU General Public License v3.0
147 stars 57 forks source link

Simplify chainhook-sdk interface #350

Open lgalabru opened 1 year ago

lgalabru commented 1 year ago

Simplifying the chainhook-sdk would be helpful for helping developers building new indexers on top of the chainhook-sdk. Something like:


let indexer = Indexer::new();

indexer.apply_block(|event| {
    // do something
});

indexer.rollback_block(|event| {
    // do something
});

indexer.run();
lgalabru commented 1 year ago

Foundation implemented in https://github.com/hirosystems/chainhook/pull/362