Optional
reset: booleanCan be awaited on for the underlying store to be ready for operations. Methods of the store should await on this, so if initialization fails then no other method will work either.
Tries to see if there's a free chain available with the given identity that's not currently being used by another processes, and if so, adds a claim to it and returns the final link of that chain.
Tries to add a bundle to this store; returns truthy if actually added, false if not (e.g. if already has it). Will throw if passed a bundle without the proceeding ones in the associated chain.
Optionally can reuse/start a new chain.
Implicitly awaits on this.ready;
Optional
claimChain: booleanAdds a callback to be called when a bundle was added by a different store and is found by the current store. Primarily intended for use with the LogBackedStore and file sharing.
the function to be called when a new bundle is found. It needs to take two arguments, bundleBytes and bundleInfo.
Get all bundles from a store ordered by [timestamp, medallion]. Intended to be used to send to a peer.
The callback should NOT await on anything (will cause problems with the IndexedDb implementation if you do). See https://github.com/google/gink/issues/28
Implicitly awaits on this.ready;
Generates a ChainTracker describing how much of each chain this store has.
Implicitly awaits on this.ready;
In ordered container types (Sequence and EdgeType), entries may be moved around. This method returns information about the current effective time, which may be different from the timestamp of the entry itself.
an object with the container muid, key, and the placement id.
Returns entry data for a List. Does it in a single pass rather than using an async generator because if a user tried to await on something else between entries it would cause the IndexedDb transaction to auto-close.
a promise of a list of ChangePairs
Uses an indexedDb to implement the Store interface. On the server side, this will be done using a shim that is only an in-memory implementation of the IndexedDb API, so the LogBackedStore should be used on the server for persistence. Most of the time uses of Gink should not need to call methods on the store directly, instead just pass it into the Database (or SimpleServer, etc.).