archon

Memeplex reference: formats and implementation (#1436)

Status: design; not implemented. Read the protocol core first. This companion holds the field definitions, schemas, examples and operational detail. Object formats and rendering requirements apply to Memeplex implementations; the Memepool section records choices of one client. The core is the single definition of attribution and publication state.

Object format

An object is an asset with a memeplex member in didDocumentData. The five kinds share one attribution rule. Responses use the version-pinned references defined in the core. Examples below show asset data with abbreviated identifiers.

Fields

Field Type Kinds
v integer, 1 all; required
kind string all; required
author DID all; required
grant DID all; required
text string, at most 10,000 code points post, reply
content { cid, type, bytes } post, paper, reply
target, targetVersion DID, versionId post, optional; reply, rating, tag, required
tags 1–20 strings, each 1–64 code points (see Tags and reactions) post, paper, reply
title string, at most 300 code points post, optional; paper, required
subtitle string, at most 300 code points: one line shown under the title post with a title; paper
summary string, at most 5,000 code points: an article’s summary or a paper’s abstract post with a title; paper, required
authors 1–100 distinct DIDs, including author paper; required
source { cid, type, bytes } paper
pdf { cid, type, bytes } paper
firstPublished date, YYYY-MM-DD: when the work first appeared, for work that appeared before it was published here post, paper
original https URL, at most 2,000 characters: where the work first appeared post, paper
verdict string, at most 300 code points reply
rating, min, max integers from −100 to 100 (see Ratings) rating; required
tag string, 1–64 code points (see Tags and reactions) tag; required
image version-pinned DID URL of an image asset (see Custom emoji) tag

firstPublished and original are for work that appeared somewhere else first: an article brought over from a blog, a paper from a journal or a preprint server. Both are the author’s claim, as a paper’s authors are, and nothing checks either. They are shown as such, beside the time the version was anchored and never in its place: that time is the only one established. No order follows firstPublished; a timeline is ordered by anchoring, which an author cannot choose. original is an address a stranger wrote: a reader follows it only as a link in text is followed (see Text formatting).

A verdict is free text so that venues can use their own wording (“accept”, “minor revisions”). A venue that needs a fixed vocabulary defines an extension kind.

Schemas

Every kind, the grant and the grant request has a schema: a JSON Schema (draft 2020-12), in the spirit of AT Protocol’s Lexicon. The schema text below is normative. Each schema is also published as an Archon schema asset (createSchema), standing alone: the text below with $schema and the common $defs it refers to. Those files are in share/schema/memeplex/v1, and in archetech/schemas, which records each one’s DID once it is published. The protocol pins each DID and versionId; none is published yet. A schema validates the memeplex member (or memeplexGrant, memeplexGrantRequest), not the whole didDocumentData.

tests/fixtures/memeplex-v1-vectors.json holds signed operations creating objects and grants, valid and invalid, each with the outcome these rules give it.

Schema text

Common definitions, shared as $defs by every schema:

{
  "did": {"type": "string", "pattern": "^did:[a-z0-9]+:[A-Za-z0-9._:%-]+$"},
  "versionId": {"type": "string", "pattern": "^b[a-z2-7]{20,}$"},
  "cid": {
    "type": "string",
    "pattern": "^(b[a-z2-7]{20,}|Qm[1-9A-HJ-NP-Za-km-z]{44})$"
  },
  "pinnedDidUrl": {
    "type": "string",
    "pattern": "^did:[a-z0-9]+:[A-Za-z0-9._:%-]+\\?versionId=b[a-z2-7]{20,}$"
  },
  "bytes": {"type": "integer", "minimum": 0},
  "markdown": {
    "type": "object",
    "required": ["cid", "type", "bytes"],
    "properties": {
      "cid": {"$ref": "#/$defs/cid"},
      "type": {"const": "text/markdown"},
      "bytes": {"$ref": "#/$defs/bytes"}
    }
  },
  "pdf": {
    "type": "object",
    "required": ["cid", "type", "bytes"],
    "properties": {
      "cid": {"$ref": "#/$defs/cid"},
      "type": {"const": "application/pdf"},
      "bytes": {"$ref": "#/$defs/bytes"}
    }
  },
  "source": {
    "type": "object",
    "required": ["cid", "type", "bytes"],
    "properties": {
      "cid": {"$ref": "#/$defs/cid"},
      "type": {"enum": ["application/x-tex", "application/gzip"]},
      "bytes": {"$ref": "#/$defs/bytes"}
    }
  },
  "tagValue": {"type": "string", "minLength": 1, "maxLength": 64},
  "tags": {"type": "array", "minItems": 1, "maxItems": 20, "items": {"$ref": "#/$defs/tagValue"}},
  "text": {"type": "string", "maxLength": 10000},
  "date": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"},
  "link": {"type": "string", "maxLength": 2000, "pattern": "^https://[^\\s]+$"},
  "action": {
    "anyOf": [
      {"enum": ["memeplex:post", "memeplex:reply", "memeplex:rate", "memeplex:tag"]},
      {"$ref": "#/$defs/pinnedDidUrl"}
    ]
  },
  "actions": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"$ref": "#/$defs/action"}},
  "expiresAt": {
    "type": "string",
    "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?Z$"
  }
}

