@helia/verified-fetch 1.3.14 → 1.4.1

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
@@ -119,22 +119,25 @@ For full control of how `@helia/verified-fetch` fetches content from the distrib
119
119
 
120
120
  The [helia](https://www.npmjs.com/package/helia) module is configured with a libp2p node that is suited for decentralized applications, alternatively [@helia/http](https://www.npmjs.com/package/@helia/http) is available which uses HTTP gateways for all network operations.
121
121
 
122
- See variations of [Helia and js-libp2p configuration options](https://helia.io/interfaces/helia.HeliaInit.html)
122
+ You can see variations of Helia and js-libp2p configuration options at <https://helia.io/interfaces/helia.index.HeliaInit.html>.
123
123
 
124
124
  ```typescript
125
125
  import { trustlessGateway } from '@helia/block-brokers'
126
126
  import { createHeliaHTTP } from '@helia/http'
127
- import { delegatedHTTPRouting } from '@helia/routers'
127
+ import { delegatedHTTPRouting, httpGatewayRouting } from '@helia/routers'
128
128
  import { createVerifiedFetch } from '@helia/verified-fetch'
129
129
 
130
130
  const fetch = await createVerifiedFetch(
131
131
  await createHeliaHTTP({
132
132
  blockBrokers: [
133
- trustlessGateway({
133
+ trustlessGateway()
134
+ ],
135
+ routers: [
136
+ delegatedHTTPRouting('http://delegated-ipfs.dev'),
137
+ httpGatewayRouting({
134
138
  gateways: ['https://mygateway.example.net', 'https://trustless-gateway.link']
135
139
  })
136
- ],
137
- routers: ['http://delegated-ipfs.dev'].map((routerUrl) => delegatedHTTPRouting(routerUrl))
140
+ ]
138
141
  })
139
142
  )
140
143
 
@@ -617,7 +620,7 @@ Known Errors that can be thrown:
617
620
  1. `TypeError` - If the resource argument is not a string, CID, or CID string.
618
621
  2. `TypeError` - If the options argument is passed and not an object.
619
622
  3. `TypeError` - If the options argument is passed and is malformed.
620
- 4. `AbortError` - If the content request is aborted due to user aborting provided AbortSignal.
623
+ 4. `AbortError` - If the content request is aborted due to user aborting provided AbortSignal. Note that this is a `AbortError` from `@libp2p/interface` and not the standard `AbortError` from the Fetch API.
621
624
 
622
625
  # Install
623
626