Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
chore: make IPFS API static (remove api-manager) (#3365)
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
Co-authored-by: Hugo Dias <[email protected]>
  • Loading branch information
3 people authored Dec 4, 2020
1 parent 384312f commit 72efd00
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion browser-ipns-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"devDependencies": {
"delay": "^4.4.0",
"execa": "^4.0.3",
"ipfsd-ctl": "^7.0.2",
"ipfsd-ctl": "^7.1.1",
"go-ipfs": "^0.7.0",
"parcel-bundler": "^1.12.4",
"path": "^0.12.7",
Expand Down
2 changes: 1 addition & 1 deletion explore-ethereum-blockchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"ipfs": "^0.52.1",
"ipfs-http-client": "^48.1.1",
"ipfsd-ctl": "^7.0.2",
"ipfsd-ctl": "^7.1.1",
"ipld-ethereum": "^5.0.1",
"test-ipfs-example": "^2.0.3"
}
Expand Down
2 changes: 1 addition & 1 deletion http-client-browser-pubsub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"execa": "^4.0.3",
"go-ipfs": "^0.7.0",
"ipfs": "^0.52.1",
"ipfsd-ctl": "^7.0.2",
"ipfsd-ctl": "^7.1.1",
"parcel-bundler": "^1.12.4",
"test-ipfs-example": "^2.0.3"
}
Expand Down
2 changes: 1 addition & 1 deletion http-client-bundle-webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"copy-webpack-plugin": "^5.0.4",
"execa": "^4.0.3",
"ipfs": "^0.52.1",
"ipfsd-ctl": "^7.0.2",
"ipfsd-ctl": "^7.1.1",
"react-hot-loader": "^4.12.21",
"rimraf": "^3.0.2",
"test-ipfs-example": "^2.0.3",
Expand Down
2 changes: 1 addition & 1 deletion http-client-name-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"devDependencies": {
"execa": "^4.0.3",
"go-ipfs": "^0.7.0",
"ipfsd-ctl": "^7.0.2",
"ipfsd-ctl": "^7.1.1",
"parcel-bundler": "^1.12.4",
"rimraf": "^3.0.2",
"test-ipfs-example": "^2.0.3"
Expand Down

0 comments on commit 72efd00

Please sign in to comment.