Every schema sets "$schema": "https://json-schema.org/draft/2020-12/schema", omitted below. Each kind’s schema lists every field the field table defines: the fields the kind allows with their types, and the rest as false, so a field from another kind makes the object invalid. Other properties are unconstrained, so unknown fields are ignored, as the strictness rule requires.

post

{
  "title": "Memeplex post",
  "type": "object",
  "properties": {
    "v": {"const": 1},
    "author": {"$ref": "#/$defs/did"},
    "grant": {"$ref": "#/$defs/did"},
    "kind": {"const": "post"},
    "text": {"$ref": "#/$defs/text"},
    "content": {"$ref": "#/$defs/markdown"},
    "target": {"$ref": "#/$defs/did"},
    "targetVersion": {"$ref": "#/$defs/versionId"},
    "tags": {"$ref": "#/$defs/tags"},
    "title": {"type": "string", "maxLength": 300},
    "subtitle": {"type": "string", "maxLength": 300},
    "summary": {"type": "string", "maxLength": 5000},
    "firstPublished": {"$ref": "#/$defs/date"},
    "original": {"$ref": "#/$defs/link"},
    "authors": false, "source": false, "pdf": false, "verdict": false,
    "rating": false, "min": false, "max": false, "tag": false, "image": false
  },
  "required": ["v", "kind", "author", "grant"],
  "dependentRequired": {
    "target": ["targetVersion"],
    "targetVersion": ["target"],
    "subtitle": ["title"],
    "summary": ["title"]
  },
  "allOf": [
    {"not": {"required": ["text", "content"]}},
    {
      "anyOf": [
        {"required": ["text"]},
        {"required": ["content"]},
        {"required": ["target"]}
      ]
    }
  ]
}

paper

{
  "title": "Memeplex paper",
  "type": "object",
  "properties": {
    "v": {"const": 1},
    "author": {"$ref": "#/$defs/did"},
    "grant": {"$ref": "#/$defs/did"},
    "kind": {"const": "paper"},
    "content": {"$ref": "#/$defs/markdown"},
    "tags": {"$ref": "#/$defs/tags"},
    "title": {"type": "string", "maxLength": 300},
    "subtitle": {"type": "string", "maxLength": 300},
    "summary": {"type": "string", "maxLength": 5000},
    "authors": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "uniqueItems": true,
      "items": {"$ref": "#/$defs/did"}
    },
    "source": {"$ref": "#/$defs/source"},
    "pdf": {"$ref": "#/$defs/pdf"},
    "firstPublished": {"$ref": "#/$defs/date"},
    "original": {"$ref": "#/$defs/link"},
    "text": false, "target": false, "targetVersion": false, "verdict": false,
    "rating": false, "min": false, "max": false, "tag": false, "image": false
  },
  "required": ["v", "kind", "author", "grant", "title", "summary", "authors", "content"]
}

reply

{
  "title": "Memeplex reply",
  "type": "object",
  "properties": {
    "v": {"const": 1},
    "author": {"$ref": "#/$defs/did"},
    "grant": {"$ref": "#/$defs/did"},
    "kind": {"const": "reply"},
    "text": {"$ref": "#/$defs/text"},
    "content": {"$ref": "#/$defs/markdown"},
    "target": {"$ref": "#/$defs/did"},
    "targetVersion": {"$ref": "#/$defs/versionId"},
    "tags": {"$ref": "#/$defs/tags"},
    "verdict": {"type": "string", "maxLength": 300},
    "title": false, "subtitle": false, "summary": false, "authors": false,
    "firstPublished": false, "original": false,
    "source": false, "pdf": false, "rating": false, "min": false, "max": false,
    "tag": false, "image": false
  },
  "required": ["v", "kind", "author", "grant", "target", "targetVersion"],
  "allOf": [
    {"not": {"required": ["text", "content"]}},
    {
      "anyOf": [
        {"required": ["text"]},
        {"required": ["content"]}
      ]
    }
  ]
}

