v0.15.0
What's new (❌ includes breaking changes)
- remove reading & writing cursor directly in sink
- Some sinks will need to validate the incoming data before saving the cursor, saving the cursor prior to validation can cause data loss
- export
fileCursor
&httpCursor
import { setup, fileCursor } from "substreams-sink"
...
// Get cursor from file
const cursor = fileCursor.readCursor("cursor.lock");
// Setup sink for Block Emitter
const { emitter } = await setup({...options, cursor});
...
// Save new cursor on each new block emitted
fileCursor.onCursor(emitter, "cursor.lock");
- remove
--http-cursor-auth
&--cursor-path
params - add
--cursor
param - remove
startCursor
fromsetup
- cursor is already provided as setup input
- update logging output
What's Changed
- Remove cursor logic from sink by @DenisCarriere in #25
Full Changelog: v0.14.0...v0.15.0