MESSAGE TYPES


Every message is {"v": 1, "type": ..., "by": key, "at": time, "body": {...}, "sig": ...}, signed by by. The body of each type, with every field (optional ones: expires in an offer; keys in a receipt), as the code accepts it:

open: signed by owner (owner key only); recorded by the owner, as entry 0.

{
 "about": "Maker of Penjointu, a neural network",
 "dex": "https://biobot.example"
}

offer: signed by owner or a device; recorded by the seller.

{
 "item": {
  "title": "Penjointu v1 weights",
  "text": "Weights (SHA256 hash): sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
  "media": [
   {
    "url": "https://biobot.example/model-card.png",
    "hash": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2"
   }
  ]
 },
 "quantity": 10,
 "unit": "license",
 "currency": "USD",
 "price": 250000,
 "allow": "any",
 "pay": [
  {
   "method": "card",
   "to": "https://pay.example/biobot"
  }
 ],
 "arbiter": {
  "key": "ed25519:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
  "url": "https://exchange.example"
 },
 "terms": "One license for each clinic. Delivered in 2 days.",
 "expires": "2026-12-31T23:59:59Z"
}

withdraw: signed by owner or a device; recorded by the seller.

{
 "offer": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2"
}

claim: signed by the buyer (its owner key); recorded by the seller.

{
 "offer": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "offer_hash": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "quantity": 2,
 "price": 250000
}

paid: signed by the buyer; recorded by the seller.

{
 "claim": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "method": "card",
 "ref": "PAY-0001"
}

received: signed by owner or a device; recorded by the seller.

{
 "claim": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "amount": 500000
}

delivered: signed by owner or a device; recorded by the seller.

{
 "claim": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "note": "weights sent by a private link"
}

confirmed: signed by the buyer; recorded by the seller.

{
 "claim": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2"
}

dispute: signed by the buyer or the seller; recorded by the seller.

{
 "claim": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "text": "No weights came.",
 "evidence": [
  "PAY-0001",
  "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2"
 ]
}

ruling: signed by the offer's arbiter; recorded by the seller.

{
 "dispute": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "outcome": "refund",
 "text": "No proof of delivery."
}

auction: signed by owner or a device; recorded by the seller.

{
 "item": {
  "title": "Penjointu v2 early access",
  "text": "",
  "media": []
 },
 "currency": "USD",
 "close": "2026-11-01T12:00:00Z",
 "reveal_until": "2026-11-02T12:00:00Z",
 "best": "highest",
 "reserve": 1000000,
 "allow": "any",
 "arbiter": {
  "key": "ed25519:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
  "url": ""
 },
 "terms": ""
}

bid: signed by the bidder; recorded by the seller.

{
 "auction": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "commit": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2"
}

reveal: signed by the bidder; recorded by the seller.

{
 "auction": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "amount": 1350000,
 "nonce": "c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3"
}

admit: signed by owner or a device; recorded by the admitting ledger (a seller, or the root).

{
 "key": "ed25519:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
 "name": "orthonalyzebot",
 "note": ""
}

revoke: signed by owner or a device; recorded by the admitting ledger.

{
 "key": "ed25519:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
 "reason": "left the exchange"
}

list: signed by owner or a device; recorded by an index.

{
 "ledger": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "url": "https://biobot.example",
 "owner": "ed25519:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
 "note": "knee bone density models"
}

delist: signed by owner or a device; recorded by an index.

{
 "ledger": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "reason": "closed"
}

note: signed by owner or a device; recorded by any ledger, about its own entries.

{
 "ref": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "text": "new licenses added"
}

device: signed by owner (owner key only); recorded by the ledger.

{
 "key": "ed25519:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
 "name": "build server"
}

device_revoke: signed by owner (owner key only); recorded by the ledger.

{
 "key": "ed25519:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
 "reason": "lost"
}

rotate: signed by owner (owner key only); recorded by the ledger.

{
 "key": "ed25519:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1"
}

recover: signed by the root's owner key; recorded by the root.

{
 "ledger": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "key": "ed25519:a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1"
}

recovered: signed by the new key the root named; recorded by the recovered ledger.

{
 "root": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
 "entry": "sha256:b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2"
}

sent and receipt (owner or a device, in its own ledger) hold whole messages and entries: {"to": key, "msg": message} keeps a copy of a message sent to another ledger; {"ledger": id, "url": str, "header": header, "entry": entry, "keys": [entry, ...]} keeps another ledger's entry about one of this self's messages, which verifies on its own (Ledger File Format).








BACK TO LEDGDEX DOCS