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
final bool gatewayFallbackEnabled; // default: false (requires blockCacheEnabled)
130
+
final List<String> gatewayFallbackUrls; // default: [] → ships 6 public gateways
131
+
final int gatewayRaceConcurrency; // default: 3
132
+
133
+
// Phase 3.3 — cold-start hybrid resolver (native-only at runtime).
134
+
// The resolver activates iff ALL four required fields are populated;
135
+
// empty values disable cold-start (the warm-device path still works).
136
+
final String usersIndexChainRpcUrl; // operator-supplied (Base/SKALE)
137
+
final String usersIndexAnchorAddress; // operator-supplied
138
+
final String usersIndexIpnsName; // operator-supplied (k51qzi5...)
139
+
final String usersIndexUserKey; // app-derived via deriveUserKeyFromEmail
140
+
final List<String> usersIndexIpnsGatewayUrls; // default: [] → SDK defaults
141
+
final List<String> usersIndexIpfsGatewayUrls; // default: [] → SDK defaults
113
142
}
114
143
```
115
144
145
+
All flags default OFF — apps that don't opt in see byte-identical behavior to pre-Phase-2.x builds.
146
+
116
147
#### EncryptionConfig
117
148
```dart
118
149
class EncryptionConfig {
@@ -372,6 +403,111 @@ final restoredClient = await createEncryptedClient(
372
403
);
373
404
```
374
405
406
+
## Offline Reads (Phase 2 + 3)
407
+
408
+
When the master gateway is unreachable, the SDK can transparently fall back to public IPFS gateways AND, on a fresh device install, cold-start by resolving a globally-published users-index from IPNS or the chain anchor — no client wallet, no fresh master required.
409
+
410
+
### Two-tier offline read
411
+
412
+
| Scenario | Path |
413
+
|---|---|
414
+
| **Warm device** (signed in before, has block cache) | Phase 2.x — gateway race using cached `(bucket, key) → cid` |
415
+
| **Fresh install** (no cache) | Phase 3.3 — cold-start resolver fetches global users-index via IPNS or chain, then walks per-user manifest |
416
+
| **Master up** | Direct master read (fast path, byte-identical to today) |
417
+
418
+
### Step 1 — Enable warm-device offline reads
419
+
420
+
```dart
421
+
final config = FulaConfig(
422
+
endpoint: 'https://your-fula-gateway.com:9000',
423
+
accessToken: jwt,
424
+
// Phase 2.1 — detect master-down without per-read timeout tax
0 commit comments