Releases: MainframeOS/erebos
v0.13.2
v0.13.1
v0.13.0
Breaking changes
- The
bzz
-related packages have been refactored, the@erebos/api-bzz-base
,@erebos/api-bzz-browser
and@erebos/api-bzz-node
packages are discontinued and should be replaced by@erebos/bzz
,@erebos/bzz-browser
,@erebos/bzz-node
,@erebos/bzz-feed
and@erebos/bzz-fs
depending on the use cases, see below. - The
@erebos/api-pss
package has been renamed to@erebos/pss
for consistency with thebzz
-related packages. - In the
@erebos/timeline
package, thedecode
option has been removed fromTimelineReaderConfig
and theencode
option 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-list
and@erebos/timeline
packages classes now need to be injected aBzzFeed
instance.
Bzz packages changes
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/keccak256
andrxjs
that 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-feed
package. @erebos/api-bzz-node
provided additional methods to interact with the file system. These methods are now provided by the dedicated@erebos/bzz-fs
package.- The
@erebos/bzz
package can now be used directly in browsers. However, it does not provide thedownloadDirectory()
anduploadDirectory()
methods added in the@erebos/bzz-browser
and@erebos/bzz-node
packages.
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/bzz
as 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
.
New package
The @erebos/doc-sync
package has been added, allowing to synchronize JSON documents.
v0.12.0
Breaking change
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
.
Additional features
- Support for raw Swarm feeds has been added thanks to Attila Gazso's pull request.
@erebos/api-bzz-browser
can 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()
.
Other change
HTTP error messages from Swarm are now parsed when possible thanks to Adam Uhlíř's pull request.
New package
The @erebos/feed-list
package has been added, implementing lists data structures on top of raw Swarm feeds.
v0.11.0
This release adds support for Readable streams in @erebos/api-bzz-base
, thanks to Adam Uhlíř's pull request.
Breaking change
The uploadFileStream()
method of @erebos/api-bzz-node
has been removed, uploadFile()
now supporting streams.
Additional features
- The
downloadObservable()
anddownloadDirectoryData()
methods have been added to@erebos/api-bzz-base
and 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.
Other change
The code base and type definitions have been updated to TypeScript 3.7 thanks to Adam Uhlíř's pull request.
v0.10.0
Breaking changes
- The
PollOptions
interface of the Bzz API has been changed and is now used by the Timeline API. ThePollFeedOptions
interface is now used for polling feeds. - The
PollOptions
interface of the Timeline API has been removed, now using the interface exported by the Bzz API.
Swarm v0.5 support
Erebos v0.10 adds support for 2 new features added to the Swarm v0.5 release:
Pinning content
- Using the
pin()
,unpin()
andpins()
methods of the Bzz class. - Using the
pin
option when uploading content. - Using the CLI.
Tags
It is possible to track progress of chunks spreading over the network using the getTag()
and pins()
methods of the Bzz class.
New packages
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.
v0.9.0
Breaking changes
TypeScript rewrite
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'
Pss module changes
- The
EMPTY_HEX
constant has been renamed toEMPTY_ADDRESS
. - The
sendRaw()
,setPeerPublicKey()
andsetSymmetricKey()
methods of thePss
class no longer set a defaultaddress
value, useEMPTY_ADDRESS
if needed.
Browser module namespacing
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.
Additional features
- The
downloadTarTo()
method has been added to@erebos/api-bzz-node
. - The experimental
@erebos/api-bzz-react-native
has been added by Mark Vujevits in PR #98.
Other changes
- The
sign()
andverify()
functions exported by the@erebos/secp256k1
package now accept aBNInput
input value as exported by theelliptic
package. - The
addChapter()
method of theTimeline
class 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.
v0.8.1
v0.8.0
Breaking changes
- The
FeedMode
andFeedOptions
types have been removed, their use cases are implemented by new methods. - The
mode
andcontentChangedOnly
fields have been removed from thePollOptions
object. - 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()
Additional features
- The
@erebos/wallet-hd
utility package has been added, providing a simple way to use Hierarchical Deterministic wallets. - The
PollContentHashOptions
andPollContentOptions
have 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 theprevious
field, while the logic ofaddChapter()
has been changed to retrieve the latest chapter ID before adding the new chapter when theprevious
field 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.
Other changes
The library is now tested against Swarm v0.4.0, using the Docker image provided by ethersphere.