cafe.thunderbird.daisy.match

thunderbird.cafe

Documentation

One player's copy of a finished Daisy match. Each player saves their own; the record key is the match id (a TID made when the commitments are exchanged, just before the coin), so the two copies share it. A player against the bot saves alone.

main record

One player's copy of a finished Daisy match. Each player saves their own; the record key is the match id (a TID made when the commitments are exchanged, just before the coin), so the two copies share it. A player against the bot saves alone.

Record Key tid Timestamp-based ID

Properties

commitments array of ref #link Required

Each player's commitment, in player order: the top of a SHA-256 hash chain made from a secret seed before the coin.

maxLength: 2 itemsminLength: 2 items
createdAt string datetime Required

An RFC 3339 formatted timestamp.

ending string Required

No description available.

Known values: won, forfeit
firstPlayer integer Required

Who the coin (roll 0) chose to start.

minimum: 1maximum: 2
forfeitReason string Optional

Only for a forfeit: the loser let the turn timer run out, was away too long, or didn't reveal their link for a roll.

Known values: turn-timeout, away, no-reveal
lastReveals array of ref #link Required

The last link each player revealed on that chain, in player order. Hashing forward from it rebuilds every earlier reveal up to the commitment, so the coin and every roll can be recomputed.

maxLength: 2 itemsminLength: 2 items
matchId string Required

The match id, also this record's key (a TID).

maxLength: 13 bytesminLength: 13 bytes
players array of ref #player Required

No description available.

maxLength: 2 itemsminLength: 2 items
rechains array of ref #rechain Optional

Only when a chain ran out: the fresh chains that followed, in order.

maxLength: 100 items
seat integer Required

Which player saved this record (1 or 2, an index into players).

minimum: 1maximum: 2
target integer Required

The score that wins, a house setting agreed before the coin.

minimum: 1maximum: 1000
turns array of ref #turn Required

Every turn in play order.

maxLength: 10000 items
winner integer Required

No description available.

minimum: 1maximum: 2
View raw schema
{
  "description": "One player's copy of a finished Daisy match. Each player saves their own; the record key is the match id (a TID made when the commitments are exchanged, just before the coin), so the two copies share it. A player against the bot saves alone.",
  "key": "tid",
  "record": {
    "properties": {
      "commitments": {
        "description": "Each player's commitment, in player order: the top of a SHA-256 hash chain made from a secret seed before the coin.",
        "items": {
          "ref": "#link",
          "type": "ref"
        },
        "maxLength": 2,
        "minLength": 2,
        "type": "array"
      },
      "createdAt": {
        "format": "datetime",
        "type": "string"
      },
      "ending": {
        "knownValues": [
          "won",
          "forfeit"
        ],
        "type": "string"
      },
      "firstPlayer": {
        "description": "Who the coin (roll 0) chose to start.",
        "maximum": 2,
        "minimum": 1,
        "type": "integer"
      },
      "forfeitReason": {
        "description": "Only for a forfeit: the loser let the turn timer run out, was away too long, or didn't reveal their link for a roll.",
        "knownValues": [
          "turn-timeout",
          "away",
          "no-reveal"
        ],
        "type": "string"
      },
      "house": {
        "description": "The house tile that refereed the match, as pinned by both players' pages.",
        "ref": "com.atproto.repo.strongRef",
        "type": "ref"
      },
      "lastReveals": {
        "description": "The last link each player revealed on that chain, in player order. Hashing forward from it rebuilds every earlier reveal up to the commitment, so the coin and every roll can be recomputed.",
        "items": {
          "ref": "#link",
          "type": "ref"
        },
        "maxLength": 2,
        "minLength": 2,
        "type": "array"
      },
      "matchId": {
        "description": "The match id, also this record's key (a TID).",
        "maxLength": 13,
        "minLength": 13,
        "type": "string"
      },
      "players": {
        "items": {
          "ref": "#player",
          "type": "ref"
        },
        "maxLength": 2,
        "minLength": 2,
        "type": "array"
      },
      "rechains": {
        "description": "Only when a chain ran out: the fresh chains that followed, in order.",
        "items": {
          "ref": "#rechain",
          "type": "ref"
        },
        "maxLength": 100,
        "type": "array"
      },
      "seat": {
        "description": "Which player saved this record (1 or 2, an index into players).",
        "maximum": 2,
        "minimum": 1,
        "type": "integer"
      },
      "target": {
        "description": "The score that wins, a house setting agreed before the coin.",
        "maximum": 1000,
        "minimum": 1,
        "type": "integer"
      },
      "turns": {
        "description": "Every turn in play order.",
        "items": {
          "ref": "#turn",
          "type": "ref"
        },
        "maxLength": 10000,
        "type": "array"
      },
      "winner": {
        "maximum": 2,
        "minimum": 1,
        "type": "integer"
      }
    },
    "required": [
      "matchId",
      "seat",
      "target",
      "players",
      "firstPlayer",
      "commitments",
      "lastReveals",
      "turns",
      "winner",
      "ending",
      "createdAt"
    ],
    "type": "object"
  },
  "type": "record"
}
link string

