@peerbit/blocks-interface 1.1.3 → 1.2.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/lib/esm/index.d.ts +2 -0
- package/package.json +5 -5
- package/src/index.ts +2 -0
package/lib/esm/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { WaitForPeer } from "@peerbit/stream-interface";
|
|
|
2
2
|
export type GetOptions = {
|
|
3
3
|
timeout?: number;
|
|
4
4
|
replicate?: boolean;
|
|
5
|
+
from?: string[];
|
|
5
6
|
};
|
|
6
7
|
export type PutOptions = {
|
|
7
8
|
timeout?: number;
|
|
@@ -13,5 +14,6 @@ export interface Blocks extends WaitForPeer {
|
|
|
13
14
|
get(cid: string, options?: GetOptions): MaybePromise<Uint8Array | undefined>;
|
|
14
15
|
rm(cid: string): MaybePromise<void>;
|
|
15
16
|
iterator(): AsyncGenerator<[string, Uint8Array], void, void>;
|
|
17
|
+
size(): MaybePromise<number>;
|
|
16
18
|
}
|
|
17
19
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peerbit/blocks-interface",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Block store streaming",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"dao.xyz"
|
|
50
50
|
],
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@peerbit/libp2p-test-utils": "
|
|
52
|
+
"@peerbit/libp2p-test-utils": "2.0.0"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@dao-xyz/borsh": "^5.1.8",
|
|
56
|
-
"@peerbit/crypto": "1.0
|
|
57
|
-
"@peerbit/stream-interface": "^
|
|
56
|
+
"@peerbit/crypto": "2.1.0",
|
|
57
|
+
"@peerbit/stream-interface": "^2.0.1"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "cba5d4b1a6f3343f044c7d3194494c3572710cc8"
|
|
60
60
|
}
|
package/src/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { WaitForPeer } from "@peerbit/stream-interface";
|
|
|
3
3
|
export type GetOptions = {
|
|
4
4
|
timeout?: number;
|
|
5
5
|
replicate?: boolean;
|
|
6
|
+
from?: string[];
|
|
6
7
|
};
|
|
7
8
|
export type PutOptions = {
|
|
8
9
|
timeout?: number;
|
|
@@ -16,4 +17,5 @@ export interface Blocks extends WaitForPeer {
|
|
|
16
17
|
get(cid: string, options?: GetOptions): MaybePromise<Uint8Array | undefined>;
|
|
17
18
|
rm(cid: string): MaybePromise<void>;
|
|
18
19
|
iterator(): AsyncGenerator<[string, Uint8Array], void, void>;
|
|
20
|
+
size(): MaybePromise<number>;
|
|
19
21
|
}
|