You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/documentation/buying-storage.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -92,10 +92,10 @@ The lifetime of the batch starts counting down from the moment of purchase. The
92
92
Just as with buying storage, since storage comes only in [***discrete sizes***](/docs/storage/#batch-size-breakpoints), the actual amount of additional space when extending the storage size of an existing batch will typically be greater than specified.
93
93
:::
94
94
95
-
If we need to upload more data, then we can extend a batch's storage size using the `bee.extendStorageSize` method. Note that in order to increase the batch size using the `extendStorageSize` method, you must choose a size which is above the current [batch's size breakpoint](/docs/buying-storage/#batch-size-breakpoints).
95
+
If we need to upload more data, then we can extend a batch's storage size using the `bee.extendStorageSize` method. Note that in order to increase the batch size using the `extendStorageSize` method, you must choose a size which is above the current [batch's size breakpoint](/docs/storage/#batch-size-breakpoints).
96
96
97
97
:::tip
98
-
As mentioned [above](/docs/buying-storage/#batch-size-breakpoints), the per byte cost decreases as the storage size of a batch increases, so it's more cost effective to increase the storage size an existing batch rather than buying a new, smaller batch.
98
+
As mentioned [above](/docs/storage/#batch-size-breakpoints), the per byte cost decreases as the storage size of a batch increases, so it's more cost effective to increase the storage size an existing batch rather than buying a new, smaller batch.
99
99
100
100
The exception to this rule is if we no longer wish to store the previously uploaded data. In that case we SHOULD buy an all new postage batch, as extending the size of an existing batch would require us to continue paying for the already uploaded data which we no longer need.
101
101
:::
@@ -151,7 +151,7 @@ const result = await bee.extendStorageSize(batchId, newSize)
151
151
console.log(result)
152
152
```
153
153
154
-
We can check that we successfully extended the batch size by [checking batch status](/docs/buying-storage/#checking-storage-status):
154
+
We can check that we successfully extended the batch size by [checking batch status](/docs/storage/#checking-storage-status):
155
155
156
156
```javascript
157
157
[
@@ -178,7 +178,7 @@ We can check that we successfully extended the batch size by [checking batch sta
178
178
179
179
Here we can see that our batch `size` was successfully extended from ~4.93 GB to ~17.03 GB.
180
180
181
-
*See [above](/docs/buying-storage/#batch-size-breakpoints) to understand why `size` was extended to ~17.03 even though 5 GB was used as input.*
181
+
*See [above](/docs/storage/#batch-size-breakpoints) to understand why `size` was extended to ~17.03 even though 5 GB was used as input.*
182
182
183
183
184
184
### Extending Storage Duration
@@ -236,7 +236,7 @@ const result = await bee.extendStorageDuration(batchId, additionalDuration)
236
236
console.log(result)
237
237
```
238
238
239
-
We can verify that the extension was successful by [checking the batch status](/docs/buying-storage/#checking-storage-status). You'll notice the `duration` value on the batch will have increased, reflecting the newly extended storage time:
239
+
We can verify that the extension was successful by [checking the batch status](/docs/storage/#checking-storage-status). You'll notice the `duration` value on the batch will have increased, reflecting the newly extended storage time:
240
240
241
241
```javascript
242
242
[
@@ -305,7 +305,7 @@ console.log(cost)
305
305
This method helps you determine if it's more economical to **extend** an existing batch or **create a new one**, especially when both dimensions—storage and time—need to grow.
306
306
307
307
:::tip
308
-
If you're unsure whether to extend a batch or start fresh, compare the output of `getExtensionCost` with the cost of a new batch using the [Postage Stamp Pricing Guide](/docs/buying-storage/#batch-size-breakpoints). In many cases, extending is cheaper, especially for larger and longer-lived batches.
308
+
If you're unsure whether to extend a batch or start fresh, compare the output of `getExtensionCost` with the cost of a new batch using the [Postage Stamp Pricing Guide](/docs/storage/#batch-size-breakpoints). In many cases, extending is cheaper, especially for larger and longer-lived batches.
309
309
:::
310
310
311
311
If you're happy with the cost, you can then proceed to extend the **size** and **duration** individually by calling `extendStorageSize` and `extendStorageDuration` as shown in the previous sections.
@@ -363,7 +363,7 @@ We can disregard many of these values since they are only needed for advanced us
363
363
For an explanation of the remaining values, refer to the "Advanced" section below.
364
364
365
365
:::tip
366
-
Note that although 1 GB was specified as input for the `bee.buyStorage`, the `size` value is ~4.93 GB. Refer to the [section about batch sizes](/docs/buying-storage/#batch-size-breakpoints) above to understand why.
366
+
Note that although 1 GB was specified as input for the `bee.buyStorage`, the `size` value is ~4.93 GB. Refer to the [section about batch sizes](/docs/storage/#batch-size-breakpoints) above to understand why.
Copy file name to clipboardExpand all lines: docs/documentation/getting-started.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,10 +89,10 @@ That said, the `bee-js` library itself works seamlessly within WSL. If you prefe
89
89
You can use [`create-swarm-app`](https://www.npmjs.com/package/create-swarm-app) to quickly set up scaffolding for a `bee-js` project with the following command:
90
90
91
91
```bash
92
-
npm init swarm-app@latest {app-name} {app-type}
92
+
npm init swarm-app@latest app-nameapp-type
93
93
```
94
94
95
-
Replace "{app-name}" with your app's name, and "{app-type}" with the type of app you want. Supported types are `node`, `node-esm`, `node-ts` and `vite-tsx`.
95
+
Replace "app-name" with your app's name, and "app-type" with the type of app you want. Supported types are `node`, `node-esm`, `node-ts` and `vite-tsx`.
96
96
97
97
Start a Swarm project using TypeScript:
98
98
@@ -131,6 +131,6 @@ tree .
131
131
└── tsconfig.json
132
132
```
133
133
134
-
The exact results will differ slightly depending on which `{app-type}` you use, but they will all include a `config.ts` or `config.js` file where the Bee node's API endpoint must be specified.
134
+
The exact results will differ slightly depending on which `app-type` you use, but they will all include a `config.ts` or `config.js` file where the Bee node's API endpoint must be specified.
135
135
136
136
The endpoint is set to the default Bee API endpoint of `http://localhost:1633`, if your node uses a different endpoint you will need to update it in the config file.
0 commit comments