rating

{
  "title": "Memeplex rating",
  "type": "object",
  "properties": {
    "v": {"const": 1},
    "author": {"$ref": "#/$defs/did"},
    "grant": {"$ref": "#/$defs/did"},
    "kind": {"const": "rating"},
    "target": {"$ref": "#/$defs/did"},
    "targetVersion": {"$ref": "#/$defs/versionId"},
    "rating": {"type": "integer", "minimum": -100, "maximum": 100},
    "min": {"type": "integer", "minimum": -100, "maximum": 100},
    "max": {"type": "integer", "minimum": -100, "maximum": 100},
    "text": false, "content": false, "tags": false, "title": false,
    "subtitle": false, "summary": false, "authors": false, "source": false,
    "firstPublished": false, "original": false,
    "pdf": false, "verdict": false, "tag": false, "image": false
  },
  "required": ["v", "kind", "author", "grant", "target", "targetVersion", "rating", "min", "max"]
}

tag

{
  "title": "Memeplex tag",
  "type": "object",
  "properties": {
    "v": {"const": 1},
    "author": {"$ref": "#/$defs/did"},
    "grant": {"$ref": "#/$defs/did"},
    "kind": {"const": "tag"},
    "target": {"$ref": "#/$defs/did"},
    "targetVersion": {"$ref": "#/$defs/versionId"},
    "tag": {"type": "string", "minLength": 1, "maxLength": 64},
    "image": {"$ref": "#/$defs/pinnedDidUrl"},
    "text": false, "content": false, "tags": false, "title": false,
    "subtitle": false, "summary": false, "authors": false, "source": false,
    "firstPublished": false, "original": false,
    "pdf": false, "verdict": false, "rating": false, "min": false, "max": false
  },
  "required": ["v", "kind", "author", "grant", "target", "targetVersion", "tag"]
}

grant (memeplexGrant)

{
  "title": "Memeplex grant",
  "type": "object",
  "required": ["v", "client"],
  "properties": {
    "v": {"const": 1},
    "client": {"$ref": "#/$defs/did"},
    "request": {"$ref": "#/$defs/did"},
    "actions": {"$ref": "#/$defs/actions"},
    "expiresAt": {"$ref": "#/$defs/expiresAt"}
  }
}

grant request (memeplexGrantRequest)

{
  "title": "Memeplex grant request",
  "type": "object",
  "required": ["v", "name", "registries"],
  "properties": {
    "v": {"const": 1},
    "name": {"type": "string", "minLength": 1, "maxLength": 100},
    "actions": {"$ref": "#/$defs/actions"},
    "expiresAt": {"$ref": "#/$defs/expiresAt"},
    "registries": {"type": "array", "minItems": 1, "uniqueItems": true,
                   "items": {"enum": ["BTC:mainnet", "ZEC:mainnet", "ETH:mainnet", "SOL:mainnet-beta"]}}
  }
}

JSON Schema counts string length in code points, matching the field table.

Checks beyond the schemas

These rules cannot be expressed in JSON Schema. Validators apply them alongside the schema, and a version that fails one is invalid in the same way.

  1. Rating bounds: min < max and min ≤ rating ≤ max.
  2. Paper authors: authors includes author.
  3. Expiry instant: a grant’s or grant request’s expiresAt is a valid ISO 8601 date-time in UTC, such as 2026-12-31T00:00:00Z. The schema’s pattern checks only the shape; a value that is not a real instant is invalid.

  4. First publication date: a firstPublished is a real calendar date, such as 2019-03-12. The schema’s pattern checks only the shape.

No check depends on Unicode data: tag values are validated structurally, and how they are normalized and classified is up to readers (see Tags and reactions).

Examples

One object of each kind and common variant, showing didDocumentData. Each names its grant: the reply comes from Bob’s Memepool client, and the paper from a client Alice runs herself. DIDs are shortened.

post

{ "memeplex": { "v": 1, "kind": "post", "author": "did:cid:…alice",
                "grant": "did:cid:…alice-memepool",
                "text": "Every post on Memepool is a DID. So is this photo.\n\n![A canvas tent full of people facing a projector screen](did:cid:…photo?versionId=bafyreiimg…)",
                "tags": ["archon", "memeplex"] } }

post with a title (an article): the body lives on IPFS

