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
application/jsonctr
string
Optional
The read counter, in hex, from a plain-mirror tag.
maxLength: 6 bytesminLength: 6 bytesdid
stringdid
Required
The card's creator.
mac
string
Required
The tap's signature, in hex.
maxLength: 16 bytesminLength: 16 bytespicc
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 bytesuid
string
Required
The tag's serial number, in hex.
maxLength: 14 bytesminLength: 14 bytesOutput
application/jsonproof
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.
notGenuine, replayed, alreadyCollected, unknownCardvalid
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.
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"
}