# peer.internal better peer-to-peer file sharing inspired by [atproto](https://atproto.com/) ## features - anonymous (peers are identified by public key) - extensible (peers ignore unsupported fields) - less overhead than bittorrent (metadata and file verification) - more expressive torrent metadata (`categories`, `content-language`, `prev`, `screenshots`, etc.) ## soon - mark certain fields as critical - transport protocol (considering libp2p) - actual specifications - actual code - DHT support - a real domain name ## lexicons ### records the intent is to define as few records as possible, since public broadcast of events or ranges is inadvisable. ### objects - [internal.peer.to.peer](lexicons/internal/peer/to/peer.json): A container for a peer's identity and network location. An optional value indicating the peer's current progress for a related topic MAY be included. - [internal.peer.event](lexicons/internal/peer/event.json): An ephemeral event representing an update to a peer's status, identity, and network location, in relation to a specific topic. - [internal.peer.range](lexicons/internal/peer/range.json): A specific range of bytes from a related topic. The actual bytes in the range MAY be included, and the associated BLAKE3 proof MUST be included with it. ### tokens - [internal.peer.exchange](lexicons/internal/peer/exchange.json): One of the keys utilized in the header of peer.internal torrent files, indicates that the corresponding value is an array of "active peers". - [internal.peer.exchange.closed](lexicons/internal/peer/exchange/closed.json): Used to indicate that the signalling peer will decline incoming requests for bytes. - [internal.peer.exchange.open](lexicons/internal/peer/exchange/open.json): Used to indicate that the signalling peer will accept incoming requests for bytes. - [internal.peer.tracker](lexicons/internal/peer/tracker.json): One of the keys utilized in the header of peer.internal torrent files, indicates that the corresponding value is an array of \"trackers\". - [internal.peer.tracker.started](lexicons/internal/peer/tracker/started.json): Used to indicate that the signalling peer has started receiving bytes. - [internal.peer.tracker.stopped](lexicons/internal/peer/tracker/stopped.json): Used to indicate that the signalling peer has temporarily stopped receiving bytes. - [internal.peer.tracker.completed](lexicons/internal/peer/tracker/completed.json): Used to indicate that the signalling peer has finished receiving bytes. ### queries - [internal.peer.requestEvents](lexicons/internal/peer/requestEvents.json): Request a list of events matching a specific kind and/or topic from another peer. - [internal.peer.requestRanges](lexicons/internal/peer/requestRanges.json): Request a set of non-overlapping ranges from another peer. ### procedures - [internal.peer.publishEvent](lexicons/internal/peer/publishEvent.json): Publish a signed event to another peer. - [internal.peer.publishRange](lexicons/internal/peer/publishRange.json): Publish a content-addressed range of bytes and the associated BLAKE3 proof to another peer.