Skip to content

@lelantos-org/sdk / services/fmd-server / FmdClient

Class: FmdClient โ€‹

Defined in: @lelantos-org/sdk/dist/services/fmd-server/client.d.ts:138

Constructors โ€‹

Constructor โ€‹

ts
new FmdClient(
   baseUrl, 
   chainId, 
   opts?
): FmdClient;

Defined in: @lelantos-org/sdk/dist/services/fmd-server/client.d.ts:142

Parameters โ€‹

ParameterType
baseUrlstring
chainIdbigint
opts?HttpClientOptions

Returns โ€‹

FmdClient

Methods โ€‹

createSubscription() โ€‹

ts
createSubscription(input): Promise<SubscriptionOut>;

Defined in: @lelantos-org/sdk/dist/services/fmd-server/client.d.ts:193

Idempotent under a stable tokenHex: a repeat with the same detection key and ฮณ re-attaches to the existing subscription (created: false). A repeat with a different detection key is rejected 409 rather than repointing the row, which would hand this caller the match stream of whoever registered the token first.

Parameters โ€‹

ParameterType
inputCreateSubscriptionInput

Returns โ€‹

Promise<SubscriptionOut>


deleteSubscription() โ€‹

ts
deleteSubscription(token): Promise<void>;

Defined in: @lelantos-org/sdk/dist/services/fmd-server/client.d.ts:195

Token travels in the Authorization header, not the path โ€” see listMatches.

Parameters โ€‹

ParameterType
tokenstring

Returns โ€‹

Promise<void>


fetchCommitmentChunk() โ€‹

ts
fetchCommitmentChunk(chunkId, opts?): Promise<CommitmentChunkOut>;

Defined in: @lelantos-org/sdk/dist/services/fmd-server/client.d.ts:175

Leaves chunkId * 1024 .. +1024. Complete chunks are immutable.

One of the two routes exempted from the SDK's blanket no-store. The feed is global and append-only: every wallet fetches the identical bytes, so a cache entry says only that this device synced, which the request itself already said. The origin serves complete chunks as max-age=31536000, immutable, and honoring that turns a repeat sync into no network at all โ€” the single largest transfer in a cold sync.

Parameters โ€‹

ParameterType
chunkIdnumber
opts?{ signal?: AbortSignal; }
opts.signal?AbortSignal

Returns โ€‹

Promise<CommitmentChunkOut>


fetchHead() โ€‹

ts
fetchHead(): Promise<FmdHead>;

Defined in: @lelantos-org/sdk/dist/services/fmd-server/client.d.ts:150

Current sync watermarks. Cheap enough to poll several times a minute: two indexed MAX()s, uncached on both sides.

The point is to gate the expensive reads โ€” listNotes, listMatches and the chunk feeds โ€” on whether anything actually moved.

Returns โ€‹

Promise<FmdHead>


fetchNullifierChunk() โ€‹

ts
fetchNullifierChunk(chunkId, opts?): Promise<NullifierChunkOut>;

Defined in: @lelantos-org/sdk/dist/services/fmd-server/client.d.ts:183

Spent nullifiers chunkId * 1024 .. +1024 in insertion order. The whole set is paged down and filtered client-side โ€” the server must never learn which nullifiers a wallet cares about.

Parameters โ€‹

ParameterType
chunkIdnumber
opts?{ signal?: AbortSignal; }
opts.signal?AbortSignal

Returns โ€‹

Promise<NullifierChunkOut>


fetchTreeState() โ€‹

ts
fetchTreeState(): Promise<FmdTreeState>;

Defined in: @lelantos-org/sdk/dist/services/fmd-server/client.d.ts:151

Returns โ€‹

Promise<FmdTreeState>


listMatches() โ€‹

ts
listMatches(opts): Promise<FmdMatchesPage>;

Defined in: @lelantos-org/sdk/dist/services/fmd-server/client.d.ts:160

Server-side FMD-filtered notes for a subscription, addressed by the capability token from createSubscription.

Parameters โ€‹

ParameterType
opts{ after?: number; limit?: number; token: string; }
opts.after?number
opts.limit?number
opts.tokenstring

Returns โ€‹

Promise<FmdMatchesPage>


listNotes() โ€‹

ts
listNotes(opts?): Promise<FmdNoteOut[]>;

Defined in: @lelantos-org/sdk/dist/services/fmd-server/client.d.ts:152

Parameters โ€‹

ParameterType
opts?{ after?: number; limit?: number; }
opts.after?number
opts.limit?number

Returns โ€‹

Promise<FmdNoteOut[]>

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