@seedprotocol/arweave 0.8.1 → 0.8.2-next.1818.gac40edf

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -44,6 +44,11 @@ import { fetchArweaveRawTextAcrossGateways } from '@seedprotocol/arweave'
44
44
  const body = await fetchArweaveRawTextAcrossGateways(txId)
45
45
  ```
46
46
 
47
+ `readArweaveRawAcrossGateways(txId)` asks the same gateways once each and returns `{ bytes, attempts }`,
48
+ where each attempt is `{ baseUrl, outcome }` and `outcome` is the HTTP status, `'timeout'`, `'network'`
49
+ (the request threw; in a browser this includes an answer blocked by CORS), `'empty'` or `'unreadable'`.
50
+ Use it to say why a read missed.
51
+
47
52
  Override the fallback list with `ARWEAVE_READ_GATEWAYS` or `NEXT_PUBLIC_ARWEAVE_READ_GATEWAYS` (comma-separated hosts).
48
53
 
49
54
  ### Gateway endpoint resolution
@@ -68,7 +73,7 @@ See [GATEWAY_HYPER.md](https://github.com/JournoLabs/seed-protocol-sdk/blob/main
68
73
  |-------|--------------|
69
74
  | `@seedprotocol/arweave` | `ArweaveClient` (alias of `BaseArweaveClient`), `IArweaveClient` |
70
75
  | | Gateway constants and env helpers: `DEFAULT_ARWEAVE_HOST`, `DEFAULT_ARWEAVE_GATEWAYS`, `ARWEAVE_HOST_ENV_KEYS`, `resolveArweaveHostFromEnv`, `getArweaveReadGatewayHostsForPrimary` |
71
- | | Read gateways: `ensureReadGatewaySelected`, `selectFirstHealthyReadGateway`, `probeGateway`, `getArweaveReadBaseUrls`, `fetchArweaveRawFromBaseUrl`, `fetchArweaveRawTextAcrossGateways`, `setPreferredArweaveReadBaseUrls` |
76
+ | | Read gateways: `ensureReadGatewaySelected`, `selectFirstHealthyReadGateway`, `probeGateway`, `getArweaveReadBaseUrls`, `fetchArweaveRawFromBaseUrl`, `readArweaveRawAcrossGateways`, `fetchArweaveRawTextAcrossGateways`, `setPreferredArweaveReadBaseUrls` |
72
77
  | | Circuit breaker: `configureGatewayCircuitBreaker`, `isGatewayHostCircuitOpen`, `recordGatewayHostSuccess` / `recordGatewayHostFailure` |
73
78
  | | Gateway config: `resolveSeedGatewayEndpoints`, `resolveSidecarOrigin`, `seedGatewayConfigFromSeedConfig`, `seedGatewayConfigFromClientContext`, `SeedGatewayConfig`, `ResolvedSeedGatewayEndpoints` |
74
79
  | | Upload pipeline status: `getArweaveUploadStatus`, `isArweaveL1AnchoringComplete`, `getUploadPipelineTransactionStatus`, `queryArweaveGatewayTransactionWithFallback` |