# dev.malpercio.cards.give

> Published by [cards.malpercio.dev](https://lexicon.garden/identity/did:plc:kmg2eqexpdefljft34crzesc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:kmg2eqexpdefljft34crzesc/dev.malpercio.cards.give)
- [Documentation](https://lexicon.garden/lexicon/did:plc:kmg2eqexpdefljft34crzesc/dev.malpercio.cards.give/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:kmg2eqexpdefljft34crzesc/dev.malpercio.cards.give/examples)

## Definitions

### `dev.malpercio.cards.give#cardIssue`

**Type**: `object`

A single card instance.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `assetCid` | `string` (cid) | Yes | Copied from the set manifest; the canonical fingerprint owner copies must match. |
| `cardId` | `string` | Yes |  |
| `fromPack` | `ref` → `com.atproto.repo.strongRef` | No | The pack give this card was opened from, if any. |
| `iconCid` | `string` (cid) | No |  |
| `serial` | `integer` | Yes | 1-based print number, unique per (set, cardId, variantId). |
| `variantId` | `string` | No |  |

### `dev.malpercio.cards.give`

**Type**: `record`

Issuance of a single card instance or a sealed pack, written by the provider into its own repo. This record is the root of a card's provenance chain and its at-URI is the card's permanent identity. The rkey is a TID, so issuance order is implicit.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `context` | `string` | No | Why it was issued, e.g. 'Opened from pack at://...'. |
| `givenAt` | `string` (datetime) | Yes |  |
| `issue` | `union` | Yes | What was issued: a single card or a sealed pack. |
| `recipient` | `string` (did) | Yes | The DID this give was issued to. |
| `revokedAt` | `string` (datetime) | No | Set to invalidate this give. Verifiers must treat the whole downstream chain as void. |
| `set` | `ref` → `com.atproto.repo.strongRef` | Yes | The dev.malpercio.cards.set manifest this was printed from. |
| `source` | `string` (at-uri) | No | The record that triggered issuance, e.g. the like on a pack post. For packs, the seed is derived from it. |

### `dev.malpercio.cards.give#packIssue`

**Type**: `object`

A sealed pack. Contents are drawn and reserved against supply caps at creation, committed by CID, and revealed on open.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `assetCid` | `string` (cid) | No |  |
| `cardCount` | `integer` | Yes | Number of card gives reserved by this pack. |
| `contentsCid` | `string` (cid) | Yes | CID of the DAG-CBOR object {seed, cards:[{cardId, variantId?}]} drawn at creation. Proves the pull was fixed before opening. |
| `openedAt` | `string` (datetime) | No |  |
| `packId` | `string` | Yes |  |
| `produced` | `array` | No | The card gives minted when this pack was opened. |
| `seed` | `string` | No | Revealed on open so anyone can rebuild the contents object and recompute contentsCid. |
| `serial` | `integer` | No |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "cardIssue": {
      "description": "A single card instance.",
      "properties": {
        "assetCid": {
          "description": "Copied from the set manifest; the canonical fingerprint owner copies must match.",
          "format": "cid",
          "type": "string"
        },
        "cardId": {
          "maxLength": 64,
          "type": "string"
        },
        "fromPack": {
          "description": "The pack give this card was opened from, if any.",
          "ref": "com.atproto.repo.strongRef",
          "type": "ref"
        },
        "iconCid": {
          "format": "cid",
          "type": "string"
        },
        "serial": {
          "description": "1-based print number, unique per (set, cardId, variantId).",
          "minimum": 1,
          "type": "integer"
        },
        "variantId": {
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "cardId",
        "serial",
        "assetCid"
      ],
      "type": "object"
    },
    "main": {
      "description": "Issuance of a single card instance or a sealed pack, written by the provider into its own repo. This record is the root of a card's provenance chain and its at-URI is the card's permanent identity. The rkey is a TID, so issuance order is implicit.",
      "key": "tid",
      "record": {
        "properties": {
          "context": {
            "description": "Why it was issued, e.g. 'Opened from pack at://...'.",
            "maxLength": 512,
            "type": "string"
          },
          "givenAt": {
            "format": "datetime",
            "type": "string"
          },
          "issue": {
            "description": "What was issued: a single card or a sealed pack.",
            "refs": [
              "#cardIssue",
              "#packIssue"
            ],
            "type": "union"
          },
          "recipient": {
            "description": "The DID this give was issued to.",
            "format": "did",
            "type": "string"
          },
          "revokedAt": {
            "description": "Set to invalidate this give. Verifiers must treat the whole downstream chain as void.",
            "format": "datetime",
            "type": "string"
          },
          "set": {
            "description": "The dev.malpercio.cards.set manifest this was printed from.",
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "source": {
            "description": "The record that triggered issuance, e.g. the like on a pack post. For packs, the seed is derived from it.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "set",
          "recipient",
          "givenAt",
          "issue"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "packIssue": {
      "description": "A sealed pack. Contents are drawn and reserved against supply caps at creation, committed by CID, and revealed on open.",
      "properties": {
        "assetCid": {
          "format": "cid",
          "type": "string"
        },
        "cardCount": {
          "description": "Number of card gives reserved by this pack.",
          "minimum": 1,
          "type": "integer"
        },
        "contentsCid": {
          "description": "CID of the DAG-CBOR object {seed, cards:[{cardId, variantId?}]} drawn at creation. Proves the pull was fixed before opening.",
          "format": "cid",
          "type": "string"
        },
        "openedAt": {
          "format": "datetime",
          "type": "string"
        },
        "packId": {
          "maxLength": 64,
          "type": "string"
        },
        "produced": {
          "description": "The card gives minted when this pack was opened.",
          "items": {
            "ref": "com.atproto.repo.strongRef",
            "type": "ref"
          },
          "type": "array"
        },
        "seed": {
          "description": "Revealed on open so anyone can rebuild the contents object and recompute contentsCid.",
          "maxLength": 128,
          "type": "string"
        },
        "serial": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "packId",
        "cardCount",
        "contentsCid"
      ],
      "type": "object"
    }
  },
  "id": "dev.malpercio.cards.give",
  "lexicon": 1
}
```
