fireproof-storage / fireproof

Realtime database, runs anywhere. Install Fireproof in your front-end app or edge function, and sync data via any backend.
https://fireproof.storage
Other
220 stars 16 forks source link

refactor web3 storage connection #20

Closed jchris closed 3 weeks ago

jchris commented 9 months ago

Currently there are 3 behaviors overlaid in one file.

  1. the Connection required implementation of data and meta upload and download
  2. the delegation workflows for ensuring the client has access to the proper databases
  3. the web3 storage specific public API

My instinct tells me that if we split this in 2, we can anchor the existing module on the meta upload download required behavior, and have it import a secondary module that implements the delegation workflows. I think the web3 public methods can just stay in the first module, but that might get determined on the fly