Skip to content

Expose an enumerable key/value store persistence API #291

@danfinlay

Description

@danfinlay

Some snaps and use cases require more data than a single JSON blob, and efficient performance depends on such a snap's ability to minimize how much storage is kept in memory.

Examples:

  • A light-client
  • A swingset
  • A data caching layer, like ipfs or a DID registry.

In particular, I was thinking of making a resumable swingset as a snap. This would greatly benefit from being able to store transactions in a re-enumerable order, the way IndexedDB would let me do.

This might work if you just wrapped the IndexedDB API in a way where all keys were force-prefixed with a secret key that is unique to the requesting snap. IndexedDB is available to both node and browser, so it might be a suitable API to expose (attenuated).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions