| … | … | @@ -37,3 +37,153 @@ |
| 37 | 37 | [submodule "pear-docs"] |
| 38 | 38 | path = pear-docs |
| 39 | 39 | url = https://github.com/holepunchto/pear-docs.git |
| 40 | [submodule "repos/tier3/autopass"] | |
| 41 | path = repos/tier3/autopass | |
| 42 | url = https://github.com/holepunchto/autopass.git | |
| 43 | [submodule "repos/tier3/b4a"] | |
| 44 | path = repos/tier3/b4a | |
| 45 | url = https://github.com/holepunchto/b4a.git | |
| 46 | [submodule "repos/tier3/bare"] | |
| 47 | path = repos/tier3/bare | |
| 48 | url = https://github.com/holepunchto/bare.git | |
| 49 | [submodule "repos/tier3/bare-android"] | |
| 50 | path = repos/tier3/bare-android | |
| 51 | url = https://github.com/holepunchto/bare-android.git | |
| 52 | [submodule "repos/tier3/bare-expo"] | |
| 53 | path = repos/tier3/bare-expo | |
| 54 | url = https://github.com/holepunchto/bare-expo.git | |
| 55 | [submodule "repos/tier3/bare-fs"] | |
| 56 | path = repos/tier3/bare-fs | |
| 57 | url = https://github.com/holepunchto/bare-fs.git | |
| 58 | [submodule "repos/tier3/bare-ios"] | |
| 59 | path = repos/tier3/bare-ios | |
| 60 | url = https://github.com/holepunchto/bare-ios.git | |
| 61 | [submodule "repos/tier3/bare-kit"] | |
| 62 | path = repos/tier3/bare-kit | |
| 63 | url = https://github.com/holepunchto/bare-kit.git | |
| 64 | [submodule "repos/tier3/brittle"] | |
| 65 | path = repos/tier3/brittle | |
| 66 | url = https://github.com/holepunchto/brittle.git | |
| 67 | [submodule "repos/tier3/dht-rpc"] | |
| 68 | path = repos/tier3/dht-rpc | |
| 69 | url = https://github.com/holepunchto/dht-rpc.git | |
| 70 | [submodule "repos/tier3/drives"] | |
| 71 | path = repos/tier3/drives | |
| 72 | url = https://github.com/holepunchto/drives.git | |
| 73 | [submodule "repos/tier3/emoji-index"] | |
| 74 | path = repos/tier3/emoji-index | |
| 75 | url = https://github.com/holepunchto/emoji-index.git | |
| 76 | [submodule "repos/tier3/examples"] | |
| 77 | path = repos/tier3/examples | |
| 78 | url = https://github.com/holepunchto/examples.git | |
| 79 | [submodule "repos/tier3/filesharing-react-app-example"] | |
| 80 | path = repos/tier3/filesharing-react-app-example | |
| 81 | url = https://github.com/holepunchto/filesharing-react-app-example.git | |
| 82 | [submodule "repos/tier3/fs-native-extensions"] | |
| 83 | path = repos/tier3/fs-native-extensions | |
| 84 | url = https://github.com/holepunchto/fs-native-extensions.git | |
| 85 | [submodule "repos/tier3/hyperbeam"] | |
| 86 | path = repos/tier3/hyperbeam | |
| 87 | url = https://github.com/holepunchto/hyperbeam.git | |
| 88 | [submodule "repos/tier3/hyperblobs"] | |
| 89 | path = repos/tier3/hyperblobs | |
| 90 | url = https://github.com/holepunchto/hyperblobs.git | |
| 91 | [submodule "repos/tier3/hypercore-crypto"] | |
| 92 | path = repos/tier3/hypercore-crypto | |
| 93 | url = https://github.com/holepunchto/hypercore-crypto.git | |
| 94 | [submodule "repos/tier3/hyperdb"] | |
| 95 | path = repos/tier3/hyperdb | |
| 96 | url = https://github.com/holepunchto/hyperdb.git | |
| 97 | [submodule "repos/tier3/hyperdrive-next"] | |
| 98 | path = repos/tier3/hyperdrive-next | |
| 99 | url = https://github.com/holepunchto/hyperdrive-next.git | |
| 100 | [submodule "repos/tier3/hyperschema"] | |
| 101 | path = repos/tier3/hyperschema | |
| 102 | url = https://github.com/holepunchto/hyperschema.git | |
| 103 | [submodule "repos/tier3/hypershell"] | |
| 104 | path = repos/tier3/hypershell | |
| 105 | url = https://github.com/holepunchto/hypershell.git | |
| 106 | [submodule "repos/tier3/hyperssh"] | |
| 107 | path = repos/tier3/hyperssh | |
| 108 | url = https://github.com/holepunchto/hyperssh.git | |
| 109 | [submodule "repos/tier3/hyperswarm-dht-relay"] | |
| 110 | path = repos/tier3/hyperswarm-dht-relay | |
| 111 | url = https://github.com/holepunchto/hyperswarm-dht-relay.git | |
| 112 | [submodule "repos/tier3/hyperswarm-seeders"] | |
| 113 | path = repos/tier3/hyperswarm-seeders | |
| 114 | url = https://github.com/holepunchto/hyperswarm-seeders.git | |
| 115 | [submodule "repos/tier3/keet-identity-key"] | |
| 116 | path = repos/tier3/keet-identity-key | |
| 117 | url = https://github.com/holepunchto/keet-identity-key.git | |
| 118 | [submodule "repos/tier3/keet-mobile-releases"] | |
| 119 | path = repos/tier3/keet-mobile-releases | |
| 120 | url = https://github.com/holepunchto/keet-mobile-releases.git | |
| 121 | [submodule "repos/tier3/keypear"] | |
| 122 | path = repos/tier3/keypear | |
| 123 | url = https://github.com/holepunchto/keypear.git | |
| 124 | [submodule "repos/tier3/libjs"] | |
| 125 | path = repos/tier3/libjs | |
| 126 | url = https://github.com/holepunchto/libjs.git | |
| 127 | [submodule "repos/tier3/libqjs"] | |
| 128 | path = repos/tier3/libqjs | |
| 129 | url = https://github.com/holepunchto/libqjs.git | |
| 130 | [submodule "repos/tier3/libquickbit"] | |
| 131 | path = repos/tier3/libquickbit | |
| 132 | url = https://github.com/holepunchto/libquickbit.git | |
| 133 | [submodule "repos/tier3/libudx"] | |
| 134 | path = repos/tier3/libudx | |
| 135 | url = https://github.com/holepunchto/libudx.git | |
| 136 | [submodule "repos/tier3/mininet"] | |
| 137 | path = repos/tier3/mininet | |
| 138 | url = https://github.com/holepunchto/mininet.git | |
| 139 | [submodule "repos/tier3/noise-handshake"] | |
| 140 | path = repos/tier3/noise-handshake | |
| 141 | url = https://github.com/holepunchto/noise-handshake.git | |
| 142 | [submodule "repos/tier3/pear"] | |
| 143 | path = repos/tier3/pear | |
| 144 | url = https://github.com/holepunchto/pear.git | |
| 145 | [submodule "repos/tier3/pear-docs"] | |
| 146 | path = repos/tier3/pear-docs | |
| 147 | url = https://github.com/holepunchto/pear-docs.git | |
| 148 | [submodule "repos/tier3/pear-expo-hello-world"] | |
| 149 | path = repos/tier3/pear-expo-hello-world | |
| 150 | url = https://github.com/holepunchto/pear-expo-hello-world.git | |
| 151 | [submodule "repos/tier3/pearpass-example"] | |
| 152 | path = repos/tier3/pearpass-example | |
| 153 | url = https://github.com/holepunchto/pearpass-example.git | |
| 154 | [submodule "repos/tier3/pear-radio"] | |
| 155 | path = repos/tier3/pear-radio | |
| 156 | url = https://github.com/holepunchto/pear-radio.git | |
| 157 | [submodule "repos/tier3/react-native-bare-kit"] | |
| 158 | path = repos/tier3/react-native-bare-kit | |
| 159 | url = https://github.com/holepunchto/react-native-bare-kit.git | |
| 160 | [submodule "repos/tier3/ready-resource"] | |
| 161 | path = repos/tier3/ready-resource | |
| 162 | url = https://github.com/holepunchto/ready-resource.git | |
| 163 | [submodule "repos/tier3/repl-swarm"] | |
| 164 | path = repos/tier3/repl-swarm | |
| 165 | url = https://github.com/holepunchto/repl-swarm.git | |
| 166 | [submodule "repos/tier3/rocksdb-native"] | |
| 167 | path = repos/tier3/rocksdb-native | |
| 168 | url = https://github.com/holepunchto/rocksdb-native.git | |
| 169 | [submodule "repos/tier3/rpc"] | |
| 170 | path = repos/tier3/rpc | |
| 171 | url = https://github.com/holepunchto/rpc.git | |
| 172 | [submodule "repos/tier3/simple-seeder"] | |
| 173 | path = repos/tier3/simple-seeder | |
| 174 | url = https://github.com/holepunchto/simple-seeder.git | |
| 175 | [submodule "repos/tier3/sodium-native"] | |
| 176 | path = repos/tier3/sodium-native | |
| 177 | url = https://github.com/holepunchto/sodium-native.git | |
| 178 | [submodule "repos/tier3/sodium-universal"] | |
| 179 | path = repos/tier3/sodium-universal | |
| 180 | url = https://github.com/holepunchto/sodium-universal.git | |
| 181 | [submodule "repos/tier3/tiny-fs-native"] | |
| 182 | path = repos/tier3/tiny-fs-native | |
| 183 | url = https://github.com/holepunchto/tiny-fs-native.git | |
| 184 | [submodule "repos/tier3/tiny-http-native"] | |
| 185 | path = repos/tier3/tiny-http-native | |
| 186 | url = https://github.com/holepunchto/tiny-http-native.git | |
| 187 | [submodule "repos/tier3/udx-native"] | |
| 188 | path = repos/tier3/udx-native | |
| 189 | url = https://github.com/holepunchto/udx-native.git |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 59638a621f302e898c570275a3d0976657bb942d |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit f992b867a0ec251b029c5cca6b5eee71ee17a5a6 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit d2e3d3d985a3fe0c4505a2ba90df7765fc1ab890 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit af3c5b45ad1254775103500203f1b11adca9fc8a |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 484a2a43cd4e40f17972d2d47fdd83f85078c21f |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 98178ccb9426f43ad413d426ec3f87fed16ea8f7 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 12439b2b5598d0fe5f205f61fe5cac17f65187f9 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit a5b342bd255f54a522dd5ae99fe3ae0310d6afc4 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit d4fb2ec919c096b42345c1b5d3a02bf81616efe3 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit c78f054343c502bc0eada83a32e387a997438e3a |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 7c74285b9a5c5241ffb795c455b4933473640be6 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit b4b0947439b0c5904484ba48ba133b4829356d22 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 028f37d602bc51f44e2a6ca52b9a956733a89560 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 12c08e18b079740a2b96af348b3de40d81e8ea91 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit f2092aef6a5703934c7f7ba5bf57cd4b4537b6da |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit cbdf8b5a304f0cbd27c25abec843eb4ccfe0b6f4 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit efa5bdcc323ddc0c7b0235e5abfeb7196ff25ec5 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 4545e3f8d972b76b82f1e7347b5d800c5cbec642 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 84c5fa38897df8e2159aad6acc3d9493e22c2add |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit e2916611dc666f2b78c7632e5368dbbbeb14f18a |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 81184017689ff21dc833d1185e7f8f016d9f935d |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 17507ab5534021ad49583db62d981d46fd7af0ff |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit d8f9e2bd658ea9104880851f1bdf92b56bb79fdd |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 5036c4b09930228efe539a7787826fe379adb373 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 75afcdee11223bf654f5dd39473f6c901f9a0a7b |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit f02311afbeac10e73756539e809684349740631f |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 4a4fa106ea5eeb7d7cba5b772e888e743ea3b9fb |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit bb3974570759c47e00e3986a43e9c1a9e5bf9dc5 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 20eccc3022c3e79c66b43a3b8064eeae6b44e075 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 43985979f2d45b8fd981938de888b3e42f19cf5c |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 85de6aaed00684d0441628c6ab299d688c59d32b |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit fb414d0c7fcdd8ad3560b4e212cc05c5c94aaf0f |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 638441fb3f9d6ceca6c000a98d244a65eef17d7a |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit dc1f9c4398fa4335bbfdca5c4af25fdfdba86057 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit e1209543b4059491d80b39c58e3a9f7285a27699 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit facdea8fcb4031a75be363619b18b3360afa6a61 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit de81f2d4b3298394cf2430d696fec3bcbfee4076 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 928cf9fa25bee3c2acd35d932bfa714133345ffe |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit ad86e1b4e6ac680b471fad5b9546c91b459ae49f |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit d7c07f475a8f479b814d54736b5cf516f534f028 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 5009db6e91fe596067d1b355f7ca5a04be254d2c |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 78438911125b3bf19b249bdc97be4de1eda2ccdc |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit b2b8a9ec748a145b7efc26bb0d2c22b5f72ebe64 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit b5db372b8c8f17dc6a65d2c8cddd9e2366fecaba |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 9d976b6915abe4cb9313b07ffd40bdaa52aa5bc6 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit dfd13335d0b722ec4b149c9c96b4fe006befe1d8 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit e961a935f1f1dd2e6c5ef1f2b68a759e57ba2586 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 761903272e770f7cb6774f04bbcf14b2d0bfeb13 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 2174f9e438bdf88e9942d956d1c15c4c96f81bf4 |
| … | … | @@ -0,0 +1 @@ |
| 1 | Subproject commit 3d039a43133debfe91789918eb3eb9e820966c24 |
| … | … | @@ -0,0 +1,59 @@ |
| 1 | { | |
| 2 | "repo": "autopass", | |
| 3 | "timestamp": "2026-01-16T23:39:45.629Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "Autopass" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "AutopassPairer" | |
| 21 | }, | |
| 22 | { | |
| 23 | "name": "Autopass" | |
| 24 | }, | |
| 25 | { | |
| 26 | "name": "function" | |
| 27 | } | |
| 28 | ], | |
| 29 | "functions": [ | |
| 30 | { | |
| 31 | "name": "apply" | |
| 32 | }, | |
| 33 | { | |
| 34 | "name": "noop" | |
| 35 | } | |
| 36 | ] | |
| 37 | }, | |
| 38 | "readme": { | |
| 39 | "content": "# autopass\n\nDistributed notes/password manager\n\n```sh\nnpm install autopass\n```\n\n> [!NOTE]\n> Autopass needs Corestore 7, our latest major version that is backed by RocksDB for storage and atomicity.\n\n## Usage\n\nFirst choose if you wanna pair or make a new instance.\n\n```js\nimport Autopass from 'autopass'\nimport Corestore from 'corestore'\n\nconst pass = new Autopass(new Corestore('./pass'))\n\nconst inv = await pass.createInvite()\nconsole.log('share to add', inv)\n```\n\nThen invite another instance\n\n```js\nconst pair = Autopass.pair(new Corestore('./another-pass'), inv)\n\nconst anotherPass = await pair.finished()\nawait anotherPass.ready()\n```\n\nWhen paired you can simply start the instance again with the normal constructor.\n\n```js\nawait pass.add('a-note', 'hello this is a note')\n```\n\nThen on the other node you get it out with\n\n```js\nconst note = await pass.get('a-note')\nconsole.log({ note })\n```\n\n## API\n\n#### `pass = new Autopass(new Corestore(path))`\n\nMake a new pass instance.\n\n#### `pass.on('upd", | |
| 40 | "sections": [ | |
| 41 | "intro", | |
| 42 | "usage", | |
| 43 | "api", | |
| 44 | "contributors" | |
| 45 | ], | |
| 46 | "hasApi": true, | |
| 47 | "hasExamples": true, | |
| 48 | "exampleCount": 4, | |
| 49 | "examples": [ | |
| 50 | "> [!NOTE]\n> Autopass needs Corestore 7, our latest major version that is backed by RocksDB for storage and atomicity.\n\n## Usage\n\nFirst choose if you wanna pair or make a new instance.", | |
| 51 | "Then invite another instance", | |
| 52 | "When paired you can simply start the instance again with the normal constructor." | |
| 53 | ] | |
| 54 | }, | |
| 55 | "patterns": [ | |
| 56 | "append-only-log", | |
| 57 | "peer-discovery" | |
| 58 | ] | |
| 59 | } |
| … | … | @@ -64,11 +64,60 @@ const pass = new Autopass(new Corestore('./pass')) |
| 64 | 64 | |
| 65 | 65 | ## API Documentation |
| 66 | 66 | |
| 67 | _To be enriched in Phase 1B with deep code analysis_ | |
| 67 | _Extracted from README and code analysis_ | |
| 68 | ||
| 69 | ### Classes | |
| 70 | ||
| 71 | - `AutopassPairer` | |
| 72 | - `Autopass` | |
| 73 | - `function` | |
| 74 | ||
| 75 | ### Functions | |
| 76 | ||
| 77 | - `apply()` | |
| 78 | - `noop()` | |
| 79 | ||
| 80 | ### Exports | |
| 81 | ||
| 82 | - default: `Autopass` | |
| 83 | ||
| 84 | ||
| 85 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 86 | ||
| 68 | 87 | |
| 69 | 88 | ## Usage Examples |
| 70 | 89 | |
| 71 | _To be added in Phase 1B_ | |
| 90 | _Extracted from README_ | |
| 91 | ||
| 92 | ### Example 1 | |
| 93 | ||
| 94 | ```javascript | |
| 95 | > [!NOTE] | |
| 96 | > Autopass needs Corestore 7, our latest major version that is backed by RocksDB for storage and atomicity. | |
| 97 | ||
| 98 | ## Usage | |
| 99 | ||
| 100 | First choose if you wanna pair or make a new instance. | |
| 101 | ``` | |
| 102 | ||
| 103 | ### Example 2 | |
| 104 | ||
| 105 | ```javascript | |
| 106 | Then invite another instance | |
| 107 | ``` | |
| 108 | ||
| 109 | ### Example 3 | |
| 110 | ||
| 111 | ```javascript | |
| 112 | When paired you can simply start the instance again with the normal constructor. | |
| 113 | ``` | |
| 114 | ||
| 115 | ||
| 116 | ||
| 117 | ## P2P Patterns | |
| 118 | ||
| 119 | - append-only-log | |
| 120 | - peer-discovery | |
| 72 | 121 | |
| 73 | 122 | ## Semantic Type |
| 74 | 123 |
| … | … | @@ -0,0 +1,24 @@ |
| 1 | { | |
| 2 | "repo": "bare-android", | |
| 3 | "timestamp": "2026-01-16T23:39:53.759Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": {} | |
| 7 | }, | |
| 8 | "api": {}, | |
| 9 | "readme": { | |
| 10 | "content": "# Bare on Android\n\nExample of embedding Bare in an Android application using <https://github.com/holepunchto/bare-kit>.\n\n## Building\n\nTo keep the build process fast and efficient, the project relies on a Bare Kit prebuild being available in the [`app/libs/`](app/libs) directory. Prior to building the project, you must therefore either clone and compile Bare Kit from source, or download the latest prebuild from GitHub. The latter is easily accomplished using the [GitHub CLI](https://cli.github.com):\n\n```console\ngh release download --repo holepunchto/bare-kit <version>\n```\n\nUnpack the resulting `prebuilds.zip` archive and move `android/bare-kit` into [`app/libs/`](app/libs). When finished, either open the project in Android Studio or build it from the commandline:\n\n```console\ngradle build\n```\n\n### Addons\n\nNative addons will be linked into [`app/src/main/addons/`](app/src/main/addons) as part of the build process and will be automatically included in the final APK bundle by Gradle.\n\n## Li", | |
| 11 | "sections": [ | |
| 12 | "intro", | |
| 13 | "building", | |
| 14 | "license" | |
| 15 | ], | |
| 16 | "hasApi": false, | |
| 17 | "hasExamples": true, | |
| 18 | "exampleCount": 1, | |
| 19 | "examples": [ | |
| 20 | "Unpack the resulting `prebuilds.zip` archive and move `android/bare-kit` into [`app/libs/`](app/libs). When finished, either open the project in Android Studio or build it from the commandline:" | |
| 21 | ] | |
| 22 | }, | |
| 23 | "patterns": [] | |
| 24 | } |
| … | … | @@ -43,11 +43,23 @@ gradle build |
| 43 | 43 | |
| 44 | 44 | ## API Documentation |
| 45 | 45 | |
| 46 | _To be enriched in Phase 1B with deep code analysis_ | |
| 46 | _Extracted from code analysis_ | |
| 47 | ||
| 48 | ||
| 49 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 50 | ||
| 47 | 51 | |
| 48 | 52 | ## Usage Examples |
| 49 | 53 | |
| 50 | _To be added in Phase 1B_ | |
| 54 | _Extracted from README_ | |
| 55 | ||
| 56 | ### Example 1 | |
| 57 | ||
| 58 | ```javascript | |
| 59 | Unpack the resulting `prebuilds.zip` archive and move `android/bare-kit` into [`app/libs/`](app/libs). When finished, either open the project in Android Studio or build it from the commandline: | |
| 60 | ``` | |
| 61 | ||
| 62 | ||
| 51 | 63 | |
| 52 | 64 | ## Semantic Type |
| 53 | 65 |
| … | … | @@ -0,0 +1,27 @@ |
| 1 | { | |
| 2 | "repo": "bare-expo", | |
| 3 | "timestamp": "2026-01-16T23:39:44.501Z", | |
| 4 | "entryPoint": "expo-router/entry", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "expo-router/entry" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": {}, | |
| 11 | "readme": { | |
| 12 | "content": "# Bare on Expo\n\nExample of embedding Bare in an Expo application using <https://github.com/holepunchto/react-native-bare-kit>.\n\n## Usage\n\nStart by installing the dependencies:\n\n```sh\nnpm install\n```\n\nWhen finished, you can run the app on either iOS or Android.\n\n### iOS\n\n```sh\nnpm run ios\n```\n\n### Android\n\n```sh\nnpm run android\n```\n\n## License\n\nApache-2.0\n", | |
| 13 | "sections": [ | |
| 14 | "intro", | |
| 15 | "usage", | |
| 16 | "license" | |
| 17 | ], | |
| 18 | "hasApi": true, | |
| 19 | "hasExamples": true, | |
| 20 | "exampleCount": 2, | |
| 21 | "examples": [ | |
| 22 | "When finished, you can run the app on either iOS or Android.\n\n### iOS", | |
| 23 | "### Android" | |
| 24 | ] | |
| 25 | }, | |
| 26 | "patterns": [] | |
| 27 | } |
| … | … | @@ -63,11 +63,31 @@ npm run ios |
| 63 | 63 | |
| 64 | 64 | ## API Documentation |
| 65 | 65 | |
| 66 | _To be enriched in Phase 1B with deep code analysis_ | |
| 66 | _Extracted from README and code analysis_ | |
| 67 | ||
| 68 | ||
| 69 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 70 | ||
| 67 | 71 | |
| 68 | 72 | ## Usage Examples |
| 69 | 73 | |
| 70 | _To be added in Phase 1B_ | |
| 74 | _Extracted from README_ | |
| 75 | ||
| 76 | ### Example 1 | |
| 77 | ||
| 78 | ```javascript | |
| 79 | When finished, you can run the app on either iOS or Android. | |
| 80 | ||
| 81 | ### iOS | |
| 82 | ``` | |
| 83 | ||
| 84 | ### Example 2 | |
| 85 | ||
| 86 | ```javascript | |
| 87 | ### Android | |
| 88 | ``` | |
| 89 | ||
| 90 | ||
| 71 | 91 | |
| 72 | 92 | ## Semantic Type |
| 73 | 93 |
| … | … | @@ -0,0 +1,26 @@ |
| 1 | { | |
| 2 | "repo": "bare-ios", | |
| 3 | "timestamp": "2026-01-16T23:39:56.178Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": {} | |
| 7 | }, | |
| 8 | "api": {}, | |
| 9 | "readme": { | |
| 10 | "content": "# Bare on iOS\n\nExample of embedding Bare in an iOS application using <https://github.com/holepunchto/bare-kit>.\n\n## Building\n\nTo keep the build process fast and efficient, the project relies on a Bare Kit prebuild being available in the [`app/frameworks/`](app/frameworks) directory. Prior to building the project, you must therefore either clone and compile Bare Kit from source, or download the latest prebuild from GitHub. The latter is easily accomplished using the [GitHub CLI](https://cli.github.com):\n\n```console\ngh release download --repo holepunchto/bare-kit <version>\n```\n\nUnpack the resulting `prebuilds.zip` archive and move `ios/BareKit.xcframework` into [`app/frameworks/`](app/frameworks). When finished, generate the Xcode project files using <https://github.com/yonaskolb/XcodeGen>:\n\n```console\nxcodegen generate\n```\n\nThen, either open the project in Xcode or build it from the commandline:\n\n```console\nxcodebuild -scheme App build\n```\n\n### Addons\n\nNative addons will be linked into ", | |
| 11 | "sections": [ | |
| 12 | "intro", | |
| 13 | "building", | |
| 14 | "license" | |
| 15 | ], | |
| 16 | "hasApi": false, | |
| 17 | "hasExamples": true, | |
| 18 | "exampleCount": 4, | |
| 19 | "examples": [ | |
| 20 | "Unpack the resulting `prebuilds.zip` archive and move `ios/BareKit.xcframework` into [`app/frameworks/`](app/frameworks). When finished, generate the Xcode project files using <https://github.com/yonaskolb/XcodeGen>:", | |
| 21 | "Then, either open the project in Xcode or build it from the commandline:", | |
| 22 | "### Addons\n\nNative addons will be linked into [`app/addons/`](app/addons) as part of the build process and must be referenced in [`app/addons/addons.yml`](app/addons/addons.yml) to ensure that Xcode copies them to the final app bundle. After installing `bare-addon` v1.2.3, for example, do:" | |
| 23 | ] | |
| 24 | }, | |
| 25 | "patterns": [] | |
| 26 | } |
| … | … | @@ -43,11 +43,37 @@ Then, either open the project in Xcode or build it from the commandline: |
| 43 | 43 | |
| 44 | 44 | ## API Documentation |
| 45 | 45 | |
| 46 | _To be enriched in Phase 1B with deep code analysis_ | |
| 46 | _Extracted from code analysis_ | |
| 47 | ||
| 48 | ||
| 49 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 50 | ||
| 47 | 51 | |
| 48 | 52 | ## Usage Examples |
| 49 | 53 | |
| 50 | _To be added in Phase 1B_ | |
| 54 | _Extracted from README_ | |
| 55 | ||
| 56 | ### Example 1 | |
| 57 | ||
| 58 | ```javascript | |
| 59 | Unpack the resulting `prebuilds.zip` archive and move `ios/BareKit.xcframework` into [`app/frameworks/`](app/frameworks). When finished, generate the Xcode project files using <https://github.com/yonaskolb/XcodeGen>: | |
| 60 | ``` | |
| 61 | ||
| 62 | ### Example 2 | |
| 63 | ||
| 64 | ```javascript | |
| 65 | Then, either open the project in Xcode or build it from the commandline: | |
| 66 | ``` | |
| 67 | ||
| 68 | ### Example 3 | |
| 69 | ||
| 70 | ```javascript | |
| 71 | ### Addons | |
| 72 | ||
| 73 | Native addons will be linked into [`app/addons/`](app/addons) as part of the build process and must be referenced in [`app/addons/addons.yml`](app/addons/addons.yml) to ensure that Xcode copies them to the final app bundle. After installing `bare-addon` v1.2.3, for example, do: | |
| 74 | ``` | |
| 75 | ||
| 76 | ||
| 51 | 77 | |
| 52 | 78 | ## Semantic Type |
| 53 | 79 |
| … | … | @@ -0,0 +1,28 @@ |
| 1 | { | |
| 2 | "repo": "bare-kit", | |
| 3 | "timestamp": "2026-01-16T23:39:43.316Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": {} | |
| 7 | }, | |
| 8 | "api": {}, | |
| 9 | "readme": { | |
| 10 | "content": "# bare-kit\n\nBare for native application development. The kit provides a web worker-like API to start and manage isolated Bare threads, called worklets[^1], that expose an IPC abstraction with bindings for various languages.\n\n[^1]: This term was chosen to avoid ambiguity with worker threads as implemented by <https://github.com/holepunchto/bare-worker>.\n\n## Worklet\n\nIn this section, we will learn how to create a worklet both iOS and Android.\n\n### iOS\n\nThis is a basic example of how to create a worklet in Objective-C:\n\n```objc\n#import <BareKit/BareKit.h>\n#import <Foundation/Foundation.h>\n\nint\nmain() {\n BareWorkletConfiguration *options = [BareWorkletConfiguration defaultWorkletConfiguration];\n options.memoryLimit = 1024 * 1024 * 24; // 24 MiB\n\n BareWorklet *worklet = [[BareWorklet alloc] initWithConfiguration:options];\n\n NSString *source = @\"console.log('hello from the worklet')\";\n\n [worklet start:@\"/app.js\" source:[source dataUsingEncoding:NSUTF8StringEncoding] arguments:@[]];\n\n [", | |
| 11 | "sections": [ | |
| 12 | "intro", | |
| 13 | "worklet", | |
| 14 | "ipc", | |
| 15 | "notifications", | |
| 16 | "license" | |
| 17 | ], | |
| 18 | "hasApi": false, | |
| 19 | "hasExamples": true, | |
| 20 | "exampleCount": 14, | |
| 21 | "examples": [ | |
| 22 | "You can create a `BareWorkletConfiguration` to optionally set the memory limit or attach assets. This step is optional.\n\nThe configuration is then passed to the `BareWorklet`, which represents the running worklet instance.\n\nAvailable actions on a worklet include:\n\n- `[worklet start]`: starts the worklet\n- `[worklet suspend]`: suspends the execution of the worklet\n- `[worklet suspendWithLinger]`: suspends the worklet for a specified duration; the linger integer (in milliseconds) defines how long to keep the process alive before it fully exits\n- `[worklet resume]`: resumes a suspended worklet\n- `[worklet terminate]`: terminates the worklet\n\n> [!TIP]\n> For a full API reference, see [`apple/BareKit/BareKit.h`](apple/BareKit/BareKit.h).\n\n### Android\n\nThis is a basic example of how to create a worklet in Java:", | |
| 23 | "You can create a `Worklet.Options` to optionally set the memory limit or attach assets. This step is optional.\n\nThe configuration is then passed to the `Worklet`, which represents the running worklet instance.\n\nAvailable actions on a worklet include:\n\n- `worklet.start()`: starts the worklet\n- `worklet.suspend()`: suspends the execution of the worklet\n- `worklet.suspend(linger)`: suspends the worklet for a specified duration; the linger integer (in milliseconds) defines how long to keep the process alive before it fully exits\n- `worklet.resume()`: resumes a suspended worklet\n- `worklet.terminate()`: terminates the worklet\n\n> [!TIP]\n> For a full API reference, see [`android/src/main/java/to/holepunch/bare/kit/Worklet.java`](android/src/main/java/to/holepunch/bare/kit/Worklet.java).\n\n## IPC\n\nBare Kit provides an IPC (Inter-Process Communication) abstraction that allows communication between the main application and worklets. The IPC interface provides both synchronous and asynchronous read/write operations with callback-based event handling.\n\n> [!IMPORTANT]\n> IPC operations are **non-blocking** regardless of whether you use synchronous or asynchronous APIs. They may return partial results (e.g., writing fewer bytes than requested) and require polling to complete the operation.\n\n### iOS\n\n#### Polling IPC\n\nThe `BareIPC` class provides these methods for polling IPC:\n\n- `ipc.readable`: callback property for when data is available to read\n- `ipc.writable`: callback property for when data can be written\n- `[ipc read]`: synchronously reads available data, returns `nil` if no data is available\n- `[ipc write:data]`: synchronously writes data, returns the number of bytes written", | |
| 24 | "> [!NOTE]\n> On iOS, IPC callbacks run on a dedicated queue, so callers must be mindful of synchronization when accessing shared resources from these callbacks.\n\n#### Async IPC\n\nThe `BareIPC` class provides these methods for async IPC:\n\n- `[ipc read:completion]`: asynchronously reads data with a completion callback\n- `[ipc write:data completion:]`: asynchronously writes data with a completion callback" | |
| 25 | ] | |
| 26 | }, | |
| 27 | "patterns": [] | |
| 28 | } |
| … | … | @@ -59,11 +59,91 @@ main() { |
| 59 | 59 | |
| 60 | 60 | ## API Documentation |
| 61 | 61 | |
| 62 | _To be enriched in Phase 1B with deep code analysis_ | |
| 62 | _Extracted from code analysis_ | |
| 63 | ||
| 64 | ||
| 65 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 66 | ||
| 63 | 67 | |
| 64 | 68 | ## Usage Examples |
| 65 | 69 | |
| 66 | _To be added in Phase 1B_ | |
| 70 | _Extracted from README_ | |
| 71 | ||
| 72 | ### Example 1 | |
| 73 | ||
| 74 | ```javascript | |
| 75 | You can create a `BareWorkletConfiguration` to optionally set the memory limit or attach assets. This step is optional. | |
| 76 | ||
| 77 | The configuration is then passed to the `BareWorklet`, which represents the running worklet instance. | |
| 78 | ||
| 79 | Available actions on a worklet include: | |
| 80 | ||
| 81 | - `[worklet start]`: starts the worklet | |
| 82 | - `[worklet suspend]`: suspends the execution of the worklet | |
| 83 | - `[worklet suspendWithLinger]`: suspends the worklet for a specified duration; the linger integer (in milliseconds) defines how long to keep the process alive before it fully exits | |
| 84 | - `[worklet resume]`: resumes a suspended worklet | |
| 85 | - `[worklet terminate]`: terminates the worklet | |
| 86 | ||
| 87 | > [!TIP] | |
| 88 | > For a full API reference, see [`apple/BareKit/BareKit.h`](apple/BareKit/BareKit.h). | |
| 89 | ||
| 90 | ### Android | |
| 91 | ||
| 92 | This is a basic example of how to create a worklet in Java: | |
| 93 | ``` | |
| 94 | ||
| 95 | ### Example 2 | |
| 96 | ||
| 97 | ```javascript | |
| 98 | You can create a `Worklet.Options` to optionally set the memory limit or attach assets. This step is optional. | |
| 99 | ||
| 100 | The configuration is then passed to the `Worklet`, which represents the running worklet instance. | |
| 101 | ||
| 102 | Available actions on a worklet include: | |
| 103 | ||
| 104 | - `worklet.start()`: starts the worklet | |
| 105 | - `worklet.suspend()`: suspends the execution of the worklet | |
| 106 | - `worklet.suspend(linger)`: suspends the worklet for a specified duration; the linger integer (in milliseconds) defines how long to keep the process alive before it fully exits | |
| 107 | - `worklet.resume()`: resumes a suspended worklet | |
| 108 | - `worklet.terminate()`: terminates the worklet | |
| 109 | ||
| 110 | > [!TIP] | |
| 111 | > For a full API reference, see [`android/src/main/java/to/holepunch/bare/kit/Worklet.java`](android/src/main/java/to/holepunch/bare/kit/Worklet.java). | |
| 112 | ||
| 113 | ## IPC | |
| 114 | ||
| 115 | Bare Kit provides an IPC (Inter-Process Communication) abstraction that allows communication between the main application and worklets. The IPC interface provides both synchronous and asynchronous read/write operations with callback-based event handling. | |
| 116 | ||
| 117 | > [!IMPORTANT] | |
| 118 | > IPC operations are **non-blocking** regardless of whether you use synchronous or asynchronous APIs. They may return partial results (e.g., writing fewer bytes than requested) and require polling to complete the operation. | |
| 119 | ||
| 120 | ### iOS | |
| 121 | ||
| 122 | #### Polling IPC | |
| 123 | ||
| 124 | The `BareIPC` class provides these methods for polling IPC: | |
| 125 | ||
| 126 | - `ipc.readable`: callback property for when data is available to read | |
| 127 | - `ipc.writable`: callback property for when data can be written | |
| 128 | - `[ipc read]`: synchronously reads available data, returns `nil` if no data is available | |
| 129 | - `[ipc write:data]`: synchronously writes data, returns the number of bytes written | |
| 130 | ``` | |
| 131 | ||
| 132 | ### Example 3 | |
| 133 | ||
| 134 | ```javascript | |
| 135 | > [!NOTE] | |
| 136 | > On iOS, IPC callbacks run on a dedicated queue, so callers must be mindful of synchronization when accessing shared resources from these callbacks. | |
| 137 | ||
| 138 | #### Async IPC | |
| 139 | ||
| 140 | The `BareIPC` class provides these methods for async IPC: | |
| 141 | ||
| 142 | - `[ipc read:completion]`: asynchronously reads data with a completion callback | |
| 143 | - `[ipc write:data completion:]`: asynchronously writes data with a completion callback | |
| 144 | ``` | |
| 145 | ||
| 146 | ||
| 67 | 147 | |
| 68 | 148 | ## Semantic Type |
| 69 | 149 |
| … | … | @@ -0,0 +1,31 @@ |
| 1 | { | |
| 2 | "repo": "bare", | |
| 3 | "timestamp": "2026-01-16T23:39:31.180Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": {} | |
| 7 | }, | |
| 8 | "api": {}, | |
| 9 | "readme": { | |
| 10 | "content": "<h1>\n <picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"./media/logo-light.svg\">\n <img alt=\"Bare\" src=\"./media/logo-dark.svg\" height=\"80\">\n </picture>\n</h1>\n\nSmall and modular JavaScript runtime for desktop and mobile. Like Node.js, it provides an asynchronous, event-driven architecture for writing applications in the lingua franca of modern software. Unlike Node.js, it makes embedding and cross-device support core use cases, aiming to run just as well on your phone as on your laptop. The result is a runtime ideal for networked, peer-to-peer applications that can run on a wide selection of hardware.\n\n```sh\nnpm i -g bare\n```\n\n## Usage\n\n```console\nbare [flags] <filename> [...args]\n\nEvaluate a script or start a REPL session if no script is provided.\n\nArguments:\n <filename> The name of a script to evaluate\n [...args] Additional arguments made available to the script\n\nFlags:\n --version|-v Print the Bare version\n --eval|-e <script> ", | |
| 11 | "sections": [ | |
| 12 | "intro", | |
| 13 | "usage", | |
| 14 | "architecture", | |
| 15 | "api", | |
| 16 | "building", | |
| 17 | "platform support", | |
| 18 | "modules", | |
| 19 | "license" | |
| 20 | ], | |
| 21 | "hasApi": true, | |
| 22 | "hasExamples": true, | |
| 23 | "exampleCount": 9, | |
| 24 | "examples": [ | |
| 25 | "## Usage", | |
| 26 | "The specified `<script>` or `<filename>` is run using `Module.load()`. For more information on the module system and the supported formats, see <https://github.com/holepunchto/bare-module>.\n\n## Architecture\n\nBare is built on top of <https://github.com/holepunchto/libjs>, which provides low-level bindings to V8 in an engine independent manner, and <https://github.com/libuv/libuv>, which provides an asynchronous I/O event loop. Bare itself only adds a few missing pieces on top to support a wider ecosystem of modules:\n\n1. A module system supporting both CJS and ESM with bidirectional interoperability between the two.\n2. A native addon system supporting both statically and dynamically linked addons.\n3. Light-weight thread support with synchronous joins and shared array buffer support.\n\nEverything else if left to userland modules to implement using these primitives, keeping the runtime itself succinct and _bare_. By abstracting over both the underlying JavaScript engine using `libjs` and platform I/O operations using `libuv`, Bare allows module authors to implement native addons that can run on any JavaScript engine that implements the `libjs` ABI and any system that `libuv` supports.\n\n## API\n\n### `Bare`\n\nThe core JavaScript API of Bare is available through the global `Bare` namespace.\n\n#### `Bare.platform`\n\nThe identifier of the operating system for which Bare was compiled. The possible values are `android`, `darwin`, `ios`, `linux`, and `win32`.\n\n#### `Bare.arch`\n\nThe identifier of the processor architecture for which Bare was compiled. The possible values are `arm`, `arm64`, `ia32`, `mips`, `mipsel`, and `x64`.\n\n#### `Bare.argv`\n\nThe command line arguments passed to the process when launched.\n\n#### `Bare.pid`\n\nThe ID of the current process.\n\n#### `Bare.exitCode`\n\nThe code that will be returned once the process exits. If the process is exited using `Bare.exit()` without specifying a code, `Bare.exitCode` is used.\n\n#### `Bare.version`\n\nThe Bare version string.\n\n#### `Bare.versions`\n\nAn object containing the version strings of Bare and its dependencies.\n\n#### `Bare.exit([code])`\n\nImmediately terminate the process or current thread with an exit status of `code` which defaults to `Bare.exitCode`.\n\n#### `Bare.suspend([linger])`\n\nSuspend the process and all threads. This will emit a `suspend` event signalling that all work should stop immediately. When all work has stopped and the process would otherwise exit, an `idle` event will be emitted. If the process is not resumed from an `idle` event listener, the loop will block until the process is resumed.\n\n#### `Bare.wakeup([deadline])`\n\nWake the process and all threads during suspension. This will emit a `wakeup` event signalling that work may be performed until `deadline` is reached.\n\n#### `Bare.idle()`\n\nImmediately suspend the event loop and trigger the `idle` event.\n\n#### `Bare.resume()`\n\nResume the process and all threads after suspension. This can be used to cancel suspension after the `suspend` event has been emitted and up until all `idle` event listeners have run.\n\n#### `Bare.on('uncaughtException', err)`\n\nEmitted when a JavaScript exception is thrown within an execution context without being caught by any exception handlers within that execution context. By default, uncaught exceptions are printed to `stderr` and the processes aborted. Adding an event listener for the `uncaughtException` event overrides the default behavior.\n\n#### `Bare.on('unhandledRejection', reason, promise)`\n\nEmitted when a JavaScript promise is rejected within an execution context without that rejection being handled within that execution context. By default, unhandled rejections are printed to `stderr` and the process aborted. Adding an event listener for the `unhandledRejection` event overrides the default behavior.\n\n#### `Bare.on('beforeExit', code)`\n\nEmitted when the loop runs out of work and before the process or current thread exits. This provides a chance to schedule additional work and keep the process from exiting. If additional work is scheduled, `beforeExit` will be emitted again once the loop runs out of work.\n\nIf the process is exited explicitly, such as by calling `Bare.exit()` or as the result of an uncaught exception, the `beforeExit` event will not be emitted.\n\n#### `Bare.on('exit', code)`\n\nEmitted when the process or current thread exits. If the process is forcefully terminated from an `exit` event listener, the remaining listeners will not run.\n\n> [!CAUTION] \n> Additional work **MUST NOT** be scheduled from an `exit` event listener.\n\n#### `Bare.on('suspend', linger)`\n\nEmitted when the process or current thread is suspended. Any in-progress or outstanding work, such as network activity or file system access, should be deferred, cancelled, or paused when the `suspend` event is emitted and no additional work should be scheduled. A `suspend` event listener may call `Bare.resume()` to cancel the suspension.\n\n#### `Bare.on('wakeup', deadline)`\n\nEmitted when the process or current thread wakes up during suspension. Once the process becomes idle, or if the process is not idle by the time `deadline` has passed, the process will suspend itself again and an `idle` event be emitted. A `wakeup` event listener may call `Bare.resume()` to resume the process.\n\n#### `Bare.on('idle')`\n\nEmitted when the process or current thread becomes idle after suspension. After all handlers have run, the event loop will block and no additional work be performed until the process is resumed. An `idle` event listener may call `Bare.resume()` to cancel the suspension.\n\n#### `Bare.on('resume')`\n\nEmitted when the process or current thread resumes after suspension. Deferred and paused work should be continued when the `resume` event is emitted and new work may again be scheduled.\n\n### Lifecycle", | |
| 27 | "### `Bare.Addon`\n\nThe `Bare.Addon` namespace provides support for loading native addons, which are typically written in C/C++ and distributed as shared libraries.\n\n> [!NOTE] \n> This is an advanced API that users should never have to interact with directly.\n\n#### `Addon.cache`\n\nThe global cache of loaded addons.\n\n#### `Addon.host`\n\nThe target triplet identifying the current addon host.\n\n#### `const url = Addon.resolve(specifier, parentURL[, options])`\n\nResolve a native addon specifier by searching for a static native addon or dynamic object library matching `specifier` imported from `parentURL`.\n\nOptions are reserved.\n\n#### `const addon = Addon.load(url[, options])`\n\nLoad a static or dynamic native addon identified by `url`. If `url` is not a static native addon, Bare will instead look for a matching dynamic object library.\n\nOptions are reserved.\n\n#### `addon.url`\n\nThe WHATWG `URL` identifier of the addon.\n\n#### `addon.exports`\n\nThe exports of the addon.\n\n### `Bare.Thread`\n\nThe `Bare.Thread` namespace provides support for lightweight threads. Threads are similar to workers in Node.js, but provide only minimal API surface for creating and joining threads.\n\n> [!NOTE] \n> This is an advanced API that users should never have to interact with directly.\n\n#### `Thread.isMainThread`\n\n`true` if the current thread is the main thread.\n\n#### `Thread.self`\n\nA reference to the current thread as a `ThreadProxy` object. Will be `null` on the main thread.\n\n#### `Thread.self.data`\n\nThe data that was passed to the current thread on creation. Will be `null` if no data was passed.\n\n#### `const thread = new Thread([filename][, options][, callback])`\n\nStart a new thread that will run the contents of `filename`. If `callback` is provided, its function body will be treated as the contents of `filename` and invoked on the new thread with `Thread.self.data` passed as an argument.\n\nOptions include:" | |
| 28 | ] | |
| 29 | }, | |
| 30 | "patterns": [] | |
| 31 | } |
| … | … | @@ -64,11 +64,196 @@ Evaluate a script or start a REPL session if no script is provided. |
| 64 | 64 | |
| 65 | 65 | ## API Documentation |
| 66 | 66 | |
| 67 | _To be enriched in Phase 1B with deep code analysis_ | |
| 67 | _Extracted from README and code analysis_ | |
| 68 | ||
| 69 | ||
| 70 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 71 | ||
| 68 | 72 | |
| 69 | 73 | ## Usage Examples |
| 70 | 74 | |
| 71 | _To be added in Phase 1B_ | |
| 75 | _Extracted from README_ | |
| 76 | ||
| 77 | ### Example 1 | |
| 78 | ||
| 79 | ```javascript | |
| 80 | ## Usage | |
| 81 | ``` | |
| 82 | ||
| 83 | ### Example 2 | |
| 84 | ||
| 85 | ```javascript | |
| 86 | The specified `<script>` or `<filename>` is run using `Module.load()`. For more information on the module system and the supported formats, see <https://github.com/holepunchto/bare-module>. | |
| 87 | ||
| 88 | ## Architecture | |
| 89 | ||
| 90 | Bare is built on top of <https://github.com/holepunchto/libjs>, which provides low-level bindings to V8 in an engine independent manner, and <https://github.com/libuv/libuv>, which provides an asynchronous I/O event loop. Bare itself only adds a few missing pieces on top to support a wider ecosystem of modules: | |
| 91 | ||
| 92 | 1. A module system supporting both CJS and ESM with bidirectional interoperability between the two. | |
| 93 | 2. A native addon system supporting both statically and dynamically linked addons. | |
| 94 | 3. Light-weight thread support with synchronous joins and shared array buffer support. | |
| 95 | ||
| 96 | Everything else if left to userland modules to implement using these primitives, keeping the runtime itself succinct and _bare_. By abstracting over both the underlying JavaScript engine using `libjs` and platform I/O operations using `libuv`, Bare allows module authors to implement native addons that can run on any JavaScript engine that implements the `libjs` ABI and any system that `libuv` supports. | |
| 97 | ||
| 98 | ## API | |
| 99 | ||
| 100 | ### `Bare` | |
| 101 | ||
| 102 | The core JavaScript API of Bare is available through the global `Bare` namespace. | |
| 103 | ||
| 104 | #### `Bare.platform` | |
| 105 | ||
| 106 | The identifier of the operating system for which Bare was compiled. The possible values are `android`, `darwin`, `ios`, `linux`, and `win32`. | |
| 107 | ||
| 108 | #### `Bare.arch` | |
| 109 | ||
| 110 | The identifier of the processor architecture for which Bare was compiled. The possible values are `arm`, `arm64`, `ia32`, `mips`, `mipsel`, and `x64`. | |
| 111 | ||
| 112 | #### `Bare.argv` | |
| 113 | ||
| 114 | The command line arguments passed to the process when launched. | |
| 115 | ||
| 116 | #### `Bare.pid` | |
| 117 | ||
| 118 | The ID of the current process. | |
| 119 | ||
| 120 | #### `Bare.exitCode` | |
| 121 | ||
| 122 | The code that will be returned once the process exits. If the process is exited using `Bare.exit()` without specifying a code, `Bare.exitCode` is used. | |
| 123 | ||
| 124 | #### `Bare.version` | |
| 125 | ||
| 126 | The Bare version string. | |
| 127 | ||
| 128 | #### `Bare.versions` | |
| 129 | ||
| 130 | An object containing the version strings of Bare and its dependencies. | |
| 131 | ||
| 132 | #### `Bare.exit([code])` | |
| 133 | ||
| 134 | Immediately terminate the process or current thread with an exit status of `code` which defaults to `Bare.exitCode`. | |
| 135 | ||
| 136 | #### `Bare.suspend([linger])` | |
| 137 | ||
| 138 | Suspend the process and all threads. This will emit a `suspend` event signalling that all work should stop immediately. When all work has stopped and the process would otherwise exit, an `idle` event will be emitted. If the process is not resumed from an `idle` event listener, the loop will block until the process is resumed. | |
| 139 | ||
| 140 | #### `Bare.wakeup([deadline])` | |
| 141 | ||
| 142 | Wake the process and all threads during suspension. This will emit a `wakeup` event signalling that work may be performed until `deadline` is reached. | |
| 143 | ||
| 144 | #### `Bare.idle()` | |
| 145 | ||
| 146 | Immediately suspend the event loop and trigger the `idle` event. | |
| 147 | ||
| 148 | #### `Bare.resume()` | |
| 149 | ||
| 150 | Resume the process and all threads after suspension. This can be used to cancel suspension after the `suspend` event has been emitted and up until all `idle` event listeners have run. | |
| 151 | ||
| 152 | #### `Bare.on('uncaughtException', err)` | |
| 153 | ||
| 154 | Emitted when a JavaScript exception is thrown within an execution context without being caught by any exception handlers within that execution context. By default, uncaught exceptions are printed to `stderr` and the processes aborted. Adding an event listener for the `uncaughtException` event overrides the default behavior. | |
| 155 | ||
| 156 | #### `Bare.on('unhandledRejection', reason, promise)` | |
| 157 | ||
| 158 | Emitted when a JavaScript promise is rejected within an execution context without that rejection being handled within that execution context. By default, unhandled rejections are printed to `stderr` and the process aborted. Adding an event listener for the `unhandledRejection` event overrides the default behavior. | |
| 159 | ||
| 160 | #### `Bare.on('beforeExit', code)` | |
| 161 | ||
| 162 | Emitted when the loop runs out of work and before the process or current thread exits. This provides a chance to schedule additional work and keep the process from exiting. If additional work is scheduled, `beforeExit` will be emitted again once the loop runs out of work. | |
| 163 | ||
| 164 | If the process is exited explicitly, such as by calling `Bare.exit()` or as the result of an uncaught exception, the `beforeExit` event will not be emitted. | |
| 165 | ||
| 166 | #### `Bare.on('exit', code)` | |
| 167 | ||
| 168 | Emitted when the process or current thread exits. If the process is forcefully terminated from an `exit` event listener, the remaining listeners will not run. | |
| 169 | ||
| 170 | > [!CAUTION] | |
| 171 | > Additional work **MUST NOT** be scheduled from an `exit` event listener. | |
| 172 | ||
| 173 | #### `Bare.on('suspend', linger)` | |
| 174 | ||
| 175 | Emitted when the process or current thread is suspended. Any in-progress or outstanding work, such as network activity or file system access, should be deferred, cancelled, or paused when the `suspend` event is emitted and no additional work should be scheduled. A `suspend` event listener may call `Bare.resume()` to cancel the suspension. | |
| 176 | ||
| 177 | #### `Bare.on('wakeup', deadline)` | |
| 178 | ||
| 179 | Emitted when the process or current thread wakes up during suspension. Once the process becomes idle, or if the process is not idle by the time `deadline` has passed, the process will suspend itself again and an `idle` event be emitted. A `wakeup` event listener may call `Bare.resume()` to resume the process. | |
| 180 | ||
| 181 | #### `Bare.on('idle')` | |
| 182 | ||
| 183 | Emitted when the process or current thread becomes idle after suspension. After all handlers have run, the event loop will block and no additional work be performed until the process is resumed. An `idle` event listener may call `Bare.resume()` to cancel the suspension. | |
| 184 | ||
| 185 | #### `Bare.on('resume')` | |
| 186 | ||
| 187 | Emitted when the process or current thread resumes after suspension. Deferred and paused work should be continued when the `resume` event is emitted and new work may again be scheduled. | |
| 188 | ||
| 189 | ### Lifecycle | |
| 190 | ``` | |
| 191 | ||
| 192 | ### Example 3 | |
| 193 | ||
| 194 | ```javascript | |
| 195 | ### `Bare.Addon` | |
| 196 | ||
| 197 | The `Bare.Addon` namespace provides support for loading native addons, which are typically written in C/C++ and distributed as shared libraries. | |
| 198 | ||
| 199 | > [!NOTE] | |
| 200 | > This is an advanced API that users should never have to interact with directly. | |
| 201 | ||
| 202 | #### `Addon.cache` | |
| 203 | ||
| 204 | The global cache of loaded addons. | |
| 205 | ||
| 206 | #### `Addon.host` | |
| 207 | ||
| 208 | The target triplet identifying the current addon host. | |
| 209 | ||
| 210 | #### `const url = Addon.resolve(specifier, parentURL[, options])` | |
| 211 | ||
| 212 | Resolve a native addon specifier by searching for a static native addon or dynamic object library matching `specifier` imported from `parentURL`. | |
| 213 | ||
| 214 | Options are reserved. | |
| 215 | ||
| 216 | #### `const addon = Addon.load(url[, options])` | |
| 217 | ||
| 218 | Load a static or dynamic native addon identified by `url`. If `url` is not a static native addon, Bare will instead look for a matching dynamic object library. | |
| 219 | ||
| 220 | Options are reserved. | |
| 221 | ||
| 222 | #### `addon.url` | |
| 223 | ||
| 224 | The WHATWG `URL` identifier of the addon. | |
| 225 | ||
| 226 | #### `addon.exports` | |
| 227 | ||
| 228 | The exports of the addon. | |
| 229 | ||
| 230 | ### `Bare.Thread` | |
| 231 | ||
| 232 | The `Bare.Thread` namespace provides support for lightweight threads. Threads are similar to workers in Node.js, but provide only minimal API surface for creating and joining threads. | |
| 233 | ||
| 234 | > [!NOTE] | |
| 235 | > This is an advanced API that users should never have to interact with directly. | |
| 236 | ||
| 237 | #### `Thread.isMainThread` | |
| 238 | ||
| 239 | `true` if the current thread is the main thread. | |
| 240 | ||
| 241 | #### `Thread.self` | |
| 242 | ||
| 243 | A reference to the current thread as a `ThreadProxy` object. Will be `null` on the main thread. | |
| 244 | ||
| 245 | #### `Thread.self.data` | |
| 246 | ||
| 247 | The data that was passed to the current thread on creation. Will be `null` if no data was passed. | |
| 248 | ||
| 249 | #### `const thread = new Thread([filename][, options][, callback])` | |
| 250 | ||
| 251 | Start a new thread that will run the contents of `filename`. If `callback` is provided, its function body will be treated as the contents of `filename` and invoked on the new thread with `Thread.self.data` passed as an argument. | |
| 252 | ||
| 253 | Options include: | |
| 254 | ``` | |
| 255 | ||
| 256 | ||
| 72 | 257 | |
| 73 | 258 | ## Semantic Type |
| 74 | 259 |
| … | … | @@ -0,0 +1,113 @@ |
| 1 | { | |
| 2 | "repo": "brittle", | |
| 3 | "timestamp": "2026-01-16T23:39:35.984Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "test" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "Runner" | |
| 21 | }, | |
| 22 | { | |
| 23 | "name": "Test" | |
| 24 | } | |
| 25 | ], | |
| 26 | "functions": [ | |
| 27 | { | |
| 28 | "name": "configure" | |
| 29 | }, | |
| 30 | { | |
| 31 | "name": "highDefTimerNode" | |
| 32 | }, | |
| 33 | { | |
| 34 | "name": "highDefTimerFallback" | |
| 35 | }, | |
| 36 | { | |
| 37 | "name": "cmp" | |
| 38 | }, | |
| 39 | { | |
| 40 | "name": "test" | |
| 41 | }, | |
| 42 | { | |
| 43 | "name": "hook" | |
| 44 | }, | |
| 45 | { | |
| 46 | "name": "solo" | |
| 47 | }, | |
| 48 | { | |
| 49 | "name": "skip" | |
| 50 | }, | |
| 51 | { | |
| 52 | "name": "todo" | |
| 53 | }, | |
| 54 | { | |
| 55 | "name": "pause" | |
| 56 | }, | |
| 57 | { | |
| 58 | "name": "resume" | |
| 59 | }, | |
| 60 | { | |
| 61 | "name": "wait" | |
| 62 | }, | |
| 63 | { | |
| 64 | "name": "loop" | |
| 65 | }, | |
| 66 | { | |
| 67 | "name": "tickish" | |
| 68 | }, | |
| 69 | { | |
| 70 | "name": "explain" | |
| 71 | }, | |
| 72 | { | |
| 73 | "name": "originFrame" | |
| 74 | }, | |
| 75 | { | |
| 76 | "name": "isPromise" | |
| 77 | }, | |
| 78 | { | |
| 79 | "name": "isUncaught" | |
| 80 | }, | |
| 81 | { | |
| 82 | "name": "getRunner" | |
| 83 | }, | |
| 84 | { | |
| 85 | "name": "prematureEnd" | |
| 86 | }, | |
| 87 | { | |
| 88 | "name": "stealth" | |
| 89 | } | |
| 90 | ] | |
| 91 | }, | |
| 92 | "readme": { | |
| 93 | "content": "# brittle\n\n> tap à la mode\n\nA TAP test runner built for modern times.\n\n<img width=300 height=200 src=brittle.png>\n\n## Usage\n\nFirst install brittle from npm\n\n```\nnpm i brittle\n```\n\nThen start writing tests\n\n```javascript\nimport test from 'brittle'\n\ntest('basic', function (t) {\n t.is(typeof Date.now(), 'number')\n t.not(typeof Date.now(), 'string')\n\n t.ok(Date.now() > 0)\n t.absent(null)\n\n t.comment('text')\n\n t.alike({ a: 1 }, { a: 1 })\n t.unlike({ a: 2 }, { a: 3 })\n\n t.pass()\n t.fail()\n})\n\ntest('asynchronous', async function (t) {\n await new Promise(r => setTimeout(r, 250))\n t.pass()\n})\n\ntest('plans', function (t) {\n t.plan(2)\n t.pass()\n setTimeout(() => t.pass(), 250)\n})\n\ntest('classic subtest', function (t) {\n t.test('subtest', function (sub) {\n sub.plan(1)\n sub.pass()\n })\n})\n\ntest('inverted subtest', function (t) {\n const sub = t.test('subtest')\n sub.plan(1)\n sub.pass()\n})\n\ntest('executions', async function (t) {\n t.execution(() => 'should not throw')\n await ", | |
| 94 | "sections": [ | |
| 95 | "intro", | |
| 96 | "usage", | |
| 97 | "test runtimes", | |
| 98 | "api", | |
| 99 | "runner", | |
| 100 | "cli", | |
| 101 | "license" | |
| 102 | ], | |
| 103 | "hasApi": true, | |
| 104 | "hasExamples": true, | |
| 105 | "exampleCount": 32, | |
| 106 | "examples": [ | |
| 107 | "npm i brittle", | |
| 108 | "import test from 'brittle'\n\ntest('basic', function (t) {\n t.is(typeof Date.now(), 'number')\n t.not(typeof Date.now(), 'string')\n\n t.ok(Date.now() > 0)\n t.absent(null)\n\n t.comment('text')\n\n t.alike({ a: 1 }, { a: 1 })\n t.unlike({ a: 2 }, { a: 3 })\n\n t.pass()\n t.fail()\n})\n\ntest('asynchronous', async function (t) {\n await new Promise(r => setTimeout(r, 250))\n t.pass()\n})\n\ntest('plans', function (t) {\n t.plan(2)\n t.pass()\n setTimeout(() => t.pass(), 250)\n})\n\ntest('classic subtest', function (t) {\n t.test('subtest', function (sub) {\n sub.plan(1)\n sub.pass()\n })\n})\n\ntest('inverted subtest', function (t) {\n const sub = t.test('subtest')\n sub.plan(1)\n sub.pass()\n})\n\ntest('executions', async function (t) {\n t.execution(() => 'should not throw')\n await t.execution(async () => 'should not reject')\n})\n\ntest('exceptions', async function (t) {\n t.exception(() => { throw Error('expected to throw') })\n await t.exception(async () => { throw Error('expected to reject') })\n})\n\nconst a = test('inverted test without plan needs end()')\na.pass()\na.end()\n\nconst b = test('inverted test with plan')\nb.plan(1)\nb.pass()\n\nconst c = test('inverted tests can be awaited')\nc.plan(1)\nsetTimeout(() => c.pass(), 250)\nawait c", | |
| 109 | "import { test, solo, skip, hook, todo, configure } from 'brittle'" | |
| 110 | ] | |
| 111 | }, | |
| 112 | "patterns": [] | |
| 113 | } |
| … | … | @@ -65,11 +65,131 @@ import test from 'brittle' |
| 65 | 65 | |
| 66 | 66 | ## API Documentation |
| 67 | 67 | |
| 68 | _To be enriched in Phase 1B with deep code analysis_ | |
| 68 | _Extracted from README and code analysis_ | |
| 69 | ||
| 70 | ### Classes | |
| 71 | ||
| 72 | - `Runner` | |
| 73 | - `Test` | |
| 74 | ||
| 75 | ### Functions | |
| 76 | ||
| 77 | - `configure()` | |
| 78 | - `highDefTimerNode()` | |
| 79 | - `highDefTimerFallback()` | |
| 80 | - `cmp()` | |
| 81 | - `test()` | |
| 82 | - `hook()` | |
| 83 | - `solo()` | |
| 84 | - `skip()` | |
| 85 | - `todo()` | |
| 86 | - `pause()` | |
| 87 | - `resume()` | |
| 88 | - `wait()` | |
| 89 | - `loop()` | |
| 90 | - `tickish()` | |
| 91 | - `explain()` | |
| 92 | - `originFrame()` | |
| 93 | - `isPromise()` | |
| 94 | - `isUncaught()` | |
| 95 | - `getRunner()` | |
| 96 | - `prematureEnd()` | |
| 97 | - `stealth()` | |
| 98 | ||
| 99 | ### Exports | |
| 100 | ||
| 101 | - default: `test` | |
| 102 | ||
| 103 | ||
| 104 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 105 | ||
| 69 | 106 | |
| 70 | 107 | ## Usage Examples |
| 71 | 108 | |
| 72 | _To be added in Phase 1B_ | |
| 109 | _Extracted from README_ | |
| 110 | ||
| 111 | ### Example 1 | |
| 112 | ||
| 113 | ```javascript | |
| 114 | npm i brittle | |
| 115 | ``` | |
| 116 | ||
| 117 | ### Example 2 | |
| 118 | ||
| 119 | ```javascript | |
| 120 | import test from 'brittle' | |
| 121 | ||
| 122 | test('basic', function (t) { | |
| 123 | t.is(typeof Date.now(), 'number') | |
| 124 | t.not(typeof Date.now(), 'string') | |
| 125 | ||
| 126 | t.ok(Date.now() > 0) | |
| 127 | t.absent(null) | |
| 128 | ||
| 129 | t.comment('text') | |
| 130 | ||
| 131 | t.alike({ a: 1 }, { a: 1 }) | |
| 132 | t.unlike({ a: 2 }, { a: 3 }) | |
| 133 | ||
| 134 | t.pass() | |
| 135 | t.fail() | |
| 136 | }) | |
| 137 | ||
| 138 | test('asynchronous', async function (t) { | |
| 139 | await new Promise(r => setTimeout(r, 250)) | |
| 140 | t.pass() | |
| 141 | }) | |
| 142 | ||
| 143 | test('plans', function (t) { | |
| 144 | t.plan(2) | |
| 145 | t.pass() | |
| 146 | setTimeout(() => t.pass(), 250) | |
| 147 | }) | |
| 148 | ||
| 149 | test('classic subtest', function (t) { | |
| 150 | t.test('subtest', function (sub) { | |
| 151 | sub.plan(1) | |
| 152 | sub.pass() | |
| 153 | }) | |
| 154 | }) | |
| 155 | ||
| 156 | test('inverted subtest', function (t) { | |
| 157 | const sub = t.test('subtest') | |
| 158 | sub.plan(1) | |
| 159 | sub.pass() | |
| 160 | }) | |
| 161 | ||
| 162 | test('executions', async function (t) { | |
| 163 | t.execution(() => 'should not throw') | |
| 164 | await t.execution(async () => 'should not reject') | |
| 165 | }) | |
| 166 | ||
| 167 | test('exceptions', async function (t) { | |
| 168 | t.exception(() => { throw Error('expected to throw') }) | |
| 169 | await t.exception(async () => { throw Error('expected to reject') }) | |
| 170 | }) | |
| 171 | ||
| 172 | const a = test('inverted test without plan needs end()') | |
| 173 | a.pass() | |
| 174 | a.end() | |
| 175 | ||
| 176 | const b = test('inverted test with plan') | |
| 177 | b.plan(1) | |
| 178 | b.pass() | |
| 179 | ||
| 180 | const c = test('inverted tests can be awaited') | |
| 181 | c.plan(1) | |
| 182 | setTimeout(() => c.pass(), 250) | |
| 183 | await c | |
| 184 | ``` | |
| 185 | ||
| 186 | ### Example 3 | |
| 187 | ||
| 188 | ```javascript | |
| 189 | import { test, solo, skip, hook, todo, configure } from 'brittle' | |
| 190 | ``` | |
| 191 | ||
| 192 | ||
| 73 | 193 | |
| 74 | 194 | ## Semantic Type |
| 75 | 195 |
| … | … | @@ -0,0 +1,85 @@ |
| 1 | { | |
| 2 | "repo": "dht-rpc", | |
| 3 | "timestamp": "2026-01-16T23:39:33.380Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "DHT" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "DHT" | |
| 21 | } | |
| 22 | ], | |
| 23 | "functions": [ | |
| 24 | { | |
| 25 | "name": "ondata" | |
| 26 | }, | |
| 27 | { | |
| 28 | "name": "onsuccess" | |
| 29 | }, | |
| 30 | { | |
| 31 | "name": "onswap" | |
| 32 | }, | |
| 33 | { | |
| 34 | "name": "onmessage" | |
| 35 | }, | |
| 36 | { | |
| 37 | "name": "localIP" | |
| 38 | }, | |
| 39 | { | |
| 40 | "name": "parseNode" | |
| 41 | }, | |
| 42 | { | |
| 43 | "name": "randomBytes" | |
| 44 | }, | |
| 45 | { | |
| 46 | "name": "randomOffset" | |
| 47 | }, | |
| 48 | { | |
| 49 | "name": "requestAll" | |
| 50 | }, | |
| 51 | { | |
| 52 | "name": "onsuccess" | |
| 53 | }, | |
| 54 | { | |
| 55 | "name": "onerror" | |
| 56 | }, | |
| 57 | { | |
| 58 | "name": "noop" | |
| 59 | } | |
| 60 | ] | |
| 61 | }, | |
| 62 | "readme": { | |
| 63 | "content": "# dht-rpc\n\nMake RPC calls over a [Kademlia](https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf) based DHT.\n\n```\nnpm install dht-rpc\n```\n\n## Key Features\n\n- Remote IP / firewall detection\n- Easily add any command to your DHT\n- Streaming queries and updates\n\nNote that internally V5 of dht-rpc differs significantly from V4, due to a series\nof improvements to NAT detection, secure routing IDs and more.\n\n## Usage\n\nHere is an example implementing a simple key value store\n\nFirst spin up a bootstrap node. You can make multiple if you want for redundancy.\nThere is nothing special about a bootstrap node, except it needs to know it's own host and port,\nsince it knows no other nodes to infer it from.\n\n```js\nimport DHT from 'dht-rpc'\n\nconst bootstrap = DHT.bootstrapper(10001, '127.0.0.1')\n```\n\nNow lets make some dht nodes that can store values in our key value store.\n\n```js\nimport DHT from 'dht-rpc'\nimport crypto from 'crypto'\n\n// Let's create 100 dht nodes for our example.\nfor (", | |
| 64 | "sections": [ | |
| 65 | "intro", | |
| 66 | "key features", | |
| 67 | "usage", | |
| 68 | "api", | |
| 69 | "license" | |
| 70 | ], | |
| 71 | "hasApi": true, | |
| 72 | "hasExamples": true, | |
| 73 | "exampleCount": 13, | |
| 74 | "examples": [ | |
| 75 | "npm install dht-rpc", | |
| 76 | "import DHT from 'dht-rpc'\n\nconst bootstrap = DHT.bootstrapper(10001, '127.0.0.1')", | |
| 77 | "import DHT from 'dht-rpc'\nimport crypto from 'crypto'\n\n// Let's create 100 dht nodes for our example.\nfor (var i = 0; i < 100; i++) createNode()\n\nfunction createNode() {\n const node = new DHT({\n bootstrap: ['localhost:10001']\n })\n\n const values = new Map()\n const VALUES = 0 // define a command enum\n\n node.on('request', function (req) {\n if (req.command === VALUES) {\n if (req.token) {\n // if we are the closest node store the value (ie the node sent a valid roundtrip token)\n const key = hash(req.value).toString('hex')\n values.set(key, req.value)\n console.log('Storing', key, '-->', req.value.toString())\n return req.reply(null)\n }\n\n const value = values.get(req.target.toString('hex'))\n req.reply(value)\n }\n })\n}\n\nfunction hash(value) {\n return crypto.createHash('sha256').update(value).digest()\n}" | |
| 78 | ] | |
| 79 | }, | |
| 80 | "patterns": [ | |
| 81 | "binary-encoding", | |
| 82 | "cryptography", | |
| 83 | "streaming" | |
| 84 | ] | |
| 85 | } |
| … | … | @@ -62,11 +62,98 @@ Here is an example implementing a simple key value store |
| 62 | 62 | |
| 63 | 63 | ## API Documentation |
| 64 | 64 | |
| 65 | _To be enriched in Phase 1B with deep code analysis_ | |
| 65 | _Extracted from README and code analysis_ | |
| 66 | ||
| 67 | ### Classes | |
| 68 | ||
| 69 | - `DHT` | |
| 70 | ||
| 71 | ### Functions | |
| 72 | ||
| 73 | - `ondata()` | |
| 74 | - `onsuccess()` | |
| 75 | - `onswap()` | |
| 76 | - `onmessage()` | |
| 77 | - `localIP()` | |
| 78 | - `parseNode()` | |
| 79 | - `randomBytes()` | |
| 80 | - `randomOffset()` | |
| 81 | - `requestAll()` | |
| 82 | - `onsuccess()` | |
| 83 | - `onerror()` | |
| 84 | - `noop()` | |
| 85 | ||
| 86 | ### Exports | |
| 87 | ||
| 88 | - default: `DHT` | |
| 89 | ||
| 90 | ||
| 91 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 92 | ||
| 66 | 93 | |
| 67 | 94 | ## Usage Examples |
| 68 | 95 | |
| 69 | _To be added in Phase 1B_ | |
| 96 | _Extracted from README_ | |
| 97 | ||
| 98 | ### Example 1 | |
| 99 | ||
| 100 | ```javascript | |
| 101 | npm install dht-rpc | |
| 102 | ``` | |
| 103 | ||
| 104 | ### Example 2 | |
| 105 | ||
| 106 | ```javascript | |
| 107 | import DHT from 'dht-rpc' | |
| 108 | ||
| 109 | const bootstrap = DHT.bootstrapper(10001, '127.0.0.1') | |
| 110 | ``` | |
| 111 | ||
| 112 | ### Example 3 | |
| 113 | ||
| 114 | ```javascript | |
| 115 | import DHT from 'dht-rpc' | |
| 116 | import crypto from 'crypto' | |
| 117 | ||
| 118 | // Let's create 100 dht nodes for our example. | |
| 119 | for (var i = 0; i < 100; i++) createNode() | |
| 120 | ||
| 121 | function createNode() { | |
| 122 | const node = new DHT({ | |
| 123 | bootstrap: ['localhost:10001'] | |
| 124 | }) | |
| 125 | ||
| 126 | const values = new Map() | |
| 127 | const VALUES = 0 // define a command enum | |
| 128 | ||
| 129 | node.on('request', function (req) { | |
| 130 | if (req.command === VALUES) { | |
| 131 | if (req.token) { | |
| 132 | // if we are the closest node store the value (ie the node sent a valid roundtrip token) | |
| 133 | const key = hash(req.value).toString('hex') | |
| 134 | values.set(key, req.value) | |
| 135 | console.log('Storing', key, '-->', req.value.toString()) | |
| 136 | return req.reply(null) | |
| 137 | } | |
| 138 | ||
| 139 | const value = values.get(req.target.toString('hex')) | |
| 140 | req.reply(value) | |
| 141 | } | |
| 142 | }) | |
| 143 | } | |
| 144 | ||
| 145 | function hash(value) { | |
| 146 | return crypto.createHash('sha256').update(value).digest() | |
| 147 | } | |
| 148 | ``` | |
| 149 | ||
| 150 | ||
| 151 | ||
| 152 | ## P2P Patterns | |
| 153 | ||
| 154 | - binary-encoding | |
| 155 | - cryptography | |
| 156 | - streaming | |
| 70 | 157 | |
| 71 | 158 | ## Semantic Type |
| 72 | 159 |
| … | … | @@ -0,0 +1,31 @@ |
| 1 | { | |
| 2 | "repo": "drives", | |
| 3 | "timestamp": "2026-01-16T23:39:44.097Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": {}, | |
| 11 | "readme": { | |
| 12 | "content": "# drives\n\nCLI to seed, mirror, and serve a Hyperdrive or Localdrive\n\n```\nnpm i -g drives\n```\n\n## Usage\n```bash\nUsage: drives [command] [options]\n\nCommands:\n init Initializes a new storage on the cwd\n touch Create a writable Hyperdrive\n mirror <src> <dst> Mirror a drive into another drive\n ls <src> [path] List files of the drive\n seed [key] Share a Hyperdrive\n download <key> Archive download a Hyperdrive by key\n serve <src> Creates a HTTP drive server\n put <src> <path> <blob> Create a file\n entry <src> <path> Show a single entry file\n get <src> <path> Show the file content\n rm <src> <path> Delete a file\n info <key> Show info about the Hyperdrive\n purge <key> Delete all local storage of the drive\n```\n\n## API\nUse `drives --help` for more information, `drives mirror --help`, etc.\n\n#### Storage\n\nBy default, it tries to use `.drives` from ", | |
| 13 | "sections": [ | |
| 14 | "intro", | |
| 15 | "usage", | |
| 16 | "api", | |
| 17 | "license" | |
| 18 | ], | |
| 19 | "hasApi": true, | |
| 20 | "hasExamples": true, | |
| 21 | "exampleCount": 9, | |
| 22 | "examples": [ | |
| 23 | "npm i -g drives", | |
| 24 | "## API\nUse `drives --help` for more information, `drives mirror --help`, etc.\n\n#### Storage\n\nBy default, it tries to use `.drives` from the current directory.\n\nIf it doesn't exists then it will go back `../` until it finds an existing `.drives`.\n\nIf it doesn't find anything, then it will create and use a global folder at `~/.drives`.\n\nYou can always set `--storage [path]` to force a different location.\n\n#### Initialize\nIt creates the `.drives` storage folder in the current working directory.", | |
| 25 | "Useful to avoid doing a parent lookup, and not using the home folder.\n\n#### Create a writable Hyperdrive" | |
| 26 | ] | |
| 27 | }, | |
| 28 | "patterns": [ | |
| 29 | "peer-discovery" | |
| 30 | ] | |
| 31 | } |
| … | … | @@ -70,11 +70,55 @@ Commands: |
| 70 | 70 | |
| 71 | 71 | ## API Documentation |
| 72 | 72 | |
| 73 | _To be enriched in Phase 1B with deep code analysis_ | |
| 73 | _Extracted from README and code analysis_ | |
| 74 | ||
| 75 | ||
| 76 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 77 | ||
| 74 | 78 | |
| 75 | 79 | ## Usage Examples |
| 76 | 80 | |
| 77 | _To be added in Phase 1B_ | |
| 81 | _Extracted from README_ | |
| 82 | ||
| 83 | ### Example 1 | |
| 84 | ||
| 85 | ```javascript | |
| 86 | npm i -g drives | |
| 87 | ``` | |
| 88 | ||
| 89 | ### Example 2 | |
| 90 | ||
| 91 | ```javascript | |
| 92 | ## API | |
| 93 | Use `drives --help` for more information, `drives mirror --help`, etc. | |
| 94 | ||
| 95 | #### Storage | |
| 96 | ||
| 97 | By default, it tries to use `.drives` from the current directory. | |
| 98 | ||
| 99 | If it doesn't exists then it will go back `../` until it finds an existing `.drives`. | |
| 100 | ||
| 101 | If it doesn't find anything, then it will create and use a global folder at `~/.drives`. | |
| 102 | ||
| 103 | You can always set `--storage [path]` to force a different location. | |
| 104 | ||
| 105 | #### Initialize | |
| 106 | It creates the `.drives` storage folder in the current working directory. | |
| 107 | ``` | |
| 108 | ||
| 109 | ### Example 3 | |
| 110 | ||
| 111 | ```javascript | |
| 112 | Useful to avoid doing a parent lookup, and not using the home folder. | |
| 113 | ||
| 114 | #### Create a writable Hyperdrive | |
| 115 | ``` | |
| 116 | ||
| 117 | ||
| 118 | ||
| 119 | ## P2P Patterns | |
| 120 | ||
| 121 | - peer-discovery | |
| 78 | 122 | |
| 79 | 123 | ## Semantic Type |
| 80 | 124 |
| … | … | @@ -0,0 +1,44 @@ |
| 1 | { | |
| 2 | "repo": "emoji-index", | |
| 3 | "timestamp": "2026-01-16T23:39:56.631Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [], | |
| 13 | "classes": [], | |
| 14 | "functions": [ | |
| 15 | { | |
| 16 | "name": "toEmoji" | |
| 17 | }, | |
| 18 | { | |
| 19 | "name": "toShortCode" | |
| 20 | }, | |
| 21 | { | |
| 22 | "name": "getCodePoint" | |
| 23 | }, | |
| 24 | { | |
| 25 | "name": "cmpCodePoints" | |
| 26 | } | |
| 27 | ] | |
| 28 | }, | |
| 29 | "readme": { | |
| 30 | "content": "# emoji-index\n\nTiny embedded emoji index\n\n```\nnpm install emoji-index\n```\n\nIs just ~75kb in size and consumes only ~60kb on memory when running.\n\n## Usage\n\n``` js\nconst e = require('emoji-index')\n\nconsole.log(e.toEmoji('neutral')) // prints 😐\nconsole.log(e.toShortCode('😐')) // prints neutral\n```\n\n## License\n\nApache 2.0\n", | |
| 31 | "sections": [ | |
| 32 | "intro", | |
| 33 | "usage", | |
| 34 | "license" | |
| 35 | ], | |
| 36 | "hasApi": true, | |
| 37 | "hasExamples": true, | |
| 38 | "exampleCount": 1, | |
| 39 | "examples": [ | |
| 40 | "npm install emoji-index" | |
| 41 | ] | |
| 42 | }, | |
| 43 | "patterns": [] | |
| 44 | } |
| … | … | @@ -52,11 +52,30 @@ console.log(e.toShortCode('😐')) // prints neutral |
| 52 | 52 | |
| 53 | 53 | ## API Documentation |
| 54 | 54 | |
| 55 | _To be enriched in Phase 1B with deep code analysis_ | |
| 55 | _Extracted from README and code analysis_ | |
| 56 | ||
| 57 | ### Functions | |
| 58 | ||
| 59 | - `toEmoji()` | |
| 60 | - `toShortCode()` | |
| 61 | - `getCodePoint()` | |
| 62 | - `cmpCodePoints()` | |
| 63 | ||
| 64 | ||
| 65 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 66 | ||
| 56 | 67 | |
| 57 | 68 | ## Usage Examples |
| 58 | 69 | |
| 59 | _To be added in Phase 1B_ | |
| 70 | _Extracted from README_ | |
| 71 | ||
| 72 | ### Example 1 | |
| 73 | ||
| 74 | ```javascript | |
| 75 | npm install emoji-index | |
| 76 | ``` | |
| 77 | ||
| 78 | ||
| 60 | 79 | |
| 61 | 80 | ## Semantic Type |
| 62 | 81 |
| … | … | @@ -0,0 +1,26 @@ |
| 1 | { | |
| 2 | "repo": "examples", | |
| 3 | "timestamp": "2026-01-16T23:39:52.013Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": {}, | |
| 11 | "readme": { | |
| 12 | "content": "# Holepunch Examples\nHere you'll find a few self-contained examples showing how to use the different building blocks in the Holepunch module ecosystem.\n\nFor more context, check out the [Quick Start](...) \n\n\n", | |
| 13 | "sections": [ | |
| 14 | "intro" | |
| 15 | ], | |
| 16 | "hasApi": false, | |
| 17 | "hasExamples": false, | |
| 18 | "exampleCount": 0, | |
| 19 | "examples": [] | |
| 20 | }, | |
| 21 | "patterns": [ | |
| 22 | "append-only-log", | |
| 23 | "peer-discovery", | |
| 24 | "dht-discovery" | |
| 25 | ] | |
| 26 | } |
| … | … | @@ -47,12 +47,22 @@ For more context, check out the [Quick Start](...) |
| 47 | 47 | |
| 48 | 48 | ## API Documentation |
| 49 | 49 | |
| 50 | _To be enriched in Phase 1B with deep code analysis_ | |
| 50 | _Extracted from code analysis_ | |
| 51 | ||
| 52 | ||
| 53 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 54 | ||
| 51 | 55 | |
| 52 | 56 | ## Usage Examples |
| 53 | 57 | |
| 54 | 58 | _To be added in Phase 1B_ |
| 55 | 59 | |
| 60 | ## P2P Patterns | |
| 61 | ||
| 62 | - append-only-log | |
| 63 | - peer-discovery | |
| 64 | - dht-discovery | |
| 65 | ||
| 56 | 66 | ## Semantic Type |
| 57 | 67 | |
| 58 | 68 | _To be classified in Phase 2_ |
| … | … | @@ -0,0 +1,36 @@ |
| 1 | { | |
| 2 | "repo": "filesharing-react-app-example", | |
| 3 | "timestamp": "2026-01-16T23:39:46.538Z", | |
| 4 | "entryPoint": "index.html", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.html", | |
| 8 | "type": "module" | |
| 9 | } | |
| 10 | }, | |
| 11 | "api": { | |
| 12 | "file": "index.html", | |
| 13 | "exports": [], | |
| 14 | "classes": [], | |
| 15 | "functions": [] | |
| 16 | }, | |
| 17 | "readme": { | |
| 18 | "content": "# filesharing-react-app-example\n\nThis example app shows how to build a simple file sharing app where all files are shared between everyone who use the app.\n\nTo read more details about how to use Pear, read the [Getting Started guide](https://docs.pears.com/guides/getting-started).\n\n## How to run\n\n[Pear](https://docs.pears.com/guides/getting-started) is a prerequisite, which can be installed with `npm i -g pear`.\n\n```\n$ git clone https://github.com/holepunchto/filesharing-react-app-example.git\n$ cd filesharing-react-app-example\n$ npm install \n$ pear run .\n```\n\nWhen a Pear app runs, it uses a local storage that's the same for all instances. To test the file sharing app, it would be good run multiple instances that looks different. To do that, use the `--store/-s` parameter for `pear`.\n\nIn one terminal:\n\n```\n$ pear run -s /tmp/fs1 .\n```\n\nIn another terminal:\n\n```\n$ pear run -s /tmp/fs2 .\n```\n\n## How to release\n\nWhen a Pear app is released, it can be run by others. Read more about this in ", | |
| 19 | "sections": [ | |
| 20 | "intro", | |
| 21 | "how to run", | |
| 22 | "how to release" | |
| 23 | ], | |
| 24 | "hasApi": false, | |
| 25 | "hasExamples": true, | |
| 26 | "exampleCount": 6, | |
| 27 | "examples": [ | |
| 28 | "$ git clone https://github.com/holepunchto/filesharing-react-app-example.git\n$ cd filesharing-react-app-example\n$ npm install \n$ pear run .", | |
| 29 | "$ pear run -s /tmp/fs1 .", | |
| 30 | "$ pear run -s /tmp/fs2 ." | |
| 31 | ] | |
| 32 | }, | |
| 33 | "patterns": [ | |
| 34 | "peer-discovery" | |
| 35 | ] | |
| 36 | } |
| … | … | @@ -66,11 +66,42 @@ In one terminal: |
| 66 | 66 | |
| 67 | 67 | ## API Documentation |
| 68 | 68 | |
| 69 | _To be enriched in Phase 1B with deep code analysis_ | |
| 69 | _Extracted from code analysis_ | |
| 70 | ||
| 71 | ||
| 72 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 73 | ||
| 70 | 74 | |
| 71 | 75 | ## Usage Examples |
| 72 | 76 | |
| 73 | _To be added in Phase 1B_ | |
| 77 | _Extracted from README_ | |
| 78 | ||
| 79 | ### Example 1 | |
| 80 | ||
| 81 | ```javascript | |
| 82 | $ git clone https://github.com/holepunchto/filesharing-react-app-example.git | |
| 83 | $ cd filesharing-react-app-example | |
| 84 | $ npm install | |
| 85 | $ pear run . | |
| 86 | ``` | |
| 87 | ||
| 88 | ### Example 2 | |
| 89 | ||
| 90 | ```javascript | |
| 91 | $ pear run -s /tmp/fs1 . | |
| 92 | ``` | |
| 93 | ||
| 94 | ### Example 3 | |
| 95 | ||
| 96 | ```javascript | |
| 97 | $ pear run -s /tmp/fs2 . | |
| 98 | ``` | |
| 99 | ||
| 100 | ||
| 101 | ||
| 102 | ## P2P Patterns | |
| 103 | ||
| 104 | - peer-discovery | |
| 74 | 105 | |
| 75 | 106 | ## Semantic Type |
| 76 | 107 |
| … | … | @@ -0,0 +1,80 @@ |
| 1 | { | |
| 2 | "repo": "fs-native-extensions", | |
| 3 | "timestamp": "2026-01-16T23:39:42.471Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [], | |
| 13 | "classes": [], | |
| 14 | "functions": [ | |
| 15 | { | |
| 16 | "name": "onwork" | |
| 17 | }, | |
| 18 | { | |
| 19 | "name": "tryLock" | |
| 20 | }, | |
| 21 | { | |
| 22 | "name": "waitForLock" | |
| 23 | }, | |
| 24 | { | |
| 25 | "name": "tryDowngradeLock" | |
| 26 | }, | |
| 27 | { | |
| 28 | "name": "downgradeLock" | |
| 29 | }, | |
| 30 | { | |
| 31 | "name": "tryUpgradeLock" | |
| 32 | }, | |
| 33 | { | |
| 34 | "name": "upgradeLock" | |
| 35 | }, | |
| 36 | { | |
| 37 | "name": "unlock" | |
| 38 | }, | |
| 39 | { | |
| 40 | "name": "trim" | |
| 41 | }, | |
| 42 | { | |
| 43 | "name": "sparse" | |
| 44 | }, | |
| 45 | { | |
| 46 | "name": "swap" | |
| 47 | }, | |
| 48 | { | |
| 49 | "name": "getAttr" | |
| 50 | }, | |
| 51 | { | |
| 52 | "name": "setAttr" | |
| 53 | }, | |
| 54 | { | |
| 55 | "name": "removeAttr" | |
| 56 | }, | |
| 57 | { | |
| 58 | "name": "listAttrs" | |
| 59 | } | |
| 60 | ] | |
| 61 | }, | |
| 62 | "readme": { | |
| 63 | "content": "# fs-native-extensions\n\nNative file system extensions for advanced file operations\n\n```\nnpm install fs-native-extensions\n```\n\n## Usage\n\nWrite to a file using an exclusive lock:\n\n```js\nconst { open } = require('fs/promises')\nconst { waitForLock, unlock } = require('fs-native-extensions')\n\nconst file = await open('file.txt', 'a+')\n\nawait waitForLock(file.fd)\n\ntry {\n await file.write('hello world')\n} finally {\n unlock(file.fd)\n}\n```\n\n## API\n\n#### `const granted = tryLock(fd[, offset[, length]][, options])`\n\nRequest a lock on a file, returning `true` if the lock was granted or `false` if another file descriptor currently holds the lock.\n\nTo lock only a portion of the file, `offset` and `length` may be passed. A `length` of `0` will request a lock from `offset` to the end of the file.\n\nOn macOS, BSD locks are used and so only locks on the whole file are supported.\n\nNote that the lock is only advisory and there is nothing stopping another process from accessing the file by simply ignoring ", | |
| 64 | "sections": [ | |
| 65 | "intro", | |
| 66 | "usage", | |
| 67 | "api", | |
| 68 | "license" | |
| 69 | ], | |
| 70 | "hasApi": true, | |
| 71 | "hasExamples": true, | |
| 72 | "exampleCount": 3, | |
| 73 | "examples": [ | |
| 74 | "npm install fs-native-extensions", | |
| 75 | "const { open } = require('fs/promises')\nconst { waitForLock, unlock } = require('fs-native-extensions')\n\nconst file = await open('file.txt', 'a+')\n\nawait waitForLock(file.fd)\n\ntry {\n await file.write('hello world')\n} finally {\n unlock(file.fd)\n}", | |
| 76 | "{\n // If `true`, request a shared lock, i.e. a read lock, on the file. By\n // default, an exclusive lock, i.e. a write lock, is requested.\n // Be aware that an exclusive lock can only be granted to files that are\n // writable!\n shared: false\n}" | |
| 77 | ] | |
| 78 | }, | |
| 79 | "patterns": [] | |
| 80 | } |
| … | … | @@ -52,11 +52,70 @@ await waitForLock(file.fd) |
| 52 | 52 | |
| 53 | 53 | ## API Documentation |
| 54 | 54 | |
| 55 | _To be enriched in Phase 1B with deep code analysis_ | |
| 55 | _Extracted from README and code analysis_ | |
| 56 | ||
| 57 | ### Functions | |
| 58 | ||
| 59 | - `onwork()` | |
| 60 | - `tryLock()` | |
| 61 | - `waitForLock()` | |
| 62 | - `tryDowngradeLock()` | |
| 63 | - `downgradeLock()` | |
| 64 | - `tryUpgradeLock()` | |
| 65 | - `upgradeLock()` | |
| 66 | - `unlock()` | |
| 67 | - `trim()` | |
| 68 | - `sparse()` | |
| 69 | - `swap()` | |
| 70 | - `getAttr()` | |
| 71 | - `setAttr()` | |
| 72 | - `removeAttr()` | |
| 73 | - `listAttrs()` | |
| 74 | ||
| 75 | ||
| 76 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 77 | ||
| 56 | 78 | |
| 57 | 79 | ## Usage Examples |
| 58 | 80 | |
| 59 | _To be added in Phase 1B_ | |
| 81 | _Extracted from README_ | |
| 82 | ||
| 83 | ### Example 1 | |
| 84 | ||
| 85 | ```javascript | |
| 86 | npm install fs-native-extensions | |
| 87 | ``` | |
| 88 | ||
| 89 | ### Example 2 | |
| 90 | ||
| 91 | ```javascript | |
| 92 | const { open } = require('fs/promises') | |
| 93 | const { waitForLock, unlock } = require('fs-native-extensions') | |
| 94 | ||
| 95 | const file = await open('file.txt', 'a+') | |
| 96 | ||
| 97 | await waitForLock(file.fd) | |
| 98 | ||
| 99 | try { | |
| 100 | await file.write('hello world') | |
| 101 | } finally { | |
| 102 | unlock(file.fd) | |
| 103 | } | |
| 104 | ``` | |
| 105 | ||
| 106 | ### Example 3 | |
| 107 | ||
| 108 | ```javascript | |
| 109 | { | |
| 110 | // If `true`, request a shared lock, i.e. a read lock, on the file. By | |
| 111 | // default, an exclusive lock, i.e. a write lock, is requested. | |
| 112 | // Be aware that an exclusive lock can only be granted to files that are | |
| 113 | // writable! | |
| 114 | shared: false | |
| 115 | } | |
| 116 | ``` | |
| 117 | ||
| 118 | ||
| 60 | 119 | |
| 61 | 120 | ## Semantic Type |
| 62 | 121 |
| … | … | @@ -0,0 +1,60 @@ |
| 1 | { | |
| 2 | "repo": "hyperbeam", | |
| 3 | "timestamp": "2026-01-16T23:39:31.544Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "class" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "Hyperbeam" | |
| 21 | } | |
| 22 | ], | |
| 23 | "functions": [ | |
| 24 | { | |
| 25 | "name": "toBase32" | |
| 26 | }, | |
| 27 | { | |
| 28 | "name": "fromBase32" | |
| 29 | }, | |
| 30 | { | |
| 31 | "name": "randomBytes" | |
| 32 | } | |
| 33 | ] | |
| 34 | }, | |
| 35 | "readme": { | |
| 36 | "content": "# hyperbeam\n\nA 1-1 end-to-end encrypted internet pipe powered by [Hyperswarm](https://github.com/holepunchto/hyperswarm) and Noise\n\n```\nnpm install hyperbeam\n```\n\n## Usage\n\n``` js\nconst Hyperbeam = require('hyperbeam')\n\n// 'neznr3z3j44l7q7sgynbzpdrdlpausurbpcmqvwupmuoidolbopa' is 32-byte unique passphrase\n// to find the other side of your pipe.\n// once the other peer is discovered it is used to derive a noise keypair as well.\nconst beam = new Hyperbeam('neznr3z3j44l7q7sgynbzpdrdlpausurbpcmqvwupmuoidolbopa')\n\n// to generate a passphrase, leave the constructor empty and hyperbeam will generate one for you\n// const beam = new Hyperbeam()\n// beam.key // <-- your passphrase\n\n// make a little chat app\nprocess.stdin.pipe(beam).pipe(process.stdout)\n```\n\n## CLI\n\nPart of the [Hyperspace CLI, hyp](https://github.com/hypercore-protocol/cli)\n\nProvided here as a standalone CLI as well.\n\nFirst install it\n\n```sh\nnpm install -g hyperbeam\n```\n\nThen on one machine run\n\n```sh\necho 'hello world' | hyperbea", | |
| 37 | "sections": [ | |
| 38 | "intro", | |
| 39 | "usage", | |
| 40 | "cli", | |
| 41 | "api", | |
| 42 | "license" | |
| 43 | ], | |
| 44 | "hasApi": true, | |
| 45 | "hasExamples": true, | |
| 46 | "exampleCount": 4, | |
| 47 | "examples": [ | |
| 48 | "npm install hyperbeam", | |
| 49 | "## CLI\n\nPart of the [Hyperspace CLI, hyp](https://github.com/hypercore-protocol/cli)\n\nProvided here as a standalone CLI as well.\n\nFirst install it", | |
| 50 | "Then on one machine run" | |
| 51 | ] | |
| 52 | }, | |
| 53 | "patterns": [ | |
| 54 | "append-only-log", | |
| 55 | "peer-discovery", | |
| 56 | "dht-discovery", | |
| 57 | "cryptography", | |
| 58 | "streaming" | |
| 59 | ] | |
| 60 | } |
| … | … | @@ -56,11 +56,63 @@ const beam = new Hyperbeam('neznr3z3j44l7q7sgynbzpdrdlpausurbpcmqvwupmuoidolbopa |
| 56 | 56 | |
| 57 | 57 | ## API Documentation |
| 58 | 58 | |
| 59 | _To be enriched in Phase 1B with deep code analysis_ | |
| 59 | _Extracted from README and code analysis_ | |
| 60 | ||
| 61 | ### Classes | |
| 62 | ||
| 63 | - `Hyperbeam` | |
| 64 | ||
| 65 | ### Functions | |
| 66 | ||
| 67 | - `toBase32()` | |
| 68 | - `fromBase32()` | |
| 69 | - `randomBytes()` | |
| 70 | ||
| 71 | ### Exports | |
| 72 | ||
| 73 | - default: `class` | |
| 74 | ||
| 75 | ||
| 76 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 77 | ||
| 60 | 78 | |
| 61 | 79 | ## Usage Examples |
| 62 | 80 | |
| 63 | _To be added in Phase 1B_ | |
| 81 | _Extracted from README_ | |
| 82 | ||
| 83 | ### Example 1 | |
| 84 | ||
| 85 | ```javascript | |
| 86 | npm install hyperbeam | |
| 87 | ``` | |
| 88 | ||
| 89 | ### Example 2 | |
| 90 | ||
| 91 | ```javascript | |
| 92 | ## CLI | |
| 93 | ||
| 94 | Part of the [Hyperspace CLI, hyp](https://github.com/hypercore-protocol/cli) | |
| 95 | ||
| 96 | Provided here as a standalone CLI as well. | |
| 97 | ||
| 98 | First install it | |
| 99 | ``` | |
| 100 | ||
| 101 | ### Example 3 | |
| 102 | ||
| 103 | ```javascript | |
| 104 | Then on one machine run | |
| 105 | ``` | |
| 106 | ||
| 107 | ||
| 108 | ||
| 109 | ## P2P Patterns | |
| 110 | ||
| 111 | - append-only-log | |
| 112 | - peer-discovery | |
| 113 | - dht-discovery | |
| 114 | - cryptography | |
| 115 | - streaming | |
| 64 | 116 | |
| 65 | 117 | ## Semantic Type |
| 66 | 118 |
| … | … | @@ -0,0 +1,48 @@ |
| 1 | { | |
| 2 | "repo": "hyperblobs", | |
| 3 | "timestamp": "2026-01-16T23:39:39.662Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "Hyperblobs" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "HyperBlobsBatch" | |
| 21 | }, | |
| 22 | { | |
| 23 | "name": "Hyperblobs" | |
| 24 | } | |
| 25 | ], | |
| 26 | "functions": [] | |
| 27 | }, | |
| 28 | "readme": { | |
| 29 | "content": "# hyperblobs\n\nA simple blob store for Hypercore.\n\nEach blob is identified by its unique bounds within the Hypercore, e.g. `{ byteOffset: 0, blockOffset: 0, blockLength: 5, byteLength: 327680 }`, which makes them easy to save and retrieve:\n\n```js\nconst blobs = new Hyperblobs(core)\n// ID is { byteOffset: 0, blockOffset: 0, blockLength: 1, byteLength: 11 }\nconst id = await blobs.put(Buffer.from('hello world', 'utf-8'))\nawait blobs.get(id) // Buffer.from('hello world', 'utf-8')\n```\n\nYou can also get from start/end bounds within a single blob:\n\n```js\nconst blobs = new Hyperblobs(core)\n// ID is { byteOffset: 0, blockOffset: 0, blockLength: 1, byteLength: 11 }\nconst id = await blobs.put(Buffer.from('hello world', 'utf-8'))\nawait blobs.get(id, { start: 1, length: 2 }) // Buffer.from('el', 'utf-8')\n```\n\nIf the blob is large, there's a Streams interface (`createReadStream` and `createWriteStream`) too.\n\n## Installation\n\n```\nnpm i hyperblobs\n```\n\n## API\n\n```js\nconst Hyperblobs = require('hyperblo", | |
| 30 | "sections": [ | |
| 31 | "intro", | |
| 32 | "installation", | |
| 33 | "api", | |
| 34 | "license" | |
| 35 | ], | |
| 36 | "hasApi": true, | |
| 37 | "hasExamples": true, | |
| 38 | "exampleCount": 7, | |
| 39 | "examples": [ | |
| 40 | "const blobs = new Hyperblobs(core)\n// ID is { byteOffset: 0, blockOffset: 0, blockLength: 1, byteLength: 11 }\nconst id = await blobs.put(Buffer.from('hello world', 'utf-8'))\nawait blobs.get(id) // Buffer.from('hello world', 'utf-8')", | |
| 41 | "const blobs = new Hyperblobs(core)\n// ID is { byteOffset: 0, blockOffset: 0, blockLength: 1, byteLength: 11 }\nconst id = await blobs.put(Buffer.from('hello world', 'utf-8'))\nawait blobs.get(id, { start: 1, length: 2 }) // Buffer.from('el', 'utf-8')", | |
| 42 | "npm i hyperblobs" | |
| 43 | ] | |
| 44 | }, | |
| 45 | "patterns": [ | |
| 46 | "streaming" | |
| 47 | ] | |
| 48 | } |
| … | … | @@ -56,11 +56,54 @@ await blobs.get(id, { start: 1, length: 2 }) // Buffer.from('el', 'utf-8') |
| 56 | 56 | |
| 57 | 57 | ## API Documentation |
| 58 | 58 | |
| 59 | _To be enriched in Phase 1B with deep code analysis_ | |
| 59 | _Extracted from README and code analysis_ | |
| 60 | ||
| 61 | ### Classes | |
| 62 | ||
| 63 | - `HyperBlobsBatch` | |
| 64 | - `Hyperblobs` | |
| 65 | ||
| 66 | ### Exports | |
| 67 | ||
| 68 | - default: `Hyperblobs` | |
| 69 | ||
| 70 | ||
| 71 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 72 | ||
| 60 | 73 | |
| 61 | 74 | ## Usage Examples |
| 62 | 75 | |
| 63 | _To be added in Phase 1B_ | |
| 76 | _Extracted from README_ | |
| 77 | ||
| 78 | ### Example 1 | |
| 79 | ||
| 80 | ```javascript | |
| 81 | const blobs = new Hyperblobs(core) | |
| 82 | // ID is { byteOffset: 0, blockOffset: 0, blockLength: 1, byteLength: 11 } | |
| 83 | const id = await blobs.put(Buffer.from('hello world', 'utf-8')) | |
| 84 | await blobs.get(id) // Buffer.from('hello world', 'utf-8') | |
| 85 | ``` | |
| 86 | ||
| 87 | ### Example 2 | |
| 88 | ||
| 89 | ```javascript | |
| 90 | const blobs = new Hyperblobs(core) | |
| 91 | // ID is { byteOffset: 0, blockOffset: 0, blockLength: 1, byteLength: 11 } | |
| 92 | const id = await blobs.put(Buffer.from('hello world', 'utf-8')) | |
| 93 | await blobs.get(id, { start: 1, length: 2 }) // Buffer.from('el', 'utf-8') | |
| 94 | ``` | |
| 95 | ||
| 96 | ### Example 3 | |
| 97 | ||
| 98 | ```javascript | |
| 99 | npm i hyperblobs | |
| 100 | ``` | |
| 101 | ||
| 102 | ||
| 103 | ||
| 104 | ## P2P Patterns | |
| 105 | ||
| 106 | - streaming | |
| 64 | 107 | |
| 65 | 108 | ## Semantic Type |
| 66 | 109 |
| … | … | @@ -0,0 +1,42 @@ |
| 1 | { | |
| 2 | "repo": "hypercore-crypto", | |
| 3 | "timestamp": "2026-01-16T23:39:43.710Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [], | |
| 13 | "classes": [], | |
| 14 | "functions": [ | |
| 15 | { | |
| 16 | "name": "range" | |
| 17 | } | |
| 18 | ] | |
| 19 | }, | |
| 20 | "readme": { | |
| 21 | "content": "# hypercore-crypto\n\nThe crypto primitives used in hypercore, extracted into a separate module\n\n```\nnpm install hypercore-crypto\n```\n\n## Usage\n\n```js\nconst crypto = require('hypercore-crypto')\n\nconst keyPair = crypto.keyPair()\nconsole.log(keyPair) // prints a ed25519 keypair\n```\n\n## API\n\n#### `keyPair = crypto.keyPair()`\n\nReturns an `ED25519` keypair that can be used for tree signing.\n\n#### `signature = crypto.sign(message, secretKey)`\n\nSigns a message (buffer).\n\n#### `verified = crypto.verify(message, signature, publicKey)`\n\nVerifies a signature for a message.\n\n#### `hash = crypto.data(data)`\n\nHashes a leaf node in a merkle tree.\n\n#### `hash = crypto.parent(left, right)`\n\nHash a parent node in a merkle tree. `left` and `right` should look like this:\n\n```js\n{\n index: treeIndex,\n hash: hashOfThisNode,\n size: byteSizeOfThisTree\n}\n```\n\n#### `hash = crypto.tree(peaks)`\n\nHashes the merkle root of the tree. `peaks` should be an array of the peaks of the tree and should look like above.\n\n##", | |
| 22 | "sections": [ | |
| 23 | "intro", | |
| 24 | "usage", | |
| 25 | "api", | |
| 26 | "license" | |
| 27 | ], | |
| 28 | "hasApi": true, | |
| 29 | "hasExamples": true, | |
| 30 | "exampleCount": 3, | |
| 31 | "examples": [ | |
| 32 | "npm install hypercore-crypto", | |
| 33 | "const crypto = require('hypercore-crypto')\n\nconst keyPair = crypto.keyPair()\nconsole.log(keyPair) // prints a ed25519 keypair", | |
| 34 | "{\n index: treeIndex,\n hash: hashOfThisNode,\n size: byteSizeOfThisTree\n}" | |
| 35 | ] | |
| 36 | }, | |
| 37 | "patterns": [ | |
| 38 | "append-only-log", | |
| 39 | "binary-encoding", | |
| 40 | "cryptography" | |
| 41 | ] | |
| 42 | } |
| … | … | @@ -53,11 +53,52 @@ console.log(keyPair) // prints a ed25519 keypair |
| 53 | 53 | |
| 54 | 54 | ## API Documentation |
| 55 | 55 | |
| 56 | _To be enriched in Phase 1B with deep code analysis_ | |
| 56 | _Extracted from README and code analysis_ | |
| 57 | ||
| 58 | ### Functions | |
| 59 | ||
| 60 | - `range()` | |
| 61 | ||
| 62 | ||
| 63 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 64 | ||
| 57 | 65 | |
| 58 | 66 | ## Usage Examples |
| 59 | 67 | |
| 60 | _To be added in Phase 1B_ | |
| 68 | _Extracted from README_ | |
| 69 | ||
| 70 | ### Example 1 | |
| 71 | ||
| 72 | ```javascript | |
| 73 | npm install hypercore-crypto | |
| 74 | ``` | |
| 75 | ||
| 76 | ### Example 2 | |
| 77 | ||
| 78 | ```javascript | |
| 79 | const crypto = require('hypercore-crypto') | |
| 80 | ||
| 81 | const keyPair = crypto.keyPair() | |
| 82 | console.log(keyPair) // prints a ed25519 keypair | |
| 83 | ``` | |
| 84 | ||
| 85 | ### Example 3 | |
| 86 | ||
| 87 | ```javascript | |
| 88 | { | |
| 89 | index: treeIndex, | |
| 90 | hash: hashOfThisNode, | |
| 91 | size: byteSizeOfThisTree | |
| 92 | } | |
| 93 | ``` | |
| 94 | ||
| 95 | ||
| 96 | ||
| 97 | ## P2P Patterns | |
| 98 | ||
| 99 | - append-only-log | |
| 100 | - binary-encoding | |
| 101 | - cryptography | |
| 61 | 102 | |
| 62 | 103 | ## Semantic Type |
| 63 | 104 |
| … | … | @@ -0,0 +1,64 @@ |
| 1 | { | |
| 2 | "repo": "hyperdrive-next", | |
| 3 | "timestamp": "2026-01-16T23:39:38.896Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "class" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "Hyperdrive" | |
| 21 | } | |
| 22 | ], | |
| 23 | "functions": [ | |
| 24 | { | |
| 25 | "name": "onblobs" | |
| 26 | }, | |
| 27 | { | |
| 28 | "name": "onnode" | |
| 29 | }, | |
| 30 | { | |
| 31 | "name": "onblobs" | |
| 32 | }, | |
| 33 | { | |
| 34 | "name": "callOnfinish" | |
| 35 | }, | |
| 36 | { | |
| 37 | "name": "callOndrain" | |
| 38 | }, | |
| 39 | { | |
| 40 | "name": "shallowReadStream" | |
| 41 | }, | |
| 42 | { | |
| 43 | "name": "makeBee" | |
| 44 | }, | |
| 45 | { | |
| 46 | "name": "normalizePath" | |
| 47 | } | |
| 48 | ] | |
| 49 | }, | |
| 50 | "readme": { | |
| 51 | "content": "Hyperdrive 11 is stable!\n\nSee [https://github.com/holepunchto/hyperdrive] for more\n", | |
| 52 | "sections": [ | |
| 53 | "intro" | |
| 54 | ], | |
| 55 | "hasApi": false, | |
| 56 | "hasExamples": false, | |
| 57 | "exampleCount": 0, | |
| 58 | "examples": [] | |
| 59 | }, | |
| 60 | "patterns": [ | |
| 61 | "binary-encoding", | |
| 62 | "streaming" | |
| 63 | ] | |
| 64 | } |
| … | … | @@ -43,12 +43,40 @@ See [https://github.com/holepunchto/hyperdrive] for more |
| 43 | 43 | |
| 44 | 44 | ## API Documentation |
| 45 | 45 | |
| 46 | _To be enriched in Phase 1B with deep code analysis_ | |
| 46 | _Extracted from code analysis_ | |
| 47 | ||
| 48 | ### Classes | |
| 49 | ||
| 50 | - `Hyperdrive` | |
| 51 | ||
| 52 | ### Functions | |
| 53 | ||
| 54 | - `onblobs()` | |
| 55 | - `onnode()` | |
| 56 | - `onblobs()` | |
| 57 | - `callOnfinish()` | |
| 58 | - `callOndrain()` | |
| 59 | - `shallowReadStream()` | |
| 60 | - `makeBee()` | |
| 61 | - `normalizePath()` | |
| 62 | ||
| 63 | ### Exports | |
| 64 | ||
| 65 | - default: `class` | |
| 66 | ||
| 67 | ||
| 68 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 69 | ||
| 47 | 70 | |
| 48 | 71 | ## Usage Examples |
| 49 | 72 | |
| 50 | 73 | _To be added in Phase 1B_ |
| 51 | 74 | |
| 75 | ## P2P Patterns | |
| 76 | ||
| 77 | - binary-encoding | |
| 78 | - streaming | |
| 79 | ||
| 52 | 80 | ## Semantic Type |
| 53 | 81 | |
| 54 | 82 | _To be classified in Phase 2_ |
| … | … | @@ -0,0 +1,39 @@ |
| 1 | { | |
| 2 | "repo": "hypershell", | |
| 3 | "timestamp": "2026-01-16T23:39:33.006Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": {}, | |
| 11 | "readme": { | |
| 12 | "content": "# hypershell\n\nSpawn shells anywhere. Fully peer-to-peer, authenticated, and end to end encrypted.\n\n## Install\n```\nnpm i -g hypershell\n```\n\n## Usage\n```shell\n# Create keys\nhypershell-keygen [-f keyfile] [-c comment]\n\n# Create a P2P server\nhypershell-server [-f keyfile] [--firewall filename] [--disable-firewall] [--protocol name]\n\n# Connect to a P2P shell\nhypershell <server key or name> [-f keyfile]\n\n# Local tunnel that forwards to remote host\nhypershell <server key or name> -L [address:]port:host:hostport\n\n# Copy files (download and upload)\nhypershell-copy <[@host:]source> <[@host:]target> [-f keyfile]\n```\n\nUse `--help` with any command for more information, for example `hypershell-server --help`.\n\n## First steps\nKeys are automatically created with a default filename on first run.\n\nOtherwise, you can first do:\n```bash\nhypershell-keygen\n```\n\nJust connect to servers (they have to allow your public key):\n```bash\nhypershell <server name or public key>\n```\n\nYou could also create a server:\n``", | |
| 13 | "sections": [ | |
| 14 | "intro", | |
| 15 | "install", | |
| 16 | "usage", | |
| 17 | "first steps", | |
| 18 | "known peers", | |
| 19 | "hypershell-copy", | |
| 20 | "local tunnel", | |
| 21 | "multiple keys", | |
| 22 | "restrict server protocols", | |
| 23 | "license" | |
| 24 | ], | |
| 25 | "hasApi": true, | |
| 26 | "hasExamples": true, | |
| 27 | "exampleCount": 14, | |
| 28 | "examples": [ | |
| 29 | "npm i -g hypershell", | |
| 30 | "Use `--help` with any command for more information, for example `hypershell-server --help`.\n\n## First steps\nKeys are automatically created with a default filename on first run.\n\nOtherwise, you can first do:", | |
| 31 | "Just connect to servers (they have to allow your public key):" | |
| 32 | ] | |
| 33 | }, | |
| 34 | "patterns": [ | |
| 35 | "dht-discovery", | |
| 36 | "stream-multiplexing", | |
| 37 | "binary-encoding" | |
| 38 | ] | |
| 39 | } |
| … | … | @@ -65,11 +65,46 @@ hypershell <server key or name> [-f keyfile] |
| 65 | 65 | |
| 66 | 66 | ## API Documentation |
| 67 | 67 | |
| 68 | _To be enriched in Phase 1B with deep code analysis_ | |
| 68 | _Extracted from README and code analysis_ | |
| 69 | ||
| 70 | ||
| 71 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 72 | ||
| 69 | 73 | |
| 70 | 74 | ## Usage Examples |
| 71 | 75 | |
| 72 | _To be added in Phase 1B_ | |
| 76 | _Extracted from README_ | |
| 77 | ||
| 78 | ### Example 1 | |
| 79 | ||
| 80 | ```javascript | |
| 81 | npm i -g hypershell | |
| 82 | ``` | |
| 83 | ||
| 84 | ### Example 2 | |
| 85 | ||
| 86 | ```javascript | |
| 87 | Use `--help` with any command for more information, for example `hypershell-server --help`. | |
| 88 | ||
| 89 | ## First steps | |
| 90 | Keys are automatically created with a default filename on first run. | |
| 91 | ||
| 92 | Otherwise, you can first do: | |
| 93 | ``` | |
| 94 | ||
| 95 | ### Example 3 | |
| 96 | ||
| 97 | ```javascript | |
| 98 | Just connect to servers (they have to allow your public key): | |
| 99 | ``` | |
| 100 | ||
| 101 | ||
| 102 | ||
| 103 | ## P2P Patterns | |
| 104 | ||
| 105 | - dht-discovery | |
| 106 | - stream-multiplexing | |
| 107 | - binary-encoding | |
| 73 | 108 | |
| 74 | 109 | ## Semantic Type |
| 75 | 110 |
| … | … | @@ -0,0 +1,33 @@ |
| 1 | { | |
| 2 | "repo": "hyperssh", | |
| 3 | "timestamp": "2026-01-16T23:39:34.223Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": {}, | |
| 11 | "readme": { | |
| 12 | "content": "# hyperssh\n\nSSH and SSHFS over the [Hyperswarm DHT](https://github.com/holepunchto/hyperdht)!\n\n## Installation\n```\nnpm install -g hyperssh // ssh / fuse client stubs\nnpm install -g hypertele // hyperswarm server proxy\nnpm install -g hyper-cmd-utils // keygen utils\n```\n\n## Usage\n\n### Server\n\nOn a server\n\n```sh\nhyper-cmd-util-keygen --gen_seed\n-> SEED\n\nhypertele-server --seed SEED -l 22\n-> PEER_KEY\n```\n\nThis will start announcing the server on the DHT.\n\n### Client\n\nOn the client\n\n```sh\nhyperssh -s ab01f... -u maf\nhyperssh -s ab01f... -u maf -i keypair.json\n```\n\nRead more about using identities here: https://github.com/prdn/hyper-cmd-docs/blob/main/identity.md\n\nSSHFS (mount a remove fs/folder via ssh)\n\n```sh\nhyperssh-fuse -s ab01f... -u maf -m ~/mnt\n```\n\nHyperswarm will do UDP holepunching under the hood, so even if your server is located on a home network it should be accessible.\n\n### Windows RDP\n\nYou can also use hyperssh with Windows RDP to remotely log in to your windows machines.\n\nOn", | |
| 13 | "sections": [ | |
| 14 | "intro", | |
| 15 | "installation", | |
| 16 | "usage", | |
| 17 | "the hyper-cmd system", | |
| 18 | "license" | |
| 19 | ], | |
| 20 | "hasApi": true, | |
| 21 | "hasExamples": true, | |
| 22 | "exampleCount": 5, | |
| 23 | "examples": [ | |
| 24 | "npm install -g hyperssh // ssh / fuse client stubs\nnpm install -g hypertele // hyperswarm server proxy\nnpm install -g hyper-cmd-utils // keygen utils", | |
| 25 | "This will start announcing the server on the DHT.\n\n### Client\n\nOn the client", | |
| 26 | "Read more about using identities here: https://github.com/prdn/hyper-cmd-docs/blob/main/identity.md\n\nSSHFS (mount a remove fs/folder via ssh)" | |
| 27 | ] | |
| 28 | }, | |
| 29 | "patterns": [ | |
| 30 | "peer-discovery", | |
| 31 | "dht-discovery" | |
| 32 | ] | |
| 33 | } |
| … | … | @@ -55,11 +55,48 @@ hyper-cmd-util-keygen --gen_seed |
| 55 | 55 | |
| 56 | 56 | ## API Documentation |
| 57 | 57 | |
| 58 | _To be enriched in Phase 1B with deep code analysis_ | |
| 58 | _Extracted from README and code analysis_ | |
| 59 | ||
| 60 | ||
| 61 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 62 | ||
| 59 | 63 | |
| 60 | 64 | ## Usage Examples |
| 61 | 65 | |
| 62 | _To be added in Phase 1B_ | |
| 66 | _Extracted from README_ | |
| 67 | ||
| 68 | ### Example 1 | |
| 69 | ||
| 70 | ```javascript | |
| 71 | npm install -g hyperssh // ssh / fuse client stubs | |
| 72 | npm install -g hypertele // hyperswarm server proxy | |
| 73 | npm install -g hyper-cmd-utils // keygen utils | |
| 74 | ``` | |
| 75 | ||
| 76 | ### Example 2 | |
| 77 | ||
| 78 | ```javascript | |
| 79 | This will start announcing the server on the DHT. | |
| 80 | ||
| 81 | ### Client | |
| 82 | ||
| 83 | On the client | |
| 84 | ``` | |
| 85 | ||
| 86 | ### Example 3 | |
| 87 | ||
| 88 | ```javascript | |
| 89 | Read more about using identities here: https://github.com/prdn/hyper-cmd-docs/blob/main/identity.md | |
| 90 | ||
| 91 | SSHFS (mount a remove fs/folder via ssh) | |
| 92 | ``` | |
| 93 | ||
| 94 | ||
| 95 | ||
| 96 | ## P2P Patterns | |
| 97 | ||
| 98 | - peer-discovery | |
| 99 | - dht-discovery | |
| 63 | 100 | |
| 64 | 101 | ## Semantic Type |
| 65 | 102 |
| … | … | @@ -0,0 +1,56 @@ |
| 1 | { | |
| 2 | "repo": "hyperswarm-dht-relay", | |
| 3 | "timestamp": "2026-01-16T23:39:39.293Z", | |
| 4 | "entryPoint": "./index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "./index.js", | |
| 8 | "exports": { | |
| 9 | ".": "./index.js", | |
| 10 | "./tcp": "./tcp.js", | |
| 11 | "./ws": "./ws.js" | |
| 12 | } | |
| 13 | } | |
| 14 | }, | |
| 15 | "api": { | |
| 16 | "file": "./index.js", | |
| 17 | "exports": [ | |
| 18 | { | |
| 19 | "type": "default", | |
| 20 | "name": "Node" | |
| 21 | } | |
| 22 | ], | |
| 23 | "classes": [], | |
| 24 | "functions": [ | |
| 25 | { | |
| 26 | "name": "relay" | |
| 27 | } | |
| 28 | ] | |
| 29 | }, | |
| 30 | "readme": { | |
| 31 | "content": "# Hyperswarm Relay\n\n> :test_tube: This project is still experimental. **Do not use it in production**.\n\nRelaying the Hyperswarm DHT over framed streams to bring decentralized networking to everyone.\n\n## Installation\n\n```sh\nnpm install @hyperswarm/dht-relay\n```\n\n## Usage\n\nOn the relaying side:\n\n```js\nimport DHT from 'hyperdht'\nimport { relay } from '@hyperswarm/dht-relay'\n\nrelay(new DHT(), stream)\n```\n\nOn the relayed side:\n\n```js\nimport DHT from '@hyperswarm/dht-relay'\n\nconst dht = new DHT(stream)\n```\n\nFrom here, the API matches that of the Hyperswarm DHT: <https://github.com/holepunchto/hyperdht#api>\n\n### Transports\n\nAs a convenience, we provide stream wrappers for common transport protocols. These may or may not be appropriate for your particular use case and so your mileage may vary.\n\n<details>\n<summary>TCP</summary>\n\nThe TCP wrapper is a re-export of <https://github.com/holepunchto/hyperswarm-secret-stream> which adds both framing and encryption.\n\nOn the relaying side:\n\n```js\nimport", | |
| 32 | "sections": [ | |
| 33 | "intro", | |
| 34 | "installation", | |
| 35 | "usage", | |
| 36 | "protocol", | |
| 37 | "license" | |
| 38 | ], | |
| 39 | "hasApi": true, | |
| 40 | "hasExamples": true, | |
| 41 | "exampleCount": 8, | |
| 42 | "examples": [ | |
| 43 | "## Usage\n\nOn the relaying side:", | |
| 44 | "On the relayed side:", | |
| 45 | "From here, the API matches that of the Hyperswarm DHT: <https://github.com/holepunchto/hyperdht#api>\n\n### Transports\n\nAs a convenience, we provide stream wrappers for common transport protocols. These may or may not be appropriate for your particular use case and so your mileage may vary.\n\n<details>\n<summary>TCP</summary>\n\nThe TCP wrapper is a re-export of <https://github.com/holepunchto/hyperswarm-secret-stream> which adds both framing and encryption.\n\nOn the relaying side:" | |
| 46 | ] | |
| 47 | }, | |
| 48 | "patterns": [ | |
| 49 | "peer-discovery", | |
| 50 | "dht-discovery", | |
| 51 | "stream-multiplexing", | |
| 52 | "binary-encoding", | |
| 53 | "cryptography", | |
| 54 | "streaming" | |
| 55 | ] | |
| 56 | } |
| … | … | @@ -69,11 +69,65 @@ import { relay } from '@hyperswarm/dht-relay' |
| 69 | 69 | |
| 70 | 70 | ## API Documentation |
| 71 | 71 | |
| 72 | _To be enriched in Phase 1B with deep code analysis_ | |
| 72 | _Extracted from README and code analysis_ | |
| 73 | ||
| 74 | ### Functions | |
| 75 | ||
| 76 | - `relay()` | |
| 77 | ||
| 78 | ### Exports | |
| 79 | ||
| 80 | - default: `Node` | |
| 81 | ||
| 82 | ||
| 83 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 84 | ||
| 73 | 85 | |
| 74 | 86 | ## Usage Examples |
| 75 | 87 | |
| 76 | _To be added in Phase 1B_ | |
| 88 | _Extracted from README_ | |
| 89 | ||
| 90 | ### Example 1 | |
| 91 | ||
| 92 | ```javascript | |
| 93 | ## Usage | |
| 94 | ||
| 95 | On the relaying side: | |
| 96 | ``` | |
| 97 | ||
| 98 | ### Example 2 | |
| 99 | ||
| 100 | ```javascript | |
| 101 | On the relayed side: | |
| 102 | ``` | |
| 103 | ||
| 104 | ### Example 3 | |
| 105 | ||
| 106 | ```javascript | |
| 107 | From here, the API matches that of the Hyperswarm DHT: <https://github.com/holepunchto/hyperdht#api> | |
| 108 | ||
| 109 | ### Transports | |
| 110 | ||
| 111 | As a convenience, we provide stream wrappers for common transport protocols. These may or may not be appropriate for your particular use case and so your mileage may vary. | |
| 112 | ||
| 113 | <details> | |
| 114 | <summary>TCP</summary> | |
| 115 | ||
| 116 | The TCP wrapper is a re-export of <https://github.com/holepunchto/hyperswarm-secret-stream> which adds both framing and encryption. | |
| 117 | ||
| 118 | On the relaying side: | |
| 119 | ``` | |
| 120 | ||
| 121 | ||
| 122 | ||
| 123 | ## P2P Patterns | |
| 124 | ||
| 125 | - peer-discovery | |
| 126 | - dht-discovery | |
| 127 | - stream-multiplexing | |
| 128 | - binary-encoding | |
| 129 | - cryptography | |
| 130 | - streaming | |
| 77 | 131 | |
| 78 | 132 | ## Semantic Type |
| 79 | 133 |
| … | … | @@ -0,0 +1,55 @@ |
| 1 | { | |
| 2 | "repo": "hyperswarm-seeders", | |
| 3 | "timestamp": "2026-01-16T23:39:52.972Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "class" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "MutableRecord" | |
| 21 | }, | |
| 22 | { | |
| 23 | "name": "SeederSwarm" | |
| 24 | } | |
| 25 | ], | |
| 26 | "functions": [ | |
| 27 | { | |
| 28 | "name": "pause" | |
| 29 | }, | |
| 30 | { | |
| 31 | "name": "retry" | |
| 32 | } | |
| 33 | ] | |
| 34 | }, | |
| 35 | "readme": { | |
| 36 | "content": "# @hyperswarm/seeders\n\nA seeders only swarm, verified by a mutable record\n\n```\nnpm install @hyperswarm/seeders\n```\n\nNote that the list of seeds are stored in a verifiable record in the DHT,\nmeaning no one can spoof it, but other people can read it.\n\n## Usage\n\n``` js\nconst Seeders = require('@hyperswarm/seeders')\n\nconst swarm = new Seeders(firstSeedPublicKey, {\n dht, // optional dht new to use\n keyPair, // optional key pair to use, defaults to dht.defaultKeyPair\n maxClientConnections // how many connections to make to the seed, defaults to 2\n})\n\nswarm.on('connection', function (connection) {\n console.log('got connection...')\n})\n\n// if you are the first seed, add more seeds by passing a record\nif (swarm.owner) {\n await swarm.join({\n seeds: [\n publicKey1,\n publicKey2,\n ...\n ],\n // optionally add info about the hypercore being seeded\n core: {\n length: 42,\n fork: 0\n }\n })\n} else {\n await swarm.join()\n}\n```\n\n## License\n\nApache-2.0\n", | |
| 37 | "sections": [ | |
| 38 | "intro", | |
| 39 | "usage", | |
| 40 | "license" | |
| 41 | ], | |
| 42 | "hasApi": true, | |
| 43 | "hasExamples": true, | |
| 44 | "exampleCount": 1, | |
| 45 | "examples": [ | |
| 46 | "npm install @hyperswarm/seeders" | |
| 47 | ] | |
| 48 | }, | |
| 49 | "patterns": [ | |
| 50 | "append-only-log", | |
| 51 | "peer-discovery", | |
| 52 | "dht-discovery", | |
| 53 | "binary-encoding" | |
| 54 | ] | |
| 55 | } |
| … | … | @@ -55,11 +55,44 @@ const swarm = new Seeders(firstSeedPublicKey, { |
| 55 | 55 | |
| 56 | 56 | ## API Documentation |
| 57 | 57 | |
| 58 | _To be enriched in Phase 1B with deep code analysis_ | |
| 58 | _Extracted from README and code analysis_ | |
| 59 | ||
| 60 | ### Classes | |
| 61 | ||
| 62 | - `MutableRecord` | |
| 63 | - `SeederSwarm` | |
| 64 | ||
| 65 | ### Functions | |
| 66 | ||
| 67 | - `pause()` | |
| 68 | - `retry()` | |
| 69 | ||
| 70 | ### Exports | |
| 71 | ||
| 72 | - default: `class` | |
| 73 | ||
| 74 | ||
| 75 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 76 | ||
| 59 | 77 | |
| 60 | 78 | ## Usage Examples |
| 61 | 79 | |
| 62 | _To be added in Phase 1B_ | |
| 80 | _Extracted from README_ | |
| 81 | ||
| 82 | ### Example 1 | |
| 83 | ||
| 84 | ```javascript | |
| 85 | npm install @hyperswarm/seeders | |
| 86 | ``` | |
| 87 | ||
| 88 | ||
| 89 | ||
| 90 | ## P2P Patterns | |
| 91 | ||
| 92 | - append-only-log | |
| 93 | - peer-discovery | |
| 94 | - dht-discovery | |
| 95 | - binary-encoding | |
| 63 | 96 | |
| 64 | 97 | ## Semantic Type |
| 65 | 98 |
| … | … | @@ -0,0 +1,69 @@ |
| 1 | { | |
| 2 | "repo": "keet-identity-key", | |
| 3 | "timestamp": "2026-01-16T23:39:49.447Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "class" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "IdentityKey" | |
| 21 | } | |
| 22 | ], | |
| 23 | "functions": [ | |
| 24 | { | |
| 25 | "name": "validateProof" | |
| 26 | }, | |
| 27 | { | |
| 28 | "name": "validateAttestedData" | |
| 29 | }, | |
| 30 | { | |
| 31 | "name": "getLastKey" | |
| 32 | }, | |
| 33 | { | |
| 34 | "name": "keyPath" | |
| 35 | }, | |
| 36 | { | |
| 37 | "name": "identityKeyPath" | |
| 38 | }, | |
| 39 | { | |
| 40 | "name": "discoveryCorePath" | |
| 41 | }, | |
| 42 | { | |
| 43 | "name": "symmetricPath" | |
| 44 | }, | |
| 45 | { | |
| 46 | "name": "encryptionKeyPath" | |
| 47 | } | |
| 48 | ] | |
| 49 | }, | |
| 50 | "readme": { | |
| 51 | "content": "# keet-identity-key\n\nHierarchical keychains that derives deterministic Ed25519 keypairs\n\n```\nnpm install keet-identity-key\n```\n\n## Usage\n\n``` js\nconst IdentityKey = require('keet-identity-key')\n\nconst mnemonic = IdentityKey.generateMnemonic()\nconst id = await IdentityKey.from({ mnemonic })\n\nconst proof0 = id.bootstrap(mainDevice.publicKey)\nconst proof = IdentityKey.attest(auxillaryDevice.publicKey, mainDevice, proof0)\n\nconst info = IdentityKey.verify(proof)\n\nif (info === null) {\n // verification failed\n} else {\n console.log(b4a.equals(info.identityPublicKey, id.identityPublicKey)) // true\n console.log(b4a.equals(info.publicKey, auxillaryDevice.publicKey)) // true\n}\n```\n\n## API\n\n#### `mnemonic = IdentityKey.generateMnemonic()`\n\nGenerate a new `mnemonic`\n\n#### `seed = IdentityKey.generateSeed(mnemonic)`\n\nReturns a 32-byte buffer with entropy derived from `mnemonic`\n\n#### `const identity = new IdentityKeyPair(keyChain)`\n\nInstantiate a new `IdentityKey`\n\n#### `identity.identityPublicKey", | |
| 52 | "sections": [ | |
| 53 | "intro", | |
| 54 | "usage", | |
| 55 | "api", | |
| 56 | "license" | |
| 57 | ], | |
| 58 | "hasApi": true, | |
| 59 | "hasExamples": true, | |
| 60 | "exampleCount": 1, | |
| 61 | "examples": [ | |
| 62 | "npm install keet-identity-key" | |
| 63 | ] | |
| 64 | }, | |
| 65 | "patterns": [ | |
| 66 | "binary-encoding", | |
| 67 | "cryptography" | |
| 68 | ] | |
| 69 | } |
| … | … | @@ -56,11 +56,47 @@ const info = IdentityKey.verify(proof) |
| 56 | 56 | |
| 57 | 57 | ## API Documentation |
| 58 | 58 | |
| 59 | _To be enriched in Phase 1B with deep code analysis_ | |
| 59 | _Extracted from README and code analysis_ | |
| 60 | ||
| 61 | ### Classes | |
| 62 | ||
| 63 | - `IdentityKey` | |
| 64 | ||
| 65 | ### Functions | |
| 66 | ||
| 67 | - `validateProof()` | |
| 68 | - `validateAttestedData()` | |
| 69 | - `getLastKey()` | |
| 70 | - `keyPath()` | |
| 71 | - `identityKeyPath()` | |
| 72 | - `discoveryCorePath()` | |
| 73 | - `symmetricPath()` | |
| 74 | - `encryptionKeyPath()` | |
| 75 | ||
| 76 | ### Exports | |
| 77 | ||
| 78 | - default: `class` | |
| 79 | ||
| 80 | ||
| 81 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 82 | ||
| 60 | 83 | |
| 61 | 84 | ## Usage Examples |
| 62 | 85 | |
| 63 | _To be added in Phase 1B_ | |
| 86 | _Extracted from README_ | |
| 87 | ||
| 88 | ### Example 1 | |
| 89 | ||
| 90 | ```javascript | |
| 91 | npm install keet-identity-key | |
| 92 | ``` | |
| 93 | ||
| 94 | ||
| 95 | ||
| 96 | ## P2P Patterns | |
| 97 | ||
| 98 | - binary-encoding | |
| 99 | - cryptography | |
| 64 | 100 | |
| 65 | 101 | ## Semantic Type |
| 66 | 102 |
| … | … | @@ -0,0 +1,19 @@ |
| 1 | { | |
| 2 | "repo": "keet-mobile-releases", | |
| 3 | "timestamp": "2026-01-16T23:39:38.136Z", | |
| 4 | "entryPoint": null, | |
| 5 | "exports": {}, | |
| 6 | "api": {}, | |
| 7 | "readme": { | |
| 8 | "content": "# Keet Mobile App\n\n[](https://gasolin.idv.tw/keetlink/#key=yryskey4bdbxfkaijjankt1e7wecr4w3bztqhheoqkfcyxcs6qjm6gwxecqng6t778stk8zbdic59a3noutugyn8u4gjbi18wgpeub3f5r&title=Bug%20Bandits%F0%9F%90%9E)\n\nRelease download link: https://github.com/holepunchto/keet-mobile-releases/releases\n\nOr you can download Keet Apk from Keet pear://keet/yfo6nemwt5oik3k3hnadrzbdz4txwdghpdt3zrhrd1wycynkn88keu43a4i64ux57xji85e3mej7s561a1qbm4cbtrgaea7jpko8may74bia3yhm4pihqum73ec16yun4togs13ry8tquahhx18x5fsks9r7aye\n\n\nYou can download the latest official Keet Android `apk` here.\nFor Play Store/App Store versions and the usage instructions, please visit https://keet.io/\n\nZH:\n您可以由此下载 Keet 官方提供的安卓 APK 档案。\n若您可以直接使用苹果/安卓商店安装应用,请造访 https://keet.io/\n\nGerman:\nSie können die neueste offizielle Keet Android APK hier herunterladen.\nFür die Versionen im Play Store/App Store und die Anweisungen zur Nutzung besuchen Sie bitte https://keet.io/\n\nDutch:\nU kunt ", | |
| 9 | "sections": [ | |
| 10 | "intro", | |
| 11 | "verify the download file" | |
| 12 | ], | |
| 13 | "hasApi": false, | |
| 14 | "hasExamples": false, | |
| 15 | "exampleCount": 0, | |
| 16 | "examples": [] | |
| 17 | }, | |
| 18 | "patterns": [] | |
| 19 | } |
| … | … | @@ -36,7 +36,11 @@ Für die Versionen im Play Store/App Store und die Anweisungen zur Nutzung besuc |
| 36 | 36 | |
| 37 | 37 | ## API Documentation |
| 38 | 38 | |
| 39 | _To be enriched in Phase 1B with deep code analysis_ | |
| 39 | _Extracted from code analysis_ | |
| 40 | ||
| 41 | ||
| 42 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 43 | ||
| 40 | 44 | |
| 41 | 45 | ## Usage Examples |
| 42 | 46 |
| … | … | @@ -0,0 +1,71 @@ |
| 1 | { | |
| 2 | "repo": "keypear", | |
| 3 | "timestamp": "2026-01-16T23:39:46.925Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "Keychain" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "Keychain" | |
| 21 | } | |
| 22 | ], | |
| 23 | "functions": [ | |
| 24 | { | |
| 25 | "name": "add" | |
| 26 | }, | |
| 27 | { | |
| 28 | "name": "fromKeyPair" | |
| 29 | }, | |
| 30 | { | |
| 31 | "name": "allocKeyPair" | |
| 32 | }, | |
| 33 | { | |
| 34 | "name": "toScalarKeyPair" | |
| 35 | }, | |
| 36 | { | |
| 37 | "name": "tweakKeyPair" | |
| 38 | }, | |
| 39 | { | |
| 40 | "name": "createSigner" | |
| 41 | }, | |
| 42 | { | |
| 43 | "name": "verify" | |
| 44 | }, | |
| 45 | { | |
| 46 | "name": "toBuffer" | |
| 47 | } | |
| 48 | ] | |
| 49 | }, | |
| 50 | "readme": { | |
| 51 | "content": "# keypear\n\n🔑🍐 Keychain that derives deterministic Ed25519 keypairs and attestations\n\n```\nnpm install keypear\n```\n\n## Usage\n\n``` js\nconst Keychain = require('keypear')\n\nconst keys = new Keychain()\n\nconst cur = keys.get() // returns the current keypair instance\nconst foo = keys.get('foo') // tweaks and returns a keypair instance for 'foo'\n\nconst sub = keys.sub('bar') // get a sub keychain tweaked by 'bar'\nconst subsub = sub.sub('baz') // sub on the sub chain\n\n// to sign things\n\nconst sig = cur.sign(message)\nconst publicKey = cur.publicKey\n```\n\n## API\n\n#### `keys = new Keychain(publicKeyOrKeyPair)`\n\nMake a new Keychain instance.\n\n```js\nconst keys = new Keychain() // generates a fresh keypair for you\nconst keys = new Keychain(publicKey) // generate a \"readonly\" keychain\nconst keys = new Keychain(keyPair) // generate a keychain from a keypair\n```\n\n#### `keys.home`\n\nPoints to the keypair that was used to construct the Keychain.\n\n#### `keys.base`\n\nPoints to current checkout, or home if no c", | |
| 52 | "sections": [ | |
| 53 | "intro", | |
| 54 | "usage", | |
| 55 | "api", | |
| 56 | "bootstrapping helpers", | |
| 57 | "license" | |
| 58 | ], | |
| 59 | "hasApi": true, | |
| 60 | "hasExamples": true, | |
| 61 | "exampleCount": 9, | |
| 62 | "examples": [ | |
| 63 | "npm install keypear", | |
| 64 | "## API\n\n#### `keys = new Keychain(publicKeyOrKeyPair)`\n\nMake a new Keychain instance.", | |
| 65 | "#### `keys.home`\n\nPoints to the keypair that was used to construct the Keychain.\n\n#### `keys.base`\n\nPoints to current checkout, or home if no checkout was made.\n\n#### `keys.tweak`\n\nPoints to the current tweak used.\n\n#### `keys.head`\n\nThe key pair of this chain, basically `base + tweak`.\n\n#### `keys = Keychain.from(keyChainOrPublicKeyOrKeyPair)`\n\nSame as above, except it will return the Keychain if passed to it.\nUseful to avoid a peer dependency on the Keychain in your application, ie" | |
| 66 | ] | |
| 67 | }, | |
| 68 | "patterns": [ | |
| 69 | "cryptography" | |
| 70 | ] | |
| 71 | } |
| … | … | @@ -52,11 +52,81 @@ const subsub = sub.sub('baz') // sub on the sub chain |
| 52 | 52 | |
| 53 | 53 | ## API Documentation |
| 54 | 54 | |
| 55 | _To be enriched in Phase 1B with deep code analysis_ | |
| 55 | _Extracted from README and code analysis_ | |
| 56 | ||
| 57 | ### Classes | |
| 58 | ||
| 59 | - `Keychain` | |
| 60 | ||
| 61 | ### Functions | |
| 62 | ||
| 63 | - `add()` | |
| 64 | - `fromKeyPair()` | |
| 65 | - `allocKeyPair()` | |
| 66 | - `toScalarKeyPair()` | |
| 67 | - `tweakKeyPair()` | |
| 68 | - `createSigner()` | |
| 69 | - `verify()` | |
| 70 | - `toBuffer()` | |
| 71 | ||
| 72 | ### Exports | |
| 73 | ||
| 74 | - default: `Keychain` | |
| 75 | ||
| 76 | ||
| 77 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 78 | ||
| 56 | 79 | |
| 57 | 80 | ## Usage Examples |
| 58 | 81 | |
| 59 | _To be added in Phase 1B_ | |
| 82 | _Extracted from README_ | |
| 83 | ||
| 84 | ### Example 1 | |
| 85 | ||
| 86 | ```javascript | |
| 87 | npm install keypear | |
| 88 | ``` | |
| 89 | ||
| 90 | ### Example 2 | |
| 91 | ||
| 92 | ```javascript | |
| 93 | ## API | |
| 94 | ||
| 95 | #### `keys = new Keychain(publicKeyOrKeyPair)` | |
| 96 | ||
| 97 | Make a new Keychain instance. | |
| 98 | ``` | |
| 99 | ||
| 100 | ### Example 3 | |
| 101 | ||
| 102 | ```javascript | |
| 103 | #### `keys.home` | |
| 104 | ||
| 105 | Points to the keypair that was used to construct the Keychain. | |
| 106 | ||
| 107 | #### `keys.base` | |
| 108 | ||
| 109 | Points to current checkout, or home if no checkout was made. | |
| 110 | ||
| 111 | #### `keys.tweak` | |
| 112 | ||
| 113 | Points to the current tweak used. | |
| 114 | ||
| 115 | #### `keys.head` | |
| 116 | ||
| 117 | The key pair of this chain, basically `base + tweak`. | |
| 118 | ||
| 119 | #### `keys = Keychain.from(keyChainOrPublicKeyOrKeyPair)` | |
| 120 | ||
| 121 | Same as above, except it will return the Keychain if passed to it. | |
| 122 | Useful to avoid a peer dependency on the Keychain in your application, ie | |
| 123 | ``` | |
| 124 | ||
| 125 | ||
| 126 | ||
| 127 | ## P2P Patterns | |
| 128 | ||
| 129 | - cryptography | |
| 60 | 130 | |
| 61 | 131 | ## Semantic Type |
| 62 | 132 |
| … | … | @@ -0,0 +1,24 @@ |
| 1 | { | |
| 2 | "repo": "libjs", | |
| 3 | "timestamp": "2026-01-16T23:39:37.746Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": {} | |
| 7 | }, | |
| 8 | "api": {}, | |
| 9 | "readme": { | |
| 10 | "content": "# libjs\n\nSimple and ABI stable C bindings to V8 built on libuv. It tightly integrates with libuv, using a dedicated V8 platform implementation for scheduling platform and isolate tasks on libuv event loops.\n\n## API\n\nSee [`include/js.h`](include/js.h) for the public API.\n\n### Exceptions\n\nJavaScript exceptions are used for all error handling. A negative return value therefore indicates that an exception is either pending in the case of `js_pending_exception`, or uncaught if the JavaScript execution stack is empty and an uncaught exception handler is installed in case of `js_uncaught_exception`. Furthermore, certain functions will immediately return an error value if an exception is already pending when the function was called.\n\nTo handle a pending exception in native code, rather than defer it to JavaScript, use the `js_get_and_clear_last_exception()` function. If the exception cannot be handled, it may be rethrown with `js_throw()`. If the JavaScript execution stack becomes empty withou", | |
| 11 | "sections": [ | |
| 12 | "intro", | |
| 13 | "api", | |
| 14 | "building", | |
| 15 | "alternatives", | |
| 16 | "license" | |
| 17 | ], | |
| 18 | "hasApi": true, | |
| 19 | "hasExamples": false, | |
| 20 | "exampleCount": 0, | |
| 21 | "examples": [] | |
| 22 | }, | |
| 23 | "patterns": [] | |
| 24 | } |
| … | … | @@ -43,7 +43,11 @@ When configuring the build tree, make sure to define the `GN_DIR` and `GN_OUT_DI |
| 43 | 43 | |
| 44 | 44 | ## API Documentation |
| 45 | 45 | |
| 46 | _To be enriched in Phase 1B with deep code analysis_ | |
| 46 | _Extracted from README and code analysis_ | |
| 47 | ||
| 48 | ||
| 49 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 50 | ||
| 47 | 51 | |
| 48 | 52 | ## Usage Examples |
| 49 | 53 |
| … | … | @@ -0,0 +1,21 @@ |
| 1 | { | |
| 2 | "repo": "libqjs", | |
| 3 | "timestamp": "2026-01-16T23:39:49.873Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": {} | |
| 7 | }, | |
| 8 | "api": {}, | |
| 9 | "readme": { | |
| 10 | "content": "# libqjs\n\nABI compatible replacement for <https://github.com/holepunchto/libjs> built on QuickJS. Useful for IoT, embedded, or otherwise constrained systems where the requirements of V8 can become problematic.\n\n## License\n\nApache-2.0\n", | |
| 11 | "sections": [ | |
| 12 | "intro", | |
| 13 | "license" | |
| 14 | ], | |
| 15 | "hasApi": false, | |
| 16 | "hasExamples": false, | |
| 17 | "exampleCount": 0, | |
| 18 | "examples": [] | |
| 19 | }, | |
| 20 | "patterns": [] | |
| 21 | } |
| … | … | @@ -31,7 +31,11 @@ Apache-2.0 |
| 31 | 31 | |
| 32 | 32 | ## API Documentation |
| 33 | 33 | |
| 34 | _To be enriched in Phase 1B with deep code analysis_ | |
| 34 | _Extracted from code analysis_ | |
| 35 | ||
| 36 | ||
| 37 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 38 | ||
| 35 | 39 | |
| 36 | 40 | ## Usage Examples |
| 37 | 41 |
| … | … | @@ -0,0 +1,24 @@ |
| 1 | { | |
| 2 | "repo": "libquickbit", | |
| 3 | "timestamp": "2026-01-16T23:39:57.435Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": {} | |
| 7 | }, | |
| 8 | "api": {}, | |
| 9 | "readme": { | |
| 10 | "content": "# libquickbit\n\nThe fastest bit in the West; a library for working with bit fields, accelerated using SIMD on supported hardware.\n\n## API\n\nSee [`include/quickbit.h`](include/quickbit.h) for the public API.\n\n### Indexing\n\nBit fields may be indexed to enable skipping uninteresting portions in effectively constant time. An index is two 128-ary balanced trees of bits with a set bit in a branch indicating that all bits below are the same, either unset or set depending on the tree. An index has a fixed depth of 3 with leaves of the trees being the bit field itself. A single index can therefore contain 128^3 bits (256 KiB). To index more than 256 KiB, several indices may be used.\n\nAn index is initialised using `quickbit_index_init()` and maintained using `quickbit_index_update()`:\n\n```c\nquickbit_t field = malloc(256 * 1024);\n\nquickbit_index_t index;\nquickbit_index_init(index, field, 256 * 1024);\n\nif (quickbit_set(field, 1000000, true)) {\n quickbit_index_update(index, field, 1000000);\n}\n```\n\nO", | |
| 11 | "sections": [ | |
| 12 | "intro", | |
| 13 | "api", | |
| 14 | "license" | |
| 15 | ], | |
| 16 | "hasApi": true, | |
| 17 | "hasExamples": true, | |
| 18 | "exampleCount": 1, | |
| 19 | "examples": [ | |
| 20 | "Once an index has been constructed, the `quickbit_skip_first()` and `quickbit_skip_last()` functions may be used to skip portions of the bit field that are not interesting for a given query.\n\n#### Sparse fields\n\nIn cases where memory is at a premium, an alternate API is available for indexing sparse bit fields. This API conceptually operates on several `(field, offset)` tuples and assumes that any holes encountered consist of zeros. Other than the representation of the bit field, the sparse API produces indexes that are indentical to those produced by the dense API.\n\nBit field chunks must be aligned to 128 bit boundaries, must be passed sorted by their byte offset, and must not overlap:" | |
| 21 | ] | |
| 22 | }, | |
| 23 | "patterns": [] | |
| 24 | } |
| … | … | @@ -43,11 +43,29 @@ quickbit_index_init(index, field, 256 * 1024); |
| 43 | 43 | |
| 44 | 44 | ## API Documentation |
| 45 | 45 | |
| 46 | _To be enriched in Phase 1B with deep code analysis_ | |
| 46 | _Extracted from README and code analysis_ | |
| 47 | ||
| 48 | ||
| 49 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 50 | ||
| 47 | 51 | |
| 48 | 52 | ## Usage Examples |
| 49 | 53 | |
| 50 | _To be added in Phase 1B_ | |
| 54 | _Extracted from README_ | |
| 55 | ||
| 56 | ### Example 1 | |
| 57 | ||
| 58 | ```javascript | |
| 59 | Once an index has been constructed, the `quickbit_skip_first()` and `quickbit_skip_last()` functions may be used to skip portions of the bit field that are not interesting for a given query. | |
| 60 | ||
| 61 | #### Sparse fields | |
| 62 | ||
| 63 | In cases where memory is at a premium, an alternate API is available for indexing sparse bit fields. This API conceptually operates on several `(field, offset)` tuples and assumes that any holes encountered consist of zeros. Other than the representation of the bit field, the sparse API produces indexes that are indentical to those produced by the dense API. | |
| 64 | ||
| 65 | Bit field chunks must be aligned to 128 bit boundaries, must be passed sorted by their byte offset, and must not overlap: | |
| 66 | ``` | |
| 67 | ||
| 68 | ||
| 51 | 69 | |
| 52 | 70 | ## Semantic Type |
| 53 | 71 |
| … | … | @@ -0,0 +1,26 @@ |
| 1 | { | |
| 2 | "repo": "libudx", | |
| 3 | "timestamp": "2026-01-16T23:39:36.513Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": {} | |
| 7 | }, | |
| 8 | "api": {}, | |
| 9 | "readme": { | |
| 10 | "content": "# libudx\n\nudx is reliable, multiplexed, and congestion-controlled streams over udp.\n\n## Building\n\n<https://github.com/holepunchto/bare-make> is used for building static and dynamic libraries for use outside of Node.js.\n\n```sh\nbare-make generate\nbare-make build\n```\n\n## Debugging\n\nWhen debugging native code, make sure to configure a debug build:\n\n```sh\nbare-make generate --debug\n```\n\n### Memory errors\n\nTo diagnose and debug memory errors, such as leaks and use-after-free, the collection of sanitizers provided by LLVM are recommended. The sanitizers can be enabled by passing the `--sanitize` flag when generating the build system:\n\n```sh\nbare-make generate --debug --sanitize <address|memory|undefined|leak|thread>\n```\n\nTo read more about the various sanitizers and how to use them, see:\n\n- <https://clang.llvm.org/docs/AddressSanitizer.html>\n- <https://clang.llvm.org/docs/MemorySanitizer.html>\n- <https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html>\n- <https://clang.llvm.org/docs/LeakS", | |
| 11 | "sections": [ | |
| 12 | "intro", | |
| 13 | "building", | |
| 14 | "debugging", | |
| 15 | "license" | |
| 16 | ], | |
| 17 | "hasApi": false, | |
| 18 | "hasExamples": true, | |
| 19 | "exampleCount": 2, | |
| 20 | "examples": [ | |
| 21 | "## Debugging\n\nWhen debugging native code, make sure to configure a debug build:", | |
| 22 | "### Memory errors\n\nTo diagnose and debug memory errors, such as leaks and use-after-free, the collection of sanitizers provided by LLVM are recommended. The sanitizers can be enabled by passing the `--sanitize` flag when generating the build system:" | |
| 23 | ] | |
| 24 | }, | |
| 25 | "patterns": [] | |
| 26 | } |
| … | … | @@ -43,11 +43,33 @@ bare-make generate --debug |
| 43 | 43 | |
| 44 | 44 | ## API Documentation |
| 45 | 45 | |
| 46 | _To be enriched in Phase 1B with deep code analysis_ | |
| 46 | _Extracted from code analysis_ | |
| 47 | ||
| 48 | ||
| 49 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 50 | ||
| 47 | 51 | |
| 48 | 52 | ## Usage Examples |
| 49 | 53 | |
| 50 | _To be added in Phase 1B_ | |
| 54 | _Extracted from README_ | |
| 55 | ||
| 56 | ### Example 1 | |
| 57 | ||
| 58 | ```javascript | |
| 59 | ## Debugging | |
| 60 | ||
| 61 | When debugging native code, make sure to configure a debug build: | |
| 62 | ``` | |
| 63 | ||
| 64 | ### Example 2 | |
| 65 | ||
| 66 | ```javascript | |
| 67 | ### Memory errors | |
| 68 | ||
| 69 | To diagnose and debug memory errors, such as leaks and use-after-free, the collection of sanitizers provided by LLVM are recommended. The sanitizers can be enabled by passing the `--sanitize` flag when generating the build system: | |
| 70 | ``` | |
| 71 | ||
| 72 | ||
| 51 | 73 | |
| 52 | 74 | ## Semantic Type |
| 53 | 75 |
| … | … | @@ -0,0 +1,102 @@ |
| 1 | { | |
| 2 | "repo": "mininet", | |
| 3 | "timestamp": "2026-01-16T23:39:34.594Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "Mininet" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "Mininet" | |
| 21 | }, | |
| 22 | { | |
| 23 | "name": "Controller" | |
| 24 | }, | |
| 25 | { | |
| 26 | "name": "Switch" | |
| 27 | }, | |
| 28 | { | |
| 29 | "name": "Host" | |
| 30 | } | |
| 31 | ], | |
| 32 | "functions": [ | |
| 33 | { | |
| 34 | "name": "onsocket" | |
| 35 | }, | |
| 36 | { | |
| 37 | "name": "onreadable" | |
| 38 | }, | |
| 39 | { | |
| 40 | "name": "onready" | |
| 41 | }, | |
| 42 | { | |
| 43 | "name": "onstart" | |
| 44 | }, | |
| 45 | { | |
| 46 | "name": "broadcast" | |
| 47 | }, | |
| 48 | { | |
| 49 | "name": "forward" | |
| 50 | }, | |
| 51 | { | |
| 52 | "name": "onupdate" | |
| 53 | }, | |
| 54 | { | |
| 55 | "name": "sendFromHost" | |
| 56 | }, | |
| 57 | { | |
| 58 | "name": "send" | |
| 59 | }, | |
| 60 | { | |
| 61 | "name": "kill" | |
| 62 | }, | |
| 63 | { | |
| 64 | "name": "pkill" | |
| 65 | }, | |
| 66 | { | |
| 67 | "name": "onspawn" | |
| 68 | }, | |
| 69 | { | |
| 70 | "name": "header" | |
| 71 | }, | |
| 72 | { | |
| 73 | "name": "fork" | |
| 74 | }, | |
| 75 | { | |
| 76 | "name": "noop" | |
| 77 | }, | |
| 78 | { | |
| 79 | "name": "trim" | |
| 80 | } | |
| 81 | ] | |
| 82 | }, | |
| 83 | "readme": { | |
| 84 | "content": "# mininet\n\n> Spin up and interact with virtual networks using\n> [Mininet](http://mininet.org/) and Node.js\n\n```\nnpm install mininet\n```\n\n## Usage\n\n```js\nconst Mininet = require('mininet')\n\nconst mn = new Mininet()\n\n// create a switch\nconst s1 = mn.createSwitch()\n\n// create some hosts\nconst h1 = mn.createHost()\nconst h2 = mn.createHost()\n\n// link them to the switch\nh1.link(s1)\nh2.link(s1)\n\n// start the network\nmn.start()\n\n// run a server in node\nconst proc = h1.spawn('node server.js')\n\nproc.on('message:listening', function () {\n // when h1 signals it is listening, run curl\n const proc2 = h2.spawn('curl --silent ' + h1.ip + ':10000')\n\n proc2.on('stdout', function (data) {\n process.stdout.write('h2 ' + data)\n mn.stop() // stop when h2 messages\n })\n})\n\nproc.on('stdout', function (data) {\n process.stdout.write('h1 ' + data)\n})\n```\n\nAssuming server.js looks like this\n\n```js\nconst http = require('http')\nconst mn = require('mininet/host')\n\nconst server = http.createServer(function (", | |
| 85 | "sections": [ | |
| 86 | "intro", | |
| 87 | "usage", | |
| 88 | "api", | |
| 89 | "messaging", | |
| 90 | "license" | |
| 91 | ], | |
| 92 | "hasApi": true, | |
| 93 | "hasExamples": true, | |
| 94 | "exampleCount": 8, | |
| 95 | "examples": [ | |
| 96 | "npm install mininet", | |
| 97 | "const Mininet = require('mininet')\n\nconst mn = new Mininet()\n\n// create a switch\nconst s1 = mn.createSwitch()\n\n// create some hosts\nconst h1 = mn.createHost()\nconst h2 = mn.createHost()\n\n// link them to the switch\nh1.link(s1)\nh2.link(s1)\n\n// start the network\nmn.start()\n\n// run a server in node\nconst proc = h1.spawn('node server.js')\n\nproc.on('message:listening', function () {\n // when h1 signals it is listening, run curl\n const proc2 = h2.spawn('curl --silent ' + h1.ip + ':10000')\n\n proc2.on('stdout', function (data) {\n process.stdout.write('h2 ' + data)\n mn.stop() // stop when h2 messages\n })\n})\n\nproc.on('stdout', function (data) {\n process.stdout.write('h1 ' + data)\n})", | |
| 98 | "const http = require('http')\nconst mn = require('mininet/host')\n\nconst server = http.createServer(function (req, res) {\n console.log('Server responding')\n res.end('hello from server\\n')\n})\n\nserver.listen(10000, function () {\n console.log('Server listening on', this.address().port)\n mn.send('listening') // msg the host\n})" | |
| 99 | ] | |
| 100 | }, | |
| 101 | "patterns": [] | |
| 102 | } |
| … | … | @@ -55,11 +55,109 @@ const s1 = mn.createSwitch() |
| 55 | 55 | |
| 56 | 56 | ## API Documentation |
| 57 | 57 | |
| 58 | _To be enriched in Phase 1B with deep code analysis_ | |
| 58 | _Extracted from README and code analysis_ | |
| 59 | ||
| 60 | ### Classes | |
| 61 | ||
| 62 | - `Mininet` | |
| 63 | - `Controller` | |
| 64 | - `Switch` | |
| 65 | - `Host` | |
| 66 | ||
| 67 | ### Functions | |
| 68 | ||
| 69 | - `onsocket()` | |
| 70 | - `onreadable()` | |
| 71 | - `onready()` | |
| 72 | - `onstart()` | |
| 73 | - `broadcast()` | |
| 74 | - `forward()` | |
| 75 | - `onupdate()` | |
| 76 | - `sendFromHost()` | |
| 77 | - `send()` | |
| 78 | - `kill()` | |
| 79 | - `pkill()` | |
| 80 | - `onspawn()` | |
| 81 | - `header()` | |
| 82 | - `fork()` | |
| 83 | - `noop()` | |
| 84 | - `trim()` | |
| 85 | ||
| 86 | ### Exports | |
| 87 | ||
| 88 | - default: `Mininet` | |
| 89 | ||
| 90 | ||
| 91 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 92 | ||
| 59 | 93 | |
| 60 | 94 | ## Usage Examples |
| 61 | 95 | |
| 62 | _To be added in Phase 1B_ | |
| 96 | _Extracted from README_ | |
| 97 | ||
| 98 | ### Example 1 | |
| 99 | ||
| 100 | ```javascript | |
| 101 | npm install mininet | |
| 102 | ``` | |
| 103 | ||
| 104 | ### Example 2 | |
| 105 | ||
| 106 | ```javascript | |
| 107 | const Mininet = require('mininet') | |
| 108 | ||
| 109 | const mn = new Mininet() | |
| 110 | ||
| 111 | // create a switch | |
| 112 | const s1 = mn.createSwitch() | |
| 113 | ||
| 114 | // create some hosts | |
| 115 | const h1 = mn.createHost() | |
| 116 | const h2 = mn.createHost() | |
| 117 | ||
| 118 | // link them to the switch | |
| 119 | h1.link(s1) | |
| 120 | h2.link(s1) | |
| 121 | ||
| 122 | // start the network | |
| 123 | mn.start() | |
| 124 | ||
| 125 | // run a server in node | |
| 126 | const proc = h1.spawn('node server.js') | |
| 127 | ||
| 128 | proc.on('message:listening', function () { | |
| 129 | // when h1 signals it is listening, run curl | |
| 130 | const proc2 = h2.spawn('curl --silent ' + h1.ip + ':10000') | |
| 131 | ||
| 132 | proc2.on('stdout', function (data) { | |
| 133 | process.stdout.write('h2 ' + data) | |
| 134 | mn.stop() // stop when h2 messages | |
| 135 | }) | |
| 136 | }) | |
| 137 | ||
| 138 | proc.on('stdout', function (data) { | |
| 139 | process.stdout.write('h1 ' + data) | |
| 140 | }) | |
| 141 | ``` | |
| 142 | ||
| 143 | ### Example 3 | |
| 144 | ||
| 145 | ```javascript | |
| 146 | const http = require('http') | |
| 147 | const mn = require('mininet/host') | |
| 148 | ||
| 149 | const server = http.createServer(function (req, res) { | |
| 150 | console.log('Server responding') | |
| 151 | res.end('hello from server\n') | |
| 152 | }) | |
| 153 | ||
| 154 | server.listen(10000, function () { | |
| 155 | console.log('Server listening on', this.address().port) | |
| 156 | mn.send('listening') // msg the host | |
| 157 | }) | |
| 158 | ``` | |
| 159 | ||
| 160 | ||
| 63 | 161 | |
| 64 | 162 | ## Semantic Type |
| 65 | 163 |
| … | … | @@ -0,0 +1,58 @@ |
| 1 | { | |
| 2 | "repo": "noise-handshake", | |
| 3 | "timestamp": "2026-01-16T23:39:54.133Z", | |
| 4 | "entryPoint": "noise.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "noise.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "noise.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "class" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "Writer" | |
| 21 | }, | |
| 22 | { | |
| 23 | "name": "Reader" | |
| 24 | }, | |
| 25 | { | |
| 26 | "name": "NoiseState" | |
| 27 | } | |
| 28 | ], | |
| 29 | "functions": [ | |
| 30 | { | |
| 31 | "name": "keyPattern" | |
| 32 | }, | |
| 33 | { | |
| 34 | "name": "hasPskToken" | |
| 35 | } | |
| 36 | ] | |
| 37 | }, | |
| 38 | "readme": { | |
| 39 | "content": "# noise-handshake\n\n## Usage\n```js\nconst Noise = require('noise-handshake')\nconst Cipher = require('noise-handshake/cipher')\nconst initiator = new Noise('IK', true)\nconst responder = new Noise('IK', false)\n\nconst prologue = Buffer.alloc(0)\n\n// preshared key\ninitiator.initialise(prologue, responder.s.publicKey)\nresponder.initialise(prologue)\n\n// -> e, es, s, ss\nconst message = initiator.send()\nresponder.recv(message)\n\n// <- e, ee, se\nconst reply = responder.send()\ninitiator.recv(reply)\n\nconsole.log(initiator.complete) // true\n\n// convention is to use rx for\n// sending and tx for receiving\n\n// initiator.rx === responder.tx\n// responder.rx === initiator.tx\n\n// instantiate a cipher using shared secrets\nconst send = new Cipher(initiator.tx)\nconst recieve = new Cipher(responder.rx)\n\nconst msg = Buffer.from('hello, world')\n\nconst enc = send.encrypt(msg)\nconsole.log(recieve.decrypt(enc)) // hello, world\n```\n\n## API\n\n#### `const peer = new Noise(pattern, initiator, staticKeypair, [opts])`\n\nCreat", | |
| 40 | "sections": [ | |
| 41 | "intro", | |
| 42 | "usage", | |
| 43 | "api", | |
| 44 | "license" | |
| 45 | ], | |
| 46 | "hasApi": true, | |
| 47 | "hasExamples": true, | |
| 48 | "exampleCount": 3, | |
| 49 | "examples": [ | |
| 50 | "const Noise = require('noise-handshake')\nconst Cipher = require('noise-handshake/cipher')\nconst initiator = new Noise('IK', true)\nconst responder = new Noise('IK', false)\n\nconst prologue = Buffer.alloc(0)\n\n// preshared key\ninitiator.initialise(prologue, responder.s.publicKey)\nresponder.initialise(prologue)\n\n// -> e, es, s, ss\nconst message = initiator.send()\nresponder.recv(message)\n\n// <- e, ee, se\nconst reply = responder.send()\ninitiator.recv(reply)\n\nconsole.log(initiator.complete) // true\n\n// convention is to use rx for\n// sending and tx for receiving\n\n// initiator.rx === responder.tx\n// responder.rx === initiator.tx\n\n// instantiate a cipher using shared secrets\nconst send = new Cipher(initiator.tx)\nconst recieve = new Cipher(responder.rx)\n\nconst msg = Buffer.from('hello, world')\n\nconst enc = send.encrypt(msg)\nconsole.log(recieve.decrypt(enc)) // hello, world", | |
| 51 | "{\n DHLEN,\n PKLEN,\n SKLEN,\n ALG,\n generateKeyPair,\n dh\n}", | |
| 52 | "{\n tx, // session key to decrypt messages from remote peer\n rx, // session key to encrypt messages to remote peer\n rs, // the remote peer's public key,\n hash, // a hash of the entire handshake state\n}" | |
| 53 | ] | |
| 54 | }, | |
| 55 | "patterns": [ | |
| 56 | "cryptography" | |
| 57 | ] | |
| 58 | } |
| … | … | @@ -53,11 +53,100 @@ responder.recv(message) |
| 53 | 53 | |
| 54 | 54 | ## API Documentation |
| 55 | 55 | |
| 56 | _To be enriched in Phase 1B with deep code analysis_ | |
| 56 | _Extracted from README and code analysis_ | |
| 57 | ||
| 58 | ### Classes | |
| 59 | ||
| 60 | - `Writer` | |
| 61 | - `Reader` | |
| 62 | - `NoiseState` | |
| 63 | ||
| 64 | ### Functions | |
| 65 | ||
| 66 | - `keyPattern()` | |
| 67 | - `hasPskToken()` | |
| 68 | ||
| 69 | ### Exports | |
| 70 | ||
| 71 | - default: `class` | |
| 72 | ||
| 73 | ||
| 74 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 75 | ||
| 57 | 76 | |
| 58 | 77 | ## Usage Examples |
| 59 | 78 | |
| 60 | _To be added in Phase 1B_ | |
| 79 | _Extracted from README_ | |
| 80 | ||
| 81 | ### Example 1 | |
| 82 | ||
| 83 | ```javascript | |
| 84 | const Noise = require('noise-handshake') | |
| 85 | const Cipher = require('noise-handshake/cipher') | |
| 86 | const initiator = new Noise('IK', true) | |
| 87 | const responder = new Noise('IK', false) | |
| 88 | ||
| 89 | const prologue = Buffer.alloc(0) | |
| 90 | ||
| 91 | // preshared key | |
| 92 | initiator.initialise(prologue, responder.s.publicKey) | |
| 93 | responder.initialise(prologue) | |
| 94 | ||
| 95 | // -> e, es, s, ss | |
| 96 | const message = initiator.send() | |
| 97 | responder.recv(message) | |
| 98 | ||
| 99 | // <- e, ee, se | |
| 100 | const reply = responder.send() | |
| 101 | initiator.recv(reply) | |
| 102 | ||
| 103 | console.log(initiator.complete) // true | |
| 104 | ||
| 105 | // convention is to use rx for | |
| 106 | // sending and tx for receiving | |
| 107 | ||
| 108 | // initiator.rx === responder.tx | |
| 109 | // responder.rx === initiator.tx | |
| 110 | ||
| 111 | // instantiate a cipher using shared secrets | |
| 112 | const send = new Cipher(initiator.tx) | |
| 113 | const recieve = new Cipher(responder.rx) | |
| 114 | ||
| 115 | const msg = Buffer.from('hello, world') | |
| 116 | ||
| 117 | const enc = send.encrypt(msg) | |
| 118 | console.log(recieve.decrypt(enc)) // hello, world | |
| 119 | ``` | |
| 120 | ||
| 121 | ### Example 2 | |
| 122 | ||
| 123 | ```javascript | |
| 124 | { | |
| 125 | DHLEN, | |
| 126 | PKLEN, | |
| 127 | SKLEN, | |
| 128 | ALG, | |
| 129 | generateKeyPair, | |
| 130 | dh | |
| 131 | } | |
| 132 | ``` | |
| 133 | ||
| 134 | ### Example 3 | |
| 135 | ||
| 136 | ```javascript | |
| 137 | { | |
| 138 | tx, // session key to decrypt messages from remote peer | |
| 139 | rx, // session key to encrypt messages to remote peer | |
| 140 | rs, // the remote peer's public key, | |
| 141 | hash, // a hash of the entire handshake state | |
| 142 | } | |
| 143 | ``` | |
| 144 | ||
| 145 | ||
| 146 | ||
| 147 | ## P2P Patterns | |
| 148 | ||
| 149 | - cryptography | |
| 61 | 150 | |
| 62 | 151 | ## Semantic Type |
| 63 | 152 |
| … | … | @@ -0,0 +1,19 @@ |
| 1 | { | |
| 2 | "repo": "pear-docs", | |
| 3 | "timestamp": "2026-01-16T23:39:42.072Z", | |
| 4 | "entryPoint": null, | |
| 5 | "exports": {}, | |
| 6 | "api": {}, | |
| 7 | "readme": { | |
| 8 | "content": "# Pear by Holepunch\n\n> Pear loads applications remotely from peers and allows anyone to create and share applications with peers.\n\nPear is an installable Peer-to-Peer (P2P) Runtime, Development & Deployment platform.\n\nBuild, share & extend unstoppable, zero-infrastructure P2P applications for Mobile, Desktop & Terminal.\n\nWelcome to the Internet of Peers\n\n _– Holepunch, the P2P Company_\n\n## Documentation\n\n* [Showcase](#showcase)\n* [Terms](#terms)\n* [Legend](#legend)\n* [Reference](#reference)\n* [Examples](#examples)\n* [Guides](#guides)\n* [How-tos](#how-tos)\n* [Pear Modules](#pear-modules)\n* [P2P Modules](#p2p-modules)\n* [Bare Modules](#bare-modules)\n* [Tools](#tools)\n\n### Showcase<a name=\"showcase\"></a>\n\nPeer-to-Peer applications built on, deployed with, running on Pear.\n\n| <a href=\"https://keet.io\" data-pear=\"pear://keet\" title=\"Encrypted peer-to-peer message, audio & video chat\"><img src=\"assets/keet.svg\" alt=\"Encrypted peer-to-peer message, audio & video chat\"></a> | <a href=\"ht", | |
| 9 | "sections": [ | |
| 10 | "intro", | |
| 11 | "documentation" | |
| 12 | ], | |
| 13 | "hasApi": false, | |
| 14 | "hasExamples": false, | |
| 15 | "exampleCount": 0, | |
| 16 | "examples": [] | |
| 17 | }, | |
| 18 | "patterns": [] | |
| 19 | } |
| … | … | @@ -36,7 +36,11 @@ Welcome to the Internet of Peers |
| 36 | 36 | |
| 37 | 37 | ## API Documentation |
| 38 | 38 | |
| 39 | _To be enriched in Phase 1B with deep code analysis_ | |
| 39 | _Extracted from code analysis_ | |
| 40 | ||
| 41 | ||
| 42 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 43 | ||
| 40 | 44 | |
| 41 | 45 | ## Usage Examples |
| 42 | 46 |
| … | … | @@ -0,0 +1,33 @@ |
| 1 | { | |
| 2 | "repo": "pear-expo-hello-world", | |
| 3 | "timestamp": "2026-01-16T23:39:55.039Z", | |
| 4 | "entryPoint": "node_modules/expo/AppEntry.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "node_modules/expo/AppEntry.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": {}, | |
| 11 | "readme": { | |
| 12 | "content": "# pear-expo-hello-world\n\n> [!IMPORTANT]\n> This repo is obsolete to [bare-expo](https://github.com/holepunchto/bare-expo), which is based on [react-native-bare-kit](https://github.com/holepunchto/react-native-bare-kit).\n\nA Pear Runtime `hello world` using [Bare](https://github.com/holepunchto/bare) with [Expo](https://docs.expo.dev/).\n\n## Requirements\n\nMake sure below packages are installed on your system:\n\n- `CMake` >= 3.25 - can check via `cmake --version`\n- `Android Studio` - For Android, installing Android Studio is recommended (you can follow [React Native docs](https://reactnative.dev/docs/set-up-your-environment?platform=android))\n- `Android NDK` - also make sure Android NDK version `25.1.8937393` is installed and set the `ANDROID_HOME` environment variable (see `Configure the ANDROID_HOME environment variable` section in the above React Native docs).\n\n## Build\n\n1. Clone this repo:\n\n ```\n git clone https://github.com/holepunchto/pear-expo-hello-world.git\n ```\n\n2. run fol", | |
| 13 | "sections": [ | |
| 14 | "intro", | |
| 15 | "requirements", | |
| 16 | "build", | |
| 17 | "run on device", | |
| 18 | "how it works", | |
| 19 | "short tutorial" | |
| 20 | ], | |
| 21 | "hasApi": false, | |
| 22 | "hasExamples": true, | |
| 23 | "exampleCount": 4, | |
| 24 | "examples": [ | |
| 25 | "git clone https://github.com/holepunchto/pear-expo-hello-world.git", | |
| 26 | "> [!NOTE]\n > From now on, you should run `npx bare-dev vendor sync` after updating `bare` git submodule.\n\n3. run `npm install` to install all the dependencies, or use other package manager by preference.\n\n4. run configure script from the project root (Need to append the `--configure` flag when first run)", | |
| 27 | "> could also run as `npx hello-pear --configure`, or do `npm link` then run `hello-pear --configure`.\n\n### hello-pear commands\n\nBy default the `hello-pear` script will builds bare for every architecture for both iOS and Android, but a more fine grained build could be achieved:" | |
| 28 | ] | |
| 29 | }, | |
| 30 | "patterns": [ | |
| 31 | "binary-encoding" | |
| 32 | ] | |
| 33 | } |
| … | … | @@ -62,11 +62,48 @@ Make sure below packages are installed on your system: |
| 62 | 62 | |
| 63 | 63 | ## API Documentation |
| 64 | 64 | |
| 65 | _To be enriched in Phase 1B with deep code analysis_ | |
| 65 | _Extracted from code analysis_ | |
| 66 | ||
| 67 | ||
| 68 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 69 | ||
| 66 | 70 | |
| 67 | 71 | ## Usage Examples |
| 68 | 72 | |
| 69 | _To be added in Phase 1B_ | |
| 73 | _Extracted from README_ | |
| 74 | ||
| 75 | ### Example 1 | |
| 76 | ||
| 77 | ```javascript | |
| 78 | git clone https://github.com/holepunchto/pear-expo-hello-world.git | |
| 79 | ``` | |
| 80 | ||
| 81 | ### Example 2 | |
| 82 | ||
| 83 | ```javascript | |
| 84 | > [!NOTE] | |
| 85 | > From now on, you should run `npx bare-dev vendor sync` after updating `bare` git submodule. | |
| 86 | ||
| 87 | 3. run `npm install` to install all the dependencies, or use other package manager by preference. | |
| 88 | ||
| 89 | 4. run configure script from the project root (Need to append the `--configure` flag when first run) | |
| 90 | ``` | |
| 91 | ||
| 92 | ### Example 3 | |
| 93 | ||
| 94 | ```javascript | |
| 95 | > could also run as `npx hello-pear --configure`, or do `npm link` then run `hello-pear --configure`. | |
| 96 | ||
| 97 | ### hello-pear commands | |
| 98 | ||
| 99 | By default the `hello-pear` script will builds bare for every architecture for both iOS and Android, but a more fine grained build could be achieved: | |
| 100 | ``` | |
| 101 | ||
| 102 | ||
| 103 | ||
| 104 | ## P2P Patterns | |
| 105 | ||
| 106 | - binary-encoding | |
| 70 | 107 | |
| 71 | 108 | ## Semantic Type |
| 72 | 109 |
| … | … | @@ -0,0 +1,33 @@ |
| 1 | { | |
| 2 | "repo": "pear-radio", | |
| 3 | "timestamp": "2026-01-16T23:39:52.591Z", | |
| 4 | "entryPoint": "index.html", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.html", | |
| 8 | "type": "module" | |
| 9 | } | |
| 10 | }, | |
| 11 | "api": { | |
| 12 | "file": "index.html", | |
| 13 | "exports": [], | |
| 14 | "classes": [], | |
| 15 | "functions": [] | |
| 16 | }, | |
| 17 | "readme": { | |
| 18 | "content": "# Pear Radio\n\nPear radio is a Holepunch music audio player/streamer.\n\n```\npear run pear://npyi57u7d7wx3frz5bnxaue7s44miwmyxy86tidtuxkq8axyf1io\n```\n\n<img src=\"https://user-images.githubusercontent.com/15270736/211868865-b51cdfe4-6195-4c21-8323-d7f86dced1ee.png\" width=35% height=35%>\n\n## Pear-radio on the terminal\n\n```\nnpm install -g pear-radio\n```\n\nStreamer side:\n\n```\npear-radio stream -library /path/to/your/music/library\n# Streaming on: e4f2581e0b2a9edc280a7aadb960bdc8cc71f246083b15a8ddd5e3d42c3a2b85\n```\n\nListener side:\n\n```\npear-radio listen --key e4f2581e0b2a9edc280a7aadb960bdc8cc71f246083b15a8ddd5e3d42c3a2b85 \n# Streaming to http://localhost:38059\n```\n", | |
| 19 | "sections": [ | |
| 20 | "intro", | |
| 21 | "pear-radio on the terminal" | |
| 22 | ], | |
| 23 | "hasApi": false, | |
| 24 | "hasExamples": true, | |
| 25 | "exampleCount": 4, | |
| 26 | "examples": [ | |
| 27 | "pear run pear://npyi57u7d7wx3frz5bnxaue7s44miwmyxy86tidtuxkq8axyf1io", | |
| 28 | "npm install -g pear-radio", | |
| 29 | "pear-radio stream -library /path/to/your/music/library\n# Streaming on: e4f2581e0b2a9edc280a7aadb960bdc8cc71f246083b15a8ddd5e3d42c3a2b85" | |
| 30 | ] | |
| 31 | }, | |
| 32 | "patterns": [] | |
| 33 | } |
| … | … | @@ -56,11 +56,36 @@ pear-radio stream -library /path/to/your/music/library |
| 56 | 56 | |
| 57 | 57 | ## API Documentation |
| 58 | 58 | |
| 59 | _To be enriched in Phase 1B with deep code analysis_ | |
| 59 | _Extracted from code analysis_ | |
| 60 | ||
| 61 | ||
| 62 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 63 | ||
| 60 | 64 | |
| 61 | 65 | ## Usage Examples |
| 62 | 66 | |
| 63 | _To be added in Phase 1B_ | |
| 67 | _Extracted from README_ | |
| 68 | ||
| 69 | ### Example 1 | |
| 70 | ||
| 71 | ```javascript | |
| 72 | pear run pear://npyi57u7d7wx3frz5bnxaue7s44miwmyxy86tidtuxkq8axyf1io | |
| 73 | ``` | |
| 74 | ||
| 75 | ### Example 2 | |
| 76 | ||
| 77 | ```javascript | |
| 78 | npm install -g pear-radio | |
| 79 | ``` | |
| 80 | ||
| 81 | ### Example 3 | |
| 82 | ||
| 83 | ```javascript | |
| 84 | pear-radio stream -library /path/to/your/music/library | |
| 85 | # Streaming on: e4f2581e0b2a9edc280a7aadb960bdc8cc71f246083b15a8ddd5e3d42c3a2b85 | |
| 86 | ``` | |
| 87 | ||
| 88 | ||
| 64 | 89 | |
| 65 | 90 | ## Semantic Type |
| 66 | 91 |
| … | … | @@ -0,0 +1,50 @@ |
| 1 | { | |
| 2 | "repo": "pear", | |
| 3 | "timestamp": "2026-01-16T23:39:33.885Z", | |
| 4 | "entryPoint": "./boot.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "./boot.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "./boot.js", | |
| 12 | "exports": [], | |
| 13 | "classes": [ | |
| 14 | { | |
| 15 | "name": "API" | |
| 16 | } | |
| 17 | ], | |
| 18 | "functions": [ | |
| 19 | { | |
| 20 | "name": "getBootType" | |
| 21 | } | |
| 22 | ] | |
| 23 | }, | |
| 24 | "readme": { | |
| 25 | "content": "# 🍐 Pear\n\n## Setup\n \nVia Node.js's npm's `npx`:\n\n```sh\nnpx pear\n```\n\nThis installs Pear onto the system. \n\nTo complete the setup, be sure to follow instructions for setting `PATH` as output by the `npx pear` command.\n\n### Help\n\n```sh\npear help <cmd>\n```\n\n```sh\npear <cmd> --help\n```\n\n```sh\npear <cmd> -h\n```\n\n## Documentation\n\n[Documentation](https://docs.pears.com)\n\n## Platform Development\n\nPlatform development is generally referred to as **localdev**.\n\n**Clone:**\n\n```sh\ngit clone https://github.com/holepunchto/pear && cd pear\n```\n\n**Install deps:**\n\n```sh\nnpm install\n```\n\nBootstrap the runtime binaries with\n\n```sh\nnpm run bootstrap [KEY]\n```\n\nKey defaults to production key `npm run bootstrap` bootstraps from production runtimes.\n\nFirst run will install runtimes in `by-arch`, create platform directory called `pear` and add a `pear.dev` symlink (Linux, Mac)or `pear.ps1` and `pear.cmd` files (Windows). These are system-specific and .gitignore'd.\n\nUse `./pear.dev` (`\\\\pear.ps1` / `\\\\pear.", | |
| 26 | "sections": [ | |
| 27 | "intro", | |
| 28 | "setup", | |
| 29 | "documentation", | |
| 30 | "platform development", | |
| 31 | "drives", | |
| 32 | "license" | |
| 33 | ], | |
| 34 | "hasApi": false, | |
| 35 | "hasExamples": true, | |
| 36 | "exampleCount": 8, | |
| 37 | "examples": [ | |
| 38 | "This installs Pear onto the system. \n\nTo complete the setup, be sure to follow instructions for setting `PATH` as output by the `npx pear` command.\n\n### Help", | |
| 39 | "", | |
| 40 | "" | |
| 41 | ] | |
| 42 | }, | |
| 43 | "patterns": [ | |
| 44 | "peer-discovery", | |
| 45 | "stream-multiplexing", | |
| 46 | "binary-encoding", | |
| 47 | "cryptography", | |
| 48 | "streaming" | |
| 49 | ] | |
| 50 | } |
| … | … | @@ -132,11 +132,55 @@ pear help <cmd> |
| 132 | 132 | |
| 133 | 133 | ## API Documentation |
| 134 | 134 | |
| 135 | _To be enriched in Phase 1B with deep code analysis_ | |
| 135 | _Extracted from code analysis_ | |
| 136 | ||
| 137 | ### Classes | |
| 138 | ||
| 139 | - `API` | |
| 140 | ||
| 141 | ### Functions | |
| 142 | ||
| 143 | - `getBootType()` | |
| 144 | ||
| 145 | ||
| 146 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 147 | ||
| 136 | 148 | |
| 137 | 149 | ## Usage Examples |
| 138 | 150 | |
| 139 | _To be added in Phase 1B_ | |
| 151 | _Extracted from README_ | |
| 152 | ||
| 153 | ### Example 1 | |
| 154 | ||
| 155 | ```javascript | |
| 156 | This installs Pear onto the system. | |
| 157 | ||
| 158 | To complete the setup, be sure to follow instructions for setting `PATH` as output by the `npx pear` command. | |
| 159 | ||
| 160 | ### Help | |
| 161 | ``` | |
| 162 | ||
| 163 | ### Example 2 | |
| 164 | ||
| 165 | ```javascript | |
| 166 | ||
| 167 | ``` | |
| 168 | ||
| 169 | ### Example 3 | |
| 170 | ||
| 171 | ```javascript | |
| 172 | ||
| 173 | ``` | |
| 174 | ||
| 175 | ||
| 176 | ||
| 177 | ## P2P Patterns | |
| 178 | ||
| 179 | - peer-discovery | |
| 180 | - stream-multiplexing | |
| 181 | - binary-encoding | |
| 182 | - cryptography | |
| 183 | - streaming | |
| 140 | 184 | |
| 141 | 185 | ## Semantic Type |
| 142 | 186 |
| … | … | @@ -0,0 +1,33 @@ |
| 1 | { | |
| 2 | "repo": "pearpass-example", | |
| 3 | "timestamp": "2026-01-16T23:39:58.212Z", | |
| 4 | "entryPoint": "index.html", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.html", | |
| 8 | "type": "module" | |
| 9 | } | |
| 10 | }, | |
| 11 | "api": { | |
| 12 | "file": "index.html", | |
| 13 | "exports": [], | |
| 14 | "classes": [], | |
| 15 | "functions": [ | |
| 16 | { | |
| 17 | "name": "openView" | |
| 18 | } | |
| 19 | ] | |
| 20 | }, | |
| 21 | "readme": { | |
| 22 | "content": "# Pearpass-example\nExample of building a collaborative application with [autobase](https://github.com/holepunchto/autobase) and [autopass](https://github.com/holepunchto/autopass).\n\n## Setup\n\n git clone https://github.com/holepunchto/pearpass-example/ && cd pearpass-example\n npm i pear -g\n npm i \n npm run dev\n\n\n", | |
| 23 | "sections": [ | |
| 24 | "intro", | |
| 25 | "setup" | |
| 26 | ], | |
| 27 | "hasApi": false, | |
| 28 | "hasExamples": false, | |
| 29 | "exampleCount": 0, | |
| 30 | "examples": [] | |
| 31 | }, | |
| 32 | "patterns": [] | |
| 33 | } |
| … | … | @@ -46,7 +46,15 @@ Example of building a collaborative application with [autobase](https://github.c |
| 46 | 46 | |
| 47 | 47 | ## API Documentation |
| 48 | 48 | |
| 49 | _To be enriched in Phase 1B with deep code analysis_ | |
| 49 | _Extracted from code analysis_ | |
| 50 | ||
| 51 | ### Functions | |
| 52 | ||
| 53 | - `openView()` | |
| 54 | ||
| 55 | ||
| 56 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 57 | ||
| 50 | 58 | |
| 51 | 59 | ## Usage Examples |
| 52 | 60 |
| … | … | @@ -0,0 +1,42 @@ |
| 1 | { | |
| 2 | "repo": "react-native-bare-kit", | |
| 3 | "timestamp": "2026-01-16T23:39:42.842Z", | |
| 4 | "entryPoint": "./index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "./index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "./index.js", | |
| 12 | "exports": [], | |
| 13 | "classes": [ | |
| 14 | { | |
| 15 | "name": "BareKitIPC" | |
| 16 | }, | |
| 17 | { | |
| 18 | "name": "BareKitWorklet" | |
| 19 | } | |
| 20 | ], | |
| 21 | "functions": [] | |
| 22 | }, | |
| 23 | "readme": { | |
| 24 | "content": "# react-native-bare-kit\n\n<https://github.com/holepunchto/bare-kit> for React Native.\n\n```\nnpm i react-native-bare-kit\n```\n\n## Usage\n\n```js\nimport { Worklet } from 'react-native-bare-kit'\nimport b4a from 'b4a'\n\nconst worklet = new Worklet()\n\nconst source = `\\\nconst { IPC } = BareKit\n\nIPC.on('data', (data) => console.log(data.toString()))\nIPC.write(Buffer.from('Hello from Bare!'))\n`\n\nworklet.start('/app.js', source)\n\nconst { IPC } = worklet\n\nIPC.on('data', (data) => console.log(b4a.toString(data)))\nIPC.write(b4a.from('Hello from React Native!'))\n```\n\nAlternatively to load from a bundle:\n\n```js\nimport { Worklet } from 'react-native-bare-kit'\n\n// Bundle output by `bare-pack`\n// Extension can be .bundle, .js, .cjs, .mjs\nimport bundle from './my.bundle.js'\n\nconst worklet = new Worklet()\n// First arg (filename)'s extension *must* be .bundle\nworklet.start('/app.bundle', source)\n\n// [...]\n```\n\nRefer to <https://github.com/holepunchto/bare-expo> for an example of using the library in an Expo app", | |
| 25 | "sections": [ | |
| 26 | "intro", | |
| 27 | "usage", | |
| 28 | "license" | |
| 29 | ], | |
| 30 | "hasApi": true, | |
| 31 | "hasExamples": true, | |
| 32 | "exampleCount": 3, | |
| 33 | "examples": [ | |
| 34 | "npm i react-native-bare-kit", | |
| 35 | "import { Worklet } from 'react-native-bare-kit'\nimport b4a from 'b4a'\n\nconst worklet = new Worklet()\n\nconst source = `\\\nconst { IPC } = BareKit\n\nIPC.on('data', (data) => console.log(data.toString()))\nIPC.write(Buffer.from('Hello from Bare!'))\n`\n\nworklet.start('/app.js', source)\n\nconst { IPC } = worklet\n\nIPC.on('data', (data) => console.log(b4a.toString(data)))\nIPC.write(b4a.from('Hello from React Native!'))", | |
| 36 | "import { Worklet } from 'react-native-bare-kit'\n\n// Bundle output by `bare-pack`\n// Extension can be .bundle, .js, .cjs, .mjs\nimport bundle from './my.bundle.js'\n\nconst worklet = new Worklet()\n// First arg (filename)'s extension *must* be .bundle\nworklet.start('/app.bundle', source)\n\n// [...]" | |
| 37 | ] | |
| 38 | }, | |
| 39 | "patterns": [ | |
| 40 | "streaming" | |
| 41 | ] | |
| 42 | } |
| … | … | @@ -53,11 +53,71 @@ IPC.on('data', (data) => console.log(data.toString())) |
| 53 | 53 | |
| 54 | 54 | ## API Documentation |
| 55 | 55 | |
| 56 | _To be enriched in Phase 1B with deep code analysis_ | |
| 56 | _Extracted from README and code analysis_ | |
| 57 | ||
| 58 | ### Classes | |
| 59 | ||
| 60 | - `BareKitIPC` | |
| 61 | - `BareKitWorklet` | |
| 62 | ||
| 63 | ||
| 64 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 65 | ||
| 57 | 66 | |
| 58 | 67 | ## Usage Examples |
| 59 | 68 | |
| 60 | _To be added in Phase 1B_ | |
| 69 | _Extracted from README_ | |
| 70 | ||
| 71 | ### Example 1 | |
| 72 | ||
| 73 | ```javascript | |
| 74 | npm i react-native-bare-kit | |
| 75 | ``` | |
| 76 | ||
| 77 | ### Example 2 | |
| 78 | ||
| 79 | ```javascript | |
| 80 | import { Worklet } from 'react-native-bare-kit' | |
| 81 | import b4a from 'b4a' | |
| 82 | ||
| 83 | const worklet = new Worklet() | |
| 84 | ||
| 85 | const source = `\ | |
| 86 | const { IPC } = BareKit | |
| 87 | ||
| 88 | IPC.on('data', (data) => console.log(data.toString())) | |
| 89 | IPC.write(Buffer.from('Hello from Bare!')) | |
| 90 | ` | |
| 91 | ||
| 92 | worklet.start('/app.js', source) | |
| 93 | ||
| 94 | const { IPC } = worklet | |
| 95 | ||
| 96 | IPC.on('data', (data) => console.log(b4a.toString(data))) | |
| 97 | IPC.write(b4a.from('Hello from React Native!')) | |
| 98 | ``` | |
| 99 | ||
| 100 | ### Example 3 | |
| 101 | ||
| 102 | ```javascript | |
| 103 | import { Worklet } from 'react-native-bare-kit' | |
| 104 | ||
| 105 | // Bundle output by `bare-pack` | |
| 106 | // Extension can be .bundle, .js, .cjs, .mjs | |
| 107 | import bundle from './my.bundle.js' | |
| 108 | ||
| 109 | const worklet = new Worklet() | |
| 110 | // First arg (filename)'s extension *must* be .bundle | |
| 111 | worklet.start('/app.bundle', source) | |
| 112 | ||
| 113 | // [...] | |
| 114 | ``` | |
| 115 | ||
| 116 | ||
| 117 | ||
| 118 | ## P2P Patterns | |
| 119 | ||
| 120 | - streaming | |
| 61 | 121 | |
| 62 | 122 | ## Semantic Type |
| 63 | 123 |
| … | … | @@ -0,0 +1,48 @@ |
| 1 | { | |
| 2 | "repo": "ready-resource", | |
| 3 | "timestamp": "2026-01-16T23:39:53.349Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "class" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "ReadyResource" | |
| 21 | } | |
| 22 | ], | |
| 23 | "functions": [ | |
| 24 | { | |
| 25 | "name": "open" | |
| 26 | }, | |
| 27 | { | |
| 28 | "name": "close" | |
| 29 | } | |
| 30 | ] | |
| 31 | }, | |
| 32 | "readme": { | |
| 33 | "content": "# ready-resource\n\nModern single resource management\n\n```\nnpm install ready-resource\n```\n\n## Usage\n\n```js\nconst ReadyResource = require('ready-resource')\n\nclass Thing extends ReadyResource {\n constructor() {\n super()\n }\n\n async _open() {\n // open the resource\n }\n\n async _close() {\n // close the resource\n }\n}\n\nconst r = new Thing()\n\nawait r.ready() // calls _open once\nawait r.ready() // noop\n\nawait r.close() // calls _close after _open has finished\nawait r.close() // noop\n```\n\n## License\n\nMIT\n", | |
| 34 | "sections": [ | |
| 35 | "intro", | |
| 36 | "usage", | |
| 37 | "license" | |
| 38 | ], | |
| 39 | "hasApi": true, | |
| 40 | "hasExamples": true, | |
| 41 | "exampleCount": 2, | |
| 42 | "examples": [ | |
| 43 | "npm install ready-resource", | |
| 44 | "const ReadyResource = require('ready-resource')\n\nclass Thing extends ReadyResource {\n constructor() {\n super()\n }\n\n async _open() {\n // open the resource\n }\n\n async _close() {\n // close the resource\n }\n}\n\nconst r = new Thing()\n\nawait r.ready() // calls _open once\nawait r.ready() // noop\n\nawait r.close() // calls _close after _open has finished\nawait r.close() // noop" | |
| 45 | ] | |
| 46 | }, | |
| 47 | "patterns": [] | |
| 48 | } |
| … | … | @@ -51,11 +51,64 @@ class Thing extends ReadyResource { |
| 51 | 51 | |
| 52 | 52 | ## API Documentation |
| 53 | 53 | |
| 54 | _To be enriched in Phase 1B with deep code analysis_ | |
| 54 | _Extracted from README and code analysis_ | |
| 55 | ||
| 56 | ### Classes | |
| 57 | ||
| 58 | - `ReadyResource` | |
| 59 | ||
| 60 | ### Functions | |
| 61 | ||
| 62 | - `open()` | |
| 63 | - `close()` | |
| 64 | ||
| 65 | ### Exports | |
| 66 | ||
| 67 | - default: `class` | |
| 68 | ||
| 69 | ||
| 70 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 71 | ||
| 55 | 72 | |
| 56 | 73 | ## Usage Examples |
| 57 | 74 | |
| 58 | _To be added in Phase 1B_ | |
| 75 | _Extracted from README_ | |
| 76 | ||
| 77 | ### Example 1 | |
| 78 | ||
| 79 | ```javascript | |
| 80 | npm install ready-resource | |
| 81 | ``` | |
| 82 | ||
| 83 | ### Example 2 | |
| 84 | ||
| 85 | ```javascript | |
| 86 | const ReadyResource = require('ready-resource') | |
| 87 | ||
| 88 | class Thing extends ReadyResource { | |
| 89 | constructor() { | |
| 90 | super() | |
| 91 | } | |
| 92 | ||
| 93 | async _open() { | |
| 94 | // open the resource | |
| 95 | } | |
| 96 | ||
| 97 | async _close() { | |
| 98 | // close the resource | |
| 99 | } | |
| 100 | } | |
| 101 | ||
| 102 | const r = new Thing() | |
| 103 | ||
| 104 | await r.ready() // calls _open once | |
| 105 | await r.ready() // noop | |
| 106 | ||
| 107 | await r.close() // calls _close after _open has finished | |
| 108 | await r.close() // noop | |
| 109 | ``` | |
| 110 | ||
| 111 | ||
| 59 | 112 | |
| 60 | 113 | ## Semantic Type |
| 61 | 114 |
| … | … | @@ -0,0 +1,52 @@ |
| 1 | { | |
| 2 | "repo": "repl-swarm", | |
| 3 | "timestamp": "2026-01-16T23:39:55.409Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "function" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [], | |
| 19 | "functions": [ | |
| 20 | { | |
| 21 | "name": "replSwarm" | |
| 22 | }, | |
| 23 | { | |
| 24 | "name": "firewall" | |
| 25 | }, | |
| 26 | { | |
| 27 | "name": "randomBytes" | |
| 28 | } | |
| 29 | ] | |
| 30 | }, | |
| 31 | "readme": { | |
| 32 | "content": "# repl-swarm\n\nAttach to a node repl using Hyperswarm\n\n```\nnpm install repl-swarm\n```\n\n## Usage\n\nIn the app you want to debug\n\n``` js\nconst repl = require('repl-swarm')\n\nrepl({ data: { i: 'am exposed in the repl' }, foo: 'anything in this map is exposed to the repl' })\n```\n\nRunning the above will print out a secure key you can use to connect to the repl with.\nTo do so, install the cli\n\n```\nnpm install -g repl-swarm\n```\n\nThen connect from anywhere in the world\n\n```\nrepl-swarm <key printed above>\n```\n\nThen you'll have a full end-to-end encrypted node repl.\n\n## API\n\n#### `const seed = repl(opts)`\n\n`opts` include:\n- `seed`: the seed to use (if not set, it checks the `REPL_SWARM` environment variable. If that is not set either then it defaults to a random seed)\n- `logSeed`: whether to log the seed (default true).\n\nAny other opts are exposed over the repl (see Usage section).\n\n## License\n\nMIT\n", | |
| 33 | "sections": [ | |
| 34 | "intro", | |
| 35 | "usage", | |
| 36 | "api", | |
| 37 | "license" | |
| 38 | ], | |
| 39 | "hasApi": true, | |
| 40 | "hasExamples": true, | |
| 41 | "exampleCount": 3, | |
| 42 | "examples": [ | |
| 43 | "npm install repl-swarm", | |
| 44 | "Running the above will print out a secure key you can use to connect to the repl with.\nTo do so, install the cli", | |
| 45 | "Then connect from anywhere in the world" | |
| 46 | ] | |
| 47 | }, | |
| 48 | "patterns": [ | |
| 49 | "dht-discovery", | |
| 50 | "cryptography" | |
| 51 | ] | |
| 52 | } |
| … | … | @@ -52,11 +52,51 @@ To do so, install the cli |
| 52 | 52 | |
| 53 | 53 | ## API Documentation |
| 54 | 54 | |
| 55 | _To be enriched in Phase 1B with deep code analysis_ | |
| 55 | _Extracted from README and code analysis_ | |
| 56 | ||
| 57 | ### Functions | |
| 58 | ||
| 59 | - `replSwarm()` | |
| 60 | - `firewall()` | |
| 61 | - `randomBytes()` | |
| 62 | ||
| 63 | ### Exports | |
| 64 | ||
| 65 | - default: `function` | |
| 66 | ||
| 67 | ||
| 68 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 69 | ||
| 56 | 70 | |
| 57 | 71 | ## Usage Examples |
| 58 | 72 | |
| 59 | _To be added in Phase 1B_ | |
| 73 | _Extracted from README_ | |
| 74 | ||
| 75 | ### Example 1 | |
| 76 | ||
| 77 | ```javascript | |
| 78 | npm install repl-swarm | |
| 79 | ``` | |
| 80 | ||
| 81 | ### Example 2 | |
| 82 | ||
| 83 | ```javascript | |
| 84 | Running the above will print out a secure key you can use to connect to the repl with. | |
| 85 | To do so, install the cli | |
| 86 | ``` | |
| 87 | ||
| 88 | ### Example 3 | |
| 89 | ||
| 90 | ```javascript | |
| 91 | Then connect from anywhere in the world | |
| 92 | ``` | |
| 93 | ||
| 94 | ||
| 95 | ||
| 96 | ## P2P Patterns | |
| 97 | ||
| 98 | - dht-discovery | |
| 99 | - cryptography | |
| 60 | 100 | |
| 61 | 101 | ## Semantic Type |
| 62 | 102 |
| … | … | @@ -0,0 +1,60 @@ |
| 1 | { | |
| 2 | "repo": "rpc", | |
| 3 | "timestamp": "2026-01-16T23:39:55.794Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "class" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "HyperswarmRPC" | |
| 21 | }, | |
| 22 | { | |
| 23 | "name": "ClientRef" | |
| 24 | }, | |
| 25 | { | |
| 26 | "name": "Client" | |
| 27 | }, | |
| 28 | { | |
| 29 | "name": "Server" | |
| 30 | } | |
| 31 | ], | |
| 32 | "functions": [ | |
| 33 | { | |
| 34 | "name": "wrap" | |
| 35 | } | |
| 36 | ] | |
| 37 | }, | |
| 38 | "readme": { | |
| 39 | "content": "# Hyperswarm RPC\n\nSimple RPC over the Hyperswarm DHT, backed by [Protomux](https://github.com/mafintosh/protomux).\n\n```sh\nnpm install @hyperswarm/rpc\n```\n\n## Usage\n\n```js\nconst RPC = require('@hyperswarm/rpc')\n\nconst rpc = new RPC()\n\nconst server = rpc.createServer()\nawait server.listen()\n\nserver.respond('echo', (req) => req)\n\nconst client = rpc.connect(server.publicKey)\nawait client.request('echo', Buffer.from('hello world'))\n// <Buffer 'hello world'>\n```\n\n## API\n\n#### `const rpc = new RPC([options])`\n\nConstruct a new RPC instance.\n\nOptions include:\n\n```js\n{\n // Optional default value encoding.\n valueEncoding: encoding,\n // A Noise keypair that will be used by default to listen/connect on the DHT.\n // Defaults to a new key pair.\n keyPair,\n // A unique, 32-byte, random seed that can be used to deterministically \n // generate the key pair.\n seed: buffer,\n // Optionally overwrite the default bootstrap servers. Not used if a DHT\n // instance is passed instead.\n bootstrap: ['hos", | |
| 40 | "sections": [ | |
| 41 | "intro", | |
| 42 | "usage", | |
| 43 | "api", | |
| 44 | "license" | |
| 45 | ], | |
| 46 | "hasApi": true, | |
| 47 | "hasExamples": true, | |
| 48 | "exampleCount": 5, | |
| 49 | "examples": [ | |
| 50 | "## Usage", | |
| 51 | "## API\n\n#### `const rpc = new RPC([options])`\n\nConstruct a new RPC instance.\n\nOptions include:", | |
| 52 | "#### `await rpc.destroy([options])`\n\nFully destroy this RPC instance.\n\nThis will also close any running servers. If you want to force close the instance without waiting for the servers to close pass `{ force: true }`.\n\nIf a DHT instance was passed when constructing the RPC instance, this DHT will *not* be destroyed; the RPC instance will only destroy DHT instances that it itself has constructed.\n\n### Creating clients\n\n#### `const client = rpc.connect(publicKey[, options])`\n\nOptions are the same as [`dht.connect()`](https://github.com/holepunchto/hyperdht#const-encryptedconnection--nodeconnectremotepublickey-options).\n\n#### `client.dht`\n\nThe [`DHT`](https://github.com/holepunchto/hyperdht#api) instance used by the client.\n\n#### `client.rpc`\n\nThe [`ProtomuxRPC`](https://github.com/holepunchto/protomux-rpc#api) instance used by the client.\n\n#### `client.closed`\n\nWhether or not the RPC channel is closed.\n\n#### `client.mux`\n\nThe muxer used by the channel.\n\n#### `client.stream`\n\nThe stream used by the channel.\n\n#### `const response = await client.request(method, value[, options])`\n\nPerform an RPC request, returning a promise that will resolve with the value returned by the request handler or reject with an error.\n\nOptions include:" | |
| 53 | ] | |
| 54 | }, | |
| 55 | "patterns": [ | |
| 56 | "peer-discovery", | |
| 57 | "dht-discovery", | |
| 58 | "stream-multiplexing" | |
| 59 | ] | |
| 60 | } |
| … | … | @@ -55,11 +55,100 @@ server.respond('echo', (req) => req) |
| 55 | 55 | |
| 56 | 56 | ## API Documentation |
| 57 | 57 | |
| 58 | _To be enriched in Phase 1B with deep code analysis_ | |
| 58 | _Extracted from README and code analysis_ | |
| 59 | ||
| 60 | ### Classes | |
| 61 | ||
| 62 | - `HyperswarmRPC` | |
| 63 | - `ClientRef` | |
| 64 | - `Client` | |
| 65 | - `Server` | |
| 66 | ||
| 67 | ### Functions | |
| 68 | ||
| 69 | - `wrap()` | |
| 70 | ||
| 71 | ### Exports | |
| 72 | ||
| 73 | - default: `class` | |
| 74 | ||
| 75 | ||
| 76 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 77 | ||
| 59 | 78 | |
| 60 | 79 | ## Usage Examples |
| 61 | 80 | |
| 62 | _To be added in Phase 1B_ | |
| 81 | _Extracted from README_ | |
| 82 | ||
| 83 | ### Example 1 | |
| 84 | ||
| 85 | ```javascript | |
| 86 | ## Usage | |
| 87 | ``` | |
| 88 | ||
| 89 | ### Example 2 | |
| 90 | ||
| 91 | ```javascript | |
| 92 | ## API | |
| 93 | ||
| 94 | #### `const rpc = new RPC([options])` | |
| 95 | ||
| 96 | Construct a new RPC instance. | |
| 97 | ||
| 98 | Options include: | |
| 99 | ``` | |
| 100 | ||
| 101 | ### Example 3 | |
| 102 | ||
| 103 | ```javascript | |
| 104 | #### `await rpc.destroy([options])` | |
| 105 | ||
| 106 | Fully destroy this RPC instance. | |
| 107 | ||
| 108 | This will also close any running servers. If you want to force close the instance without waiting for the servers to close pass `{ force: true }`. | |
| 109 | ||
| 110 | If a DHT instance was passed when constructing the RPC instance, this DHT will *not* be destroyed; the RPC instance will only destroy DHT instances that it itself has constructed. | |
| 111 | ||
| 112 | ### Creating clients | |
| 113 | ||
| 114 | #### `const client = rpc.connect(publicKey[, options])` | |
| 115 | ||
| 116 | Options are the same as [`dht.connect()`](https://github.com/holepunchto/hyperdht#const-encryptedconnection--nodeconnectremotepublickey-options). | |
| 117 | ||
| 118 | #### `client.dht` | |
| 119 | ||
| 120 | The [`DHT`](https://github.com/holepunchto/hyperdht#api) instance used by the client. | |
| 121 | ||
| 122 | #### `client.rpc` | |
| 123 | ||
| 124 | The [`ProtomuxRPC`](https://github.com/holepunchto/protomux-rpc#api) instance used by the client. | |
| 125 | ||
| 126 | #### `client.closed` | |
| 127 | ||
| 128 | Whether or not the RPC channel is closed. | |
| 129 | ||
| 130 | #### `client.mux` | |
| 131 | ||
| 132 | The muxer used by the channel. | |
| 133 | ||
| 134 | #### `client.stream` | |
| 135 | ||
| 136 | The stream used by the channel. | |
| 137 | ||
| 138 | #### `const response = await client.request(method, value[, options])` | |
| 139 | ||
| 140 | Perform an RPC request, returning a promise that will resolve with the value returned by the request handler or reject with an error. | |
| 141 | ||
| 142 | Options include: | |
| 143 | ``` | |
| 144 | ||
| 145 | ||
| 146 | ||
| 147 | ## P2P Patterns | |
| 148 | ||
| 149 | - peer-discovery | |
| 150 | - dht-discovery | |
| 151 | - stream-multiplexing | |
| 63 | 152 | |
| 64 | 153 | ## Semantic Type |
| 65 | 154 |
| … | … | @@ -0,0 +1,55 @@ |
| 1 | { | |
| 2 | "repo": "simple-seeder", | |
| 3 | "timestamp": "2026-01-16T23:39:49.000Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [], | |
| 13 | "classes": [], | |
| 14 | "functions": [ | |
| 15 | { | |
| 16 | "name": "main" | |
| 17 | }, | |
| 18 | { | |
| 19 | "name": "ui" | |
| 20 | }, | |
| 21 | { | |
| 22 | "name": "firewall" | |
| 23 | }, | |
| 24 | { | |
| 25 | "name": "formatResource" | |
| 26 | }, | |
| 27 | { | |
| 28 | "name": "format" | |
| 29 | }, | |
| 30 | { | |
| 31 | "name": "onsocket" | |
| 32 | } | |
| 33 | ] | |
| 34 | }, | |
| 35 | "readme": { | |
| 36 | "content": "# simple-seeder\n\nDead simple Hypercore seeder\n\n```\nnpm install -g simple-seeder\n```\n\n## Usage\n\nThree ways to load seeds, you can only use one approach per process:\n\n#### Args\nYou use those args:\n\n```\n--core, -c <key>\n--bee, -b <key>\n--drive, -d <key>\n--seeders, -s <key>\n```\n\n```\nsimple-seeder -c <key> -c <another-key>\n```\n\nThe `seeders` is an option, and must use the same key as the resource to enable it.\n\n#### File\nA file containing the seeds list:\n\n`seeds.txt`\n```\ncore <key>\nbee <key>\ndrive <key>\nseeders <key>\n```\n\n```\nsimple-seeder --file ./seeds.txt\n```\n\n#### List\nA Hyperbee list that can receive updates in real-time.\n\nManage the list with `simple-seeder --menu [key]`\n\nThe menu will also show you the Hyperbee list key that you can use:\n```\nsimple-seeder <key>\n```\n\n## License\n\nApache-2.0\n", | |
| 37 | "sections": [ | |
| 38 | "intro", | |
| 39 | "usage", | |
| 40 | "license" | |
| 41 | ], | |
| 42 | "hasApi": true, | |
| 43 | "hasExamples": true, | |
| 44 | "exampleCount": 6, | |
| 45 | "examples": [ | |
| 46 | "npm install -g simple-seeder", | |
| 47 | "--core, -c <key>\n--bee, -b <key>\n--drive, -d <key>\n--seeders, -s <key>", | |
| 48 | "simple-seeder -c <key> -c <another-key>" | |
| 49 | ] | |
| 50 | }, | |
| 51 | "patterns": [ | |
| 52 | "peer-discovery", | |
| 53 | "dht-discovery" | |
| 54 | ] | |
| 55 | } |
| … | … | @@ -68,11 +68,52 @@ You use those args: |
| 68 | 68 | |
| 69 | 69 | ## API Documentation |
| 70 | 70 | |
| 71 | _To be enriched in Phase 1B with deep code analysis_ | |
| 71 | _Extracted from README and code analysis_ | |
| 72 | ||
| 73 | ### Functions | |
| 74 | ||
| 75 | - `main()` | |
| 76 | - `ui()` | |
| 77 | - `firewall()` | |
| 78 | - `formatResource()` | |
| 79 | - `format()` | |
| 80 | - `onsocket()` | |
| 81 | ||
| 82 | ||
| 83 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 84 | ||
| 72 | 85 | |
| 73 | 86 | ## Usage Examples |
| 74 | 87 | |
| 75 | _To be added in Phase 1B_ | |
| 88 | _Extracted from README_ | |
| 89 | ||
| 90 | ### Example 1 | |
| 91 | ||
| 92 | ```javascript | |
| 93 | npm install -g simple-seeder | |
| 94 | ``` | |
| 95 | ||
| 96 | ### Example 2 | |
| 97 | ||
| 98 | ```javascript | |
| 99 | --core, -c <key> | |
| 100 | --bee, -b <key> | |
| 101 | --drive, -d <key> | |
| 102 | --seeders, -s <key> | |
| 103 | ``` | |
| 104 | ||
| 105 | ### Example 3 | |
| 106 | ||
| 107 | ```javascript | |
| 108 | simple-seeder -c <key> -c <another-key> | |
| 109 | ``` | |
| 110 | ||
| 111 | ||
| 112 | ||
| 113 | ## P2P Patterns | |
| 114 | ||
| 115 | - peer-discovery | |
| 116 | - dht-discovery | |
| 76 | 117 | |
| 77 | 118 | ## Semantic Type |
| 78 | 119 |
| … | … | @@ -0,0 +1,42 @@ |
| 1 | { | |
| 2 | "repo": "sodium-native", | |
| 3 | "timestamp": "2026-01-16T23:39:32.625Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "exports" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [], | |
| 19 | "functions": [ | |
| 20 | { | |
| 21 | "name": "checkStatus" | |
| 22 | } | |
| 23 | ] | |
| 24 | }, | |
| 25 | "readme": { | |
| 26 | "content": "# sodium-native\n\nLow level bindings for [libsodium](https://github.com/jedisct1/libsodium).\n\n```\nnpm install sodium-native\n```\n\nThe goal of this project is to be thin, stable, unopionated wrapper around libsodium.\n\nAll methods exposed are more or less a direct translation of the libsodium c-api.\nThis means that most data types are buffers and you have to manage allocating return values and passing them in as arguments instead of receiving them as return values.\n\nThis makes this API harder to use than other libsodium wrappers out there, but also means that you'll be able to get a lot of perf / memory improvements as you can do stuff like inline encryption / decryption, reuse buffers etc.\n\nThis also makes this library useful as a foundation for more high level crypto abstractions that you want to make.\n\n## Usage\n\n```js\nvar sodium = require('sodium-native')\n\nvar nonce = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES)\nvar key = sodium.sodium_malloc(sodium.crypto_secretbox_KEYBYTES) // sec", | |
| 27 | "sections": [ | |
| 28 | "intro", | |
| 29 | "usage", | |
| 30 | "documentation", | |
| 31 | "license" | |
| 32 | ], | |
| 33 | "hasApi": true, | |
| 34 | "hasExamples": true, | |
| 35 | "exampleCount": 2, | |
| 36 | "examples": [ | |
| 37 | "npm install sodium-native", | |
| 38 | "var sodium = require('sodium-native')\n\nvar nonce = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES)\nvar key = sodium.sodium_malloc(sodium.crypto_secretbox_KEYBYTES) // secure buffer\nvar message = Buffer.from('Hello, World!')\nvar ciphertext = Buffer.alloc(message.length + sodium.crypto_secretbox_MACBYTES)\n\nsodium.randombytes_buf(nonce) // insert random data into nonce\nsodium.randombytes_buf(key) // insert random data into key\n\n// encrypted message is stored in ciphertext.\nsodium.crypto_secretbox_easy(ciphertext, message, nonce, key)\n\nconsole.log('Encrypted message:', ciphertext)\n\nvar plainText = Buffer.alloc(\n ciphertext.length - sodium.crypto_secretbox_MACBYTES\n)\n\nif (!sodium.crypto_secretbox_open_easy(plainText, ciphertext, nonce, key)) {\n console.log('Decryption failed!')\n} else {\n console.log('Decrypted message:', plainText, '(' + plainText.toString() + ')')\n}" | |
| 39 | ] | |
| 40 | }, | |
| 41 | "patterns": [] | |
| 42 | } |
| … | … | @@ -52,11 +52,60 @@ This also makes this library useful as a foundation for more high level crypto a |
| 52 | 52 | |
| 53 | 53 | ## API Documentation |
| 54 | 54 | |
| 55 | _To be enriched in Phase 1B with deep code analysis_ | |
| 55 | _Extracted from README and code analysis_ | |
| 56 | ||
| 57 | ### Functions | |
| 58 | ||
| 59 | - `checkStatus()` | |
| 60 | ||
| 61 | ### Exports | |
| 62 | ||
| 63 | - default: `exports` | |
| 64 | ||
| 65 | ||
| 66 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 67 | ||
| 56 | 68 | |
| 57 | 69 | ## Usage Examples |
| 58 | 70 | |
| 59 | _To be added in Phase 1B_ | |
| 71 | _Extracted from README_ | |
| 72 | ||
| 73 | ### Example 1 | |
| 74 | ||
| 75 | ```javascript | |
| 76 | npm install sodium-native | |
| 77 | ``` | |
| 78 | ||
| 79 | ### Example 2 | |
| 80 | ||
| 81 | ```javascript | |
| 82 | var sodium = require('sodium-native') | |
| 83 | ||
| 84 | var nonce = Buffer.alloc(sodium.crypto_secretbox_NONCEBYTES) | |
| 85 | var key = sodium.sodium_malloc(sodium.crypto_secretbox_KEYBYTES) // secure buffer | |
| 86 | var message = Buffer.from('Hello, World!') | |
| 87 | var ciphertext = Buffer.alloc(message.length + sodium.crypto_secretbox_MACBYTES) | |
| 88 | ||
| 89 | sodium.randombytes_buf(nonce) // insert random data into nonce | |
| 90 | sodium.randombytes_buf(key) // insert random data into key | |
| 91 | ||
| 92 | // encrypted message is stored in ciphertext. | |
| 93 | sodium.crypto_secretbox_easy(ciphertext, message, nonce, key) | |
| 94 | ||
| 95 | console.log('Encrypted message:', ciphertext) | |
| 96 | ||
| 97 | var plainText = Buffer.alloc( | |
| 98 | ciphertext.length - sodium.crypto_secretbox_MACBYTES | |
| 99 | ) | |
| 100 | ||
| 101 | if (!sodium.crypto_secretbox_open_easy(plainText, ciphertext, nonce, key)) { | |
| 102 | console.log('Decryption failed!') | |
| 103 | } else { | |
| 104 | console.log('Decrypted message:', plainText, '(' + plainText.toString() + ')') | |
| 105 | } | |
| 106 | ``` | |
| 107 | ||
| 108 | ||
| 60 | 109 | |
| 61 | 110 | ## Semantic Type |
| 62 | 111 |
| … | … | @@ -0,0 +1,33 @@ |
| 1 | { | |
| 2 | "repo": "sodium-universal", | |
| 3 | "timestamp": "2026-01-16T23:39:36.893Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": {}, | |
| 11 | "readme": { | |
| 12 | "content": "# sodium-universal\n\nUniversal wrapper for `sodium-javascript` and `sodium-native` working in Node.js and the Browser\n\n```sh\nnpm install sodium-universal\n```\n\n`sodium-native` ships with prebuilds for macOS, Windows, and Linux.\n\nNote that the module itself is generated on a prepublish hook.\n\n## Usage\n\n```js\nvar sodium = require('sodium-universal')\n\nvar rnd = Buffer.allocUnsafe(12) // Cryptographically random data\nsodium.randombytes_buf(rnd)\n\nconsole.log(rnd.toString('hex'))\n```\n\nWorks seamlessly with Node.js:\n\n```sh\n$ node example.js\nc7dbd46a6cc84ff2e0d1285c\n```\n\nAnd the browser:\n\nFirst install the peer dep, `sodium-javascript`.\n\n```sh\nnpm install --save sodium-javascript\n```\n\nAnd then browserify\n\n```sh\nbrowserify example.js > bundle.js\n```\n\n## Introduction\n\n[`libsodium`](https://download.libsodium.org/doc/) is a collection of cryptographic primitives, providing a low-level foundation to build higher-level cryptographic applications and protocols. It is often put in contrast to RSA based", | |
| 13 | "sections": [ | |
| 14 | "intro", | |
| 15 | "usage", | |
| 16 | "introduction", | |
| 17 | "api", | |
| 18 | "compatibilty", | |
| 19 | "license" | |
| 20 | ], | |
| 21 | "hasApi": true, | |
| 22 | "hasExamples": true, | |
| 23 | "exampleCount": 4, | |
| 24 | "examples": [ | |
| 25 | "`sodium-native` ships with prebuilds for macOS, Windows, and Linux.\n\nNote that the module itself is generated on a prepublish hook.\n\n## Usage", | |
| 26 | "Works seamlessly with Node.js:", | |
| 27 | "And the browser:\n\nFirst install the peer dep, `sodium-javascript`." | |
| 28 | ] | |
| 29 | }, | |
| 30 | "patterns": [ | |
| 31 | "cryptography" | |
| 32 | ] | |
| 33 | } |
| … | … | @@ -51,11 +51,45 @@ sodium.randombytes_buf(rnd) |
| 51 | 51 | |
| 52 | 52 | ## API Documentation |
| 53 | 53 | |
| 54 | _To be enriched in Phase 1B with deep code analysis_ | |
| 54 | _Extracted from README and code analysis_ | |
| 55 | ||
| 56 | ||
| 57 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 58 | ||
| 55 | 59 | |
| 56 | 60 | ## Usage Examples |
| 57 | 61 | |
| 58 | _To be added in Phase 1B_ | |
| 62 | _Extracted from README_ | |
| 63 | ||
| 64 | ### Example 1 | |
| 65 | ||
| 66 | ```javascript | |
| 67 | `sodium-native` ships with prebuilds for macOS, Windows, and Linux. | |
| 68 | ||
| 69 | Note that the module itself is generated on a prepublish hook. | |
| 70 | ||
| 71 | ## Usage | |
| 72 | ``` | |
| 73 | ||
| 74 | ### Example 2 | |
| 75 | ||
| 76 | ```javascript | |
| 77 | Works seamlessly with Node.js: | |
| 78 | ``` | |
| 79 | ||
| 80 | ### Example 3 | |
| 81 | ||
| 82 | ```javascript | |
| 83 | And the browser: | |
| 84 | ||
| 85 | First install the peer dep, `sodium-javascript`. | |
| 86 | ``` | |
| 87 | ||
| 88 | ||
| 89 | ||
| 90 | ## P2P Patterns | |
| 91 | ||
| 92 | - cryptography | |
| 59 | 93 | |
| 60 | 94 | ## Semantic Type |
| 61 | 95 |
| … | … | @@ -0,0 +1,173 @@ |
| 1 | { | |
| 2 | "repo": "tiny-fs-native", | |
| 3 | "timestamp": "2026-01-16T23:39:45.249Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [], | |
| 13 | "classes": [ | |
| 14 | { | |
| 15 | "name": "Stats" | |
| 16 | }, | |
| 17 | { | |
| 18 | "name": "FileWriteStream" | |
| 19 | }, | |
| 20 | { | |
| 21 | "name": "FileReadStream" | |
| 22 | } | |
| 23 | ], | |
| 24 | "functions": [ | |
| 25 | { | |
| 26 | "name": "flagsToNumber" | |
| 27 | }, | |
| 28 | { | |
| 29 | "name": "modeToNumber" | |
| 30 | }, | |
| 31 | { | |
| 32 | "name": "alloc" | |
| 33 | }, | |
| 34 | { | |
| 35 | "name": "getReq" | |
| 36 | }, | |
| 37 | { | |
| 38 | "name": "onfsresponse" | |
| 39 | }, | |
| 40 | { | |
| 41 | "name": "createError" | |
| 42 | }, | |
| 43 | { | |
| 44 | "name": "write" | |
| 45 | }, | |
| 46 | { | |
| 47 | "name": "writeSync" | |
| 48 | }, | |
| 49 | { | |
| 50 | "name": "writev" | |
| 51 | }, | |
| 52 | { | |
| 53 | "name": "read" | |
| 54 | }, | |
| 55 | { | |
| 56 | "name": "readSync" | |
| 57 | }, | |
| 58 | { | |
| 59 | "name": "readv" | |
| 60 | }, | |
| 61 | { | |
| 62 | "name": "open" | |
| 63 | }, | |
| 64 | { | |
| 65 | "name": "openSync" | |
| 66 | }, | |
| 67 | { | |
| 68 | "name": "close" | |
| 69 | }, | |
| 70 | { | |
| 71 | "name": "closeSync" | |
| 72 | }, | |
| 73 | { | |
| 74 | "name": "ftruncate" | |
| 75 | }, | |
| 76 | { | |
| 77 | "name": "toNumber" | |
| 78 | }, | |
| 79 | { | |
| 80 | "name": "stat" | |
| 81 | }, | |
| 82 | { | |
| 83 | "name": "statSync" | |
| 84 | }, | |
| 85 | { | |
| 86 | "name": "lstat" | |
| 87 | }, | |
| 88 | { | |
| 89 | "name": "lstatSync" | |
| 90 | }, | |
| 91 | { | |
| 92 | "name": "fstat" | |
| 93 | }, | |
| 94 | { | |
| 95 | "name": "fstatSync" | |
| 96 | }, | |
| 97 | { | |
| 98 | "name": "mkdirp" | |
| 99 | }, | |
| 100 | { | |
| 101 | "name": "rename" | |
| 102 | }, | |
| 103 | { | |
| 104 | "name": "mkdir" | |
| 105 | }, | |
| 106 | { | |
| 107 | "name": "rmdir" | |
| 108 | }, | |
| 109 | { | |
| 110 | "name": "unlink" | |
| 111 | }, | |
| 112 | { | |
| 113 | "name": "readFile" | |
| 114 | }, | |
| 115 | { | |
| 116 | "name": "loop" | |
| 117 | }, | |
| 118 | { | |
| 119 | "name": "done" | |
| 120 | }, | |
| 121 | { | |
| 122 | "name": "closeAndError" | |
| 123 | }, | |
| 124 | { | |
| 125 | "name": "readFileSync" | |
| 126 | }, | |
| 127 | { | |
| 128 | "name": "writeFile" | |
| 129 | }, | |
| 130 | { | |
| 131 | "name": "loop" | |
| 132 | }, | |
| 133 | { | |
| 134 | "name": "done" | |
| 135 | }, | |
| 136 | { | |
| 137 | "name": "closeAndError" | |
| 138 | }, | |
| 139 | { | |
| 140 | "name": "writeFileSync" | |
| 141 | }, | |
| 142 | { | |
| 143 | "name": "typeError" | |
| 144 | }, | |
| 145 | { | |
| 146 | "name": "noop" | |
| 147 | }, | |
| 148 | { | |
| 149 | "name": "promisify" | |
| 150 | }, | |
| 151 | { | |
| 152 | "name": "map" | |
| 153 | } | |
| 154 | ] | |
| 155 | }, | |
| 156 | "readme": { | |
| 157 | "content": "# tiny-fs-native\n\nNative fs for Javascript\n\n```\nnpm install tiny-fs-native\n```\n\nUseful for embedded devices that only have n-api but not node.\n\n\n## Usage\n\n``` js\nconst fs = require('tiny-fs-native')\n\n// currently supports\n\nfs.open\nfs.close\nfs.unlink\nfs.read\nfs.readv\nfs.write\nfs.writev\nfs.ftruncate\nfs.stat\nfs.fstat\nfs.lstat\nfs.mkdir\nfs.rmdir\nfs.rename\n\nfs.readFile\nfs.writeFile\n\nfs.promises.readFile\nfs.promises.writeFile\nfs.promises.mkdir\nfs.promises.rmdir\nfs.promises.stat\nfs.promises.unlink\n\nfs.createReadStream\nfs.createWriteStream\n\nfs.writeFileSync\nfs.readFileSync\nfs.openSync\nfs.readSync\nfs.writeSync\nfs.statSync\nfs.lstatSync\nfs.fstatSync\nfs.closeSync\n```\n\n## License\n\nApache-2.0\n", | |
| 158 | "sections": [ | |
| 159 | "intro", | |
| 160 | "usage", | |
| 161 | "license" | |
| 162 | ], | |
| 163 | "hasApi": true, | |
| 164 | "hasExamples": true, | |
| 165 | "exampleCount": 1, | |
| 166 | "examples": [ | |
| 167 | "npm install tiny-fs-native" | |
| 168 | ] | |
| 169 | }, | |
| 170 | "patterns": [ | |
| 171 | "streaming" | |
| 172 | ] | |
| 173 | } |
| … | … | @@ -53,11 +53,79 @@ fs.close |
| 53 | 53 | |
| 54 | 54 | ## API Documentation |
| 55 | 55 | |
| 56 | _To be enriched in Phase 1B with deep code analysis_ | |
| 56 | _Extracted from README and code analysis_ | |
| 57 | ||
| 58 | ### Classes | |
| 59 | ||
| 60 | - `Stats` | |
| 61 | - `FileWriteStream` | |
| 62 | - `FileReadStream` | |
| 63 | ||
| 64 | ### Functions | |
| 65 | ||
| 66 | - `flagsToNumber()` | |
| 67 | - `modeToNumber()` | |
| 68 | - `alloc()` | |
| 69 | - `getReq()` | |
| 70 | - `onfsresponse()` | |
| 71 | - `createError()` | |
| 72 | - `write()` | |
| 73 | - `writeSync()` | |
| 74 | - `writev()` | |
| 75 | - `read()` | |
| 76 | - `readSync()` | |
| 77 | - `readv()` | |
| 78 | - `open()` | |
| 79 | - `openSync()` | |
| 80 | - `close()` | |
| 81 | - `closeSync()` | |
| 82 | - `ftruncate()` | |
| 83 | - `toNumber()` | |
| 84 | - `stat()` | |
| 85 | - `statSync()` | |
| 86 | - `lstat()` | |
| 87 | - `lstatSync()` | |
| 88 | - `fstat()` | |
| 89 | - `fstatSync()` | |
| 90 | - `mkdirp()` | |
| 91 | - `rename()` | |
| 92 | - `mkdir()` | |
| 93 | - `rmdir()` | |
| 94 | - `unlink()` | |
| 95 | - `readFile()` | |
| 96 | - `loop()` | |
| 97 | - `done()` | |
| 98 | - `closeAndError()` | |
| 99 | - `readFileSync()` | |
| 100 | - `writeFile()` | |
| 101 | - `loop()` | |
| 102 | - `done()` | |
| 103 | - `closeAndError()` | |
| 104 | - `writeFileSync()` | |
| 105 | - `typeError()` | |
| 106 | - `noop()` | |
| 107 | - `promisify()` | |
| 108 | - `map()` | |
| 109 | ||
| 110 | ||
| 111 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 112 | ||
| 57 | 113 | |
| 58 | 114 | ## Usage Examples |
| 59 | 115 | |
| 60 | _To be added in Phase 1B_ | |
| 116 | _Extracted from README_ | |
| 117 | ||
| 118 | ### Example 1 | |
| 119 | ||
| 120 | ```javascript | |
| 121 | npm install tiny-fs-native | |
| 122 | ``` | |
| 123 | ||
| 124 | ||
| 125 | ||
| 126 | ## P2P Patterns | |
| 127 | ||
| 128 | - streaming | |
| 61 | 129 | |
| 62 | 130 | ## Semantic Type |
| 63 | 131 |
| … | … | @@ -0,0 +1,55 @@ |
| 1 | { | |
| 2 | "repo": "tiny-http-native", | |
| 3 | "timestamp": "2026-01-16T23:39:58.581Z", | |
| 4 | "entryPoint": "index.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "index.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "index.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "class" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "Socket" | |
| 21 | }, | |
| 22 | { | |
| 23 | "name": "Server" | |
| 24 | }, | |
| 25 | { | |
| 26 | "name": "Request" | |
| 27 | }, | |
| 28 | { | |
| 29 | "name": "Response" | |
| 30 | } | |
| 31 | ], | |
| 32 | "functions": [ | |
| 33 | { | |
| 34 | "name": "noop" | |
| 35 | } | |
| 36 | ] | |
| 37 | }, | |
| 38 | "readme": { | |
| 39 | "content": "# tiny-http-native\n\nTiny HTTP library made purely on libuv and napi.\n\n```\nnpm install tiny-http-native\n```\n\nUseful for embedded devices that only have n-api but not node.\n\nOnly HTTP servers at the moment and current does NOT support server request bodies,\nbut supports most other HTTP features (keep-alive, chunked encoding etc)\nand streaming server responses.\n\n## Usage\n\n``` js\nconst http = require('tiny-http-native')\n\n// same api as node\n\nconst server = http.createServer(function (req, res) {\n res.statusCode = 200\n res.setHeader('Content-Length', 10)\n res.write('hello world!')\n res.end()\n})\n\nserver.listen(0, function () {\n console.log('server is bound on', server.address().port)\n})\n```\n\n## License\n\nApache-2.0\n", | |
| 40 | "sections": [ | |
| 41 | "intro", | |
| 42 | "usage", | |
| 43 | "license" | |
| 44 | ], | |
| 45 | "hasApi": true, | |
| 46 | "hasExamples": true, | |
| 47 | "exampleCount": 1, | |
| 48 | "examples": [ | |
| 49 | "npm install tiny-http-native" | |
| 50 | ] | |
| 51 | }, | |
| 52 | "patterns": [ | |
| 53 | "streaming" | |
| 54 | ] | |
| 55 | } |
| … | … | @@ -55,11 +55,42 @@ const http = require('tiny-http-native') |
| 55 | 55 | |
| 56 | 56 | ## API Documentation |
| 57 | 57 | |
| 58 | _To be enriched in Phase 1B with deep code analysis_ | |
| 58 | _Extracted from README and code analysis_ | |
| 59 | ||
| 60 | ### Classes | |
| 61 | ||
| 62 | - `Socket` | |
| 63 | - `Server` | |
| 64 | - `Request` | |
| 65 | - `Response` | |
| 66 | ||
| 67 | ### Functions | |
| 68 | ||
| 69 | - `noop()` | |
| 70 | ||
| 71 | ### Exports | |
| 72 | ||
| 73 | - default: `class` | |
| 74 | ||
| 75 | ||
| 76 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 77 | ||
| 59 | 78 | |
| 60 | 79 | ## Usage Examples |
| 61 | 80 | |
| 62 | _To be added in Phase 1B_ | |
| 81 | _Extracted from README_ | |
| 82 | ||
| 83 | ### Example 1 | |
| 84 | ||
| 85 | ```javascript | |
| 86 | npm install tiny-http-native | |
| 87 | ``` | |
| 88 | ||
| 89 | ||
| 90 | ||
| 91 | ## P2P Patterns | |
| 92 | ||
| 93 | - streaming | |
| 63 | 94 | |
| 64 | 95 | ## Semantic Type |
| 65 | 96 |
| … | … | @@ -0,0 +1,54 @@ |
| 1 | { | |
| 2 | "repo": "udx-native", | |
| 3 | "timestamp": "2026-01-16T23:39:44.892Z", | |
| 4 | "entryPoint": "lib/udx.js", | |
| 5 | "exports": { | |
| 6 | "packageJson": { | |
| 7 | "main": "lib/udx.js" | |
| 8 | } | |
| 9 | }, | |
| 10 | "api": { | |
| 11 | "file": "lib/udx.js", | |
| 12 | "exports": [ | |
| 13 | { | |
| 14 | "type": "default", | |
| 15 | "name": "class" | |
| 16 | } | |
| 17 | ], | |
| 18 | "classes": [ | |
| 19 | { | |
| 20 | "name": "UDX" | |
| 21 | } | |
| 22 | ], | |
| 23 | "functions": [ | |
| 24 | { | |
| 25 | "name": "onlookup" | |
| 26 | } | |
| 27 | ] | |
| 28 | }, | |
| 29 | "readme": { | |
| 30 | "content": "# udx-native\n\nudx is reliable, multiplexed, and congestion-controlled streams over udp.\n\n```\nnpm i udx-native\n```\n\nIt's a transport protocol, made only for peer-to-peer networking.\n\nNo handshakes. No encryption. No features. This is good for P2P.\\\nJust fast streams and messages that are composable into powerful things.\n\n## Usage\n\n```js\nconst UDX = require('udx-native')\n\nconst u = new UDX()\nconst a = u.createSocket()\nconst b = u.createSocket()\n\nb.on('message', function (message) {\n console.log('received', message.toString())\n a.close()\n b.close()\n})\n\nb.bind(0)\na.send(Buffer.from('hello'), b.address().port)\n```\n\n```js\nconst UDX = require('udx-native')\n\nconst u = new UDX()\n\nconst socket1 = u.createSocket()\nconst socket2 = u.createSocket()\n\nsocket1.bind()\nsocket2.bind()\n\nconst stream1 = u.createStream(1)\nconst stream2 = u.createStream(2)\n\nstream1.connect(socket1, stream2.id, socket2.address().port, '127.0.0.1')\nstream2.connect(socket2, stream1.id, socket1.address().port, '127.0.0.1')\n\ns", | |
| 31 | "sections": [ | |
| 32 | "intro", | |
| 33 | "usage", | |
| 34 | "api", | |
| 35 | "sockets", | |
| 36 | "streams", | |
| 37 | "network interfaces", | |
| 38 | "dns", | |
| 39 | "dev setup", | |
| 40 | "license" | |
| 41 | ], | |
| 42 | "hasApi": true, | |
| 43 | "hasExamples": true, | |
| 44 | "exampleCount": 8, | |
| 45 | "examples": [ | |
| 46 | "npm i udx-native", | |
| 47 | "const UDX = require('udx-native')\n\nconst u = new UDX()\nconst a = u.createSocket()\nconst b = u.createSocket()\n\nb.on('message', function (message) {\n console.log('received', message.toString())\n a.close()\n b.close()\n})\n\nb.bind(0)\na.send(Buffer.from('hello'), b.address().port)", | |
| 48 | "const UDX = require('udx-native')\n\nconst u = new UDX()\n\nconst socket1 = u.createSocket()\nconst socket2 = u.createSocket()\n\nsocket1.bind()\nsocket2.bind()\n\nconst stream1 = u.createStream(1)\nconst stream2 = u.createStream(2)\n\nstream1.connect(socket1, stream2.id, socket2.address().port, '127.0.0.1')\nstream2.connect(socket2, stream1.id, socket1.address().port, '127.0.0.1')\n\nstream1.write(Buffer.from('hello'))\nstream1.end()\n\nstream2.on('data', function (data) {\n console.log(data)\n})\n\nstream2.on('end', function () {\n stream2.end()\n})\n\nstream1.on('close', function () {\n console.log('stream1 closed')\n socket1.close()\n})\n\nstream2.on('close', function () {\n console.log('stream2 closed')\n socket2.close()\n})" | |
| 49 | ] | |
| 50 | }, | |
| 51 | "patterns": [ | |
| 52 | "streaming" | |
| 53 | ] | |
| 54 | } |
| … | … | @@ -54,11 +54,99 @@ const a = u.createSocket() |
| 54 | 54 | |
| 55 | 55 | ## API Documentation |
| 56 | 56 | |
| 57 | _To be enriched in Phase 1B with deep code analysis_ | |
| 57 | _Extracted from README and code analysis_ | |
| 58 | ||
| 59 | ### Classes | |
| 60 | ||
| 61 | - `UDX` | |
| 62 | ||
| 63 | ### Functions | |
| 64 | ||
| 65 | - `onlookup()` | |
| 66 | ||
| 67 | ### Exports | |
| 68 | ||
| 69 | - default: `class` | |
| 70 | ||
| 71 | ||
| 72 | _See [api-extract.json](./api-extract.json) for detailed API information._ | |
| 73 | ||
| 58 | 74 | |
| 59 | 75 | ## Usage Examples |
| 60 | 76 | |
| 61 | _To be added in Phase 1B_ | |
| 77 | _Extracted from README_ | |
| 78 | ||
| 79 | ### Example 1 | |
| 80 | ||
| 81 | ```javascript | |
| 82 | npm i udx-native | |
| 83 | ``` | |
| 84 | ||
| 85 | ### Example 2 | |
| 86 | ||
| 87 | ```javascript | |
| 88 | const UDX = require('udx-native') | |
| 89 | ||
| 90 | const u = new UDX() | |
| 91 | const a = u.createSocket() | |
| 92 | const b = u.createSocket() | |
| 93 | ||
| 94 | b.on('message', function (message) { | |
| 95 | console.log('received', message.toString()) | |
| 96 | a.close() | |
| 97 | b.close() | |
| 98 | }) | |
| 99 | ||
| 100 | b.bind(0) | |
| 101 | a.send(Buffer.from('hello'), b.address().port) | |
| 102 | ``` | |
| 103 | ||
| 104 | ### Example 3 | |
| 105 | ||
| 106 | ```javascript | |
| 107 | const UDX = require('udx-native') | |
| 108 | ||
| 109 | const u = new UDX() | |
| 110 | ||
| 111 | const socket1 = u.createSocket() | |
| 112 | const socket2 = u.createSocket() | |
| 113 | ||
| 114 | socket1.bind() | |
| 115 | socket2.bind() | |
| 116 | ||
| 117 | const stream1 = u.createStream(1) | |
| 118 | const stream2 = u.createStream(2) | |
| 119 | ||
| 120 | stream1.connect(socket1, stream2.id, socket2.address().port, '127.0.0.1') | |
| 121 | stream2.connect(socket2, stream1.id, socket1.address().port, '127.0.0.1') | |
| 122 | ||
| 123 | stream1.write(Buffer.from('hello')) | |
| 124 | stream1.end() | |
| 125 | ||
| 126 | stream2.on('data', function (data) { | |
| 127 | console.log(data) | |
| 128 | }) | |
| 129 | ||
| 130 | stream2.on('end', function () { | |
| 131 | stream2.end() | |
| 132 | }) | |
| 133 | ||
| 134 | stream1.on('close', function () { | |
| 135 | console.log('stream1 closed') | |
| 136 | socket1.close() | |
| 137 | }) | |
| 138 | ||
| 139 | stream2.on('close', function () { | |
| 140 | console.log('stream2 closed') | |
| 141 | socket2.close() | |
| 142 | }) | |
| 143 | ``` | |
| 144 | ||
| 145 | ||
| 146 | ||
| 147 | ## P2P Patterns | |
| 148 | ||
| 149 | - streaming | |
| 62 | 150 | |
| 63 | 151 | ## Semantic Type |
| 64 | 152 |