Meshline
English translationDownload Markdown

The Simplified Chinese text is authoritative.

Channel Hosting Protocol

Client–relay protocol

Channel hosting is an optional client–relay module. Clients connect directly to the hosting relay; operations use neither the account route DHT nor relay RPC. A relay offering channel hosting MUST implement this entire module and declare channel.host.v1 in a valid RelayDescriptor.

The creator account establishes a channel and automatically becomes its owner. The owner signs subsequent descriptor revisions; owner and moderators may maintain the public timeline. Clients with valid device sessions may resolve and read channels. The hosting relay verifies permissions and adds descriptor, post, edit, and deletion events to one timeline in acceptance order. Closing permanently stops writes to both descriptor and timeline.

Protocol Contents

Section Contents
Model and timeline Fixed hosting, permissions, descriptor revisions, unified timeline, post deletion, and bounded retention
Core objects Channel ID, ChannelDescriptor, and ChannelEvent
Channel management methods Creation, queries, updates, and closure
Timeline methods Posting, editing, deletion, reporting, reading, and synchronization
Subscription methods Subscription-set replacement, limits, and failures
Channel notifications Timeline change notifications

Method Index

All methods below use device sessions.

Method HTTP WebSocket
channel.create POST JSON-RPC
channel.resolve GET JSON-RPC
channel.update PUT JSON-RPC
channel.close DELETE JSON-RPC
channel.post PUT JSON-RPC
channel.post.edit PATCH JSON-RPC
channel.post.delete DELETE JSON-RPC
channel.post.report PUT JSON-RPC
channel.read GET JSON-RPC
channel.subscribe N/A JSON-RPC

HTTP/WSS mapping and errors follow Client–relay method conventions.

Notification Index

Envelopes follow Client–relay notification conventions.

Conformance Requirements

Conforming implementations MUST follow Conformance testing boundaries and Common client method conventions, covering:

  • Descriptors and lifecycle: verify ID derivation, complete descriptor signing and replacement, field and total-size limits, consecutive revisions, query confirmation after conflicts, current-descriptor rollback prevention, and terminal closure under Core objects and Channel management methods.
  • Content writes: verify owner/moderator permissions, complete request and certificate binding, post idempotency, omission versus deletion in edits, successive-edit reconstruction, deletion/reporting conflicts, and signature protection and safe handling of bodies and attachments under Timeline methods.
  • Commit and retention: verify concurrent permission/state checks, failure recovery, stable acceptance times and sequences, retention configuration changes, and retention dependencies of edits and verification material under Timeline lifecycle and Atomic commit rules.
  • Reading and reconstruction: verify latest, forward, and backward pages, nonconsecutive positions, page ordering, has_more, historical descriptor/certificate validation, and readable scope after deletion or cleanup under channel.read.
  • Subscriptions and notifications: verify atomic set replacement, clearing, reduced limits, failure details and preservation of the original set, notification coalescing, and catch-up under Subscription methods and Channel notifications. Notifications MUST NOT directly advance synchronization positions.