{
"id": "net.anisota.chronicle.inventory",
"defs": {
"main": {
"key": "any",
"type": "record",
"record": {
"type": "object",
"required": [
"itemId",
"quantity",
"signature",
"createdAt"
],
"properties": {
"itemId": {
"type": "string",
"maxLength": 100,
"description": "Unique identifier for the item"
},
"rarity": {
"enum": [
"veryCommon",
"common",
"uncommon",
"rare",
"veryRare",
"epic",
"legendary"
],
"type": "string",
"description": "Rarity level of the item"
},
"source": {
"enum": [
"quest",
"trade",
"crafted",
"found",
"purchased",
"expedition",
"starter"
],
"type": "string",
"description": "How the item was acquired"
},
"itemName": {
"type": "string",
"maxLength": 200,
"description": "Display name of the item"
},
"itemType": {
"type": "string",
"maxLength": 50,
"description": "Item category: power, camera, light, supplies, field, lore"
},
"metadata": {
"type": "unknown",
"description": "Additional item-specific data (stats, attributes, etc.)"
},
"quantity": {
"type": "integer",
"minimum": 0,
"description": "Current quantity in inventory"
},
"createdAt": {
"type": "string",
"format": "datetime",
"description": "When the item was first acquired"
},
"signature": {
"ref": "#chronicleSignature",
"type": "ref"
},
"updatedAt": {
"type": "string",
"format": "datetime",
"description": "When the record was last updated"
},
"consumable": {
"type": "boolean",
"description": "Whether this item is consumed on use (quantity decreases)"
}
}
},
"description": "Item record in the player's inventory. rkey is the item ID. Updated via putRecord when quantities change."
},
"chronicleSignature": {
"type": "object",
"required": [
"sig",
"alg",
"kid",
"signedAt",
"nonce",
"version"
],
"properties": {
"alg": {
"type": "string",
"description": "Signing algorithm (ES256)"
},
"kid": {
"type": "string",
"description": "Key identifier for the signing key"
},
"sig": {
"type": "string",
"description": "Base64-encoded ES256 signature"
},
"nonce": {
"type": "string",
"description": "Unique random nonce to prevent replay"
},
"version": {
"type": "integer",
"description": "Signature schema version"
},
"signedAt": {
"type": "string",
"format": "datetime",
"description": "When the record was signed"
}
},
"description": "ES256 cryptographic signature proving record authenticity"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}