Add
This commit is contained in:
+4
-1
@@ -1,11 +1,13 @@
|
||||
# Autobase - Multi-Writer Virtual Core
|
||||
|
||||
## Deep Dive
|
||||
|
||||
Autobase aggregates Hypercores from writers into virtual append-only log. CRDT-like for collab.
|
||||
|
||||
**Bootstrap**: load writers (keys), index tx proofs.
|
||||
|
||||
## Flow
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
Writers[W1/W2 Append Tx] --> Proofs[Signed Headers]
|
||||
@@ -14,6 +16,7 @@ graph TD
|
||||
```
|
||||
|
||||
**Ex**:
|
||||
|
||||
```js
|
||||
const base = new Autobase(store.get('system'))
|
||||
await base.load([writer1, writer2])
|
||||
@@ -27,4 +30,4 @@ const db = base.db // Hyperbee view
|
||||
|
||||
**Drive Use**: Versioned FS oplog.
|
||||
|
||||
~1200 chars expanded.
|
||||
~1200 chars expanded.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# bare-buffer v3.4.4 - Native Buffers
|
||||
|
||||
## Overview
|
||||
|
||||
**Stable** TypedArray/Buffer impl for Bare. Native alloc/slice/concat. Extends JS Uint8Array.
|
||||
|
||||
```mermaid
|
||||
@@ -18,6 +19,7 @@ classDiagram
|
||||
```
|
||||
|
||||
## Key Methods
|
||||
|
||||
```js
|
||||
const Buffer = require('bare-buffer')
|
||||
|
||||
@@ -32,7 +34,8 @@ console.log(msg.equals(cat.slice(0,11))) // true
|
||||
**Global**: `require('bare-buffer/global')` patches `global.Buffer`
|
||||
|
||||
## Interconnect
|
||||
|
||||
- Core for bare-fs read/write, bare-crypto, streams
|
||||
- No peer deps, pure addon.
|
||||
|
||||
**Source**: [github/holepunchto/bare-buffer](https://github.com/holepunchto/bare-buffer)
|
||||
**Source**: [github/holepunchto/bare-buffer](https://github.com/holepunchto/bare-buffer)
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# bare-crypto v1.13.0 - Crypto Primitives
|
||||
|
||||
## Overview
|
||||
|
||||
**Stable** Native hash/HMAC/cipher suite. SHA256/BLAKE2, AES-GCM/ChaCha20Poly.
|
||||
|
||||
## API Table
|
||||
|
||||
| Fn | Ex |
|
||||
|----|----|
|
||||
| `createHash(algo)` | `hash.update(data); hash.digest()` |
|
||||
@@ -25,4 +27,4 @@ console.log(hash.digest('hex'))
|
||||
|
||||
**Hyper Use**: Hypercore sign/verify, noise handshakes.
|
||||
|
||||
**Source**: github/holepunchto/bare-crypto
|
||||
**Source**: github/holepunchto/bare-crypto
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# bare-events v2.8.2 - EventEmitter
|
||||
|
||||
## Overview
|
||||
|
||||
**Stable** WHATWG/Node EventEmitter. on/emit/once/off. AbortSignal support.
|
||||
|
||||
```js
|
||||
@@ -22,4 +23,4 @@ ee.off('event', handler)
|
||||
|
||||
**Use**: TCP servers, drive watches, P2P signals.
|
||||
|
||||
**Source**: github/holepunchto/bare-events
|
||||
**Source**: github/holepunchto/bare-events
|
||||
|
||||
+5
-1
@@ -1,6 +1,7 @@
|
||||
# bare-fs v4.5.4 - Native File System API
|
||||
|
||||
## Overview
|
||||
|
||||
**Stable** Bare module: Cross-platform native FS operations via promises. Low-level, performant bindings (C/CMake). No high-level utils (use with bare-path/stream).
|
||||
|
||||
**Platforms**: Linux/Android/macOS/iOS/Windows
|
||||
@@ -14,6 +15,7 @@ sequenceDiagram
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
| Method | Sig | Desc |
|
||||
|--------|-----|------|
|
||||
| `open(path, flags='r')` | `Promise<number>` | Open file → fd |
|
||||
@@ -28,6 +30,7 @@ sequenceDiagram
|
||||
**Constants**: `require('bare-fs/constants')` (O_RDONLY, etc.)
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const fs = require('bare-fs')
|
||||
const path = require('bare-path')
|
||||
@@ -44,9 +47,10 @@ await fs.close(fd)
|
||||
**Streams**: Integrates `bare-stream` for duplex.
|
||||
|
||||
## Deps/Interconnect
|
||||
|
||||
- bare-path, bare-stream, bare-events, fast-fifo
|
||||
- Peer: bare-buffer (opt)
|
||||
|
||||
**In Pear/Holepunch**: Local storage for Hyperdrive mirrors, app data.
|
||||
|
||||
**Source**: [github.com/holepunchto/bare-fs](https://github.com/holepunchto/bare-fs)
|
||||
**Source**: [github.com/holepunchto/bare-fs](https://github.com/holepunchto/bare-fs)
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# bare-http1 - HTTP/1.x Parser/Server
|
||||
|
||||
## Overview
|
||||
|
||||
**Stable** Low-level HTTP/1 server/request. Streams req/res headers/body.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const http = require('bare-http1')
|
||||
|
||||
@@ -21,4 +23,4 @@ Client: http.request({port}, res => res.on('data', ...))
|
||||
|
||||
**P2P**: Proxy via hyperswarm? Pear web bridge.
|
||||
|
||||
**Source**: github/holepunchto/bare-http1
|
||||
**Source**: github/holepunchto/bare-http1
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# bare-https - TLS Streams
|
||||
|
||||
## Overview
|
||||
|
||||
**Stable** bare-tls wrapper for HTTPS. Server/client w/ certs.
|
||||
|
||||
**Ex**:
|
||||
|
||||
```js
|
||||
const https = require('bare-https')
|
||||
https.createServer({ key, cert }, (req, res) => res.end('Secure!')).listen(443)
|
||||
@@ -13,4 +15,4 @@ https.createServer({ key, cert }, (req, res) => res.end('Secure!')).listen(443)
|
||||
|
||||
**Pear**: Local HTTPS bridge for electron.
|
||||
|
||||
**Source**: github/holepunchto/bare-https
|
||||
**Source**: github/holepunchto/bare-https
|
||||
|
||||
+3
-1
@@ -1,6 +1,7 @@
|
||||
# bare-os v3.6.2 - OS Utilities
|
||||
|
||||
## Overview
|
||||
|
||||
**Stable** Platform info/constants/errors. Native bindings.
|
||||
|
||||
```js
|
||||
@@ -12,6 +13,7 @@ console.log(os.tmpdir())
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
- `platform()`, `arch()`, `release()`
|
||||
- `homedir()`, `tmpdir()`, `userInfo()`
|
||||
- `cpus()`, `freemem()`, `totalmem()`
|
||||
@@ -23,4 +25,4 @@ console.log(os.tmpdir())
|
||||
|
||||
**Use**: Path selection, resource limits, in Pear appdirs.
|
||||
|
||||
**Source**: [github/holepunchto/bare-os](https://github.com/holepunchto/bare-os)
|
||||
**Source**: [github/holepunchto/bare-os](https://github.com/holepunchto/bare-os)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# bare-path v3.0.0 - Path Utils
|
||||
|
||||
## Overview
|
||||
|
||||
**Stable** Pure-JS path normalization/join/resolve. POSIX/Win32 backends.
|
||||
|
||||
```js
|
||||
@@ -8,6 +9,7 @@ const path = require('bare-path') // auto-selects posix/win32
|
||||
```
|
||||
|
||||
## API Table
|
||||
|
||||
| Method | Example |
|
||||
|--------|---------|
|
||||
| `join(...parts)` | `path.join('/foo','bar') → '/foo/bar'` |
|
||||
@@ -19,6 +21,7 @@ const path = require('bare-path') // auto-selects posix/win32
|
||||
| `sep` | '/' or '\\' |
|
||||
|
||||
**Usage**:
|
||||
|
||||
```js
|
||||
const basedir = '/app/data'
|
||||
const file = path.join(basedir, 'hypercore.db')
|
||||
@@ -28,4 +31,4 @@ const file = path.join(basedir, 'hypercore.db')
|
||||
|
||||
**Interconnect**: Essential for bare-fs, bare-url, app bundling.
|
||||
|
||||
**Source**: [github/holepunchto/bare-path](https://github.com/holepunchto/bare-path)
|
||||
**Source**: [github/holepunchto/bare-path](https://github.com/holepunchto/bare-path)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# bare-stream v2.8.0 - High-Perf Streams
|
||||
|
||||
## Overview
|
||||
|
||||
**Stable** Wrapper for streamx in Bare. Readable/Duplex/Transform/PassThrough. Async iter, backpressure.
|
||||
|
||||
**Implements**: WHATWG streams + Node Duplex.
|
||||
@@ -18,6 +19,7 @@ classDiagram
|
||||
```
|
||||
|
||||
## Key Usage
|
||||
|
||||
```js
|
||||
const { Readable, Duplex } = require('bare-stream')
|
||||
|
||||
@@ -45,4 +47,4 @@ const ds = new Duplex({
|
||||
|
||||
**Docs**: streamx github/mafintosh
|
||||
|
||||
**Source**: github/holepunchto/bare-stream
|
||||
**Source**: github/holepunchto/bare-stream
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
# Bare TCP\n\nNative TCP sockets for JavaScript in Bare runtime.\n\nUpdated Feb 19, 2026.\n\nRepo: [github.com/holepunchto/bare-tcp](https://github.com/holepunchto/bare-tcp)
|
||||
# Bare TCP\n\nNative TCP sockets for JavaScript in Bare runtime.\n\nUpdated Feb 19, 2026.\n\nRepo: [github.com/holepunchto/bare-tcp](https://github.com/holepunchto/bare-tcp)
|
||||
|
||||
+7
-2
@@ -1,13 +1,16 @@
|
||||
# Bare
|
||||
|
||||
## Overview
|
||||
|
||||
Bare is a modular JS runtime for cross-platform P2P apps. V8/QuickJS engine + libuv I/O. ~40MB binary.
|
||||
|
||||
## Benchmarks vs Node.js (js-engine-benchmark 2026)
|
||||
|
||||
Ubuntu x64: Bare 40k score (97% Node 41k), 43MB vs 102MB, 2.3x eff/MB.
|
||||
macOS arm64: Bare 53k (97% Node 55k), 33MB vs 94MB, 2.8x eff.
|
||||
|
||||
## Tradeoffs
|
||||
|
||||
| Bare | Node.js |
|
||||
|------|---------|
|
||||
| Smaller, suspendable | Full stdlib |
|
||||
@@ -15,10 +18,10 @@ macOS arm64: Bare 53k (97% Node 55k), 33MB vs 94MB, 2.8x eff.
|
||||
|
||||
Code: `require('bare-fs').readFile(...)`
|
||||
|
||||
|
||||
Lightweight, embeddable JS runtime (Node-like, cross-platform).
|
||||
|
||||
**Key Features:**
|
||||
|
||||
- V8/QuickJS support via libjs
|
||||
- Native addons
|
||||
- Threading / IPC
|
||||
@@ -31,9 +34,11 @@ Links: [GitHub](https://github.com/holepunchto/bare), [Docs](https://deno.land/x
|
||||
Modular stdlib: bare-fs, bare-tcp, bare-http, etc.
|
||||
|
||||
## Use Cases
|
||||
|
||||
- Desktop/mobile P2P apps
|
||||
- Embedded (iOS/Android)
|
||||
- CLI tools
|
||||
|
||||
## Limitations
|
||||
- No batteries-included (modular)
|
||||
|
||||
- No batteries-included (modular)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# cmake-bare - C/C++ Build for Bare
|
||||
|
||||
## Overview
|
||||
|
||||
CMake toolchain for bare addons (prebuilds).
|
||||
|
||||
**Ex**: CMakeLists.txt + cmake-bare → native lib.
|
||||
@@ -9,4 +10,4 @@ CMake toolchain for bare addons (prebuilds).
|
||||
|
||||
**Pear**: bare-addon compile/link.
|
||||
|
||||
**Libs**: libudx/rocksdb etc.
|
||||
**Libs**: libudx/rocksdb etc.
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# compact-encoding - Binary Schemas
|
||||
|
||||
## Overview
|
||||
|
||||
Efficient polymorphic binary codec. Types: uint/varint/buffer/struct/array.
|
||||
|
||||
**Ex**:
|
||||
|
||||
```js
|
||||
const c = require('compact-encoding')
|
||||
const enc = c.encoder({ seq: c.uint64, data: c.buffer })
|
||||
@@ -15,4 +17,4 @@ const enc = c.encoder({ seq: c.uint64, data: c.buffer })
|
||||
|
||||
**Types**: 30+, golang/swift bindings.
|
||||
|
||||
**Source**: github/holepunchto/compact-encoding
|
||||
**Source**: github/holepunchto/compact-encoding
|
||||
|
||||
@@ -7,12 +7,14 @@ Corestore: Factory for named Hypercores/Hyperbees, namespaces, replication orche
|
||||
**GitHub**: [holepunchto/corestore](https://github.com/holepunchto/corestore)
|
||||
|
||||
**Features**:
|
||||
|
||||
- Namespaced cores: `store.namespace('app')`
|
||||
- Replication streams
|
||||
- Encryption per-store
|
||||
- Lazy loading
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
mermaid
|
||||
graph TB
|
||||
@@ -25,6 +27,7 @@ graph TB
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
const store = new Corestore('./storage-folder', {encryptionKey})
|
||||
const drive = new Hyperdrive(store.namespace('drive1'))
|
||||
@@ -34,6 +37,7 @@ await store.replicate(conn)
|
||||
```
|
||||
|
||||
**Key Methods**:
|
||||
|
||||
| | |
|
||||
|-|-|
|
||||
| `store.get(name)` | Named core |
|
||||
@@ -41,6 +45,7 @@ await store.replicate(conn)
|
||||
| `store.list(opts)` | Enumerate cores |
|
||||
|
||||
## Interconnects
|
||||
|
||||
Used everywhere: Hyperdrive.db/blobs, Autobase.views.
|
||||
|
||||
**Perf**: O(1) name→core, batched replicate.
|
||||
@@ -48,4 +53,4 @@ Used everywhere: Hyperdrive.db/blobs, Autobase.views.
|
||||
**Examples**:
|
||||
Multi-drive: `corestore.namespace('user/'+id).get('drive')`
|
||||
|
||||
**Chars**: ~1800
|
||||
**Chars**: ~1800
|
||||
|
||||
+3
-1
@@ -1,9 +1,11 @@
|
||||
# hrpc - Holepunch RPC
|
||||
|
||||
## Overview
|
||||
|
||||
Protomux-based RPC over swarm conns. Modular/service.
|
||||
|
||||
**Ex**:
|
||||
|
||||
```js
|
||||
const hrpc = require('hrpc')
|
||||
const server = hrpc.createServer()
|
||||
@@ -15,4 +17,4 @@ server.pipe(conn).pipe(server)
|
||||
|
||||
**Stack**: hyperswarm → protomux → hrpc.
|
||||
|
||||
**Source**: github/holepunchto/hrpc
|
||||
**Source**: github/holepunchto/hrpc
|
||||
|
||||
@@ -1 +1 @@
|
||||
# Hyper Multisig\n\n## Overview\nMultisig support for Hypercore and Hyperdrive. Enables collaborative creation, signing, and release of these structures requiring multiple approvals.\n\nUpdated Feb 19, 2026 - Recently updated repo.\n\n## Key Features\n- Create multisig cores/drives\n- Generate signing requests\n- Sign and commit with safeguards (conflict detection, seeding checks)\n\n## Usage Flow\n```js\nconst publicKeys = ['key1', 'key2'];\nconst namespace = 'project/repo';\nconst multisig = new HyperMultisig(store, swarm);\nconst { manifest, core } = await multisig.createCore(publicKeys, namespace);\n// ... request, sign, commit\n```\n\n## Repo\n[github.com/holepunchto/hyper-multisig](https://github.com/holepunchto/hyper-multisig)\n\n## Stability\nExperimental
|
||||
# Hyper Multisig\n\n## Overview\nMultisig support for Hypercore and Hyperdrive. Enables collaborative creation, signing, and release of these structures requiring multiple approvals.\n\nUpdated Feb 19, 2026 - Recently updated repo.\n\n## Key Features\n- Create multisig cores/drives\n- Generate signing requests\n- Sign and commit with safeguards (conflict detection, seeding checks)\n\n## Usage Flow\n```js\nconst publicKeys = ['key1', 'key2'];\nconst namespace = 'project/repo';\nconst multisig = new HyperMultisig(store, swarm);\nconst { manifest, core } = await multisig.createCore(publicKeys, namespace);\n// ... request, sign, commit\n```\n\n## Repo\n[github.com/holepunchto/hyper-multisig](https://github.com/holepunchto/hyper-multisig)\n\n## Stability\nExperimental
|
||||
|
||||
+8
-2
@@ -1,14 +1,17 @@
|
||||
# Hyperbee v2.27.3 - Append-Only Sorted KV Store
|
||||
|
||||
## Deep Expansion
|
||||
|
||||
Hyperbee: B-tree serialized to Hypercore. Sparse, P2P-friendly DB for indexes/feeds.
|
||||
|
||||
**v2.27**: rache radix, unslab alloc, protobuf nodes.
|
||||
|
||||
## B-Tree Internals
|
||||
|
||||
Nodes: {type:0(internal)/1(leaf)/2(extension), size, keys[], values[], pointers[]}
|
||||
|
||||
**Traversal**:
|
||||
|
||||
```mermaid
|
||||
graph TD
|
||||
Root[Root] -->|key cmp| Internal
|
||||
@@ -20,7 +23,9 @@ graph TD
|
||||
**Procs**: put traverses/append nodes, CAS mutex, history full audit.
|
||||
|
||||
## API Expansion
|
||||
|
||||
**CAS Ex**:
|
||||
|
||||
```js
|
||||
await db.put('balance:alice', '100', {
|
||||
cas: (prev, next) => parseInt(prev.value) + 10 === parseInt(next.value)
|
||||
@@ -28,6 +33,7 @@ await db.put('balance:alice', '100', {
|
||||
```
|
||||
|
||||
**Subspaces**:
|
||||
|
||||
```js
|
||||
const users = db.sub('users:')
|
||||
await users.put('alice', {balance:100})
|
||||
@@ -38,10 +44,10 @@ for await (const {left,right} of db.createDiffStream(oldVer)) {
|
||||
if (!right) await notifyDelete(left.key)
|
||||
}
|
||||
|
||||
## Perf: Millions ops local, sparse P2P queries.
|
||||
## Perf: Millions ops local, sparse P2P queries
|
||||
|
||||
**Hyperdrive Role**: /path → entry w/ blobRef.
|
||||
|
||||
**Inter**: Compact-enc keys, hyperswarm replicate.
|
||||
|
||||
Added ~2500 chars: CAS/sub/diff ex., tree details.
|
||||
Added ~2500 chars: CAS/sub/diff ex., tree details.
|
||||
|
||||
@@ -7,11 +7,13 @@ Hyperblobs: Content-addressed blob storage for Hyperdrive. Efficient append/chun
|
||||
**GitHub**: [holepunchto/hyperblobs](https://github.com/holepunchto/hyperblobs)
|
||||
|
||||
**Features**:
|
||||
|
||||
- Block-indexed blobs
|
||||
- Sparse downloads
|
||||
- Corestore-backed
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
const blobs = new Hyperblobs(corestore.get({name: 'blobs'}))
|
||||
await blobs.put(buf) // Returns id {blockOffset, byteLength etc}
|
||||
@@ -24,4 +26,4 @@ Used in Hyperdrive.entry.value.blob
|
||||
|
||||
**Interconnects**: Hyperdrive content layer.
|
||||
|
||||
**Chars**: ~800
|
||||
**Chars**: ~800
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# hyperconf - P2P Config
|
||||
|
||||
## Overview
|
||||
|
||||
Shared config drive. hyperconf(key) – JSON defaults/merge.
|
||||
|
||||
**Ex**:
|
||||
|
||||
```js
|
||||
const conf = hyperconf(corestore, 'app')
|
||||
await conf.set('theme', 'dark')
|
||||
@@ -13,4 +15,4 @@ console.log(conf.theme)
|
||||
|
||||
**Merge**: Local override remote.
|
||||
|
||||
**Pear**: App prefs.
|
||||
**Pear**: App prefs.
|
||||
|
||||
+10
-1
@@ -1,9 +1,11 @@
|
||||
# Hypercore v11.26.0 - Append-Only Distributed Log
|
||||
|
||||
## Overview
|
||||
|
||||
Hypercore is the foundational primitive of the Holepunch/Pear P2P ecosystem: a **secure, distributed append-only log** (personal blockchain). Enables realtime, sparse replication of large datasets/streams.
|
||||
|
||||
**Key Features:**
|
||||
|
||||
- **Sparse Replication**: Download only interested blocks
|
||||
- **Realtime**: Fast, secure updates via signed Merkle proofs
|
||||
- **Performant**: Flat-file storage maximizes I/O
|
||||
@@ -13,6 +15,7 @@ Hypercore is the foundational primitive of the Holepunch/Pear P2P ecosystem: a *
|
||||
**Versions**: v10 LTS (truncate+), v11+ (SMALL_WANTS proofs, sessions/atoms, userData)
|
||||
|
||||
**Keys**:
|
||||
|
||||
- `core.key`: 32-byte public key (z32 `id`)
|
||||
- `discoveryKey`: Swarm announcement (no verify)
|
||||
|
||||
@@ -30,9 +33,11 @@ graph LR
|
||||
```
|
||||
|
||||
## Installation & Usage
|
||||
|
||||
```bash
|
||||
npm i hypercore
|
||||
```
|
||||
|
||||
```js
|
||||
const Hypercore = require('hypercore')
|
||||
const core = new Hypercore('./storage') // auto-generates keyPair
|
||||
@@ -61,6 +66,7 @@ console.log(await core.get(0).toString()) // 'Hello P2P World!'
|
||||
**Advanced**: Sessions (`core.session({atom})`), proofs (`core.proof({block:index})`), extensions (legacy, use Protomux).
|
||||
|
||||
## Storage & Internals
|
||||
|
||||
- **hypercore-storage**: 4 files (oplog.tree.blocks.bitfield)
|
||||
- **flat-tree**: Sparse Merkle tree
|
||||
- **Protomux**: Multiplex replication protocol
|
||||
@@ -69,12 +75,14 @@ console.log(await core.get(0).toString()) // 'Hello P2P World!'
|
||||
**Manifest**: Signers/quorum/prologue/linked cores/userData.
|
||||
|
||||
## Interconnections
|
||||
|
||||
- **Corestore**: Factory for named cores
|
||||
- **Hyperswarm**: Replicate via topic swarms
|
||||
- **Hyperdrive/Hyperbee**: Build FS/DB atop
|
||||
- **Autobase**: Virtual multi-writer core
|
||||
|
||||
**Example Stack**:
|
||||
|
||||
```js
|
||||
const corestore = require('corestore')
|
||||
const store = corestore('./cs')
|
||||
@@ -84,6 +92,7 @@ swarm.join(core.discoveryKey)
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
- Realtime chat log
|
||||
- Versioned datasets
|
||||
- Event sourcing
|
||||
@@ -91,4 +100,4 @@ swarm.join(core.discoveryKey)
|
||||
**Docs**: [Pears.com/hypercore](https://docs.pears.com/building-blocks/hypercore)
|
||||
**Source**: [github.com/holepunchto/hypercore](https://github.com/holepunchto/hypercore) (11.26.0)
|
||||
|
||||
~4500 chars added.
|
||||
~4500 chars added.
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
# HyperDB - Legacy CRDT Map
|
||||
|
||||
## Overview
|
||||
|
||||
Pre-Hyperbee shared KV (CRDT via vector clocks).
|
||||
|
||||
**Status**: Deprecated, use Hyperbee/Autobase.
|
||||
@@ -9,4 +10,4 @@ Pre-Hyperbee shared KV (CRDT via vector clocks).
|
||||
|
||||
**Legacy**: Workshops/hyperdb-benchmark.
|
||||
|
||||
**Migr**: To hyperbee sub.
|
||||
**Migr**: To hyperbee sub.
|
||||
|
||||
+3
-1
@@ -1,6 +1,7 @@
|
||||
# HyperDHT - Kademlia DHT Engine
|
||||
|
||||
## Deep Dive Expansion
|
||||
|
||||
HyperDHT: UDP DHT for peer routing/holepunch. NodeIDs = Ed25519 keys.
|
||||
|
||||
**Bootstrap**: Public nodes (node1.hyperdht.org:49737 etc.)
|
||||
@@ -8,6 +9,7 @@ HyperDHT: UDP DHT for peer routing/holepunch. NodeIDs = Ed25519 keys.
|
||||
**Mutable Storage**: Put/Get w/ TTL/signatures.
|
||||
|
||||
## API + Ex
|
||||
|
||||
```js
|
||||
const DHT = require('hyperdht')
|
||||
const dht = new DHT({
|
||||
@@ -43,4 +45,4 @@ dht.lookup(topic).on('response', (peer) => {
|
||||
|
||||
**Inter**: Hyperswarm frontend.
|
||||
|
||||
Added ~1800 chars.
|
||||
Added ~1800 chars.
|
||||
|
||||
+13
-1
@@ -1,6 +1,7 @@
|
||||
# Hyperdrive v13.3.0 - Distributed P2P Filesystem Deep Dive
|
||||
|
||||
## Enhanced Overview (Expansion)
|
||||
|
||||
Hyperdrive builds a **mutable, versioned POSIX-like FS** on Hypercore primitives. Real-time collab, offline sync, blob dedup. Used in Pear/Keet for app bundles/fileshare.
|
||||
|
||||
**Stats**: 13.3.0, deps hyperbee^2.11/hyperblobs^2.9/hypercore^11, mirror-drive, streamx.
|
||||
@@ -8,11 +9,13 @@ Hyperdrive builds a **mutable, versioned POSIX-like FS** on Hypercore primitives
|
||||
**Evolution**: v10+ truncate, v13 SMALL_WANTS/parallel dl.
|
||||
|
||||
## Advanced Architecture
|
||||
|
||||
Metadata (Hyperbee): path → Entry {seq, blobRef: {blockOff/len, byteOff/len}, exec?, symlink?, metadata?}
|
||||
|
||||
Blobs (Hyperblobs/Corestore): Content-addressed, sparse.
|
||||
|
||||
**Versioning Flow**:
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
Client1->>Hyperbee: put('/file', blobRef)
|
||||
@@ -23,6 +26,7 @@ sequenceDiagram
|
||||
```
|
||||
|
||||
**Source Insights** (index.js/lib/monitor.js):
|
||||
|
||||
- Lazy blobs: `_blobsLazy()`
|
||||
- Watch: Hyperbee tails + diff snapshots
|
||||
- Diff: Shallow prefix changes
|
||||
@@ -30,6 +34,7 @@ sequenceDiagram
|
||||
## Expanded API Tables
|
||||
|
||||
**File Ops**:
|
||||
|
||||
| Op | Ex | Notes |
|
||||
|----|----|-------|
|
||||
| `put(path, buf, {exec, metadata})` | `drive.put('/doc.txt', buf)` | Version++ |
|
||||
@@ -39,6 +44,7 @@ sequenceDiagram
|
||||
| `symlink(path, target)` | - | Overwrites blob |
|
||||
|
||||
**Batch/Atomic**:
|
||||
|
||||
```js
|
||||
const b = drive.batch()
|
||||
b.put('/a', buf1)
|
||||
@@ -47,6 +53,7 @@ await b.flush() // Single tx
|
||||
```
|
||||
|
||||
**Sync/Mirror**:
|
||||
|
||||
| Method | Use |
|
||||
|--------|-----|
|
||||
| `mirror(otherDrive)` | Full sync, `await mirror.done()` |
|
||||
@@ -55,6 +62,7 @@ await b.flush() // Single tx
|
||||
| `downloadRange(dbRanges, blobRanges)` | Precise |
|
||||
|
||||
**Watch/Live**:
|
||||
|
||||
```js
|
||||
for await (const [curr, prev] of drive.watch('/docs')) {
|
||||
// curr.version > prev.version
|
||||
@@ -62,6 +70,7 @@ for await (const [curr, prev] of drive.watch('/docs')) {
|
||||
```
|
||||
|
||||
## Performance Deep
|
||||
|
||||
- **SMALL_WANTS**: Hypercore v11 partial blocks
|
||||
- **Ranges**: dbRanges (entries), blobRanges (content)
|
||||
- **Clear**: Free blobs, gossip peers
|
||||
@@ -70,6 +79,7 @@ for await (const [curr, prev] of drive.watch('/docs')) {
|
||||
**Bench**: Local 100MB/s+, P2P swarm-limited.
|
||||
|
||||
## Ecosystem Interconnects
|
||||
|
||||
```mermaid
|
||||
graph LR
|
||||
Hyperdrive --> Hyperbee[Metadata]
|
||||
@@ -88,6 +98,7 @@ graph LR
|
||||
## Rich Examples
|
||||
|
||||
**P2P File Sync App**:
|
||||
|
||||
```js
|
||||
const Hyperdrive = require('hyperdrive')
|
||||
const Corestore = require('corestore')
|
||||
@@ -108,6 +119,7 @@ for await (const [curr, prev] of drive.watch()) {
|
||||
```
|
||||
|
||||
**Diff Tool**:
|
||||
|
||||
```js
|
||||
async function syncDiff(local, remote) {
|
||||
const changes = drive.diff(remote.version, '/')
|
||||
@@ -121,4 +133,4 @@ async function syncDiff(local, remote) {
|
||||
|
||||
**Source**: github/holepunchto/hyperdrive (lib/download.js, monitor.js key).
|
||||
|
||||
Added ~3500 chars: perf, ex., graphs.
|
||||
Added ~3500 chars: perf, ex., graphs.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Hyperswarm - Topic Swarming
|
||||
|
||||
## Expansion: Client/Server Modes
|
||||
|
||||
Hyperswarm: High-level DHT wrapper for bidirectional conns.
|
||||
|
||||
**Modes**: {server:true} announce, {client:true} lookup.
|
||||
@@ -10,6 +11,7 @@ Hyperswarm: High-level DHT wrapper for bidirectional conns.
|
||||
**Suspend**: Battery/mobile pause.
|
||||
|
||||
## Advanced Ex
|
||||
|
||||
```js
|
||||
const swarm = new Hyperswarm({
|
||||
firewall(conn) { return conn.remotePublicKey.equals(trusted) }
|
||||
@@ -24,6 +26,7 @@ swarm.flush().then(() => console.log('Discovery cycle done'))
|
||||
```
|
||||
|
||||
**Status**:
|
||||
|
||||
- peers.size
|
||||
- reliablePeers (persistent)
|
||||
|
||||
@@ -33,4 +36,4 @@ swarm.flush().then(() => console.log('Discovery cycle done'))
|
||||
|
||||
**Inter**: Hypercore.replicate(conn), HRPC.
|
||||
|
||||
~1500 chars added.
|
||||
~1500 chars added.
|
||||
|
||||
+2
-1
@@ -1,8 +1,9 @@
|
||||
# libprng - PRNG Lib
|
||||
|
||||
## Overview
|
||||
|
||||
Fast CSPRNG for keys/nonces.
|
||||
|
||||
**Feat**: ChaCha20-based, seedable.
|
||||
|
||||
**Hyper**: random-access-id etc.
|
||||
**Hyper**: random-access-id etc.
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# libsimdle - SIMD String Ops
|
||||
|
||||
## Overview
|
||||
|
||||
SIMD memcmp/memcpy/strlen. compact-encoding perf.
|
||||
|
||||
**Feat**: AVX/NEON opt.
|
||||
|
||||
**Use**: Protocol parsing.
|
||||
**Use**: Protocol parsing.
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
# libudx - UDX Quic-like UDP
|
||||
|
||||
## Overview
|
||||
|
||||
User-space DTLS-like UDP w/ congestion/retransmit. HyperDHT transport.
|
||||
|
||||
**Ex**: udx-native socket API.
|
||||
@@ -9,4 +10,4 @@ User-space DTLS-like UDP w/ congestion/retransmit. HyperDHT transport.
|
||||
|
||||
**Stack**: bare-udp? → udx → dht-rpc.
|
||||
|
||||
**Source**: github/holepunchto/libudx
|
||||
**Source**: github/holepunchto/libudx
|
||||
|
||||
+3
-1
@@ -1,9 +1,11 @@
|
||||
# pear-api - Pear Global
|
||||
|
||||
## Overview
|
||||
|
||||
Pear runtime JS API: global.Pear {info, run, message, wakeups}
|
||||
|
||||
**Ex**:
|
||||
|
||||
```js
|
||||
const pear = global.Pear
|
||||
await pear.run('pear://chat')
|
||||
@@ -12,4 +14,4 @@ pear.on('wakeup', link => open(link))
|
||||
|
||||
**Modules**: pear-run/pipe/message.
|
||||
|
||||
**Build**: pear init → appdrive sync.
|
||||
**Build**: pear init → appdrive sync.
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
# pear-desktop - Electron UI
|
||||
|
||||
## Overview
|
||||
|
||||
pear-electron + bridge for desktop apps.
|
||||
|
||||
**Ex**: pear init desktop → electron shell + pear-bridge HTTP.
|
||||
|
||||
**Build**: pear-release, appdrive bundle.
|
||||
|
||||
**Voice/Video**: bare-ffmpeg/media.
|
||||
**Voice/Video**: bare-ffmpeg/media.
|
||||
|
||||
+3
-1
@@ -1,9 +1,11 @@
|
||||
# pear-run - Child App Runner
|
||||
|
||||
## Overview
|
||||
|
||||
pear.run(link) → pipe to child pear app.
|
||||
|
||||
**Ex**:
|
||||
|
||||
```js
|
||||
await pear.run('pear://chat')
|
||||
pipe.on('data', msg => child.send(msg))
|
||||
@@ -11,4 +13,4 @@ pipe.on('data', msg => child.send(msg))
|
||||
|
||||
**Use**: Sidecar, plugins.
|
||||
|
||||
**Pair**: pear-pipe recv.
|
||||
**Pair**: pear-pipe recv.
|
||||
|
||||
+5
-1
@@ -3,6 +3,7 @@
|
||||
Pear is Holepunch's cross-platform application bundler and runtime. It enables building and distributing P2P apps for desktop, mobile, and web with automatic updates.
|
||||
|
||||
**Key Features:**
|
||||
|
||||
- Bundle Node.js-like apps into native executables
|
||||
- Cross-compile for all platforms
|
||||
- Hotloading and graceful updates
|
||||
@@ -12,11 +13,13 @@ Pear is Holepunch's cross-platform application bundler and runtime. It enables b
|
||||
Links: [GitHub](https://github.com/holepunchto/pear), [Docs](https://docs.pears.com/pear/)
|
||||
|
||||
## Recent Updates (2026-02-19)
|
||||
|
||||
- Remove channels from build flow ([#1023](https://github.com/holepunchto/pear/pull/1023))
|
||||
- Info test fix + include link from info
|
||||
- Remove `<channel>` support ([#1020](https://github.com/holepunchto/pear/pull/1020))
|
||||
|
||||
## API / CLI
|
||||
|
||||
```
|
||||
pear init myapp
|
||||
pear run
|
||||
@@ -24,6 +27,7 @@ pear release
|
||||
```
|
||||
|
||||
## Use Cases
|
||||
|
||||
- Keet messenger
|
||||
- Pear Desktop apps
|
||||
- Expo integrations
|
||||
- Expo integrations
|
||||
|
||||
+3
-1
@@ -1,11 +1,13 @@
|
||||
# Protomux - Protocol Multiplexer
|
||||
|
||||
## Overview
|
||||
|
||||
Multiplex msgs over framed stream (secret-stream). Channels w/ handshake/msg types.
|
||||
|
||||
**Use**: Hypercore rep under swarm conns, HRPC.
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
const mux = new Protomux(stream)
|
||||
const channel = mux.addChannel({protocol: 'hrpc', handshake: c.uint })
|
||||
@@ -23,4 +25,4 @@ msg.send(req)
|
||||
|
||||
**Iter**: for (const ch of mux)
|
||||
|
||||
**Source**: github/holepunchto/protomux
|
||||
**Source**: github/holepunchto/protomux
|
||||
|
||||
@@ -1 +1 @@
|
||||
# Rabin Native\n\nlibrabin bindings for JS (content deduplication?).\n\nUpdated Feb 19, 2026.\n\nRepo: [github.com/holepunchto/rabin-native](https://github.com/holepunchto/rabin-native)
|
||||
# Rabin Native\n\nlibrabin bindings for JS (content deduplication?).\n\nUpdated Feb 19, 2026.\n\nRepo: [github.com/holepunchto/rabin-native](https://github.com/holepunchto/rabin-native)
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
# rocksdb-native - KV Storage
|
||||
|
||||
## Overview
|
||||
|
||||
RocksDB bindings for hyperblobs/hypercore-storage alt.
|
||||
|
||||
**Feat**: SSD-opt LSM tree, compaction.
|
||||
@@ -9,4 +10,4 @@ RocksDB bindings for hyperblobs/hypercore-storage alt.
|
||||
|
||||
**Ex**: new RocksDB(path)
|
||||
|
||||
**Source**: github/rocksdb-native
|
||||
**Source**: github/rocksdb-native
|
||||
|
||||
+2
-1
@@ -1,10 +1,11 @@
|
||||
# bare-rpc - Native RPC
|
||||
|
||||
## Overview
|
||||
|
||||
librpc ABI RPC for Bare. Golang compat?
|
||||
|
||||
**Ex**: spawn subprocess, rpc call.
|
||||
|
||||
**Use**: Pear-ipc, sidecar comm.
|
||||
|
||||
**Source**: github/holepunchto/bare-rpc
|
||||
**Source**: github/holepunchto/bare-rpc
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# sodium-native - Crypto Bindings
|
||||
|
||||
## Overview
|
||||
|
||||
High-perf libsodium addon. Ed25519/XChaCha20Poly/blake2b.
|
||||
|
||||
**Ex**:
|
||||
|
||||
```js
|
||||
const sodium = require('sodium-native')
|
||||
sodium.crypto_sign_keypair(pub, priv)
|
||||
@@ -16,4 +18,4 @@ sodium.crypto_sign_detached(sig, msg, priv)
|
||||
|
||||
**Prebuilds**: Multi-arch.
|
||||
|
||||
**Source**: github/holepunchto/sodium-native
|
||||
**Source**: github/holepunchto/sodium-native
|
||||
|
||||
Reference in New Issue
Block a user