Skip to content

v0.1.0

Compare
Choose a tag to compare
@DenisCarriere DenisCarriere released this 04 Oct 03:01
· 18 commits to main since this release

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);
  }
});