v0.1.0
Substreams Sink Entity Changes
Buf codegen for
EntityChanges
.
Install
$ npm install @substreams/sink-entity-changes
Quickstart
import { EntityChanges } from "@substreams/sink-entity-changes"
...
const emitter = new BlockEmitter(transport, request, registry);
// Stream EntityChanges
emitter.on("output", (output: EntityChanges) => {
for ( const entityChange of output.entityChanges) {
// EntityChange {
// entity,
// id,
// operation,
// fields
// }
console.log(entityChange);
}
});