- Fix providing the
signParams
toDataListWriter
constructors in@erebos/doc-sync
. - Remove duplicate
@erebos/bzz
types from@erebos/bzz-feed
.
- Fix type signature of the
write()
method ofTimelineWriter
. - Bump dependency version of
@erebos/hex
in@erebos/keccak256
.
- 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.
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
.
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-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()
.
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-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.
The code base and type definitions have been updated to TypeScript 3.7 thanks to Adam Uhlíř's pull request.
- 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.
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
pin
option 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_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.
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-native
has been added by Mark Vujevits in PR #98.
- 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.
- Add missing
rxjs
dependency to@erebos/api-bzz-base
package. - Fix TypeScript definition for
@erebos/api-bzz-base
package.
- 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()
- 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.
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
FeedTopicParams
type to@erebos/api-bzz-base
. - Fix
getFeedTopic()
function in@erebos/api-bzz-base
to useFeedTopicParams
as input type.
- The feed parameters object has been changed to include the required
user
field and remove thesignature
one. 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
signFeedDigest
tosignBytes
, to reflect the fact it could be used in other contexts. - The second argument of the
createKeyPair()
function in@erebos/secp256k1
has been removed, ashex
is the only supported value it is set by default.
- The
@erebos/hex
module 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/secp256k1
package. - The
@erebos/timeline
package 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-base
and@erebos/swarm
packages. - The
Bzz
instance constructor now requires to be provided aBzzConfig
object 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/keccak256
and@erebos/secp256k1
packages have been added. - Bzz requests now support a
timeout
option, and a defaulttimeout
can optionally be set in theBzzConfig
object 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
PssEvent
object emitted by PSS subscriptions now has a different shape. - Add support for Swarm feeds - see the updated Bzz API documentation.
- Add the
@erebos/hex
package to interact with hexadecimal-encoded strings - see the added documentation for more details. - Add the
pss
andwebsite
commands to the CLI - see the updated CLI documentation.
- Fix
defaultPath
support for uploads inapi-bzz-browser
andswarm-client
. - Add
--default-path
flag tobzz:upload
CLI command. - Fix flow types related to
fs-extra
usage. - Add optional
headers
argument toBzz
class methods. - Expose
getDownloadURL()
andgetUploadURL()
utility methods inBzz
class.
- Use
@erebos
namespace 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
BZZ
toBzzAPI
,PSS
toPssAPI
andRPC
toStreamRPC
. - Add
EthAPI
,NetAPI
,ShhAPI
,Web3API
andRequestRPC
classes. - Add transports and
rpc()
factories. - Add
Client
class. - 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.