@lelantos-org/sdk / advanced / NullifierStore
Class: NullifierStore
Defined in: @lelantos-org/sdk/dist/sync/nullifier-store.d.ts:45
Constructors
Constructor
new NullifierStore(fmd): NullifierStore;Defined in: @lelantos-org/sdk/dist/sync/nullifier-store.d.ts:50
Parameters
| Parameter | Type |
|---|---|
fmd | NullifierFeed |
Returns
NullifierStore
Accessors
size
Get Signature
get size(): number;Defined in: @lelantos-org/sdk/dist/sync/nullifier-store.d.ts:67
Nullifiers mirrored so far.
Returns
number
Methods
has()
has(nf): boolean;Defined in: @lelantos-org/sdk/dist/sync/nullifier-store.d.ts:65
True if this nullifier was consumed on-chain as of the last sync. A stale mirror can only under-report, so this never reports a live note as spent (barring the truncation collision described at WIRE_BYTES).
Parameters
| Parameter | Type |
|---|---|
nf | bigint |
Returns
boolean
loadState()
loadState(state): void;Defined in: @lelantos-org/sdk/dist/sync/nullifier-store.d.ts:53
Parameters
| Parameter | Type |
|---|---|
state | NullifierStoreState |
Returns
void
saveState()
saveState(): NullifierStoreState;Defined in: @lelantos-org/sdk/dist/sync/nullifier-store.d.ts:54
Returns
sync()
sync(opts?): Promise<NullifierSyncSummary>;Defined in: @lelantos-org/sdk/dist/sync/nullifier-store.d.ts:59
Fetch chunks since the last sync, fold them into the set, then persist. Idempotent: the tail chunk is re-fetched every sync and already-mirrored entries are skipped by sequence.
Parameters
| Parameter | Type |
|---|---|
opts? | NullifierSyncOpts |
Returns
Promise<NullifierSyncSummary>
withPersistence()
static withPersistence(fmd, persistence): Promise<NullifierStore>;Defined in: @lelantos-org/sdk/dist/sync/nullifier-store.d.ts:52
Build a NullifierStore and restore any previously persisted state.
Parameters
| Parameter | Type |
|---|---|
fmd | NullifierFeed |
persistence | NullifierPersistence |
Returns
Promise<NullifierStore>