@seedprotocol/gateway-hyper 0.7.4 → 0.7.5-next.871.g8788c94
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/README.md +13 -7
- package/package.json +17 -2
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @seedprotocol/gateway-hyper
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@seedprotocol/gateway-hyper)
|
|
4
|
+
|
|
3
5
|
Expose a local **seed-protocol-server + ar.io gateway** stack (via Traefik or direct upstream) to SDK users over **HyperDHT**.
|
|
4
6
|
|
|
5
7
|
Two client shapes:
|
|
@@ -7,15 +9,15 @@ Two client shapes:
|
|
|
7
9
|
- **Path A — Local sidecar:** `connectTunnel` → `http://127.0.0.1:1984` (local / Electron)
|
|
8
10
|
- **Path B — App-server proxy:** `createGatewayProxy` → mount on `/api/seed-gateway` (hosted web browsers)
|
|
9
11
|
|
|
10
|
-
See [docs/GATEWAY_HYPER.md](
|
|
12
|
+
See [docs/GATEWAY_HYPER.md](https://github.com/JournoLabs/seed-protocol-sdk/blob/main/docs/GATEWAY_HYPER.md) for operator and developer runbooks. Part of [Seed Protocol](https://seedprotocol.io); the client side is configured in [`@seedprotocol/sdk`](https://www.npmjs.com/package/@seedprotocol/sdk).
|
|
11
13
|
|
|
12
|
-
##
|
|
14
|
+
## Installation
|
|
13
15
|
|
|
14
16
|
```bash
|
|
15
|
-
|
|
17
|
+
npm install @seedprotocol/gateway-hyper
|
|
16
18
|
```
|
|
17
19
|
|
|
18
|
-
Requires Node 20+ and Holepunch native addons. Prefer Node over Bun.
|
|
20
|
+
Requires Node 20+ and Holepunch native addons. Prefer Node over Bun. Installs the `seed-gateway` CLI.
|
|
19
21
|
|
|
20
22
|
## CLI
|
|
21
23
|
|
|
@@ -24,7 +26,7 @@ Requires Node 20+ and Holepunch native addons. Prefer Node over Bun.
|
|
|
24
26
|
seed-gateway serve --upstream http://127.0.0.1:80 --key-file ./.seed/gateway-tunnel/operator.key.json
|
|
25
27
|
|
|
26
28
|
# Client sidecar (Path A)
|
|
27
|
-
seed-gateway connect <z32-key> --port 1984
|
|
29
|
+
seed-gateway connect <z32-key> --host 127.0.0.1 --port 1984
|
|
28
30
|
```
|
|
29
31
|
|
|
30
32
|
## Library
|
|
@@ -52,7 +54,7 @@ export const GET = (req: Request) => proxy.handleFetch(req)
|
|
|
52
54
|
export const POST = (req: Request) => proxy.handleFetch(req)
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
Web SDK config for Path B:
|
|
57
|
+
Web SDK config for Path B (`SeedConfig.gateway` in `@seedprotocol/sdk`):
|
|
56
58
|
|
|
57
59
|
```ts
|
|
58
60
|
gateway: {
|
|
@@ -66,4 +68,8 @@ Keep `SEED_GATEWAY_HYPER_KEY` on the server only. Authenticate / rate-limit the
|
|
|
66
68
|
## Tests
|
|
67
69
|
|
|
68
70
|
- Unit tests always run.
|
|
69
|
-
- DHT integration: `GATEWAY_HYPER_TESTS=1 bun run test`
|
|
71
|
+
- DHT integration: `GATEWAY_HYPER_TESTS=1 bun run test` (from a checkout of the monorepo)
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seedprotocol/gateway-hyper",
|
|
3
|
-
"version": "0.7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.7.5-next.871.g8788c94",
|
|
4
|
+
"description": "HyperDHT HTTP tunnel that exposes a Seed Protocol gateway and upload API through a local sidecar or app-server proxy",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"seed-protocol",
|
|
7
|
+
"hyperdht",
|
|
8
|
+
"holepunch",
|
|
9
|
+
"p2p",
|
|
10
|
+
"tunnel",
|
|
11
|
+
"gateway",
|
|
12
|
+
"arweave",
|
|
13
|
+
"cli"
|
|
14
|
+
],
|
|
5
15
|
"type": "module",
|
|
6
16
|
"main": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
7
18
|
"bin": {
|
|
8
19
|
"seed-gateway": "./dist/bin.js"
|
|
9
20
|
},
|
|
@@ -51,6 +62,10 @@
|
|
|
51
62
|
"url": "git+https://github.com/JournoLabs/seed-protocol-sdk.git",
|
|
52
63
|
"directory": "packages/gateway-hyper"
|
|
53
64
|
},
|
|
65
|
+
"homepage": "https://github.com/JournoLabs/seed-protocol-sdk/tree/main/packages/gateway-hyper#readme",
|
|
66
|
+
"bugs": {
|
|
67
|
+
"url": "https://github.com/JournoLabs/seed-protocol-sdk/issues"
|
|
68
|
+
},
|
|
54
69
|
"publishConfig": {
|
|
55
70
|
"access": "public"
|
|
56
71
|
}
|