cards.sunshine.verify

sunshine.cards

Documentation

Checks a tap of a Sunshine Card. Called through the scanner's PDS (service auth), it also returns a signed scan record for the caller to write into the scanner's repo.

main procedure

Checks a tap of a Sunshine Card. Called through the scanner's PDS (service auth), it also returns a signed scan record for the caller to write into the scanner's repo.

Input

Encodingapplication/json
ctr string Optional

The read counter, in hex, from a plain-mirror tag.

maxLength: 6 bytesminLength: 6 bytes
did stringdid Required

The card's creator.

mac string Required

The tap's signature, in hex.

maxLength: 16 bytesminLength: 16 bytes
picc string Optional

The encrypted serial number and counter, in hex, from an encrypted-mirror tag. Supply exactly one of ctr and picc.

maxLength: 32 bytesminLength: 32 bytes
uid string Required

The tag's serial number, in hex.

maxLength: 14 bytesminLength: 14 bytes

Output

Encodingapplication/json
proof ref#proof Optional

Write it whenever it's present, even when valid is false. When valid, it's the scan just made; when reason is alreadyCollected, it's the scanner's earlier scan of this card, signed again.

reason string Optional

No description available.

Known values: notGenuine, replayed, alreadyCollected, unknownCard
valid boolean Required

No description available.

Errors

CreatorUnavailable The creator's deck can't be reached. Retry the same tap; if that returns replayed, tap again.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://bsky.social)
Enter valid JSON for the request body
View raw schema
{
  "description": "Checks a tap of a Sunshine Card. Called through the scanner's PDS (service auth), it also returns a signed scan record for the caller to write into the scanner's repo.",
  "errors": [
    {
      "description": "The creator's deck can't be reached. Retry the same tap; if that returns replayed, tap again.",
      "name": "CreatorUnavailable"
    }
  ],
  "input": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "ctr": {
          "description": "The read counter, in hex, from a plain-mirror tag.",
          "maxLength": 6,
          "minLength": 6,
          "type": "string"
        },
        "did": {
          "description": "The card's creator.",
          "format": "did",
          "type": "string"
        },
        "mac": {
          "description": "The tap's signature, in hex.",
          "maxLength": 16,
          "minLength": 16,
          "type": "string"
        },
        "picc": {
          "description": "The encrypted serial number and counter, in hex, from an encrypted-mirror tag. Supply exactly one of ctr and picc.",
          "maxLength": 32,
          "minLength": 32,
          "type": "string"
        },
        "uid": {
          "description": "The tag's serial number, in hex.",
          "maxLength": 14,
          "minLength": 14,
          "type": "string"
        }
      },
      "required": [
        "did",
        "uid",
        "mac"
      ],
      "type": "object"
    }
  },
  "output": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "proof": {
          "description": "Write it whenever it's present, even when valid is false. When valid, it's the scan just made; when reason is alreadyCollected, it's the scanner's earlier scan of this card, signed again.",
          "ref": "#proof",
          "type": "ref"
        },
        "reason": {
          "knownValues": [
            "notGenuine",
            "replayed",
            "alreadyCollected",
            "unknownCard"
          ],
          "maxLength": 64,
          "type": "string"
        },
        "valid": {
          "type": "boolean"
        }
      },
      "required": [
        "valid"
      ],
      "type": "object"
    }
  },
  "type": "procedure"
}
proof object

A signed scan record, with the arguments com.atproto.repo.createRecord needs to write it.

Properties

collection string nsid Required

A namespaced identifier (e.g., app.bsky.feed.post).

did string did Required

The scanner: the repo to write to.

record unknown Required

The signed cards.sunshine.scan record.

rkey string record-key Required

A valid record key for AT Protocol repositories.

View raw schema
{
  "description": "A signed scan record, with the arguments com.atproto.repo.createRecord needs to write it.",
  "properties": {
    "collection": {
      "format": "nsid",
      "type": "string"
    },
    "did": {
      "description": "The scanner: the repo to write to.",
      "format": "did",
      "type": "string"
    },
    "record": {
      "description": "The signed cards.sunshine.scan record.",
      "type": "unknown"
    },
    "rkey": {
      "format": "record-key",
      "type": "string"
    }
  },
  "required": [
    "did",
    "collection",
    "rkey",
    "record"
  ],
  "type": "object"
}

Lexicon Garden

@