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
* docs: certified reads and nodejs options
Signed-off-by: David Dal Busco <david.dalbusco@outlook.com>
* 📄 Update LLMs.txt snapshot for PR review
---------
Signed-off-by: David Dal Busco <david.dalbusco@outlook.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: .llms-snapshots/llms-full.txt
+84Lines changed: 84 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1216,6 +1216,48 @@ The `deleteFilteredDocs` function allows you to delete multiple documents from a
1216
1216
import { deleteFilteredDocs } from "@junobuild/core";await deleteFilteredDocs({ collection: "my_collection_key", filter: { // Same options as filter of listDocs }});
1217
1217
```
1218
1218
1219
+
---
1220
+
1221
+
## Options
1222
+
1223
+
This section covers additional options that can be used with most of the functions listed above.
1224
+
1225
+
### Certified Reads
1226
+
1227
+
All read functions support a `certified` option that can be enabled to guarantee cryptographic verification of the returned data.
1228
+
1229
+
By default, uncertified reads are used for better performance and UX. Those are faster but do not provide cryptographic guarantees.
1230
+
1231
+
When `options.certified` is enabled, the function performs an update call under the hood. This ensures the response is verified by the Internet Computer but may increase latency.
1232
+
1233
+
#### When to Use Certified Reads
1234
+
1235
+
Certified reads matter when trust in displayed information is more important than speed, or when your app exposes publicly verifiable data — such as user balances, or voting results.
1236
+
1237
+
For those use cases, a common pattern is deduplicating the call: making an uncertified call for UX purposes — fetching and displaying data quickly — and an update call in parallel, which might take longer but ensures verification. If the latter fails, revert the information and warn users about the issue.
In Node.js or outside the browser, you must explicitly pass a `satellite` parameter specifying the satellite configuration, so the function knows which satellite to target and how to connect to it.
1248
+
1249
+
This is required because `initSatellite()` is only available in browser environments.
1250
+
1251
+
**Important:**
1252
+
1253
+
You never need to set this parameter in a browser context.
Understand the full journey of Serverless Functions in Juno, from setup and development to deployment and maintenance.
@@ -2191,6 +2233,48 @@ The `deleteFilteredAssets` function allows you to delete multiple assets from a
2191
2233
import { deleteFilteredAssets } from "@junobuild/core";await deleteFilteredAssets({ collection: "my_collection_key", filter: { // Uses the same filter options as listAssets }});
2192
2234
```
2193
2235
2236
+
---
2237
+
2238
+
## Options
2239
+
2240
+
This section covers additional options that can be used with most of the functions listed above.
2241
+
2242
+
### Certified Reads
2243
+
2244
+
All read functions support a `certified` option that can be enabled to guarantee cryptographic verification of the returned data.
2245
+
2246
+
By default, uncertified reads are used for better performance and UX. Those are faster but do not provide cryptographic guarantees.
2247
+
2248
+
When `options.certified` is enabled, the function performs an update call under the hood. This ensures the response is verified by the Internet Computer but may increase latency.
2249
+
2250
+
#### When to Use Certified Reads
2251
+
2252
+
Certified reads matter when trust in displayed information is more important than speed, or when your app exposes publicly verifiable data — such as user balances, or voting results.
2253
+
2254
+
For those use cases, a common pattern is deduplicating the call: making an uncertified call for UX purposes — fetching and displaying data quickly — and an update call in parallel, which might take longer but ensures verification. If the latter fails, revert the information and warn users about the issue.
In Node.js or outside the browser, you must explicitly pass a `satellite` parameter specifying the satellite configuration, so the function knows which satellite to target and how to connect to it.
2265
+
2266
+
This is required because `initSatellite()` is only available in browser environments.
2267
+
2268
+
**Important:**
2269
+
2270
+
You never need to set this parameter in a browser context.
Build full apps with Juno using your preferred frontend framework. These examples cover everything from auth to data handling with React, SvelteKit, Angular, Next.js, and more.
All read functions support a `certified` option that can be enabled to guarantee cryptographic verification of the returned data.
4
+
5
+
By default, uncertified reads are used for better performance and UX. Those are faster but do not provide cryptographic guarantees.
6
+
7
+
When `options.certified` is enabled, the function performs an update call under the hood. This ensures the response is verified by the Internet Computer but may increase latency.
8
+
9
+
#### When to Use Certified Reads
10
+
11
+
Certified reads matter when trust in displayed information is more important than speed, or when your app exposes publicly verifiable data — such as user balances, or voting results.
12
+
13
+
For those use cases, a common pattern is deduplicating the call: making an uncertified call for UX purposes — fetching and displaying data quickly — and an update call in parallel, which might take longer but ensures verification. If the latter fails, revert the information and warn users about the issue.
In Node.js or outside the browser, you must explicitly pass a `satellite` parameter specifying the satellite configuration, so the function knows which satellite to target and how to connect to it.
4
+
5
+
This is required because `initSatellite()` is only available in browser environments.
6
+
7
+
:::important
8
+
9
+
You never need to set this parameter in a browser context.
0 commit comments