Release 0.35.0
Full rewrite of webnative. 馃帀
Components
We've moved to a component system to make webnative more customizable and indepent of Fission infrastructure. The system removes all global state, avoiding bundler issues. We previously had dependency injection; this is basically more of the same without global state.
The documentation should give you some information on how the various components fit together. If you want to write implementations for a component, see the directories in src/components (or the lib folder). All existing components have been expanded and refactored, and we've introduced the following:
- Introduction of a
depotcomponent: All IPFS functionality has been moved into here. Can now be swapped out with something else. Note that webnative still uses CIDs & IPLD. - Introduction of a
referencecomponent: Data root lookups & updating, DID root lookups, DNS and various repositories (cid log & UCANs) have been moved in here. - Introduction of a
mannerscomponent: Debug functionality has moved to here. - Introduction of a
capabilitiescomponents: Responsible for accepting UCANs and filesystem secrets from external sources (eg. Fission Lobby)
Improvements
- The
programfunction now serves as the single entrypoint. You can customise all components and configuration via this function. It'll give you aProgramwith possibly aSession(and many other things) instead of theStatewe had before. Basically, when you get a session you're "logged in", otherwise you're not. - Webnative can now have many apps run on the same domain without any conflicts. This should help a lot when developing apps on the same localhost port. All storage and filesystems are namespaced by default.
- When loading a filesystem the data root is tried multiple times (to get around the DNS issue)
- Multiple filesystems can be loaded at the same time (conflicts with identifiers have been resolved), which allows for a temporary filesystem (progressive login).
(Re)moved
- Removal of various confusing filesystem parameters, all data and read keys are
Uint8Arrays now. - Removal of the
webnative.initialise,appandpermissionedAppfunctions. These have been replaced by theprogramfunction mentioned above. - Removal of the
fs.appPathfunction, replaced with theappDatafunction located in the path module. - Removal of the
fs.addPublicExchangeKeyandfs.hasPublicExchangeKeyfunctions, replaced with non-class-instance functions located infs/data.js.