{ "memeplex": { "v": 1, "kind": "post", "author": "did:cid:…alice",
                "grant": "did:cid:…alice-memepool",
                "title": "Why every post should be a DID",
                "subtitle": "Objects as identifiers, not rows in someone's database",
                "summary": "Permalinks, edit history and provable timestamps for free.",
                "content": { "cid": "bafkrei…", "type": "text/markdown", "bytes": 48213 },
                "tags": ["archon", "publishing"] } }

paper: revised in place; each revision is a version of the same DID

{ "memeplex": { "v": 1, "kind": "paper", "author": "did:cid:…alice",
                "grant": "did:cid:…alice-own-client",
                "title": "Convergent Replay of Signed DID Histories",
                "summary": "We show that nodes receiving the same signed operations …",
                "authors": ["did:cid:…alice", "did:cid:…bob"],
                "content": { "cid": "bafkrei…", "type": "text/markdown", "bytes": 61207 },
                "pdf": { "cid": "bafybei…", "type": "application/pdf", "bytes": 912340 },
                "source": { "cid": "bafybei…", "type": "application/x-tex", "bytes": 84112 },
                "tags": ["distributed-systems", "did"] } }

reply: published by Bob’s client under his grant, quoting another post inline

{ "memeplex": { "v": 1, "kind": "reply", "author": "did:cid:…bob",
                "grant": "did:cid:…bobs-grant",
                "target": "did:cid:…alice-post", "targetVersion": "bafyreipost…",
                "text": "Including the reactions? Carol measured them:\n\n![Carol's benchmark post](did:cid:…carol-post?versionId=bafyreicarol…)" } }

post with a target: a quote post; without text it would be a plain boost

{ "memeplex": { "v": 1, "kind": "post", "author": "did:cid:…erin",
                "grant": "did:cid:…erin-grant",
                "target": "did:cid:…alice-post", "targetVersion": "bafyreipost…",
                "text": "This is the clearest explanation of the idea so far." } }

reply with a verdict (a review): pins the revision it assessed

{ "memeplex": { "v": 1, "kind": "reply", "author": "did:cid:…carol",
                "grant": "did:cid:…carol-grant",
                "target": "did:cid:…paper", "targetVersion": "bafyreirev2…",
                "verdict": "minor revisions",
                "text": "The convergence argument holds, but section 4 assumes …" } }

tag with an emoji (a reaction)

{ "memeplex": { "v": 1, "kind": "tag", "author": "did:cid:…dave",
                "grant": "did:cid:…dave-grant",
                "target": "did:cid:…alice-post", "targetVersion": "bafyreipost…",
                "tag": "❤️" } }

rating: three stars out of five

{ "memeplex": { "v": 1, "kind": "rating", "author": "did:cid:…carol",
                "grant": "did:cid:…carol-grant",
                "target": "did:cid:…paper", "targetVersion": "bafyreirev2…",
                "rating": 3, "min": 1, "max": 5 } }

tag: a community labeller marking a post

{ "memeplex": { "v": 1, "kind": "tag", "author": "did:cid:…spamwatch",
                "grant": "did:cid:…spamwatch-grant",
                "target": "did:cid:…some-post", "targetVersion": "bafyreispam…",
                "tag": "spam" } }

Articles

A post with a title is an article: clients give it a long-form layout, with the optional subtitle and summary on its card. Its body is usually content on IPFS. Articles need no separate kind because nothing about them differs except the fields they carry.

Boosts and quote posts

A boost (repost) is a post whose target is the original:

kind, not target, decides thread membership: a thread shows reply objects, and counts posts, ratings and tags that target it without listing them in it. A boost shares the original with the booster’s own audience. Its target lets queries discover it alongside other responses, subject to the current-data limits under Discovery queries. Boosting needs the memeplex:post action.

Quoting inside other text is an embed (see Text formatting): an essay that discusses three posts embeds each where it discusses it. Embeds are not indexed by Gatekeeper, so counting them needs an indexer.

Ratings

A rating states its own scale, so clients can use 5 stars, 0–100 or thumbs up and down, and ratings stay comparable:

{ "memeplex": { "v": 1, "kind": "rating", "author": "did:cid:…user",
                "grant": "did:cid:…grant",
                "target": "did:cid:…paper", "targetVersion": "bafyreirev2…",
                "rating": 3, "min": 1, "max": 5 } }

A like is a reaction (“I appreciate this”); a rating judges quality.

Reviews

