peerbit 4.0.21 → 4.0.22-81d59ee

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 +1 @@
1
- {"version":3,"file":"transports.browser.d.ts","sourceRoot":"","sources":["../../src/transports.browser.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,qPAOtB,CAAC;AAEF,eAAO,MAAM,KAAK,QAAsB,GAAG,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,MAAM,MAAM,EAAE,GAAG,SAA6B,CAAC"}
1
+ {"version":3,"file":"transports.browser.d.ts","sourceRoot":"","sources":["../../src/transports.browser.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU,qPAMtB,CAAC;AAEF,eAAO,MAAM,KAAK,QAAsB,GAAG,CAAC;AAE5C,eAAO,MAAM,MAAM,EAAE,MAAM,MAAM,EAAE,GAAG,SAGrC,CAAC"}
@@ -5,11 +5,13 @@ import { all } from "@libp2p/websockets/filters";
5
5
  export const transports = () => [
6
6
  webSockets({ filter: all }),
7
7
  circuitRelayTransport({
8
- discoverRelays: 1,
9
8
  reservationCompletionTimeout: 5000,
10
9
  }),
11
10
  webRTC({}),
12
11
  ];
13
12
  export const relay = () => undefined;
14
- export const listen = () => ["/webrtc"];
13
+ export const listen = () => [
14
+ "/webrtc",
15
+ "/p2p-circuit",
16
+ ];
15
17
  //# sourceMappingURL=transports.browser.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transports.browser.js","sourceRoot":"","sources":["../../src/transports.browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAEjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAC3B,qBAAqB,CAAC;QACrB,cAAc,EAAE,CAAC;QACjB,4BAA4B,EAAE,IAAI;KAClC,CAAC;IACF,MAAM,CAAC,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,SAAgB,CAAC;AAE5C,MAAM,CAAC,MAAM,MAAM,GAA+B,GAAG,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC"}
1
+ {"version":3,"file":"transports.browser.js","sourceRoot":"","sources":["../../src/transports.browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAEjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAC3B,qBAAqB,CAAC;QACrB,4BAA4B,EAAE,IAAI;KAClC,CAAC;IACF,MAAM,CAAC,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE,CAAC,SAAgB,CAAC;AAE5C,MAAM,CAAC,MAAM,MAAM,GAA+B,GAAG,EAAE,CAAC;IACvD,SAAS;IACT,cAAc;CACd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"transports.d.ts","sourceRoot":"","sources":["../../src/transports.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,UAAU,oPAMtB,CAAC;AACF,eAAO,MAAM,KAAK,+IAIf,CAAC;AAEJ,eAAO,MAAM,MAAM,EAAE,MAAM,MAAM,EAAE,GAAG,SAGrC,CAAC"}
1
+ {"version":3,"file":"transports.d.ts","sourceRoot":"","sources":["../../src/transports.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,UAAU,oPAMtB,CAAC;AACF,eAAO,MAAM,KAAK,+IAIf,CAAC;AAEJ,eAAO,MAAM,MAAM,EAAE,MAAM,MAAM,EAAE,GAAG,SAIrC,CAAC"}
@@ -17,5 +17,6 @@ circuitRelayServer({
17
17
  export const listen = () => [
18
18
  "/ip4/127.0.0.1/tcp/0",
19
19
  "/ip4/127.0.0.1/tcp/0/ws",
20
+ "/p2p-circuit",
20
21
  ];
21
22
  //# sourceMappingURL=transports.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"transports.js","sourceRoot":"","sources":["../../src/transports.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,qBAAqB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAEjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAC3B,qBAAqB,CAAC;QACrB,4BAA4B,EAAE,IAAI;KAClC,CAAC;IACF,GAAG,EAAE;CACL,CAAC;AACF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE;AACzB,sFAAsF;AACtF,kBAAkB,CAAC;IAClB,YAAY,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE;CACjE,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,MAAM,GAA+B,GAAG,EAAE,CAAC;IACvD,sBAAsB;IACtB,yBAAyB;CACzB,CAAC"}
1
+ {"version":3,"file":"transports.js","sourceRoot":"","sources":["../../src/transports.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,qBAAqB,GACrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,MAAM,4BAA4B,CAAC;AAEjD,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAC3B,qBAAqB,CAAC;QACrB,4BAA4B,EAAE,IAAI;KAClC,CAAC;IACF,GAAG,EAAE;CACL,CAAC;AACF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE;AACzB,sFAAsF;AACtF,kBAAkB,CAAC;IAClB,YAAY,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE;CACjE,CAAC,CAAC;AAEJ,MAAM,CAAC,MAAM,MAAM,GAA+B,GAAG,EAAE,CAAC;IACvD,sBAAsB;IACtB,yBAAyB;IACzB,cAAc;CACd,CAAC"}
package/package.json CHANGED
@@ -1,109 +1,109 @@
1
1
  {
2
- "name": "peerbit",
3
- "version": "4.0.21",
4
- "description": "Peerbit client",
5
- "author": "dao.xyz",
6
- "license": "MIT",
7
- "sideEffects": false,
8
- "type": "module",
9
- "types": "./dist/src/index.d.ts",
10
- "typesVersions": {
11
- "*": {
12
- "*": [
13
- "*",
14
- "dist/*",
15
- "dist/src/*",
16
- "dist/src/*/index"
17
- ],
18
- "src/*": [
19
- "*",
20
- "dist/*",
21
- "dist/src/*",
22
- "dist/src/*/index"
23
- ]
24
- }
25
- },
26
- "files": [
27
- "src",
28
- "dist",
29
- "!dist/e2e",
30
- "!dist/test",
31
- "!**/*.tsbuildinfo"
32
- ],
33
- "exports": {
34
- ".": {
35
- "types": "./dist/src/index.d.ts",
36
- "import": "./dist/src/index.js"
37
- }
38
- },
39
- "eslintConfig": {
40
- "extends": "peerbit",
41
- "parserOptions": {
42
- "project": true,
43
- "sourceType": "module"
44
- },
45
- "ignorePatterns": [
46
- "!.aegir.js",
47
- "test/ts-use",
48
- "*.d.ts"
49
- ]
50
- },
51
- "publishConfig": {
52
- "access": "public"
53
- },
54
- "repository": {
55
- "type": "git",
56
- "url": "https://github.com/dao-xyz/peerbit"
57
- },
58
- "engines": {
59
- "node": ">=18"
60
- },
61
- "browser": {
62
- "./dist/src/transports.js": "./dist/src/transports.browser.js"
63
- },
64
- "dependencies": {
65
- "@dao-xyz/borsh": "^5.2.3",
66
- "@peerbit/any-store": "^2.1.2",
67
- "@peerbit/crypto": "2.3.2",
68
- "@peerbit/logger": "1.0.3",
69
- "@peerbit/program": "5.0.5",
70
- "@peerbit/pubsub": "^3.0.11",
71
- "@peerbit/blocks": "^2.1.5",
72
- "@peerbit/indexer-simple": "^1.1.1",
73
- "@peerbit/indexer-sqlite3": "^1.1.1",
74
- "datastore-level": "^11.0.1",
75
- "@chainsafe/libp2p-yamux": "^7.0.1",
76
- "@libp2p/webrtc": "^5.0.13",
77
- "@libp2p/websockets": "^9.0.8",
78
- "@libp2p/identify": "^3.0.8",
79
- "@libp2p/circuit-relay-v2": "^2.1.5",
80
- "@libp2p/tcp": "^10.0.9",
81
- "level": "^8.0.1",
82
- "memory-level": "^1.0.0",
83
- "path-browserify": "^1.0.1"
84
- },
85
- "devDependencies": {
86
- "p-each-series": "^3.0.0",
87
- "p-map-series": "^3.0.0",
88
- "@types/path-browserify": "^1.0.2"
89
- },
90
- "scripts": {
91
- "clean": "aegir clean",
92
- "build": "aegir build --no-bundle",
93
- "test": "aegir test -t node",
94
- "lint": "aegir lint"
95
- },
96
- "localMaintainers": [
97
- "dao.xyz"
98
- ],
99
- "keywords": [
100
- "crdt",
101
- "database",
102
- "distributed",
103
- "decentralised",
104
- "distributed",
105
- "ipfs",
106
- "p2p",
107
- "peer-to-peer"
108
- ]
2
+ "name": "peerbit",
3
+ "version": "4.0.22-81d59ee",
4
+ "description": "Peerbit client",
5
+ "author": "dao.xyz",
6
+ "license": "MIT",
7
+ "sideEffects": false,
8
+ "type": "module",
9
+ "types": "./dist/src/index.d.ts",
10
+ "typesVersions": {
11
+ "*": {
12
+ "*": [
13
+ "*",
14
+ "dist/*",
15
+ "dist/src/*",
16
+ "dist/src/*/index"
17
+ ],
18
+ "src/*": [
19
+ "*",
20
+ "dist/*",
21
+ "dist/src/*",
22
+ "dist/src/*/index"
23
+ ]
24
+ }
25
+ },
26
+ "files": [
27
+ "src",
28
+ "dist",
29
+ "!dist/e2e",
30
+ "!dist/test",
31
+ "!**/*.tsbuildinfo"
32
+ ],
33
+ "exports": {
34
+ ".": {
35
+ "types": "./dist/src/index.d.ts",
36
+ "import": "./dist/src/index.js"
37
+ }
38
+ },
39
+ "eslintConfig": {
40
+ "extends": "peerbit",
41
+ "parserOptions": {
42
+ "project": true,
43
+ "sourceType": "module"
44
+ },
45
+ "ignorePatterns": [
46
+ "!.aegir.js",
47
+ "test/ts-use",
48
+ "*.d.ts"
49
+ ]
50
+ },
51
+ "publishConfig": {
52
+ "access": "public"
53
+ },
54
+ "repository": {
55
+ "type": "git",
56
+ "url": "https://github.com/dao-xyz/peerbit"
57
+ },
58
+ "engines": {
59
+ "node": ">=18"
60
+ },
61
+ "browser": {
62
+ "./dist/src/transports.js": "./dist/src/transports.browser.js"
63
+ },
64
+ "dependencies": {
65
+ "@dao-xyz/borsh": "^5.2.3",
66
+ "@peerbit/any-store": "2.1.2-81d59ee",
67
+ "@peerbit/crypto": "2.3.2-81d59ee",
68
+ "@peerbit/logger": "1.0.3-81d59ee",
69
+ "@peerbit/program": "5.0.6-81d59ee",
70
+ "@peerbit/pubsub": "3.0.11-81d59ee",
71
+ "@peerbit/blocks": "2.1.6-81d59ee",
72
+ "@peerbit/indexer-simple": "1.1.1-81d59ee",
73
+ "@peerbit/indexer-sqlite3": "1.1.1-81d59ee",
74
+ "datastore-level": "^11.0.1",
75
+ "@chainsafe/libp2p-yamux": "^7.0.1",
76
+ "@libp2p/webrtc": "^5.0.14",
77
+ "@libp2p/websockets": "^9.0.9",
78
+ "@libp2p/identify": "^3.0.8",
79
+ "@libp2p/circuit-relay-v2": "^3.0.0",
80
+ "@libp2p/tcp": "^10.0.10",
81
+ "level": "^8.0.1",
82
+ "memory-level": "^1.0.0",
83
+ "path-browserify": "^1.0.1"
84
+ },
85
+ "devDependencies": {
86
+ "p-each-series": "^3.0.0",
87
+ "p-map-series": "^3.0.0",
88
+ "@types/path-browserify": "^1.0.2"
89
+ },
90
+ "scripts": {
91
+ "clean": "aegir clean",
92
+ "build": "aegir build --no-bundle",
93
+ "test": "aegir test -t node",
94
+ "lint": "aegir lint"
95
+ },
96
+ "localMaintainers": [
97
+ "dao.xyz"
98
+ ],
99
+ "keywords": [
100
+ "crdt",
101
+ "database",
102
+ "distributed",
103
+ "decentralised",
104
+ "distributed",
105
+ "ipfs",
106
+ "p2p",
107
+ "peer-to-peer"
108
+ ]
109
109
  }
@@ -6,7 +6,6 @@ import { all } from "@libp2p/websockets/filters";
6
6
  export const transports = () => [
7
7
  webSockets({ filter: all }),
8
8
  circuitRelayTransport({
9
- discoverRelays: 1,
10
9
  reservationCompletionTimeout: 5000,
11
10
  }),
12
11
  webRTC({}),
@@ -14,4 +13,7 @@ export const transports = () => [
14
13
 
15
14
  export const relay = () => undefined as any;
16
15
 
17
- export const listen: () => string[] | undefined = () => ["/webrtc"];
16
+ export const listen: () => string[] | undefined = () => [
17
+ "/webrtc",
18
+ "/p2p-circuit",
19
+ ];
package/src/transports.ts CHANGED
@@ -22,4 +22,5 @@ export const relay = () =>
22
22
  export const listen: () => string[] | undefined = () => [
23
23
  "/ip4/127.0.0.1/tcp/0",
24
24
  "/ip4/127.0.0.1/tcp/0/ws",
25
+ "/p2p-circuit",
25
26
  ];