@helia/verified-fetch 7.2.16 → 8.0.0

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.
Files changed (38) hide show
  1. package/README.md +8 -12
  2. package/dist/index.min.js +70 -59
  3. package/dist/index.min.js.map +4 -4
  4. package/dist/src/index.d.ts +18 -16
  5. package/dist/src/index.d.ts.map +1 -1
  6. package/dist/src/index.js +38 -34
  7. package/dist/src/index.js.map +1 -1
  8. package/dist/src/plugins/plugin-handle-ipns-record.d.ts.map +1 -1
  9. package/dist/src/plugins/plugin-handle-ipns-record.js +20 -6
  10. package/dist/src/plugins/plugin-handle-ipns-record.js.map +1 -1
  11. package/dist/src/plugins/plugin-handle-unixfs.d.ts.map +1 -1
  12. package/dist/src/plugins/plugin-handle-unixfs.js +7 -4
  13. package/dist/src/plugins/plugin-handle-unixfs.js.map +1 -1
  14. package/dist/src/url-resolver.d.ts.map +1 -1
  15. package/dist/src/url-resolver.js +27 -9
  16. package/dist/src/url-resolver.js.map +1 -1
  17. package/dist/src/utils/convert-output.d.ts +2 -2
  18. package/dist/src/utils/convert-output.d.ts.map +1 -1
  19. package/dist/src/utils/convert-output.js +11 -5
  20. package/dist/src/utils/convert-output.js.map +1 -1
  21. package/dist/src/utils/ipfs-path-to-cid.d.ts +6 -0
  22. package/dist/src/utils/ipfs-path-to-cid.d.ts.map +1 -0
  23. package/dist/src/utils/ipfs-path-to-cid.js +9 -0
  24. package/dist/src/utils/ipfs-path-to-cid.js.map +1 -0
  25. package/dist/src/utils/libp2p-defaults.browser.js +1 -1
  26. package/dist/src/utils/libp2p-defaults.browser.js.map +1 -1
  27. package/dist/src/utils/libp2p-defaults.d.ts.map +1 -1
  28. package/dist/src/utils/libp2p-defaults.js +2 -10
  29. package/dist/src/utils/libp2p-defaults.js.map +1 -1
  30. package/package.json +28 -31
  31. package/src/index.ts +53 -40
  32. package/src/plugins/plugin-handle-ipns-record.ts +25 -6
  33. package/src/plugins/plugin-handle-unixfs.ts +7 -4
  34. package/src/url-resolver.ts +35 -9
  35. package/src/utils/convert-output.ts +13 -7
  36. package/src/utils/ipfs-path-to-cid.ts +9 -0
  37. package/src/utils/libp2p-defaults.browser.ts +2 -2
  38. package/src/utils/libp2p-defaults.ts +3 -11
@@ -1,8 +1,8 @@
1
+ import { libp2pDefaults } from '@helia/libp2p'
1
2
  import { webRTCDirect } from '@libp2p/webrtc'
2
3
  import { webSockets } from '@libp2p/websockets'
3
- import { libp2pDefaults } from 'helia'
4
4
  import type { ServiceFactoryMap } from './libp2p-types.ts'
5
- import type { DefaultLibp2pServices } from 'helia'
5
+ import type { DefaultLibp2pServices } from '@helia/libp2p'
6
6
  import type { Libp2pOptions } from 'libp2p'
7
7
 
8
8
  type ServiceMap = Pick<DefaultLibp2pServices, 'dcutr' | 'identify' | 'keychain' | 'ping'>
@@ -1,9 +1,7 @@
1
+ import { libp2pDefaults } from '@helia/libp2p'
1
2
  import { kadDHT } from '@libp2p/kad-dht'
2
- import { libp2pDefaults } from 'helia'
3
- import { ipnsSelector } from 'ipns/selector'
4
- import { ipnsValidator } from 'ipns/validator'
5
3
  import type { ServiceFactoryMap } from './libp2p-types.ts'
6
- import type { DefaultLibp2pServices } from 'helia'
4
+ import type { DefaultLibp2pServices } from '@helia/libp2p'
7
5
  import type { Libp2pOptions } from 'libp2p'
8
6
 
9
7
  type ServiceMap = Pick<DefaultLibp2pServices, 'autoNAT' | 'dcutr' | 'dht' | 'identify' | 'keychain' | 'ping' | 'upnp'>
@@ -17,13 +15,7 @@ export function getLibp2pConfig (): Libp2pOptions & Required<Pick<Libp2pOptions,
17
15
  autoNAT: libp2pDefaultOptions.services.autoNAT,
18
16
  dcutr: libp2pDefaultOptions.services.dcutr,
19
17
  dht: kadDHT({
20
- clientMode: true,
21
- validators: {
22
- ipns: ipnsValidator
23
- },
24
- selectors: {
25
- ipns: ipnsSelector
26
- }
18
+ clientMode: true
27
19
  }),
28
20
  identify: libp2pDefaultOptions.services.identify,
29
21
  keychain: libp2pDefaultOptions.services.keychain,