A reply with a verdict is a review. It sits in the thread like any reply, so it can be answered there, and clients may also list a target’s reviews separately. A reviewer who also wants to score publishes a separate rating.

Tags and reactions

An object’s author describes it with the tags field inside the object. Anyone else labels it, or reacts to it, with a tag object whose target is the object:

{ "memeplex": { "v": 1, "kind": "tag", "author": "did:cid:…labeller",
                "grant": "did:cid:…grant",
                "target": "did:cid:…post", "targetVersion": "bafyrei…",
                "tag": "cryptography" } }

A tag value is any string of 1–64 code points. Validity stops there: whether a value is well formed is a matter of presentation, not authorship, so it never depends on a verifier’s Unicode data.

Indexers on different Unicode releases may count a brand-new emoji differently; authorship is the same everywhere.

Custom emoji

A tag with an image is a custom emoji reaction, like Slack’s :catjam: or Nostr’s NIP-30 emoji:

{ "memeplex": { "v": 1, "kind": "tag", "author": "did:cid:…dave",
                "grant": "did:cid:…dave-grant",
                "target": "did:cid:…post", "targetVersion": "bafyrei…",
                "tag": ":catjam:",
                "image": "did:cid:…catjam?versionId=bafyrei…" } }

Shared emoji packs, which map a community’s shortcodes to images so users can pick from a set, are a client feature built on image; they need no protocol change.

Word tags are signed, attributed judgments like any other object, so their weight depends on who applied them. Moderation labels are tags too (see Memepool: Moderation).

Content and size

Inline text is for content that fits comfortably inside one operation. Larger Markdown bodies go to IPFS and are referenced from content; binary data uses image assets or the paper’s download fields. Updating the content of an article is a normal update that replaces the reference; the old reference stays in the previous version.

Coauthors

Attribution covers only author, the DID that published the paper. The other DIDs in authors are the publisher’s claim. A listed coauthor confirms it by publishing a tag with the value coauthor on the paper, with targetVersion set to the revision they stand behind. Clients show a listed coauthor as confirmed for a revision only when such an attributed tag pins that exact revision. A tag on an earlier revision is shown as such (“confirmed v2”), never as confirmation of a later one, because the publisher can change the paper while keeping the coauthor listed. Otherwise the coauthor is shown as “listed by the publisher”. An attributed deletion withdraws the tag; an attributed edit can move its confirmation to a new revision. Read the tag’s publication state in both cases.

Text formatting

Every client renders the same text the same way:

content.type is always text/markdown, for every kind, papers included: one body format means one renderer, and every body reflows on small screens, works with screen readers, can be searched, and can embed figures and other objects. A paper may also carry two downloads, which clients offer but never render:

Pandoc converts most LaTeX papers to Markdown with math well enough; the PDF covers what the conversion loses (custom macros, complex tables, exact figure placement).

Archon mapping

These primitives exist in packages/keymaster/src/keymaster.ts and the Gatekeeper API. The Memeplex verifier and client are still to be implemented.

Need Primitive
Create a grant or publication createAsset(data, { registry, controller }); create on the grant’s chain registry.
Edit updateDID / mergeData; each operation produces another version.
Withdraw or revoke revokeDID; Memeplex interprets the deletion through its attribution rule.
Read history POST /api/v1/dids/versions for every version of a DID as resolved; resolveDID with versionId for one. Earlier versions remain resolvable while accepted.
Store content IPFS through the Gatekeeper data API; createFile stores { cid, filename, type, bytes }.
Store an image createImage; the asset has file and image data.
Publish a schema createSchema; the protocol pins its schema DID and version.
Discover activity GET /api/v1/changes, after reading every DID once; read them all again when its epoch changes.
Query current data POST /api/v1/query; a discovery shortcut, not a complete publication index.

Archon also supports transferAsset and changeRegistry. Using either on a publication ends attribution for that version and its successors. They are not Memeplex migration mechanisms. Attribution never uses versionTime as a grant cutoff, even though Archon supports historical resolution by time.

