UNPKG

holepunch-hop

Version:
35 lines (27 loc) 1.68 kB
# Plan - Implement Orgo, Gelle, and Lensglue Storage Modules The goal is to implement three new storage modules (`orgo`, `gelle`, and `lensglue`) following the pattern established in `src/storage/modules/lifestrap/lifestrap.js`, and integrate them into the `HolepunchWorker` via `HyperBee`. ## Proposed Changes ### 1. Implement Storage Modules - Create/Update `@src/storage/modules/orgo/orgo.js` - Create/Update `@src/storage/modules/gelle/gelle.js` - Create/Update `@src/storage/modules/cues/lensglue.js` Each module will implement: - `constructor(db, crypto)` - `save[ModuleName](info)` - `get[ModuleName](key)` - `get[ModuleName]History(id, category, key)` - `delete[ModuleName](item)` - `update[ModuleName]Module(contracts)` (Note: `lifestrap.js` uses `updateLifestrapModule` but `HyperBee` calls `updateLifestrapLibrary`. I will align with the existing code's logic.) ### 2. Update `src/storage/bees.js` (HyperBee) - Import the three new modules. - Initialize Hyperbee databases for each (e.g., `bentoorgo`, `bentogelle`, `bentolensglue`). - Assign `beePubkeys` for each. - Instantiate the modules in the `constructor` or `setupHyperbee`. - Add delegate methods (e.g., `saveOrgo`, `getOrgo`, etc.) to `HyperBee` class for external access. ### 3. Update `src/index.js` (HolepunchWorker) - Update `setHOPCrypto` to include "Orgo", "Gelle", and "Lensglue" in the `modules` array so their `crypto` property is set. ## Verification Plan - Since I cannot run the full Holepunch environment, I will: - Perform a syntax check on the new files. - Verify that all imports and references are correct. - Ensure the naming conventions match the requested pattern.