# cards.sunshine.scan

> Published by [sunshine.cards](https://lexicon.garden/identity/did:web:sunshine.cards)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:web:sunshine.cards/cards.sunshine.scan)
- [Documentation](https://lexicon.garden/lexicon/did:web:sunshine.cards/cards.sunshine.scan/docs)
- [Examples](https://lexicon.garden/lexicon/did:web:sunshine.cards/cards.sunshine.scan/examples)

## Definitions

### `cards.sunshine.scan`

**Type**: `record`

Proof that this repo's owner scanned a Sunshine Card, signed by the instance that checked the tap. The record key is <creator DID>:<UID>:<counter>.

**Key**: `any`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `card` | `string` (at-uri) | Yes | The scanned card's public record. |
| `counter` | `integer` | Yes | The tag's read counter for this tap. |
| `createdAt` | `string` (datetime) | Yes |  |
| `signatures` | `array` | Yes |  |

### `cards.sunshine.scan#signature`

**Type**: `object`

A badge.blue inline signature: https://badge.blue

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | Yes |  |
| `issuer` | `string` (did) | Yes |  |
| `key` | `string` | Yes | DID URL of the signing key, eg. did:web:sunshine.cards#attestation. |
| `signature` | `bytes` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Proof that this repo's owner scanned a Sunshine Card, signed by the instance that checked the tap. The record key is <creator DID>:<UID>:<counter>.",
      "key": "any",
      "record": {
        "properties": {
          "card": {
            "description": "The scanned card's public record.",
            "format": "at-uri",
            "type": "string"
          },
          "counter": {
            "description": "The tag's read counter for this tap.",
            "maximum": 16777215,
            "minimum": 1,
            "type": "integer"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "signatures": {
            "items": {
              "refs": [
                "#signature"
              ],
              "type": "union"
            },
            "minLength": 1,
            "type": "array"
          }
        },
        "required": [
          "card",
          "counter",
          "createdAt",
          "signatures"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "signature": {
      "description": "A badge.blue inline signature: https://badge.blue",
      "properties": {
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "issuer": {
          "format": "did",
          "type": "string"
        },
        "key": {
          "description": "DID URL of the signing key, eg. did:web:sunshine.cards#attestation.",
          "maxLength": 2048,
          "type": "string"
        },
        "signature": {
          "maxLength": 64,
          "minLength": 64,
          "type": "bytes"
        }
      },
      "required": [
        "key",
        "issuer",
        "cid",
        "signature"
      ],
      "type": "object"
    }
  },
  "id": "cards.sunshine.scan",
  "lexicon": 1
}
```
