@helia/interface 4.0.0-f58d467 → 4.0.1-8c9bb7d

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
@@ -4,6 +4,8 @@
4
4
  </a>
5
5
  </p>
6
6
 
7
+ # @helia/interface
8
+
7
9
  [![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
8
10
  [![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
9
11
  [![codecov](https://img.shields.io/codecov/c/github/ipfs/helia.svg?style=flat-square)](https://codecov.io/gh/ipfs/helia)
@@ -13,6 +15,21 @@
13
15
 
14
16
  # About
15
17
 
18
+ <!--
19
+
20
+ !IMPORTANT!
21
+
22
+ Everything in this README between "# About" and "# Install" is automatically
23
+ generated and will be overwritten the next time the doc generator is run.
24
+
25
+ To make changes to this section, please update the @packageDocumentation section
26
+ of src/index.js or src/index.ts
27
+
28
+ To experiment with formatting, please run "npm run docs" from the root of this
29
+ repo and examine the changes made.
30
+
31
+ -->
32
+
16
33
  The API defined by a Helia node
17
34
 
18
35
  ## Example
@@ -17,6 +17,7 @@ import type { Blocks } from './blocks.js';
17
17
  import type { Pins } from './pins.js';
18
18
  import type { Routing } from './routing.js';
19
19
  import type { AbortOptions, ComponentLogger } from '@libp2p/interface';
20
+ import type { DNS } from '@multiformats/dns';
20
21
  import type { Datastore } from 'interface-datastore';
21
22
  import type { MultihashHasher } from 'multiformats';
22
23
  import type { CID } from 'multiformats/cid';
@@ -57,6 +58,11 @@ export interface Helia {
57
58
  * algorithm.
58
59
  */
59
60
  hashers: Record<number, MultihashHasher>;
61
+ /**
62
+ * The DNS property can be used to perform lookups of various record types and
63
+ * will use a resolver appropriate to the current platform.
64
+ */
65
+ dns: DNS;
60
66
  /**
61
67
  * Starts the Helia node
62
68
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.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pB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IAEV;;OAEG;IACH,MAAM,EAAE,eAAe,CAAA;IAEvB;;;OAGG;IACH,OAAO,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAErC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;IAExC;;;OAGG;IACH,GAAG,EAAE,GAAG,CAAA;IAER;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAEtB;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAErB;;OAEG;IACH,EAAE,CAAC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACvC;AAED,MAAM,MAAM,QAAQ,GAClB,aAAa,CAAC,kBAAkB,EAAE,GAAG,CAAC,GACtC,aAAa,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAA;AAExC,MAAM,WAAW,SAAU,SAAQ,YAAY,EAAE,eAAe,CAAC,QAAQ,CAAC;CAEzE;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;CACzD;AAED,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAuFH,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA8FH,cAAc,aAAa,CAAA;AAC3B,cAAc,WAAW,CAAA;AACzB,cAAc,cAAc,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helia/interface",
3
- "version": "4.0.0-f58d467",
3
+ "version": "4.0.1-8c9bb7d",
4
4
  "description": "The Helia API",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/ipfs/helia/tree/main/packages/interface#readme",
@@ -70,14 +70,15 @@
70
70
  "build": "aegir build"
71
71
  },
72
72
  "dependencies": {
73
- "@libp2p/interface": "^1.1.2",
74
- "interface-blockstore": "^5.2.9",
75
- "interface-datastore": "^8.2.10",
76
- "interface-store": "^5.1.7",
77
- "multiformats": "^13.0.1",
73
+ "@libp2p/interface": "^1.1.4",
74
+ "@multiformats/dns": "^1.0.1",
75
+ "interface-blockstore": "^5.2.10",
76
+ "interface-datastore": "^8.2.11",
77
+ "interface-store": "^5.1.8",
78
+ "multiformats": "^13.1.0",
78
79
  "progress-events": "^1.0.0"
79
80
  },
80
81
  "devDependencies": {
81
- "aegir": "^42.2.2"
82
+ "aegir": "^42.2.5"
82
83
  }
83
84
  }
package/src/index.ts CHANGED
@@ -18,6 +18,7 @@ import type { Blocks } from './blocks.js'
18
18
  import type { Pins } from './pins.js'
19
19
  import type { Routing } from './routing.js'
20
20
  import type { AbortOptions, ComponentLogger } from '@libp2p/interface'
21
+ import type { DNS } from '@multiformats/dns'
21
22
  import type { Datastore } from 'interface-datastore'
22
23
  import type { MultihashHasher } from 'multiformats'
23
24
  import type { CID } from 'multiformats/cid'
@@ -67,6 +68,12 @@ export interface Helia {
67
68
  */
68
69
  hashers: Record<number, MultihashHasher>
69
70
 
71
+ /**
72
+ * The DNS property can be used to perform lookups of various record types and
73
+ * will use a resolver appropriate to the current platform.
74
+ */
75
+ dns: DNS
76
+
70
77
  /**
71
78
  * Starts the Helia node
72
79
  */