- Fix providing the
signParamstoDataListWriterconstructors in@erebos/doc-sync. - Remove duplicate
@erebos/bzztypes from@erebos/bzz-feed.
- Fix type signature of the
write()method ofTimelineWriter. - Bump dependency version of
@erebos/hexin@erebos/keccak256.
- The
bzz-related packages have been refactored, the@erebos/api-bzz-base,@erebos/api-bzz-browserand@erebos/api-bzz-nodepackages are discontinued and should be replaced by@erebos/bzz,@erebos/bzz-browser,@erebos/bzz-node,@erebos/bzz-feedand@erebos/bzz-fsdepending on the use cases, see below. - The
@erebos/api-psspackage has been renamed to@erebos/pssfor consistency with thebzz-related packages. - In the
@erebos/timelinepackage, thedecodeoption has been removed fromTimelineReaderConfigand theencodeoption fromTimelineWriterConfig, instead theread()andwrite()methods could be overwritten to cover the use case. - The
createHex()function has been removed from@erebos/hex,Hex.from()should be used instead. - The
@erebos/feed-listand@erebos/timelinepackages classes now need to be injected aBzzFeedinstance.
One goal for Erebos has been to stay quite low-level, at least for the core packages interacting with Swarm.
As the bzz-related packages have been growing over the past releases, it's been time to reconsider how to best organize them:
- Support for Swarm feeds requires additional dependencies such as
@erebos/hex,@erebos/keccak256andrxjsthat can be an additional burden for apps that don't need feeds, so all the feed-related methods have been extracted to the@erebos/bzz-feedpackage. @erebos/api-bzz-nodeprovided additional methods to interact with the file system. These methods are now provided by the dedicated@erebos/bzz-fspackage.- The
@erebos/bzzpackage can now be used directly in browsers. However, it does not provide thedownloadDirectory()anduploadDirectory()methods added in the@erebos/bzz-browserand@erebos/bzz-nodepackages.
So what package should you use?
- If you use node:
@erebos/bzz-node - Target a browser environment?
- If you need to use the
downloadDirectory()oruploadDirectory()method:@erebos/bzz-browser - Otherwise:
@erebos/bzz
- If you need to use the
- Use React Native?
- Try the experimental
@erebos/bzz-react-native - Extend
@erebos/bzzas needed
- Try the experimental
- For any other environment, try extending
@erebos/bzz
If you need to interact with feeds, use @erebos/bzz-feed.
If you want to interact with the file sytem when using node, the @erebos/bzz-fs package provides the utility methods previously implemented in @erebos/api-bzz-node.
The @erebos/doc-sync package has been added, allowing to synchronize JSON documents.
The Timeline class has been split between the TimelineReader and TimelineWriter classes. TimelineWriter extends TimelineReader and therefore can be used as a dropped-in replacement for Timeline.
- Support for raw Swarm feeds has been added thanks to Attila Gazso's pull request.
@erebos/api-bzz-browsercan now be used in a Web Worker thanks to Adam Uhlíř's pull request.- The
uploadData()anddownloadData()methods have been added to the Bzz APIs. - The
Hex.from()static method has been added as a replacement forcreateHex().
HTTP error messages from Swarm are now parsed when possible thanks to Adam Uhlíř's pull request.
The @erebos/feed-list package has been added, implementing lists data structures on top of raw Swarm feeds.
This release adds support for Readable streams in @erebos/api-bzz-base, thanks to Adam Uhlíř's pull request.
The uploadFileStream() method of @erebos/api-bzz-node has been removed, uploadFile() now supporting streams.
- The
downloadObservable()anddownloadDirectoryData()methods have been added to@erebos/api-bzz-baseand are therefore also available in@erebos/api-bzz-browser. Until now they were only available in@erebos/api-bzz-node. - The
downloadStream()method has been added. - The
uploadFile()andupload()methods now support a Readable stream input.
The code base and type definitions have been updated to TypeScript 3.7 thanks to Adam Uhlíř's pull request.
- The
PollOptionsinterface of the Bzz API has been changed and is now used by the Timeline API. ThePollFeedOptionsinterface is now used for polling feeds. - The
PollOptionsinterface of the Timeline API has been removed, now using the interface exported by the Bzz API.
Erebos v0.10 adds support for 2 new features added to the Swarm v0.5 release:
- Using the
pin(),unpin()andpins()methods of the Bzz class. - Using the
pinoption when uploading content. - Using the CLI.
It is possible to track progress of chunks spreading over the network using the getTag() and pins() methods of the Bzz class.
RPC utility libraries that were previously stored in a different repository have now been moved to the Erebos repository and npm organization.
You can learn more about these tools in the added documentation.
The main change in this release is the code base being rewritten in TypeScript. As part of these changes, the library no longer uses ES modules default exports but only named exports, such as:
import { Bzz } from '@erebos/api-bzz-node'import { Pss } from '@erebos/api-pss'import { createHex } from '@erebos/hex'
- The
EMPTY_HEXconstant has been renamed toEMPTY_ADDRESS. - The
sendRaw(),setPeerPublicKey()andsetSymmetricKey()methods of thePssclass no longer set a defaultaddressvalue, useEMPTY_ADDRESSif needed.
The @erebos/swarm-browser package now exports its contents in the Erebos.swarm namespace instead of Erebos. For example Erebos.swarm.SwarmClient() should be used instead of Erebos.SwarmClient().
The browser builds (in the dist folder) have been renamed from erebos.development.js and erebos.production.js to erebos.swarm.development.js and erebos.swarm.production.js to better reflect this change.
- The
downloadTarTo()method has been added to@erebos/api-bzz-node. - The experimental
@erebos/api-bzz-react-nativehas been added by Mark Vujevits in PR #98.
- The
sign()andverify()functions exported by the@erebos/secp256k1package now accept aBNInputinput value as exported by theellipticpackage. - The
addChapter()method of theTimelineclass now callscreateChapter(), so default values for the chapter will be injected. - Fixed links to Swarm install & run (by thecryptofruit in PR #108).
- Docs have been updated to expose TypeScript interfaces rather than Flow types.
- Add missing
rxjsdependency to@erebos/api-bzz-basepackage. - Fix TypeScript definition for
@erebos/api-bzz-basepackage.
- The
FeedModeandFeedOptionstypes have been removed, their use cases are implemented by new methods. - The
modeandcontentChangedOnlyfields have been removed from thePollOptionsobject. - The
xxxFeedValue()methods of the Bzz class have been changed as follows:getFeedValue()getFeedChunk()to load the chunk itselfgetFeedContentHash()to load the chunk and parse the response as a Swarm hashgetFeedContent()to load the chunk, parse the response as a Swarm hash and load the referenced resource
pollFeedValue()pollFeedChunk()to poll the chunk itselfpollFeedContentHash()to poll the chunk and parse the response as a Swarm hashpollFeedContent()to poll the chunk, parse the response as a Swarm hash and load the referenced resource
postSignedFeedValue()->postSignedFeedChunk()postFeedValue()->postFeedChunk()updateFeedValue()->setFeedChunk()uploadFeedValue()->setFeedContent()
- Various Timeline methods have been renamed to be more explicit:
download()->getChapter()upload()->postChapter()getChapterID()->getLatestChapterID()loadChapter()->getLatestChapter()updateChapterID()->setLatestChapterID()createUpdater()->createAddChapter()loadChapters()->getChapters()
- The
@erebos/wallet-hdutility package has been added, providing a simple way to use Hierarchical Deterministic wallets. - The
PollContentHashOptionsandPollContentOptionshave been added for thepollFeedContentHash()andpollFeedContent()methods, respectively. - The
setFeedContentHash()method has been added to the Bzz class. - New methods have been added to the Timeline class:
setLatestChapter(): sets the latest chapter without checking thepreviousfield, while the logic ofaddChapter()has been changed to retrieve the latest chapter ID before adding the new chapter when thepreviousfield is not provided.createLoader(): returns an Observable of chapters.pollLatestChapter(): returns an Observable of the latest chapter.
- Additional commands have been added in the CLI to interact with feeds and timelines.
The library is now tested against Swarm v0.4.0, using the Docker image provided by ethersphere.
Fix FeedParams type in @erebos/api-bzz-base.
- Add
FeedTopicParamstype to@erebos/api-bzz-base. - Fix
getFeedTopic()function in@erebos/api-bzz-baseto useFeedTopicParamsas input type.
- The feed parameters object has been changed to include the required
userfield and remove thesignatureone. The added feed update parameters object should be used for feed updates. - The feed-related Bzz methods arguments have changed as the result of the feed parameters object change: rather than having a mandatory "user or hash" argument and a separate feed parameters argument, a single "hash or feed parameters" argument is now used. This change affects the
getFeedURL(),createFeedManifest(),getFeedMetadata(),getFeedValue(),pollFeedValue(),postSignedFeedValue(),postFeedValue(),updateFeedValue()anduploadFeedValue()methods. - The feed digest signing function in the Bzz class configuration has been renamed from
signFeedDigesttosignBytes, to reflect the fact it could be used in other contexts. - The second argument of the
createKeyPair()function in@erebos/secp256k1has been removed, ashexis the only supported value it is set by default.
- The
@erebos/hexmodule now supports bytes array (Array<number>) as an input type and output using the.toBytesArray()method. - The
createPublic()andverify()functions have been added to the@erebos/secp256k1package. - The
@erebos/timelinepackage has been added, providing an implementation of the Timeline protocol. Its API is available in the documentation website.
The website has been redesigned and additional examples have been added: erebos.js.org
Fix Swarm URLs to avoid unnecessary redirects.
Fix hexValue return type in Bzz upload methods.
Fixes for TypeScript definitions.
This release introduces a large refactoring of feeds interactions, notably to provide some high-level APIs. As a result, various breaking changes were needed to keep the APIs consistent and provide more security options, as detailed below.
- The
createFeedDigest()andcreateKeyPair()functions have been removed from the@erebos/api-bzz-baseand@erebos/swarmpackages. - The
Bzzinstance constructor now requires to be provided aBzzConfigobject rather than only the HTTP gatewayurl. - The
postFeedValue()method arguments have changed.
Most Bzz methods arguments have changed, the headers that were previously passed as argument must now be provided in the options object instead.
- The
@erebos/keccak256and@erebos/secp256k1packages have been added. - Bzz requests now support a
timeoutoption, and a defaulttimeoutcan optionally be set in theBzzConfigobject when creating the instance. - Various feed-related APIs and options have been added. Check the updated Bzz API documentation for more details.
Fixes for TypeScript definitions.
- Add support for PSS raw messages introduced in Swarm v0.3.8.
- Add TypeScript definitions for packages.
- Fix RPC instance creation.
- Fix PSS subscription method for Swarm v0.3.7.
- Fix feed digest signature padding.
- Remove usage of multihash for feed following its removal in Swarm.
- [BREAKING CHANGE] The
PssEventobject emitted by PSS subscriptions now has a different shape. - Add support for Swarm feeds - see the updated Bzz API documentation.
- Add the
@erebos/hexpackage to interact with hexadecimal-encoded strings - see the added documentation for more details. - Add the
pssandwebsitecommands to the CLI - see the updated CLI documentation.
- Fix
defaultPathsupport for uploads inapi-bzz-browserandswarm-client. - Add
--default-pathflag tobzz:uploadCLI command. - Fix flow types related to
fs-extrausage. - Add optional
headersargument toBzzclass methods. - Expose
getDownloadURL()andgetUploadURL()utility methods inBzzclass.
- Use
@erebosnamespace for packages. - Bzz APIs refactoring.
- Add a CLI:
@erebos/cli. - Add a documentation website: erebos.js.org
- Split modules into individual packages.
- Move RPC, transport and utilities modules to MainframeHQ/js-tools.
- Update RxJS dependency to v6.
- Remove
createPSSWebSocket(). - Rename
BZZtoBzzAPI,PSStoPssAPIandRPCtoStreamRPC. - Add
EthAPI,NetAPI,ShhAPI,Web3APIandRequestRPCclasses. - Add transports and
rpc()factories. - Add
Clientclass. - Update documentation and add Whisper example.
Breaking API change in PSS, use
the pss-apimsg-hex branch of MainframeHQ/go-ethereum
to build Swarm.
Update PSS APIs to use arguments as hex following
ethersphere/go-ethereum#140.
First release.