Skip to content

Latest commit

 

History

History
1100 lines (597 loc) · 73.2 KB

CHANGELOG.md

File metadata and controls

1100 lines (597 loc) · 73.2 KB

Changelog

8.3.1 (2024-11-06)

Bug Fixes

8.3.0 (2024-10-24)

Features

Bug Fixes

8.2.0 (2024-10-24)

Features

8.1.0 (2024-10-03)

Features

Bug Fixes

8.0.2 (2024-09-16)

Bug Fixes

  • handle bad request in feed index lookup (#949) (a1730f9)

8.0.1 (2024-09-16)

Bug Fixes

  • allow collection items with zero size (#947) (e5d9590)

8.0.0 (2024-09-13)

⚠ BREAKING CHANGES

Features

7.1.2 (2024-09-10)

Bug Fixes

7.1.1 (2024-08-08)

Bug Fixes

7.1.0 (2024-07-17)

Features

7.0.4 (2024-07-17)

Bug Fixes

7.0.3 (2024-06-18)

Bug Fixes

  • ignore errors while waiting for stamp (#927) (ac2092e)

7.0.2 (2024-06-17)

Bug Fixes

7.0.1 (2024-06-17)

Bug Fixes

7.0.0 (2024-06-02)

⚠ BREAKING CHANGES

Features

6.9.1 (2024-04-24)

Bug Fixes

6.9.0 (2024-03-27)

Features

6.8.1 (2024-03-13)

Bug Fixes

6.8.0 (2024-03-12)

Features

6.7.4 (2024-02-27)

Bug Fixes

  • do not dispose arraybuffer in browser (#906) (1524f74)

6.7.3 (2024-02-08)

Bug Fixes

6.7.2 (2024-01-17)

Bug Fixes

6.7.1 (2024-01-17)

Bug Fixes

6.7.0 (2023-12-04)

Features

Bug Fixes

6.6.0 (2023-11-28)

Features

6.5.1 (2023-11-13)

Bug Fixes

6.5.0 (2023-11-05)

Features

6.4.1 (2023-10-31)

Bug Fixes

6.4.0 (2023-08-31)

Features

6.3.0 (2023-08-30)

Features

6.2.0 (2023-08-03)

Features

  • add new redistribution state properties (#862) (c049101)

6.1.0 (2023-08-01)

Features

  • add http adapter option to bee and bee debug (#860) (ff78e0d)

6.0.0 (2023-05-22)

⚠ BREAKING CHANGES

  • change http library (#842)

Features

5.2.0 (2023-02-20)

Features

5.1.2 (2023-01-31)

This release updates Ky (the http library) and restructures its internal usage in order to keep the backward compatibility with CommonJS builds.

5.1.1 (2022-12-21)

Bug Fixes

5.1.0 (2022-11-11)

This is a smaller release that brings support for Bee 1.9 and several smaller features.

Features

5.0.0 (2022-07-28)

This is a breaking release that brings support for Bee 1.7 and cleans up some long awaiting breaking changes that we had lined up:

  • We have removed interfaces DebugPostageBatch (for PostageBatch) and NodesInfo (for NodeInfo).
  • We have changed the cid property of the UploadResultWithCid interface to be a function instead of getter as this property is not available for encrypted references which caused some troubles when serializing the whole object.
  • We have enabled by default waiting for the newly created postage batches to be usable (originally the waitForUsable property of the BeeDebug.createPostageBatch() defaulted to false, now it is true).
  • We have added support for the Bee. createFeedManifest() to return object instead of directly reference that also has support for getting CID with the .cid() function.

⚠ BREAKING CHANGES

  • enable waiting for postage batch to be usable by default (#746)
  • adds support for Feed Manifest CID (#745)
  • drop node 12 support (#741)
  • drop DebugPostageBatch in favor of PostageBatch inteface (#743)
  • drop NodesInfo in favor of NodeInfo inteface (#742)
  • convert cid getter to function (#740)

Features

  • adds support for Feed Manifest CID (#745) (37c5b55)
  • enable waiting for postage batch to be usable by default (#746) (cb05d22)

Bug Fixes

Code Refactoring

  • drop DebugPostageBatch in favor of PostageBatch inteface (#743) (3f66764)
  • drop NodesInfo in favor of NodeInfo inteface (#742) (acddb14)

Miscellaneous Chores

4.1.1 (2022-05-26)

This is a hotfix release to our build setup that published bee-js with a broken package structure.

Bug Fixes

4.1.0 (2022-05-24)

Shortly after the last release, we bring you another release that brings some nice improvements and new features together with some fixes.

✅ Node 18

We have verified the support for Node 18. It introduces a native implementation of fetch API that we use as HTTP client. This implementation wraps the errors that it throws into a nested Error object, so we unwrap these errors for better error handling.

⏳ Waiting for postage stamps to be usable

When a postage stamp is created the (BeeDebug.createPostageStamp() method is called), Bee creates an on-chain transaction that creates this transaction in the smart contract, but the stamp is not immediately "usable" as Bee waits for several blockchain blocks in order to be sure that the postage stamp won't disappear from the blockchain. During this period Bee won't accept this stamp and will return the error stamp is not usable. After this period Bee pronounces it as usable and the users can upload content using it.

In most use cases, when you create the postage stamp you want to actually wait until the stamp is usable and only then return it to the user. For that, you had to implement your own waiting logic, but no more!

The BeeDebug.createPostageStamp() method has a new option waitForUsable which if specified, then the Promise this method returns is resolved only after the Bee confirms the postage stamp to be usable. Be aware that if used, then the call time of this method raises dramatically!

In the next breaking release this option will be turned on, by default!

🔐 Wallet endpoint support

The Bee 1.6.0 release introduced /wallet endpoint that exposes the balance of the node's wallet and some other related metrics. In this release we add support for this endpoint.

Features

Bug Fixes

  • modify the ENS validation to work in safari or older browsers (#687) (2e172fb)
  • no invalid amount for stamps (#682) (b2697d5)

4.0.0 (2022-05-18)

This release brings several new features and one ad-hoc breaking fix that is passed on from the new Bee version 1.6.0, but affects only the BeeDebug.getReserveState() method.

💮 ENS support

Bee supports ENS for resolution of ENS domains into Swarm references. bee-js was until now refusing ENS domains with the input validation. Now we are bringing support for all the download* methods and a few other ones as well.

🗂. Get Feed's specific update

The FeedReader.download() function now accepts an option index where you can specify which of the feed's updates you want to download.

❓ Is Feed Retrievable?

There is a new method Bee.isFeedRetrievable() that helps you to check whether a given feed is available.

It operates in two modes. If you know the last index of the feed update then you can use it as an optional parameter and then be sure that this update is present in the network. If you won't specify the index parameter, then it will check for the "latest" update by traversing all the known updates from the start. This does not guarantee though that the found "latest" update is indeed the latest one though and hence provides a weaker guarantee.

⚠ BREAKING CHANGES

  • reserve state update response interface (#675)

Features

Bug Fixes

  • reserve state update response interface (#675) (f8564e3)

3.3.4 (2022-04-12)

This is a small patch release that brings mainly support for the new Bee 1.5.1 and two small bug fixes.

Bug Fixes

  • nodeinfo interface (#622) (6a70cad)
  • remove browser blob polyfill for service workers support (#614) (7c5c78d)

3.3.3 (2022-03-25)

🧱 EcmaScript Modules

The bee-js v3.3.0 introduced support for ES Modules. In v3.3.3 we increase the compatibility with older versions of various build systems.

Bug Fixes

3.3.2 (2022-03-21)

This is another small release that brings support for Bee 1.5.0 and a few small improvements.

🔌 Node endpoint

The Bee 1.5.0 introduced new mode called ultra-light mode. This mode has been added to the existing BeeModes.

🧱 EcmaScript Modules

The bee-js v3.3.0 introduced support for ES Modules. In 3.3.2 we include several fixes to resolve some of the reported issues and broken builds.

Bug Fixes

  • add cross-env to devDeps (c559535)
  • add ultra light bee mode (#597) (4ac6bd8)
  • replace deprecated type DebugPostageBatch with PostageBatch (#594) (265557d)
  • web-stream-polyfill typings (#585) (3b18848)

3.3.1 (2022-02-16)

This is a patching release that targets especially issues discovered thanks to the introduction of the ESM hybrid build. The main change is that if you want to use the function Utils.readableWebToNode() in browser then you have to polyfill stream package with your bundler.

Bug Fixes

  • add js suffix in imports for esm support with babel (#562) (62489aa)
  • create minified browser bundle for release (#549) (b92fdb0)
  • drop readable stream (#565) (3e36ccc)
  • exposing ky options (#553) (085c565)
  • making readable-stream optional (#556) (4983fdc)
  • rename the browser bundle in order not to break unpkg.com (#552) (7076d94)
  • use default import styles for esm compatibility (#550) (90aaf7b)

3.3.0 (2022-02-09)

This is a smaller update with two main changes.

🧱 EcmaScript Modules support

We plan to migrate our bee-js package to ES Modules (see the issue for more info) when Node v12 will reach its end-of-life (on 30th of April). With this release, we are starting a transition period by supporting both ES Modules and CommonJS builds. Please start migrating your applications to the ESM stack otherwise, you won't be able to upgrade bee-js after we drop support for CommonJS.

❓ Is supported version?

Since we are in a fast-paced environment where Bee's versions can be incompatible with each other, it is important that in your application you check whether the Bee that you connect to has the correct version that you expect and support (through bee-js).

Untill now we had the isSupportedVersion() function that indicated if the Bee node version is not matching the one that bee-js was tested and built against. This implementation has its downside because it is very strict and if for example there is a small Bee's release that patches only something internal and does not touch the API, which means that the bee-js should be compatible, you will still get a false with this check.

Except for Bee's version itself, there are two other versions that version the Bee endpoint's API and the Bee Debug endpoint's API. We have decided to implement methods that do compatibility checks using these versions and hence should be more relaxed towards Bee's small patches but might pose some risk if some change will be unnoticed and API versions not bumped accordingly.

These methods are:

  • BeeDebug.isSupportedExactVersion() - renamed isSupportedVersion which is now deprecated
  • BeeDebug.isSupportedMainApiVersion() which checks compatibility only for the main Bee endpoint
  • BeeDebug.isSupportedDebugApiVersion() which checks compatibility only for the Bee Debug endpoint
  • BeeDebug.isSupportedApiVersion() which checks compatibility for both endpoints

The compatibility is checked using the major versions of the API. If you would like to make your own assertions you can get all the versions (both from Bee itself and the one that bee-js should support) using the method BeeDebug.getVersions()

Features

3.2.0 (2022-01-25)

This is after some time a bigger update that brings some new goodies from Bee 1.4.1 version and improved error handling and support.

↔️ Direct upload support

Bee introduced direct upload mode, where Bee directly pushes the data to the network instead of the intermediate step of locally saving the data and then syncing it with the network. You can enable this behavior by passing deferred = false into UploadOptions interface. When you enable this mode the Promise returned by the upload methods will resolve only once the data is uploaded and synchronized with the network so if you use timeouts you should adjust those base on the size of data you upload.

Currently, the direct upload mode is by default turned off, but it is a plan in the future to enable this behavior by default!

⁉️ Error handling

Now BeeResponseError and BeeRequestError instances contain information about the request (and if applicable also response) that triggered the Error. Also, it has improved for non-JSON responses that were causing unclear errors.

⚠️ Deprecations

In this release, there are two changes in Interface's names that are non-breaking as there are backward compatible aliases, but these aliases will be removed with the next breaking change.

  • Interface DebugPostageBatch was renamed to PostageBatch
  • Interface NodesInfo was renamed to NodeInfo

Features

Bug Fixes

  • handling of non-json responses when json is expected (#508) (8e0962c)
  • rename DebugPostageBatch into PostageBatch (#495) (38f2758)
  • rename NodesInfo into NodeInfo (#493) (9d1ec0a)

3.1.0 (2021-12-09)

This is another small release that brings support for Bee 1.4.1 and a few small improvements

🔌 Node endpoint support

The Bee 1.4.1 release brought a new endpoint on Debug API called /node which provides information about in what mode the Bee node runs (such as dev mode, light mode, or full mode or information about gateway mode).

🔗 Chunk endpoint supports

We used chunk endpoints internally in bee-js but now we have decided to expose them for your usage as well.

∵ Stamp usage utility functions

In order to calculate the usage of a postage stamp (eq. percentage in form of a number between 0 and 1) we have added a small utility function that calculates it called getStampUsage().

Features

Bug Fixes

  • convert buffer to uint8array for readablestream (#473) (7f34ea6)

3.0.0 (2021-11-25)

This is a small release in size, but big on impact. It is a breaking release thanks to breaking changes introduced in Bee 1.4.

⚠ BREAKING CHANGES

  • dropping postage stamps methods from Bee class (#458)

Features

  • dropping bee class postage stamps methods (#458) (98afdcd)
  • openapi versions in /health endpoint and methods (#459) (98afdcd)

2.1.1 (2021-11-08)

This is small release that fixes few small issues and mainly brings compatibility with the Bee 1.3.

Bug Fixes

  • build: sourcemap (#440) (2bfb7c8)
  • readable-stream should be dependency (#444) (fd39c46)
  • build: limit the scope of files that are published to npm

2.1.0 (2021-10-13)

This release is a compatibility release with Bee 1.2.0 release, which brings few new features.

Is retrievable? support

The new method bee.isReferenceRetrievable() allows you to check whether the data represented by a reference is present in the network. This is part of the Stewardship endpoint, which also allows you to reupload the data that you have locally available (pinned).

🏷 New Postage Batch methods

There is a new method beeDebug.topUpBatch(), that allows you to top-up the amount of existing batch, effectively prolonging its lifetime.

Moreover, there is also a new method beeDebug.diluteBatch() that increases the depth of a batch, effectively extending the number of chunks that the batch can stamp and lowering the lifetime of a batch.

📨 PSS Target limit increase

⚠️ If you use the utility function makeMaxTarget, then the time of sending a PSS message will increase! Consider using your own criteria based on your use-case.

Features

Bug Fixes

Reverts


2.0.0 (2021-09-20)

This is our first major version bump as we did a big revamp of bee-js internals and fixed a few things and shortcomings that required breaking changes.

🤖 HTTP client swap (timeout and retries support)

In the JS browser ecosystem, there are two main HTTP clients: old XMLHttpRequest (XHR) API and new modern fetch API.

We originally used axios library that employs the XHR client, but XHR is old and will not get any new features as it is superseded with fetch API that is actively developed by the WHATWG group, and hence it has its limitations. Many limitations can be overcome using polyfills etc. but a hard stop is networking that only browsers decide what to allow (usually based on the specification). In the case of XHR the limitation is streaming support.

We have therefore decided to use fetch based library ky that supports streaming downloads and hopefully in close future will support also streaming uploads (see whatwg/fetch#966, there is also already functional experiment that enables this in Chrome). fetch is also more future-proof.

This change, unfortunately, does not come without a cost and that is support for tracking upload progress, that fetch still does not have (if interested please comment on the relevant whatwg/fetch#607 issue to raise importance). If this feature is crucial for you, we have devised a workaround thanks to @mattiaz9, which is demonstrated in our example upload-progress.

This change unfortunately is breaking as we originally exposed AxiosOptions on our API. We have refactored this into more generic HTTP options that should be more future-proof. Thanks to ky we also now have support for retries of failed requests (only for non-POST requests, defaults are seen here) and timeouts. Both are possible to set generally for the Bee instance and/or override it for each method call.

🎏 Streaming revamp

As part of the HTTP client revamp, we had a deeper look at how we handle streams. In the JS land, there are two main types of streams the NodeJS Readable and the browser WHATWG ReadableStream. As our design mindset is browser-first and polyfill the rest in NodeJs, we have unified all returned streams into the WHATWG ReadableStream no matter what platform you are on. Most probably you will want to use NodeJs Readable on NodeJs platform, so we have included utility function readableWebToNode that converts WHATWG stream into NodeJs. There are also more stream-related utility functions that you can check out.

For stream inputs, we accept both types of streams and convert them internally.

⏎ Upload results refactor

One of our short-coming was dropping the returned object from upload methods in favor of the simple string Reference. Later on, we discovered that there is actually a need to return more information from upload operations because Bee automatically creates a Tag for each upload that we could return. Hence we have introduced back UploadResult interface that all the upload methods will now return.

🫓 Utility namespace flatting and filtering

We have merged all the Utils.* namespaces directly into Utils and we have filtered out the functions only to those that make sense to expose in order to minimize the public API and possible future breaking changes.

🗾 uploadCollection() method

We have introduced new uploadCollection method that is more flexible in uploading collection if you do not want to use our convenience methods like uploadFilesFromDirectory() or uploadFiles. This new method accepts the Collection<Uint8Array | Readable> interface.

⚠ BREAKING CHANGES

  • Requests made by bee-js are now reported with User-Agent: bee-js/<<bee-js's version>> (#390)
  • Utils.setDefaultHeaders() was removed in favor of Bee/BeeDebug instance's option defaultHeaders (#390)
  • Hooks (#390)
    • Utils.hooks.* was removed in favor of Bee/BeeDebug instance's options onRequest and onResponse
    • Hooks now pass only metadata of the requests and not the payload
  • All returned streams are now of WHATWG ReadableStream. If you need NodeJS's Readable you can use Utils.readableWebToNode() utility function. (#390)
  • All axiosOptions were removed from those methods that supported it (for example bee.downloadReadableData(), bee.reuploadPinnedData(), UploadOptions does not have axiosOptions property anymore) (#390)
  • Unfortunately fetch does not support tracking of upload progress (like XHR/axios supported with the onUploadProgress). Please see our example upload-progress for work-around. (#390)
  • All upload methods now returns UploadResult interface (#408)
  • bee.pssSend() now throws error if the specified target exceeds maximal value. Use Utils.makeMaxTarget() that will give you the max target that Bee accepts. (#384)
  • Utils namespace is flattened and limited on the functions (#395)

Other changes:

  • All upload methods that used to accept NodeJS's Readable now accept both NodeJS and WHATWG Readable(Stream).
  • Usage of ReadableStreams in a browser is now possible. Be aware that real support for streaming browsers has only for download, but not upload. When Readable is passed to upload methods it is first fully buffered before making the request.

Features

  • HTTP request options is possible to override per method call (#411) (9eac5cd)
  • return UploadResult for upload methods (#408) (e58b8e8)

Bug Fixes

  • pss target length verification (#384) (fd032a8)
  • remove check for pinned content in reupload (#412) (6032a22)

Code Refactoring

1.2.1 (2021-08-27)

Bug Fixes

  • bee 1.1.0 version reporting workaround (#401) (687e431)

1.2.0 (2021-08-24)

This is mainly a compatibility release with Bee 1.1.0 release.

🏷 Stamps API move and deprecation

The Stamps API was moved to Debug API and on normal API it is now deprecated. Moreover, Bee provides more information on Debug API with for example batchTtl that gives an estimation for how long the batch will be valid.

⛓ Pending transaction management supports

New Debug API was added that allows you to manage pending transactions and do things like:

  • list pending transactions
  • rebroadcast already created (pending) transaction
  • cancel a pending transaction

Features

1.1.1 (2021-07-21)

This is a small patch release that fixes missing headers in requests/responses returned using the hooks system.

Bug Fixes

1.1.0 (2021-07-16)

This is a small incremental release that brings two new features.

🪝 Hooks system

If you need to know what exact HTTP requests bee-js sends to Bee you can now register hooks for outgoing requests and incoming responses using Utils.Hooks interface.

Be aware! These listeners listen to all outgoing bee-js's requests/responses, so if you have multiple Bee/BeeDebug instances for different Bee nodes, than all requests will be forwarded to your callbacks!

🏷 New Tag endpoints

With the 1.0 Bee release few new endpoints related to Tags were introduced that allows you to list, update and delete tags.

Features


1.0.0 (2021-06-22)

This release bumps the supported Bee version to 1.0.0, which marks the mainnet launch of the project.

Miscellaneous Chores

0.12.0 (2021-06-17)

This is a compatibility release for the Bee 1.0.0-rc2. It also handles extended postage stamp information.

⚠ BREAKING CHANGES

  • use string instead of bigint (#345)

Features

  • add folder and collection size check utility functions (#349) (f289c81)
  • extend PostageBatch type and creation with new properties (#350) (7695e27)

Bug Fixes

Code Refactoring

0.11.0 (2021-06-09)

This release mainly brings internal improvements as we have attacked head-on our backlog with outstanding issues. But several changes introduce breaking changes so be aware and continue reading on!

🔎 Input validation

We implemented thorough input validation to catch problems even before sending requests to Bee and give better errors on what is wrong.

⚠ BREAKING CHANGES

  • Methods Bee.pin(), Bee.unpin(), Bee.pssSend() now return Promise<void> (#342)
  • Methods Bee.setJsonFeed(), SocWriter.upload(), FeedWriter.upload() now return directly the reference hash (string) instead of it being wrapped in object (#341)
  • The new input validation might require more thorough types specification

Features

Reverts

Code Refactoring

  • no generic BeeResponse returned from Bee class (#342) (d2a65ee)
  • no single-property object returned (#341) (572253c)

0.10.0 (2021-06-01)

We would like to introduce you to a new release that brings access to other new features of 0.6.0 Bee release and several other improvements. This version is compatible with 0.6.2 version of Bee.

⁉️ Improved error reporting

Until now most returned Errors contained very limited information on what actually went wrong as most of the problems originated directly from the Bee node. We improved our internal handling of these errors and now if Bee returns the reason for the error we pass it along with our thrown errors.

⛓ New endpoints

We have included support for the new Bee Debug's endpoints that exposes chain state with BeeDebug.getChainState() (/chainstate) and reserve state BeeDebug.getReserveState() (/reservestate).

♻️ Reupload support

Now you can re-upload content that you have locally pinned in your node to the network with Bee.reuploadPinnedData(). If the data is not pinned, then an error is thrown.

⛽️ Gas prices and limits for transactions

Now you can specify a gas price for methods that create transactions:

  • BeeDebug.cashoutLastCheque()
  • BeeDebug.depositTokens()
  • BeeDebug.withdrawTokens()

⚠ BREAKING CHANGES

  • Promise returning methods from now on never throw errors, but return rejected promise instead (#326)
  • BeeDebug.cashoutLastCheque() now directly returns the transaction hash as string and not object (#325)
  • BeeDebug.depositTokens() now directly returns the transaction hash as string and not object (#336)
  • BeeDebug.withdrawTokens() now directly returns the transaction hash as string and not object (#336)

Features

Bug Fixes

  • correctly return reject promise for promise returning fnc (#326) (d76ef2d)

0.9.0 (2021-05-20)

We would like to introduce you to this big release with many changes that follow the Bee's 0.6.0 release and is fully compatible with it. This release contains new features and breaking changes that depend on the new Bee version, so if you have not already read the Bee's release notes do so for a better understanding of changes!

💮 Postage Stamp support

One of the most significant changes in Bee is the support of Postage Stamps (read about them here). They are now required for all "write" operations like uploading files, writing to manifests, or sending PSS messages. You can now create a new postage batch with bee.createPostageBatch() method, but be aware this spends the Bee node's Ethereum and BZZ to create the batch with the on-chain transaction! Use with caution.

const bee = new Bee(...)

const batchId = await bee.createPostageBatch(10, 17) // example values
const reference = await bee.uploadData(batchId, 'Hello world')

📍 Pinning methods simplification

The new pinning API now doesn't distinguish between the underlying data structure, so you simply pin any type of content with one method bee.pin(reference) and unpin with bee.unpin(reference).

↺ Renaming and refactoring

Some endpoints were removed, and some properties renamed. We also used this opportunity to streamline our API. Please check breaking changes!


⚠️ BREAKING CHANGES

  • Removing bee.download*FromCollection method (#280)
  • Removed recursive flag from uploadFilesFromDirectory (#280)
  • Following methods are removed bee.pinFile(), bee.unpinFile(), bee.pinCollection() bee.unpinCollection(), bee.pinData(), bee.unpinData(), bee.pinChunk(), bee.unpinChunk(), bee. getChunkPinningStatus() (#293)
  • Following properties were converted from snake_case to camelCase (#301):
    • BeeDebug.getNodeAddresses(): public_key, pss_public_key
    • BeeDebug.getChequebookAddress(): chequebookaddress
    • BeeDebug.getAllSettlements(): total_received, total_sent

Features

Bug Fixes

  • if there are no postage stamps the getAllPostageBatch should return [] (#319) (82985d3)
  • last cheque peer response property case (#320) (c8f0cea)
  • shape of LastCashoutActionResponse for Bee 0.6.0 (#306) (d637379)
  • use bigint primitive (#287) (6e104dc)

Code Refactoring

0.8.1 (2021-04-21)

Bug Fixes

0.8.0 (2021-04-19)

☁️ High-level feed's API

We understand that the current Feed's API is rather a low level and to use it for simple tasks might be overwhelming. We designed high-level API, that works for JSON data (arrays, objects, etc.) in a very convenient way. See the example bellow:

await bee.setJsonFeed(
  'some cool arbitraty topic',
  { some: ['cool', { json: 'compatible' }, 'object']},
  { signer: '0x634fb5a872396d9693e5c9f9d7233cfa93f395c093371017ff44aa9ae6564cdd' }
)
const data = await bee.getJsonFeed(
  'some cool arbitraty topic',
  { signer: '0x634fb5a872396d9693e5c9f9d7233cfa93f395c093371017ff44aa9ae6564cdd' }
)
console.log(data)
// Prints: { some: ['cool', { json: 'compatible' }, 'object']}

⚠️ BigInt breaking change

JavaScript has limitations on how it can safely represent big numbers before floating errors come into the picture. Since the BZZ token has 16 decimal places we are able to safely represent only 0.9 BZZ which is not much. Because of this, we had to switch from using number to bigint type on money-related APIs that concerns balances, chequebook, and settlements.

⚙️ Internal refactors

As part of our internal code improvements, we have renamed all verify* functions into assert*. This mainly impacts BeeJS.Utils.Bytes namespace where for example verifyBytes was renamed to assertBytes. As part of this change also the order of parameters was changed and some return types as well. If you use TypeScript the changes should be caught by our typings, if you are using JavaScript please verify you are not using these functions or refactor your code appropriately.


⚠ BREAKING CHANGES

Features

Bug Fixes

Code Refactoring

0.7.1 (2021-03-31)

Bug Fixes

0.7.0 (2021-03-30)

⚠ BREAKING CHANGES

  • replaced getPssPublicKey with getNodeAddresses (#228)
  • isEthAddress to isHexEthAddress (#234)
  • hex string length support (#213)

Features

Bug Fixes

  • adding string type and assertions to Reference on API (#232) (3467e7d)

Code Refactoring

0.6.0 (2021-03-15)

⚠ BREAKING CHANGES

  • correct getChequebookBalance spelling (remove extra u) (#189)

Bug Fixes

  • no ethereum prefix for custom signers (#194) (2ee1eca)
  • pss: subscribe in browsers, removed readable in browsers (#180) (a88277d)
  • strip trailining slash in node url (#203) (8e81024)

Code Refactoring

  • correct getChequebookBalance spelling (remove extra u) (#189) (20efd70)

0.5.1 (2021-02-26)

Features

Bug Fixes

0.5.0 (2021-02-09)

⚠ BREAKING CHANGES

  • breaking api changes (#105)

Features

Bug Fixes

Code Refactoring

0.4.2 (2021-02-01)

Features

Bug Fixes

  • big file upload (#77) (a51e4a6), closes #75
  • collection upload with relative path (#73) (b8f5c90)
  • raise payment tolerance on tests (#64) (4c3043b)
  • remove postinstall (#74) (992a2de)
  • remove utf8-encoder package dependency (#82) (e5b9e12)
  • replace Buffer with Uint8Array so it's not used in browser (#84) (a59bcda)
  • upload collection with unicode filenames (#79) (c893e58)
  • websocket data buffer array typing (#89) (251a650)