Releases: substreams-js/substreams-sink-entity-changes
Releases · substreams-js/substreams-sink-entity-changes
v0.3.11
v0.3.10
- add legacy operations from EntityChanges v1.1.0
- "UNSET"
- "CREATE"
- "UPDATE"
- "DELETE"
- "FINAL"
v0.3.6
- make
ordinal
optional type- Deprecated, this is not used within
graph-node
.
- Deprecated, this is not used within
v0.3.4
What's Changed
Full Changelog: v0.3.3...v0.3.4
v0.3.3
- remove
entity_pb
from default export
v0.3.2
What's Changed
Full Changelog: v0.3.1...v0.3.2
v0.3.1
- Update README docs to include
zod
- set Typescript config
strict: true
v0.3.0
v0.2.0
What's New?
- add TypeBox Static Type Resolution
Substreams Sink Entity Changes
Buf Protobuf codegen & TypeBox for
EntityChanges
.
Quickstart
$ npm install @substreams/sink-entity-changes
import { typebox, entity_pb } from "@substreams/sink-entity-changes"
Protobuf
message EntityChanges {
repeated EntityChange entity_changes = 5;
}
message EntityChange {
string entity = 1;
string id = 2;
Operation operation = 4;
repeated Field fields = 5;
}
Using Buf Protobuf codegen
import { EntityChanges } from "@substreams/sink-entity-changes/entity_pb"
...
const emitter = new BlockEmitter(transport, request, registry);
// Stream EntityChanges
emitter.on("output", (output: EntityChanges) => {
for ( const entityChange of output.entityChanges) {
console.log(entityChange);
}
});
Using TypeBox Static Type Resolution
import { EntityChanges } from "@substreams/sink-entity-changes/typebox"
...
const emitter = new BlockEmitter(transport, request, registry);
emitter.on("anyMessage", (message: EntityChanges) => {
for ( const entityChange of message.entityChanges) {
console.log(entityChange);
}
});
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);
}
});