Skip to content

@lelantos-org/sdk / wallet / addHits

Function: addHits() โ€‹

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

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

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

known lets a caller that appends repeatedly โ€” the sync loop, once per page โ€” carry the membership set across calls instead of rebuilding it from every stored note each time, which is O(notes x pages) over a long sync. It is updated in place, so a caller that passes one must not reuse it against a different file.

Parameters โ€‹

ParameterType
fileNotesFile
hitsScanHit[]
known?Set<string>

Returns โ€‹

object

added โ€‹

ts
added: StoredNote[];

skipped โ€‹

ts
skipped: number;

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