Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion apps/logicsrc-web/src/app/openswarm/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ const PROTOCOLS: Array<[name: string, line: string]> = [
["ipaudio", "Audio releases and tracks on ipfile swarms: renditions, seek tables, gapless, royalties"],
["ipvideo", "Video on demand: CMAF renditions, segment index, subtitles, thumbnails, an HLS bridge"],
["iplive", "Live streams: segment fan-out over paid relays with backpressure"],
["ipname", "How a Moshpit name or a domain resolves to a publisher key and a catalogue"]
["ipname", "How a Moshpit name or a domain resolves to a publisher key and a catalogue"],
["pay2seed", "Client protocol for paid seeding: consent at upload, seed offers with escrowed budgets, the requester's market"],
["paid2seed", "Server protocol for paid seeding: leases, storage challenges and probes over the wire, GiB-month settlement, the seeder client"],
["pay2stream", "Client protocol for paid live streams: consent for channels, relay offers by the hour, tickets, watching on any HLS player"],
["paid2stream", "Server protocol for paid live streams: relay leases, presence proofs, gateways serving standard HLS with an M3U and EPG"]
];

const ROLES: Array<[role: string, work: string, paid: string]> = [
Expand Down
23 changes: 23 additions & 0 deletions docs/openswarm.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ a different product. The member protocols keep their `ip` names.
| `ipvideo` | Video on demand on `ipfile` swarms: CMAF renditions, segment index, subtitles, thumbnails | [`ipvideo.md`](./openswarm/ipvideo.md) |
| `iplive` | Live streams: segment fan-out over peers, paid relays, backpressure | [`iplive.md`](./openswarm/iplive.md) |
| `ipname` | How a Moshpit name resolves to a publisher key and a catalogue | [`ipname.md`](./openswarm/ipname.md) |
| `pay2seed` | Client protocol for paid seeding: consent at upload, seed offers with escrowed budgets, the requester's market | [`pay2seed.md`](./openswarm/pay2seed.md) |
| `paid2seed` | Server protocol for paid seeding: leases, storage challenges and probes over the wire, GiB-month settlement, the seeder client | [`paid2seed.md`](./openswarm/paid2seed.md) |
| `pay2stream` | Client protocol for paid live streams: consent for channels, relay offers, tickets and listings, watching as a peer or on any HLS player | [`pay2stream.md`](./openswarm/pay2stream.md) |
| `paid2stream` | Server protocol for paid live streams: relay leases per hour, presence proofs, gateways serving standard HLS, M3U and EPG | [`paid2stream.md`](./openswarm/paid2stream.md) |

Supporting documents:

Expand All @@ -50,6 +54,10 @@ Supporting documents:
| ipaudio ipvideo iplive ipdb (catalogue) |
| releases titles channels feeds, entries |
+---------------------------------------------------------------+
| pay2seed / paid2seed | pay2stream / paid2stream |
| consent, offers, market | consent, relay offers, tickets |
| leases, challenges, payout | leases, presence, HLS gateways |
+------------------------------+--------------------------------+
| ipfile: manifest, per-file key pair, encrypted pieces, |
| key grants, credit window, vouchers per served piece |
+-------------------------------+-------------------------------+
Expand Down Expand Up @@ -132,6 +140,20 @@ serves more than the window unpaid.
Its head is a BEP 44 mutable item under the feed key, so any DHT node can find
the latest catalogue of any publisher with one `get`.

**One seed market, one stream market.** A `pay2seed` offer is money
escrowed at a hub for a swarm to be kept for a period, public or private,
and it cannot be listed without a signed attestation of who put the data
there and on what basis. On the `paid2seed` side, seeders take leases,
prove they hold and serve the pieces every period, and are paid per
GiB-month. `pay2stream` and `paid2stream` do the same for a live channel:
a broadcaster attests it and buys relays by the hour, relays and gateways
prove they are online and serving, and a gateway turns the swarm into
standard HLS so any television plays it. The naming is the rule: `pay2*`
is the client protocol, the side that pays over HTTPS; `paid2*` is the
server protocol, the BitTorrent side that earns. It is how a torrent
client becomes a legitimate file sharer: consent on the way in, proof on
the way out, and a payout for staying.

## What it does not define

A media player. Transcoding settings beyond what a manifest must declare. A
Expand All @@ -146,6 +168,7 @@ key and the spec says so.
| Browser WebTorrent player, hybrid Node seeder, wss trackers | `profullstack/media-streamer` (bittorrented.com) | Speaks the vanilla wire this family extends; needs the `ipfile` extension to pay |
| DHT crawl (bitmagnet) and `/dht` browse | `profullstack/media-streamer`, `dht-infohash-crawler` | Observes `ipfile` swarms as opaque infohashes; `ipdb` is how it would learn what they are |
| Pay-per-pass grants, HLS manifest sealing | `media-streamer` IPTV and seedbox rails | The central-proxy version of what `ippay` moves into the swarm |
| Headless seeder daemon with an add API and per-torrent seed time | `torlink` (`torlnk serve`) | The `pay2seed` seeder client, once it polls a market and answers challenges |
| x402 v2 offer, `X-PAYMENT` proof, verify and settle | `profullstack/x402-gateway`, CoinPay | `ippay` pass purchase reuses it unchanged |
| CloudEvents 1.0 + Standard Webhooks signing | `profullstack/autoblog` | Every OpenSwarm event uses the same envelope and headers |
| MTP/1 post-quantum transport, name pins | `profullstack/moshpit-transport`, `moshpit-proxy` | Optional tunnel for native peer links; `ipname` pin kind |
Expand Down
38 changes: 38 additions & 0 deletions docs/openswarm/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,44 @@ ip node hello <peer address> # diagnostic: handshake and p
A c0mpute worker embeds the same library; `c0mpute worker start --openswarm`
is the daemon form and `ip` is the operator's tool.

### 2.10 Seed and stream markets

```
ip seed attest (<file key> | <infohash> | <magnet>) --basis own|licensed|open-license|public-domain|personal
[--license <spdx>] [--notice <url|mailto>] [--description <text>] [--public | --private]
ip seed offer (<file key> | <infohash> | --feed <feed key>) --hub <url> --days <n> --seeders <min>[,<max>]
[--price <usd per GiB-month>] [--proof-hours <n>] [--tracker <url>]...
ip seed offers [--hub <url>] [--public | --private] [--basis <b>] [--min-price <usd>] [--max-size <bytes>]
ip seed take <offer id> --hub <url> # take a lease, fetch, seed until it ends
ip seed leases [--hub <url>] [--status proven|fetching|lapsed|ended]
ip seed status <offer id | lease id>
ip seed void <offer id> # requester: void and refund the unearned budget
ip seed notice <attestation id> --kind rights|illegal|personal-data|other --statement <text>
ip team create <name> --hub <url> [--scope <file key>|--publisher <key>]...
ip team invite <team> --to <email|ipname|key> [--role admin|member|readonly] [--expires <days>]
ip team accept <invite id>
ip team remove <team> <key> [--no-rotate]
ip team grant <team> --file <file key> # a member fetching their sealed grant
ip team audit <team> [--since <time>]
```

```
ip stream offer <channel key> --hub <url> --from <time> --to <time> --relays <min>[,<max>]
[--price <usd per relay-hour>] [--gateway-bonus <bps>] [--region <r>]...
ip stream ticket <channel key> --hub <url> --hours <n> [--gateway <url>] # prints the HLS, M3U and EPG URLs
ip stream listing <channel key> --title <text> --from <time> --to <time> [--price <usd>]
ip stream relay <offer id> --hub <url> [--gateway --base <url> --mode clear|sealed]
ip stream relays [--hub <url>]
```

`ip seed attest` is the consent step and is what `ip file add --public`,
`ip file pin` and `ip live create` call first; `ip seed offer` on a private file key includes a
pass for the seeders when the manifest charges per GiB. `ip seed take` is
what a torlink daemon does on its own from `ip seed offers`; here it is the
manual form, and it sets the swarm's seed time to the lease's end so the
client's reaper cannot drop it early. Everything returns the record ids
(`pay2seed` §7.2) and, for `offers`, the projected `earnedUsd` per lease.

## 3. Output examples

```
Expand Down
10 changes: 9 additions & 1 deletion docs/openswarm/ippay.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ Published at `GET <base>/.well-known/openswarm-hub.json`:
"eip155:137": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
"eip155:1": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
},
"minHubBps": 300,
"minHubBps": 100,
"payout": { "minUsd": "1.000000", "schedule": "daily" },
"passDays": 30,
"createdAt": "2026-09-05T00:00:00.000Z",
Expand All @@ -280,6 +280,14 @@ lists the hub's `base`, from TLS to that base, and optionally from an MTP/1
pin. `minHubBps` is the least `split.hubBps` a manifest may set for this hub
to sell passes for it.

The reference hub takes **1 percent** (`minHubBps: 100`), on every payment
that crosses it: a pass, a key grant, a seed offer, a relay offer, a
ticket. It is charged to whoever is paying and never deducted from a
seeder's or a relay's earnings, so what a publisher quotes is what a
publisher gets and what a seeder is promised is what a seeder is paid. A
hub setting a higher floor says so in this record, and a manifest naming
it can refuse.

### 5.2 API

All bodies are JSON. Records are verified on receipt.
Expand Down
Loading
Loading