@helia/interface 2.0.0-9bad21b → 2.0.0-ad4fcc1
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/dist/src/index.d.ts +1 -16
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -17
package/dist/src/index.d.ts
CHANGED
|
@@ -13,12 +13,11 @@
|
|
|
13
13
|
* }
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
|
-
import type {
|
|
16
|
+
import type { Blocks } from './blocks.js';
|
|
17
17
|
import type { Pins } from './pins.js';
|
|
18
18
|
import type { Libp2p, AbortOptions } from '@libp2p/interface';
|
|
19
19
|
import type { Datastore } from 'interface-datastore';
|
|
20
20
|
import type { CID } from 'multiformats/cid';
|
|
21
|
-
import type { MultihashHasher } from 'multiformats/hashes/interface';
|
|
22
21
|
import type { ProgressEvent, ProgressOptions } from 'progress-events';
|
|
23
22
|
export type { Await, AwaitIterable } from 'interface-store';
|
|
24
23
|
/**
|
|
@@ -57,18 +56,4 @@ export interface Helia<T = Libp2p> {
|
|
|
57
56
|
export type GcEvents = ProgressEvent<'helia:gc:deleted', CID> | ProgressEvent<'helia:gc:error', Error>;
|
|
58
57
|
export interface GCOptions extends AbortOptions, ProgressOptions<GcEvents> {
|
|
59
58
|
}
|
|
60
|
-
export type BlockBrokerFactoryComponents = Pick<Helia, 'libp2p' | 'blockstore' | 'datastore'> & {
|
|
61
|
-
hashers: MultihashHasher[];
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* A function that receives some {@link Helia} components and returns a
|
|
65
|
-
* {@link BlockBroker}.
|
|
66
|
-
*
|
|
67
|
-
* This is needed in order to re-use some of the internal components Helia
|
|
68
|
-
* constructs without having to hoist each required component into the top-level
|
|
69
|
-
* scope.
|
|
70
|
-
*/
|
|
71
|
-
export interface BlockBrokerFactoryFunction {
|
|
72
|
-
(heliaComponents: BlockBrokerFactoryComponents): BlockBroker;
|
|
73
|
-
}
|
|
74
59
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAC7D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AACpD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAErE,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAE3D;;GAEG;AACH,MAAM,WAAW,KAAK,CAAC,CAAC,GAAG,MAAM;IAC/B;;OAEG;IACH,MAAM,EAAE,CAAC,CAAA;IAET;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAElB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAA;IAEpB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IAEV;;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"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -14,12 +14,11 @@
|
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import type {
|
|
17
|
+
import type { Blocks } from './blocks.js'
|
|
18
18
|
import type { Pins } from './pins.js'
|
|
19
19
|
import type { Libp2p, AbortOptions } from '@libp2p/interface'
|
|
20
20
|
import type { Datastore } from 'interface-datastore'
|
|
21
21
|
import type { CID } from 'multiformats/cid'
|
|
22
|
-
import type { MultihashHasher } from 'multiformats/hashes/interface'
|
|
23
22
|
import type { ProgressEvent, ProgressOptions } from 'progress-events'
|
|
24
23
|
|
|
25
24
|
export type { Await, AwaitIterable } from 'interface-store'
|
|
@@ -71,18 +70,3 @@ export type GcEvents =
|
|
|
71
70
|
export interface GCOptions extends AbortOptions, ProgressOptions<GcEvents> {
|
|
72
71
|
|
|
73
72
|
}
|
|
74
|
-
export type BlockBrokerFactoryComponents = Pick<Helia, 'libp2p' | 'blockstore' | 'datastore'> & {
|
|
75
|
-
hashers: MultihashHasher[]
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* A function that receives some {@link Helia} components and returns a
|
|
80
|
-
* {@link BlockBroker}.
|
|
81
|
-
*
|
|
82
|
-
* This is needed in order to re-use some of the internal components Helia
|
|
83
|
-
* constructs without having to hoist each required component into the top-level
|
|
84
|
-
* scope.
|
|
85
|
-
*/
|
|
86
|
-
export interface BlockBrokerFactoryFunction {
|
|
87
|
-
(heliaComponents: BlockBrokerFactoryComponents): BlockBroker
|
|
88
|
-
}
|