Skip to content

@lelantos-org/sdk / internal / addHits

Function: addHits() ​

ts
function addHits(
   file, 
   hits, 
   known?
): object;

Defined in: @lelantos-org/sdk/dist/wallet/notes/note-store.d.ts:40

Append ScanHit[] to a NotesFile. Idempotent: existing cms are skipped.

known lets a caller that runs once per page reuse the commitment set instead of rebuilding it per call, which is O(notes x pages). It is updated in place and must not be reused against a different file.

Parameters ​

ParameterType
fileNotesFile
hitsScanHit[]
known?Set<string>

Returns ​

object

added ​

ts
added: StoredNote[];

skipped ​

ts
skipped: number;