cards.sunshine.verify
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.
Details · procedure
| Kind | procedure |
|---|---|
| Authority | sunshine.cards |
| Indexed |
Checks
Valid Lint pass{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"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": {
"card": {
"description": "The card's public details: a complete cards.sunshine.card record. Present when valid is true, and when reason is alreadyCollected. The card's record is only published once someone collects it, so this is the only place to find a new card's details.",
"type": "unknown"
},
"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": {
"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"
}
},
"id": "cards.sunshine.verify",
"lexicon": 1
}