A SHA-256 hash, as 64 lower-case hex characters.

ConstraintsmaxLength: 64 bytes, minLength: 64 bytes
View raw schema
{
  "description": "A SHA-256 hash, as 64 lower-case hex characters.",
  "maxLength": 64,
  "minLength": 64,
  "type": "string"
}
player object

No description available.

Properties

bot boolean Optional

True when this seat was played by the table's bot.

did string did Required

A decentralized identifier (DID).

glaze string Required

No description available.

Known values: bone, jade, midnight, glow, brick, marigold
handle string handle Required

The handle at the time of the match, for display; the did is what counts.

View raw schema
{
  "properties": {
    "bot": {
      "description": "True when this seat was played by the table's bot.",
      "type": "boolean"
    },
    "did": {
      "format": "did",
      "type": "string"
    },
    "glaze": {
      "knownValues": [
        "bone",
        "jade",
        "midnight",
        "glow",
        "brick",
        "marigold"
      ],
      "type": "string"
    },
    "handle": {
      "description": "The handle at the time of the match, for display; the did is what counts.",
      "format": "handle",
      "type": "string"
    }
  },
  "required": [
    "did",
    "handle",
    "glaze"
  ],
  "type": "object"
}
rechain object

No description available.

Properties

commitments array of ref#link Required

No description available.

maxLength: 2 itemsminLength: 2 items
fromRoll integer Required

The first roll this chain was used for (the coin is roll 0).

minimum: 1
lastReveals array of ref#link Required

No description available.

maxLength: 2 itemsminLength: 2 items
View raw schema
{
  "properties": {
    "commitments": {
      "items": {
        "ref": "#link",
        "type": "ref"
      },
      "maxLength": 2,
      "minLength": 2,
      "type": "array"
    },
    "fromRoll": {
      "description": "The first roll this chain was used for (the coin is roll 0).",
      "minimum": 1,
      "type": "integer"
    },
    "lastReveals": {
      "items": {
        "ref": "#link",
        "type": "ref"
      },
      "maxLength": 2,
      "minLength": 2,
      "type": "array"
    }
  },
  "required": [
    "fromRoll",
    "commitments",
    "lastReveals"
  ],
  "type": "object"
}
turn object

No description available.

Properties

end string Required

bank: the turn's points were kept; bust: a 1 lost them; win: the target was reached; forfeit: the match ended here by forfeit.

Known values: bank, bust, win, forfeit
player integer Required

No description available.

minimum: 1maximum: 2
rolls array of integer Required

Every roll of the turn, in order.

maxLength: 10000 items
View raw schema
{
  "properties": {
    "end": {
      "description": "bank: the turn's points were kept; bust: a 1 lost them; win: the target was reached; forfeit: the match ended here by forfeit.",
      "knownValues": [
        "bank",
        "bust",
        "win",
        "forfeit"
      ],
      "type": "string"
    },
    "player": {
      "maximum": 2,
      "minimum": 1,
      "type": "integer"
    },
    "rolls": {
      "description": "Every roll of the turn, in order.",
      "items": {
        "maximum": 6,
        "minimum": 1,
        "type": "integer"
      },
      "maxLength": 10000,
      "type": "array"
    }
  },
  "required": [
    "player",
    "rolls",
    "end"
  ],
  "type": "object"
}

Lexicon Garden

@