Meshline
English translationDownload Markdown

The Simplified Chinese text is authoritative.

Relay RPC protocol

Meshline Protocol 1.0

libp2p protocol ID: /meshline/relay/1.0.0

This protocol defines direct account queries and cross-relay message delivery between eligible public relays. Messages are not forwarded hop by hop along a DHT lookup path. After resolving the current account route, the source relay connects directly to the recipient's home relay. Source relay and target relay have the meanings given by the client–relay protocol's role definitions.

Connections, remote responses, caches, and the transport network are not roots of user trust. Responses that fail signature, route, or object validation MUST NOT be forwarded to clients.

Protocol contents

Part Contents
Common method conventions In-stream message framing, JSON-RPC requests and responses, target routing, errors, and resource controls
Account query methods Queries for device authorization status, complete device state, and account profiles
Message delivery methods Authorization, validation, timeline writes, and idempotent outcomes for cross-relay delivery
Relay RPC notifications Invalidation hints for device-certificate status caches

Method index

Notification index

Conformance requirements

Compatible implementations must follow the conformance testing boundaries and cover:

  • Connections and transport: under the common method conventions, verify peer identity, length prefixes and receive limits, JSON-RPC envelopes, target selection, route refresh, and error recovery. Message-framing failures close or reset the stream without constructing an application-layer response.
  • Queries and notifications: under the account query methods and Relay RPC notifications, verify device status and invalidation hints, account and signature binding of cross-relay responses, and the permission differences between public profile queries and restricted device queries. Unverified remote responses MUST NOT be forwarded to clients as successful results.
  • Reliable delivery: under message.deliver, verify receipt authorization, idempotency over complete parameters, result retention, response loss, route migration, and delivery and result confirmation after restart.