Folder for hypercore storage or a function that returns a RandomAccessStorage instance
Folder for sqlite Dbs. Folder must exist. Use ':memory:' to store everything in-memory
Fastify server instance
path for drizzle migrations folder for project database
16-bytes of random data that uniquely identify the device, used to derive a 32-byte master key, which is used to derive all the keypairs used for Mapeo
MapeoRPC instance, used for tests
Create a Mapeo replication stream. This replication connects the Mapeo RPC channel and allows invites. All active projects will sync automatically to this replication stream. Only use for local (trusted) connections, because the RPC channel key is public. To sync a specific project without connecting RPC, use project[kProjectReplication].
Add a project to this device. After adding a project the client should
await project.$waitForInitialSync()
to ensure that the device has
downloaded their proof of project membership and the project config.
Optional
opts: { For internal use in tests, set opts.waitForSync = false to not wait for sync during addProject()
Optional
waitClose all servers and stop multicast advertising and browsing. Will wait for open sockets to close unless opts.force=true in which case open sockets are force-closed after opts.timeout milliseconds
Optional
opts: { Force-close open sockets after timeout milliseconds
Optional timeout when calling stop() with force=true
path for drizzle migrations folder for client database