net.anisota.chronicle.inventory

anisota.net

Documentation

Item record in the player's inventory. rkey is the item ID. Updated via putRecord when quantities change.

main record

Item record in the player's inventory. rkey is the item ID. Updated via putRecord when quantities change.

Record Key any Any valid record key

Properties

consumable boolean Optional

Whether this item is consumed on use (quantity decreases)

createdAt string datetime Required

When the item was first acquired

itemId string Required

Unique identifier for the item

maxLength: 100 bytes
itemName string Optional

Display name of the item

maxLength: 200 bytes
itemType string Optional

Item category: power, camera, light, supplies, field, lore

maxLength: 50 bytes
metadata unknown Optional

Additional item-specific data (stats, attributes, etc.)

quantity integer Required

Current quantity in inventory

minimum: 0
rarity string Optional

Rarity level of the item

Allowed: veryCommon, common, uncommon, rare, veryRare, epic, legendary
source string Optional

How the item was acquired

Allowed: quest, trade, crafted, found, purchased, expedition, starter
updatedAt string datetime Optional

When the record was last updated

View raw schema
{
  "description": "Item record in the player's inventory. rkey is the item ID. Updated via putRecord when quantities change.",
  "key": "any",
  "record": {
    "properties": {
      "consumable": {
        "description": "Whether this item is consumed on use (quantity decreases)",
        "type": "boolean"
      },
      "createdAt": {
        "description": "When the item was first acquired",
        "format": "datetime",
        "type": "string"
      },
      "itemId": {
        "description": "Unique identifier for the item",
        "maxLength": 100,
        "type": "string"
      },
      "itemName": {
        "description": "Display name of the item",
        "maxLength": 200,
        "type": "string"
      },
      "itemType": {
        "description": "Item category: power, camera, light, supplies, field, lore",
        "maxLength": 50,
        "type": "string"
      },
      "metadata": {
        "description": "Additional item-specific data (stats, attributes, etc.)",
        "type": "unknown"
      },
      "quantity": {
        "description": "Current quantity in inventory",
        "minimum": 0,
        "type": "integer"
      },
      "rarity": {
        "description": "Rarity level of the item",
        "enum": [
          "veryCommon",
          "common",
          "uncommon",
          "rare",
          "veryRare",
          "epic",
          "legendary"
        ],
        "type": "string"
      },
      "signature": {
        "ref": "#chronicleSignature",
        "type": "ref"
      },
      "source": {
        "description": "How the item was acquired",
        "enum": [
          "quest",
          "trade",
          "crafted",
          "found",
          "purchased",
          "expedition",
          "starter"
        ],
        "type": "string"
      },
      "updatedAt": {
        "description": "When the record was last updated",
        "format": "datetime",
        "type": "string"
      }
    },
    "required": [
      "itemId",
      "quantity",
      "signature",
      "createdAt"
    ],
    "type": "object"
  },
  "type": "record"
}
chronicleSignature object

ES256 cryptographic signature proving record authenticity

Properties

alg string Required

Signing algorithm (ES256)

kid string Required

Key identifier for the signing key

nonce string Required

Unique random nonce to prevent replay

sig string Required

Base64-encoded ES256 signature

signedAt string datetime Required

When the record was signed

version integer Required

Signature schema version

View raw schema
{
  "description": "ES256 cryptographic signature proving record authenticity",
  "properties": {
    "alg": {
      "description": "Signing algorithm (ES256)",
      "type": "string"
    },
    "kid": {
      "description": "Key identifier for the signing key",
      "type": "string"
    },
    "nonce": {
      "description": "Unique random nonce to prevent replay",
      "type": "string"
    },
    "sig": {
      "description": "Base64-encoded ES256 signature",
      "type": "string"
    },
    "signedAt": {
      "description": "When the record was signed",
      "format": "datetime",
      "type": "string"
    },
    "version": {
      "description": "Signature schema version",
      "type": "integer"
    }
  },
  "required": [
    "sig",
    "alg",
    "kid",
    "signedAt",
    "nonce",
    "version"
  ],
  "type": "object"
}

Lexicon Garden

@