Skip to content

@lelantos-org/sdk / wallet / NoteSink

Interface: NoteSink โ€‹

Defined in: @lelantos-org/sdk/dist/wallet/sync.d.ts:34

Where a sync writes what it finds.

Deliberately not a NoteStore: a store hands back a fresh NotesFile on every load(), so a sync that owned one would be mutating a second copy of state the wallet already holds in NoteCache โ€” and whichever of the two saved last would erase the other's writes. The sink is the live file, so exactly one NotesFile exists per wallet. NoteCache implements it.

Properties โ€‹

file โ€‹

ts
readonly file: NotesFile;

Defined in: @lelantos-org/sdk/dist/wallet/sync.d.ts:36

The live notes file. Read for the resume cursor; never replaced.

Methods โ€‹

addHits() โ€‹

ts
addHits(hits): object;

Defined in: @lelantos-org/sdk/dist/wallet/sync.d.ts:38

Append hits to the live file in memory. Idempotent by cm.

Parameters โ€‹

ParameterType
hitsScanHit[]

Returns โ€‹

object

added โ€‹
ts
added: StoredNote[];
skipped โ€‹
ts
skipped: number;

checkpoint() โ€‹

ts
checkpoint(cursor): Promise<void>;

Defined in: @lelantos-org/sdk/dist/wallet/sync.d.ts:43

Persist the current notes together with cursor.

Parameters โ€‹

ParameterType
cursornumber

Returns โ€‹

Promise<void>

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub