v4.1.0
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
- cids support (#681) (02d8f9c)
- expose underlying undici error messages (#694) (b164b70)
- support for waiting on stamp to be usable (#678) (f675dc3)
- wallet endpoint support (#683) (2af84c0)