@helia/dag-cbor 3.0.0-e554493 → 3.0.0-f58d467
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 +4 -3
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/package.json +8 -8
- package/src/index.ts +4 -3
package/dist/src/index.d.ts
CHANGED
|
@@ -23,13 +23,14 @@
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
import { CID } from 'multiformats/cid';
|
|
26
|
-
import type {
|
|
26
|
+
import type { GetBlockProgressEvents, PutBlockProgressEvents } from '@helia/interface/blocks';
|
|
27
27
|
import type { AbortOptions } from '@libp2p/interfaces';
|
|
28
|
+
import type { Blockstore } from 'interface-blockstore';
|
|
28
29
|
import type { BlockCodec } from 'multiformats/codecs/interface';
|
|
29
30
|
import type { MultihashHasher } from 'multiformats/hashes/interface';
|
|
30
31
|
import type { ProgressOptions } from 'progress-events';
|
|
31
32
|
export interface DAGCBORComponents {
|
|
32
|
-
blockstore:
|
|
33
|
+
blockstore: Blockstore;
|
|
33
34
|
}
|
|
34
35
|
export interface AddOptions extends AbortOptions, ProgressOptions<PutBlockProgressEvents> {
|
|
35
36
|
hasher: MultihashHasher;
|
|
@@ -83,6 +84,6 @@ export interface DAGCBOR {
|
|
|
83
84
|
* Create a {@link DAGCBOR} instance for use with {@link https://github.com/ipfs/helia Helia}
|
|
84
85
|
*/
|
|
85
86
|
export declare function dagCbor(helia: {
|
|
86
|
-
blockstore:
|
|
87
|
+
blockstore: Blockstore;
|
|
87
88
|
}): DAGCBOR;
|
|
88
89
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,EAAE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AA;CAC5D;AA0BD;;GAEG;AACH,wBAAgB,OAAO,CAAE,KAAK,EAAE;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,GAAG,OAAO,CAEnE"}
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAA;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AAgEjD,MAAM,cAAc;IACD,UAAU,CAAmB;IAE9C,YAAa,UAA6B;QACxC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,GAAG,CAAE,GAAQ,EAAE,UAA+B,EAAE;QACpD,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAC7B,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACzD,MAAM,GAAG,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;QAE1C,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;QAEvD,OAAO,GAAG,CAAA;IACZ,CAAC;IAED,KAAK,CAAC,GAAG,CAAM,GAAQ,EAAE,UAA+B,EAAE;QACxD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;QAE9D,OAAO,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAC1B,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,OAAO,CAAE,KAAiC;IACxD,OAAO,IAAI,cAAc,CAAC,KAAK,CAAC,CAAA;AAClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helia/dag-cbor",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-f58d467",
|
|
4
4
|
"description": "Add/get IPLD blocks containing dag-cbor with your Helia node",
|
|
5
5
|
"license": "Apache-2.0 OR MIT",
|
|
6
6
|
"homepage": "https://github.com/ipfs/helia/tree/main/packages/dag-cbor#readme",
|
|
@@ -140,15 +140,15 @@
|
|
|
140
140
|
"release": "aegir release"
|
|
141
141
|
},
|
|
142
142
|
"dependencies": {
|
|
143
|
-
"@helia/interface": "4.0.0-
|
|
144
|
-
"@ipld/dag-cbor": "^9.0
|
|
145
|
-
"@libp2p/interfaces": "^3.3.
|
|
146
|
-
"
|
|
143
|
+
"@helia/interface": "4.0.0-f58d467",
|
|
144
|
+
"@ipld/dag-cbor": "^9.1.0",
|
|
145
|
+
"@libp2p/interfaces": "^3.3.2",
|
|
146
|
+
"interface-blockstore": "^5.2.9",
|
|
147
|
+
"multiformats": "^13.0.1",
|
|
147
148
|
"progress-events": "^1.0.0"
|
|
148
149
|
},
|
|
149
150
|
"devDependencies": {
|
|
150
|
-
"aegir": "^42.
|
|
151
|
-
"blockstore-core": "^4.3.10"
|
|
152
|
-
"interface-blockstore": "^5.2.9"
|
|
151
|
+
"aegir": "^42.2.2",
|
|
152
|
+
"blockstore-core": "^4.3.10"
|
|
153
153
|
}
|
|
154
154
|
}
|
package/src/index.ts
CHANGED
|
@@ -26,14 +26,15 @@
|
|
|
26
26
|
import * as codec from '@ipld/dag-cbor'
|
|
27
27
|
import { CID } from 'multiformats/cid'
|
|
28
28
|
import { sha256 } from 'multiformats/hashes/sha2'
|
|
29
|
-
import type {
|
|
29
|
+
import type { GetBlockProgressEvents, PutBlockProgressEvents } from '@helia/interface/blocks'
|
|
30
30
|
import type { AbortOptions } from '@libp2p/interfaces'
|
|
31
|
+
import type { Blockstore } from 'interface-blockstore'
|
|
31
32
|
import type { BlockCodec } from 'multiformats/codecs/interface'
|
|
32
33
|
import type { MultihashHasher } from 'multiformats/hashes/interface'
|
|
33
34
|
import type { ProgressOptions } from 'progress-events'
|
|
34
35
|
|
|
35
36
|
export interface DAGCBORComponents {
|
|
36
|
-
blockstore:
|
|
37
|
+
blockstore: Blockstore
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
export interface AddOptions extends AbortOptions, ProgressOptions<PutBlockProgressEvents> {
|
|
@@ -115,6 +116,6 @@ class DefaultDAGCBOR implements DAGCBOR {
|
|
|
115
116
|
/**
|
|
116
117
|
* Create a {@link DAGCBOR} instance for use with {@link https://github.com/ipfs/helia Helia}
|
|
117
118
|
*/
|
|
118
|
-
export function dagCbor (helia: { blockstore:
|
|
119
|
+
export function dagCbor (helia: { blockstore: Blockstore }): DAGCBOR {
|
|
119
120
|
return new DefaultDAGCBOR(helia)
|
|
120
121
|
}
|