chore: update to use bee-js 5.0.0 and support bee 1.7.0 (#503)

* chore: update to use bee-js 5.0.0 and support bee 1.7.0

* fix: store reference to feed manifest correctly

* fix: set waitForUsable to false (#507)

Co-authored-by: Cafe137 <77121044+Cafe137@users.noreply.github.com>
This commit is contained in:
Vojtech Simetka
2022-08-01 16:21:52 +02:00
committed by GitHub
parent 896f6e48d9
commit 72488fd5a3
5 changed files with 20 additions and 19 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
**Warning: This project is in alpha state. There might (and most probably will) be changes in the future to its API and **Warning: This project is in alpha state. There might (and most probably will) be changes in the future to its API and
working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.** working. Also, no guarantees can be made about its stability, efficiency, and security at this stage.**
This project is intended to be used with **Bee version <!-- SUPPORTED_BEE_START -->1.6.0-6ceadd35<!-- SUPPORTED_BEE_END -->**. This project is intended to be used with **Bee version <!-- SUPPORTED_BEE_START -->1.7.0-bbf13011<!-- SUPPORTED_BEE_END -->**.
Using it with older or newer Bee versions is not recommended and may not work. Stay up to date by joining the Using it with older or newer Bee versions is not recommended and may not work. Stay up to date by joining the
[official Discord](https://discord.gg/GU22h2utj6) and by keeping an eye on the [official Discord](https://discord.gg/GU22h2utj6) and by keeping an eye on the
[releases tab](https://github.com/ethersphere/bee-dashboard/releases). [releases tab](https://github.com/ethersphere/bee-dashboard/releases).
+14 -14
View File
@@ -9,7 +9,7 @@
"version": "0.18.2", "version": "0.18.2",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
"dependencies": { "dependencies": {
"@ethersphere/bee-js": "^4.1.1", "@ethersphere/bee-js": "^5.0.0",
"@ethersphere/manifest-js": "1.2.1", "@ethersphere/manifest-js": "1.2.1",
"@ethersphere/swarm-cid": "^0.1.0", "@ethersphere/swarm-cid": "^0.1.0",
"@material-ui/core": "4.12.3", "@material-ui/core": "4.12.3",
@@ -106,7 +106,7 @@
}, },
"engines": { "engines": {
"bee": ">=0.6.0", "bee": ">=0.6.0",
"node": ">=12.0.0", "node": ">=14.0.0",
"npm": ">=6.9.0" "npm": ">=6.9.0"
}, },
"peerDependencies": { "peerDependencies": {
@@ -2440,9 +2440,9 @@
} }
}, },
"node_modules/@ethersphere/bee-js": { "node_modules/@ethersphere/bee-js": {
"version": "4.1.1", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/@ethersphere/bee-js/-/bee-js-4.1.1.tgz", "resolved": "https://registry.npmjs.org/@ethersphere/bee-js/-/bee-js-5.0.0.tgz",
"integrity": "sha512-4hbgi7rHnku+2pv352z7txV6IhP+2iipCKaQS4sOFhjieui44LE0Lox8gy5tud9tY2wRN2wY6LTqvo2EaYrVRQ==", "integrity": "sha512-Dr5Xon0UZvi37fvbyGj46kw3/0D8fydwfDtVtFHKi2p7mNEizG0uok2mXvwLZrMvUMOS8uXkFhbQjTFBjB+pWA==",
"dependencies": { "dependencies": {
"@ethersphere/swarm-cid": "^0.1.0", "@ethersphere/swarm-cid": "^0.1.0",
"@types/readable-stream": "^2.3.13", "@types/readable-stream": "^2.3.13",
@@ -2457,13 +2457,13 @@
"tar-js": "^0.3.0", "tar-js": "^0.3.0",
"utf-8-validate": "^5.0.9", "utf-8-validate": "^5.0.9",
"web-streams-polyfill": "^4.0.0-beta.1", "web-streams-polyfill": "^4.0.0-beta.1",
"ws": "^8.6.0" "ws": "^8.7.0"
}, },
"engines": { "engines": {
"bee": "1.6.0-6ceadd35", "bee": "1.7.0-bbf13011",
"beeApiVersion": "3.0.1", "beeApiVersion": "3.0.2",
"beeDebugApiVersion": "2.0.1", "beeDebugApiVersion": "3.0.2",
"node": ">=12.0.0", "node": ">=14.0.0",
"npm": ">=6.0.0" "npm": ">=6.0.0"
} }
}, },
@@ -22462,9 +22462,9 @@
} }
}, },
"@ethersphere/bee-js": { "@ethersphere/bee-js": {
"version": "4.1.1", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/@ethersphere/bee-js/-/bee-js-4.1.1.tgz", "resolved": "https://registry.npmjs.org/@ethersphere/bee-js/-/bee-js-5.0.0.tgz",
"integrity": "sha512-4hbgi7rHnku+2pv352z7txV6IhP+2iipCKaQS4sOFhjieui44LE0Lox8gy5tud9tY2wRN2wY6LTqvo2EaYrVRQ==", "integrity": "sha512-Dr5Xon0UZvi37fvbyGj46kw3/0D8fydwfDtVtFHKi2p7mNEizG0uok2mXvwLZrMvUMOS8uXkFhbQjTFBjB+pWA==",
"requires": { "requires": {
"@ethersphere/swarm-cid": "^0.1.0", "@ethersphere/swarm-cid": "^0.1.0",
"@types/readable-stream": "^2.3.13", "@types/readable-stream": "^2.3.13",
@@ -22479,7 +22479,7 @@
"tar-js": "^0.3.0", "tar-js": "^0.3.0",
"utf-8-validate": "^5.0.9", "utf-8-validate": "^5.0.9",
"web-streams-polyfill": "^4.0.0-beta.1", "web-streams-polyfill": "^4.0.0-beta.1",
"ws": "^8.6.0" "ws": "^8.7.0"
}, },
"dependencies": { "dependencies": {
"web-streams-polyfill": { "web-streams-polyfill": {
+2 -2
View File
@@ -26,7 +26,7 @@
"url": "https://github.com/ethersphere/bee-dashboard.git" "url": "https://github.com/ethersphere/bee-dashboard.git"
}, },
"dependencies": { "dependencies": {
"@ethersphere/bee-js": "^4.1.1", "@ethersphere/bee-js": "^5.0.0",
"@ethersphere/manifest-js": "1.2.1", "@ethersphere/manifest-js": "1.2.1",
"@ethersphere/swarm-cid": "^0.1.0", "@ethersphere/swarm-cid": "^0.1.0",
"@material-ui/core": "4.12.3", "@material-ui/core": "4.12.3",
@@ -156,7 +156,7 @@
] ]
}, },
"engines": { "engines": {
"node": ">=12.0.0", "node": ">=14.0.0",
"npm": ">=6.9.0", "npm": ">=6.9.0",
"bee": ">=0.6.0" "bee": ">=0.6.0"
} }
+2 -1
View File
@@ -1,3 +1,4 @@
import { PostageBatchOptions } from '@ethersphere/bee-js'
import { Box, Grid, Typography } from '@material-ui/core' import { Box, Grid, Typography } from '@material-ui/core'
import BigNumber from 'bignumber.js' import BigNumber from 'bignumber.js'
import { Form, Formik, FormikHelpers } from 'formik' import { Form, Formik, FormikHelpers } from 'formik'
@@ -102,7 +103,7 @@ export function PostageStampCreation({ onFinished }: Props): ReactElement {
const amount = BigInt(values.amount) const amount = BigInt(values.amount)
const depth = Number.parseInt(values.depth) const depth = Number.parseInt(values.depth)
const options = values.label ? { label: values.label } : undefined const options: PostageBatchOptions = { waitForUsable: false, label: values.label || undefined }
const batchId = await beeDebugApi.createPostageBatch(amount.toString(), depth, options) const batchId = await beeDebugApi.createPostageBatch(amount.toString(), depth, options)
await waitUntilStampExists(batchId, beeDebugApi) await waitUntilStampExists(batchId, beeDebugApi)
actions.resetForm() actions.resetForm()
+1 -1
View File
@@ -88,7 +88,7 @@ export async function updateFeed(
const wallet = await getWalletFromIdentity(identity, password) const wallet = await getWalletFromIdentity(identity, password)
if (!identity.feedHash) { if (!identity.feedHash) {
identity.feedHash = await beeApi.createFeedManifest(stamp, 'sequence', '00'.repeat(32), wallet.address) identity.feedHash = (await beeApi.createFeedManifest(stamp, 'sequence', '00'.repeat(32), wallet.address)).reference
} }
const writer = beeApi.makeFeedWriter('sequence', '00'.repeat(32), wallet.privateKey) const writer = beeApi.makeFeedWriter('sequence', '00'.repeat(32), wallet.privateKey)