@lelantos-org/sdk / internal / SyncContext
Interface: SyncContext
Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:13
The narrow surface a sync needs. WalletContext and a watch wallet's context satisfy it.
Properties
cfg
readonly cfg: object;Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:22
noteSource
readonly noteSource: NoteSource;nullifierStore
readonly nullifierStore: NullifierStore;scanner
readonly scanner: Scanner;treeStore?
readonly optional treeStore?: TreeStore;Absent on a watch wallet; the tree is read only to witness a spend.
J
readonly J: Jubjub;Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:15
keys
readonly keys:
| ViewingKey
| FullViewingKey;Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:20
Scanning needs only ivk, so a SpendingKey or either viewing-key tier satisfies this. SyncContext.nullifiers distinguishes them.
locks
readonly locks: object;Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:36
sync
readonly sync: Mutex;Serialises syncs. A sync is load → scan → save over shared state, so overlapping syncs (a poll timer and a user-initiated sync()) would interleave and the later save would win. NoteCache serialises its writes but not the scan between them. Calls queue rather than reject; the second is cheap because the first advanced the cursor.
notes
readonly notes: NoteCache;Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:21
nullifiers?
readonly optional nullifiers?: NullifierMemo;Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:35
Note id → nullifier, memoised across passes. See NullifierMemo.
Absent for an incoming-viewing-key holder, which has no nk; reconciliation is then skipped and every note reads unspent.
P
readonly P: Poseidon;Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:14