Skip to content

CreatePgwasmClientOptions

Defined in: packages/client/src/index.ts:440

Options for createPgwasmClient.

optional build?: PostgresBuild

Defined in: packages/client/src/index.ts:446

The Postgres build the store runs on (see CreateSyncClientOptions.build); defaults to cBuild. Pass createCBuild({ assets }) to hand in pre-warmed WASM modules and filesystem bundle: a rejected warm falls back to the build’s own asset load, so it never fails the create.


optional restoreFrom?: Blob | File

Defined in: packages/client/src/index.ts:484

A store-backup tarball to seed the new store from (ADR-0035 decision 6, restore) — a File/Blob as produced by SyncClient.exportStore. Passed straight to pgwasm’s loadDataDir, so the created store boots ON the backup’s datadir. Restore is a CREATION-path feature: the caller (createSyncClient) has already proven the target does not yet exist (storeTargetExists); this option carries no freshness check of its own. A corrupt/foreign tarball surfaces as a pgwasm boot failure here.