You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
chore: make IPFS API static (remove api-manager) (#3365)
- api-manager is gone.
- There is now Storage component that is glorified `{keychain, repo, peerId}` tuple, that one can `async start` and it takes care of repo bootstrapping (which `init` used to do). As per discussion with @achingbrain `init` was mostly there for historical reasons.
- There is now `Network` service component that is glorified `{peerId, libp2p, bitswap}` tuple.
- All components that depended upon `libp2p` or `peerId` depend on `network` service now.
- They can do `await network.use(options)` and get tuple when node is started (if it is starting or started) or an exception if start has not been initiated.
- This way IPFS node is no longer mutated and APIs that depend on node been started throw if called before start.
- lot of TS typings were added to be able to make this changes with more confidence.
- Set of interfaces were added for things like datastore, repo, bitswap
- create can be passed implementations and it's useful to decouple interface from a concrete implementation.
- We had no types for those and it helped having interfaces to increase coverage and enable making these changes.
> I would like to migrate those to other repos, but doing it as would be more effective than having to coordinate changes across many repos.
- circular dependencies between pinmanager and dag APIs are resolved.
Co-authored-by: Alex Potsides <alex@achingbrain.net>
Co-authored-by: Hugo Dias <hugomrdias@gmail.com>
0 commit comments