@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 โ
| Parameter | Type |
|---|---|
file | NotesFile |
hits | ScanHit[] |
known? | Set<string> |
Returns โ
object
added โ
ts
added: StoredNote[];skipped โ
ts
skipped: number;