Skip to content

Releases: ethersphere/bee-js

@ethersphere/bee-js v0.9.0

20 May 16:27
7260ee1
Compare
Choose a tag to compare

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

@ethersphere/bee-js v0.8.1

21 Apr 12:23
9a547fe
Compare
Choose a tag to compare

This is a small release that fixes two of our shortcomings. For details see below.

Bug Fixes

@ethersphere/bee-js v0.8.0

19 Apr 15:19
8087a81
Compare
Choose a tag to compare

☁️ 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

@ethersphere/bee-js v0.7.1

31 Mar 10:38
4c5dc14
Compare
Choose a tag to compare

Bug Fixes

@ethersphere/bee-js v0.7.0

30 Mar 14:04
0ac3a7d
Compare
Choose a tag to compare

⚠ 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

@ethersphere/bee-js v0.6.0

18 Mar 12:03
0d6ecec
Compare
Choose a tag to compare

⚠ 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)

bee-js v0.5.1

02 Mar 07:00
7dfd556
Compare
Choose a tag to compare

Features

Bug Fixes


bee-js v0.5.0

09 Feb 09:48
313830a
Compare
Choose a tag to compare

⚠ BREAKING CHANGES

  • breaking api changes (#105)

Features

Bug Fixes

Code Refactoring

bee-js v0.4.2

01 Feb 13:17
2fef9c4
Compare
Choose a tag to compare

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)