Grant request flow

  1. The client creates its agent DID and a grant request: an asset, as a challenge is an asset, whose data is the request.

    { "memeplexGrantRequest": { "v": 1,
                                "name": "Memepool",
                                "actions": ["memeplex:post", "memeplex:reply", "memeplex:tag"],
                                "registries": ["BTC:mainnet", "ZEC:mainnet"] } }
    

    Nothing in the request names the client: the client is the request’s controller, which created and signed it. A request is not a publication, so it is made where a challenge is, on hyperswarm, and may carry validUntil; the reference client’s lasts an hour.

    registries lists the permitted registries the client can publish on: those its own node supports. A client publishes every object on its grant’s registry, so a grant on a registry the client cannot reach is a grant it cannot use, and the user would have paid to anchor it. Every request lists at least one: a client that can publish on all four says so.

    The client presents the request as a grant link: an auth link, as the one that presents a challenge is (archon://auth?challenge=<DID>), with the request’s DID as its grant:

    archon://auth?grant=<DID of the request>
    

    A challenge and a grant request are both a DID that a service made and a wallet answers, and the parameter says which the DID is. A wallet goes by what the DID holds all the same: it answers no challenge from a grant link and makes no grant from a challenge link, and says so. A wallet that opens a grant link, or scans it, shows the request for review and creates nothing until the user approves.

    • The client shows the link as a QR code for a wallet on another device, as a clickable link for a wallet on the same device (the browser extension or the mobile app), and as copyable text that the wallet accepts when pasted. A wallet also accepts the DID alone.
    • The wallet sends nothing back: the client finds the grant by query (step 3).
  2. The wallet resolves the request and reads who is asking from it. It creates no grant, and says why, when the request cannot be resolved, is deleted, is not an asset, does not match the grant request schema, or is not at its first version. Only the first version is the one its controller signed with these contents: an asset’s owner can replace its contents and transfer it to an identity that signed nothing, so the controller of a later version is not evidence of who asked.

    The wallet shows the client DID, the claimed name (labelled as the client’s own claim) and the requested scope: the listed actions, or every core kind when the request has no actions. The user approves it or a narrower subset and picks a registry from those the request lists that the wallet’s own node supports. With none of those, the wallet creates no grant and says why. Otherwise it creates the grant there with that scope, the request’s controller as client and the request’s DID as request. The grant does not carry registries.

  3. The client finds the grant with a query for memeplexGrant.client (see Discovery queries), keeps the one whose request is its request, waits until it is anchored, and checks the grant against the core authorization rules. The grant’s creator is the user. Anyone who saw the request could create a grant naming it from a different DID, so the client shows the user’s identity and asks for confirmation before publishing. A client that knows its user, because the user signed in to it, finds that user’s grants by who created them.
  4. The client names the grant’s DID as memeplex.grant in every object it publishes for that user, and creates each object on the grant’s registry. Its Gatekeeper must support that registry.

A client may hold grants from several users (a shared device, or a service publishing for many people); the author and grant fields keep them apart.

Discovery queries

Gatekeeper keeps an in-memory index of every DID’s didDocumentData, and POST /api/v1/query matches a path against a list of values. That index does not cover the controller, which is why objects carry author in their data.

Question Query
Everything by a user { "where": { "memeplex.author": { "$in": ["did:cid:…user"] } } }
Every response to an object { "where": { "memeplex.target": { "$in": ["did:cid:…"] } } }
Objects under one grant { "where": { "memeplex.grant": { "$in": ["did:cid:…grant"] } } }
Grants naming a client { "where": { "memeplexGrant.client": { "$in": ["did:cid:…client"] } } }
Objects an author tagged { "where": { "memeplex.tags[*]": { "$in": ["cryptography"] } } }
Tags others applied (their targets are the tagged objects) { "where": { "memeplex.tag": { "$in": ["cryptography"] } } }

A thread is loaded by repeating the target query one level at a time, keeping reply objects (subject to the limit below); an indexer builds complete thread trees directly. Objects carry no separate thread-root field to keep consistent.

Only one condition and only $in are supported, so a client separates boosts (posts), replies, ratings and tags by kind after the query, and reviews and reactions by their fields. Results are unsorted and unpaged, and they are not attributions: the matches still have to pass the attribution check, because anyone can write any author into an object they publish.

These queries match current data, so they are incomplete. An object whose latest version is an unattributed deletion or edit (by a revoked client, for example) may no longer match, even though its publication state is its last attributed version. A thread or timeline built from queries can therefore miss such objects. Complete results need history-based discovery, as the indexer does.

Memepool

Memepool is the first client and indexer. These choices do not bind other clients.

Reactions

Memepool offers no skin-tone picker, and counts and renders every reaction as its base emoji: the fully-qualified RGI emoji that Unicode’s emoji-test.txt lists as the untoned form of the reaction’s tag. Removing the modifier code points is not enough: ☝🏽 without its modifier is the unqualified ☝, whose base is ☝️, and a toned multi-person sequence can have a different base (👩🏽‍🤝‍👩🏻’s base is 👭). The mapping is derived from emoji-test.txt, which lists each toned emoji with its base.

Follows

Memepool keeps follows private: on the device, or in a vault the user owns so that several clients share them. Follows are never published, so the network does not learn whom anyone follows. A hosted indexer that builds a reader’s timeline does learn the set of authors it is asked about, and computing the timeline locally does not by itself avoid this: per-author queries go to a Gatekeeper over HTTP, so a remote Gatekeeper sees the same author set. Readers who want their follows private from every service query a Gatekeeper and indexer they run or trust. This is closer to Substack’s reading privacy than to Twitter’s public graph.

A public social graph (follower counts, graph-based discovery) can be added later if something needs it. The candidates are a follows list in the user’s own DID data, written by the wallet, or a single per-user state asset kept apart from publications. Neither is part of v1.

Indexer

Memepool follows the core’s history-based discovery and publication rule. It builds timelines, thread trees, search, counts and per-tag feeds, and serves those views over HTTP behind Drawbridge. Other indexers may rank them differently.

Moderation

There is no central moderator. Viewers choose which judgments to apply:

Wallet

The wallets have grants in their Auth tab, beside signing in, and so do the standalone clients (keymaster-client, gatekeeper-client), which show the same view. A grant request reaches it pasted, as a link or a DID, or by opening or scanning a grant link (archon://auth?grant=<DID>), and is shown for review: nothing is created until the user approves.

A wallet knows no app, Memeplex included: it reads a request and a grant by the rules Keymaster uses for any app’s (@didcid/keymaster/grant), and the Memeplex rules are the verifier’s. So it:

It shows a revocation in three states: requested (signed by the wallet), submitted (accepted by a node for anchoring) and effective (the deletion is anchored). Until it is effective, the wallet warns the user that the client can still act under the grant.

Content availability

IPFS content is available only while someone pins it. ARCHON_GATEKEEPER_REGISTRIES_PIN pins operation JSON, not the article, PDF or image bytes referenced by an operation. Those are pinned separately, and the client that publishes an object pins the content the object references: it put the bytes on IPFS, for a user who has no node of their own to keep them. Memepool pins what it publishes, and how long it keeps them is that service’s to say and to tell its users. An indexer or a pinning service may pin the same bytes as well. A reviewer who needs the assessed content to survive retains its CID and pins it.

A valid publication can exceed a renderer’s automatic-fetch budget or have missing content. Show an appropriate link or placeholder; neither condition grants or removes authorship. Rendering untrusted material must follow the budgets and safe-format rules above.

Design choices

V1 uses public grant assets because third parties can read the user’s signed scope directly. Archon credentials are encrypted to their subjects and would need an additional public representation for this purpose.

ZCAP and UCAN were considered. V1 needs one level of delegation, with evidence resolved through Archon; it does not need delegation chains or an additional capability proof format. The grant is already signed, versioned and revocable.

A revocation snapshot was also considered: the wallet could record the exact versions it accepts when revoking, instead of requiring chain ordering. That requires a complete inventory, including deleted objects, and durable availability of the snapshot. Chain-based authority avoids that inventory at the cost of anchoring latency. An indexer’s first-seen time can inform its own heuristics but cannot serve as independently verifiable authority.

Spam controls remain a client or service concern. A batch transaction spreads anchoring cost over many objects; anchoring alone is not an effective rate limit. Hosted publishing can impose costs or limits, and indexers can rank by trust.

Scale

Every object, of every kind, is a DID; no kind is batched or stored differently. Each object goes through Gatekeeper gossip, replay and the in-memory search index on every node. CPU, memory, startup time and durable storage all grow with the workload. Optimizations will come as volume requires them, as they have for startup replay.

A sizing benchmark establishes the starting point, on an isolated node with production-like Redis persistence, in both Gatekeeper ports:

Acceptance targets for each measurement (latency, memory, rebuild time) are set before the benchmark runs. The results size node hardware and show where optimization will be needed first.

A first, smaller run was made on 2026-11-16 to find out what those volumes need: up to 300,000 objects on one node with the Rust Gatekeeper. Its figures are in tests/scale/memeplex/README.md. It found three things in the way, all since fixed: the Gatekeeper’s memory for each DID (#1642), queries that read every DID on the node (#1643), and a Hyperswarm mediator that ran out of memory under the load (#1644).

Rust Gatekeeper First run After the fixes
Memory at 300,000 objects 11.1 GB 0.83 GB
Memory at 1 million about 36 GB, projected 2.8 GB, measured
Restart until ready at 1 million about 7 minutes, projected 373 s, with a peak of 14.2 GB

What limits a node now is importing: about 2.3 ms for each operation it receives in the Rust Gatekeeper and about 8 ms in the TypeScript one (#1651), so a node takes in a few hundred objects a second at most.

The benchmark at 1, 5 and 10 million objects is deferred. The first run answered whether every object can be a DID. The application workload cannot be measured until the verifier exists.

Milestones

  1. Benchmark objects-as-DIDs (Scale). A sizing run to 300,000 objects is done, and one node has held a million. The full volumes are deferred.
  2. Schemas: JSON Schemas for every core kind and the grant, published as schema assets, with signed fixtures. The schemas and fixtures are written. Publishing them, and pinning their DIDs here, follows the verifier: publication fixes the schemas of v: 1, so they are exercised first.
  3. Verifier library: the attribution rules, in a package of its own, used by the indexer and, for validity and their own grant, by clients, with cross-checks against real signed objects, including revoked and forged grants, transferred objects, backdated siblings, and unattributed edits and deletions after revocation (of ratings and coauthor confirmations in particular), and a fresh index rebuild that must match a continuously running one.
  4. CLI client: create an agent DID as the client, grant it from the user’s identity, then create, edit, delete and query objects on the grant’s registry from the existing CLI and SDKs; this works with today’s asset commands.
  5. Delegation: wallet UI to create, list and revoke grants on a permitted registry. The wallets (packages/wallet-ui) have grants in their Auth tab, beside signing in: it takes a pasted grant link, resolves the request it names and reads it with Keymaster’s grantRequestOf (@didcid/keymaster/grant), as it would any app’s. The wallet knows no app, so it shows a request’s actions as the request names them and can narrow a grant’s actions but not add one. An agent, which acts through the CLI and the MCP tools and cannot paste a link into a wallet, uses Keymaster’s grants: create-grant <request>, list-grants, update-grant <id> and revoke-grant <id> in the three CLIs (scripts/archon-cli.js, the TypeScript and the Python Keymaster CLI), the MCP tools archon_create_grant and the rest, and /grants on the Keymaster service. Those grants are not Memeplex’s alone. Keymaster knows no app: a client of any app asks with a grant request, an asset it creates holding <app>GrantRequest, and Keymaster answers with an asset holding <app>Grant, to the identity that created the request (packages/keymaster/README.md, “Grants”). Memeplex is the app memeplex. Keymaster checks only the shape every request has, so a grant it makes is not thereby valid under these rules: the verifier says. tests/keymaster/grant.test.ts has the verifier read the grants Keymaster makes for a memeplexGrantRequest. Still to do:
    • A wallet shows a revocation’s state only until it is closed.
  6. Indexer. The memeplex-indexer service, enabled by the memeplex profile and offered through Drawbridge at /memeplex; see docs/services/memeplex-indexer/README.md.
  7. Memepool client. Its library is @didcid/memeplex/client: MemeplexClient asks for a grant, finds it and publishes under it through a Keymaster and a Gatekeeper it is handed, and IndexerClient reads an indexer’s views. tests/memeplex/client.test.ts runs the whole flow, from a grant link to a thread read over HTTP, with the test anchoring as a mediator does. The service that holds Memepool’s key and publishes for the users who sign in to it is services/memepool (docs/services/memepool/README.md). It is deployed by the memepool profile and offered through Drawbridge at /memepool. Its pages are apps/memepool: sign-in, the grant, a timeline of the authors a reader follows, posts, replies and threads. The Memepool service serves them, at <node>/memepool/ through Drawbridge. The service stores the body of an article on its node’s IPFS, which pins it, and publishes the reference; it takes no reference to content it has not stored, and reads back the body of what it published (see Content availability). The pages write, show and edit an article. The pages render text as GitHub Flavored Markdown under the rules of Text formatting for HTML, links and images loaded from elsewhere. They show an embed as what its DID is: an object as a card with what that version said, read from the indexer at that version, and an image asset as the image, which the service serves under the limits above without decoding it. They render math with KaTeX, under the dollar rule above and with its trusted commands off. The service stores an image a user chooses and makes an asset of it, on hyperswarm, for text to embed. Still to do there: a paper’s PDF and source, which are files, and coauthors.
  8. Moderation: block lists and labels.
  9. Zaps: Lightning payments to an author for something they published, as Nostr has. Later; not designed.

References