@peerbit/blocks-interface 1.3.3 → 1.3.4-b6f9aa8

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.
@@ -1,9 +1,11 @@
1
1
  import { type WaitForPeer } from "@peerbit/stream-interface";
2
2
  export type GetOptions = {
3
- signal?: AbortSignal;
4
- timeout?: number;
5
- replicate?: boolean;
6
- from?: string[];
3
+ remote?: {
4
+ signal?: AbortSignal;
5
+ timeout?: number;
6
+ replicate?: boolean;
7
+ from?: string[];
8
+ } | boolean;
7
9
  };
8
10
  export type PutOptions = {
9
11
  timeout?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,MAAM,UAAU,GAAG;IACxB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,UAAU,GAAG;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,YAAY,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAEtC,MAAM,WAAW,MAAO,SAAQ,WAAW;IAC1C,GAAG,CAAC,KAAK,EAAE,UAAU,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IAC7C,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IACxC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC,UAAU,GAAG,SAAS,CAAC,CAAC;IAC7E,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAC,IA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I,CAAC,CAAC;IACpC,QAAQ,IAAI,cAAc,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC7D,IAAI,IAAI,YAAY,CAAC,MAAM,CAAC,CAAC;IAC7B,SAAS,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;CACnC;AAED,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,QAAQ,GACR,MAAM,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,2BAA2B,CAAC;AAwB7D,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,QAAQ,GACR,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,2BAA2B,CAAC;AA4B7D,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,QAAQ,GACR,MAAM,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,85 +1,85 @@
1
1
  {
2
- "name": "@peerbit/blocks-interface",
3
- "version": "1.3.3",
4
- "description": "Block store streaming",
5
- "type": "module",
6
- "sideEffects": false,
7
- "types": "./dist/src/index.d.ts",
8
- "typesVersions": {
9
- "*": {
10
- "*": [
11
- "*",
12
- "dist/*",
13
- "dist/src/*",
14
- "dist/src/*/index"
15
- ],
16
- "src/*": [
17
- "*",
18
- "dist/*",
19
- "dist/src/*",
20
- "dist/src/*/index"
21
- ]
22
- }
23
- },
24
- "files": [
25
- "src",
26
- "dist",
27
- "!dist/e2e",
28
- "!dist/test",
29
- "!**/*.tsbuildinfo"
30
- ],
31
- "exports": {
32
- ".": {
33
- "types": "./dist/src/index.d.ts",
34
- "import": "./dist/src/index.js"
35
- }
36
- },
37
- "eslintConfig": {
38
- "extends": "peerbit",
39
- "parserOptions": {
40
- "project": true,
41
- "sourceType": "module"
42
- },
43
- "ignorePatterns": [
44
- "!.aegir.js",
45
- "test/ts-use",
46
- "*.d.ts"
47
- ]
48
- },
49
- "publishConfig": {
50
- "access": "public"
51
- },
52
- "scripts": {
53
- "clean": "aegir clean",
54
- "build": "aegir build --no-bundle",
55
- "test": "",
56
- "lint": "aegir lint"
57
- },
58
- "engines": {
59
- "node": ">=16.15.1"
60
- },
61
- "repository": {
62
- "type": "git",
63
- "url": "git+https://github.com/dao-xyz/peerbit.git"
64
- },
65
- "keywords": [
66
- "peerbit"
67
- ],
68
- "author": "dao.xyz",
69
- "license": "MIT",
70
- "bugs": {
71
- "url": "https://github.com/dao-xyz/peerbit/issues"
72
- },
73
- "homepage": "https://github.com/dao-xyz/peerbit#readme",
74
- "localMaintainers": [
75
- "dao.xyz"
76
- ],
77
- "devDependencies": {
78
- "@peerbit/libp2p-test-utils": "2.1.7"
79
- },
80
- "dependencies": {
81
- "@dao-xyz/borsh": "^5.2.3",
82
- "@peerbit/crypto": "2.3.2",
83
- "@peerbit/stream-interface": "^5.0.5"
84
- }
2
+ "name": "@peerbit/blocks-interface",
3
+ "version": "1.3.4-b6f9aa8",
4
+ "description": "Block store streaming",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "types": "./dist/src/index.d.ts",
8
+ "typesVersions": {
9
+ "*": {
10
+ "*": [
11
+ "*",
12
+ "dist/*",
13
+ "dist/src/*",
14
+ "dist/src/*/index"
15
+ ],
16
+ "src/*": [
17
+ "*",
18
+ "dist/*",
19
+ "dist/src/*",
20
+ "dist/src/*/index"
21
+ ]
22
+ }
23
+ },
24
+ "files": [
25
+ "src",
26
+ "dist",
27
+ "!dist/e2e",
28
+ "!dist/test",
29
+ "!**/*.tsbuildinfo"
30
+ ],
31
+ "exports": {
32
+ ".": {
33
+ "types": "./dist/src/index.d.ts",
34
+ "import": "./dist/src/index.js"
35
+ }
36
+ },
37
+ "eslintConfig": {
38
+ "extends": "peerbit",
39
+ "parserOptions": {
40
+ "project": true,
41
+ "sourceType": "module"
42
+ },
43
+ "ignorePatterns": [
44
+ "!.aegir.js",
45
+ "test/ts-use",
46
+ "*.d.ts"
47
+ ]
48
+ },
49
+ "publishConfig": {
50
+ "access": "public"
51
+ },
52
+ "scripts": {
53
+ "clean": "aegir clean",
54
+ "build": "aegir build --no-bundle",
55
+ "test": "",
56
+ "lint": "aegir lint"
57
+ },
58
+ "engines": {
59
+ "node": ">=16.15.1"
60
+ },
61
+ "repository": {
62
+ "type": "git",
63
+ "url": "git+https://github.com/dao-xyz/peerbit.git"
64
+ },
65
+ "keywords": [
66
+ "peerbit"
67
+ ],
68
+ "author": "dao.xyz",
69
+ "license": "MIT",
70
+ "bugs": {
71
+ "url": "https://github.com/dao-xyz/peerbit/issues"
72
+ },
73
+ "homepage": "https://github.com/dao-xyz/peerbit#readme",
74
+ "localMaintainers": [
75
+ "dao.xyz"
76
+ ],
77
+ "devDependencies": {
78
+ "@peerbit/libp2p-test-utils": "2.1.7-b6f9aa8"
79
+ },
80
+ "dependencies": {
81
+ "@dao-xyz/borsh": "^5.2.3",
82
+ "@peerbit/crypto": "2.3.2-b6f9aa8",
83
+ "@peerbit/stream-interface": "5.1.0-b6f9aa8"
84
+ }
85
85
  }
package/src/index.ts CHANGED
@@ -1,10 +1,14 @@
1
1
  import { type WaitForPeer } from "@peerbit/stream-interface";
2
2
 
3
3
  export type GetOptions = {
4
- signal?: AbortSignal;
5
- timeout?: number;
6
- replicate?: boolean;
7
- from?: string[];
4
+ remote?:
5
+ | {
6
+ signal?: AbortSignal;
7
+ timeout?: number;
8
+ replicate?: boolean;
9
+ from?: string[];
10
+ }
11
+ | boolean;
8
12
  };
9
13
  export type PutOptions = {
10
14
  timeout?: number;