Skip to content

@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 ​

ts
readonly cfg: object;

Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:22

noteSource ​

ts
readonly noteSource: NoteSource;

nullifierStore ​

ts
readonly nullifierStore: NullifierStore;

scanner ​

ts
readonly scanner: Scanner;

treeStore? ​

ts
readonly optional treeStore?: TreeStore;

Absent on a watch wallet; the tree is read only to witness a spend.


J ​

ts
readonly J: Jubjub;

Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:15


keys ​

ts
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 ​

ts
readonly locks: object;

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

sync ​

ts
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 ​

ts
readonly notes: NoteCache;

Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:21


nullifiers? ​

ts
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 ​

ts
readonly P: Poseidon;

Defined in: @lelantos-org/sdk/dist/wallet/notes/sync-ops.d.ts:14