{
  "openapi": "3.0.3",
  "info": {
    "title": "DNR / Anomaly Provider Hub",
    "version": "2.1.0",
    "description": "Dedicated DNR and Anomaly master-provider connectors. Bearer-authenticated company-scoped catalog and launch APIs; provider-v1 HMAC-SHA256 signed operator wallet callbacks. USD cents and INR paise are supported as integer minor units; no FX conversion."
  },
  "servers": [
    {
      "url": "https://dr3d.net"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "paths": {
    "/api/v1/games": {
      "get": {
        "summary": "Read current operator catalog; published games and inactive tombstones",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Catalog with revision and games; ETag response header"
          },
          "304": {
            "description": "Unchanged"
          },
          "401": {
            "description": "Invalid or disabled operator"
          }
        }
      }
    },
    "/api/v1/launch": {
      "post": {
        "summary": "Validate operator wallet session and hand off to configured game runtime",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "game_id",
                  "session",
                  "currency"
                ],
                "properties": {
                  "game_id": {
                    "type": "string"
                  },
                  "session": {
                    "type": "string",
                    "minLength": 16,
                    "maxLength": 256
                  },
                  "currency": {
                    "type": "string",
                    "pattern": "^[A-Z]{3}$",
                    "enum": [
                      "USD",
                      "INR"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "HTTPS launch_url"
          },
          "401": {
            "description": "Invalid API key"
          },
          "403": {
            "description": "Wallet session rejected"
          },
          "404": {
            "description": "Game not published or runtime unavailable"
          },
          "409": {
            "description": "Operator callback not configured"
          },
          "502": {
            "description": "Runtime / wallet transport error"
          }
        }
      }
    },
    "/media/{filename}": {
      "get": {
        "summary": "Immutable WebP or CRM-compatible PNG lobby artwork",
        "parameters": [
          {
            "name": "filename",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "WebP or PNG image"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    }
  },
  "x-operator-wallet-callbacks": {
    "protocol": "provider-v1",
    "hosting": "Operator supplies its own HTTPS WALLET_CALLBACK_BASE for each company",
    "method": "POST",
    "paths": [
      "/v1/wallet/session",
      "/v1/wallet/balance",
      "/v1/wallet/debit",
      "/v1/wallet/credit",
      "/v1/wallet/rollback"
    ],
    "headers": [
      "X-Provider-Id",
      "X-Provider-Timestamp",
      "X-Provider-Signature"
    ],
    "signature": "HMAC-SHA256(sharedSecret, timestamp + LF + operation + LF + recursively-sorted compact UTF-8 JSON body)",
    "maximumClockSkewSeconds": 120,
    "amountUnits": "USD cents or INR paise (100 minor units per currency unit)",
    "successResponse": {
      "success": true,
      "balance": 975
    },
    "sessionAndBalanceAdditionalResponseField": "player_id",
    "fullContract": "https://dr3d.net/integration/guide.md"
  }
}