createPgliteSynclet
The createPgliteSynclet function creates a Synclet with PGlite-backed connectors.
createPgliteSynclet<Depth>(options: PgliteSyncletOptions<Depth>): Promise<Synclet<Depth, PgliteDataConnector<Depth>, PgliteMetaConnector<Depth>>>| Type | Description | |
|---|---|---|
options | PgliteSyncletOptions<Depth> | Configuration including depth, pglite instance, and optional table/column names. |
| returns | Promise<Synclet<Depth, PgliteDataConnector<Depth>, PgliteMetaConnector<Depth>>> | A Promise that resolves to the |
This is the recommended approach for creating a PGlite Synclet, providing a simplified API that creates both the DataConnector and MetaConnector internally. The function uses the same PGlite database instance for both connectors and allows customization of all table and column names.
When table/column options are not provided, the connectors use defaults: data table 'data' with columns 'address' and 'atom', and meta table 'meta' with columns 'address' and 'timestamp'. All table structures are created automatically on first use.
Since
v0.0.0