{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dogechain-com/json-schema/dogechain-com-transaction-schema.json",
  "title": "Transaction",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dogechain-com-openapi.json#/components/schemas/Transaction",
  "properties": {
    "block_hash": {
      "type": [
        "string",
        "null"
      ]
    },
    "block_height": {
      "description": "Null while in the mempool.",
      "type": [
        "integer",
        "null"
      ]
    },
    "confirmations": {
      "type": "integer"
    },
    "fee": {
      "$ref": "#/$defs/Amount"
    },
    "hash": {
      "type": "string"
    },
    "inputs": {
      "items": {
        "$ref": "#/$defs/Input"
      },
      "type": "array"
    },
    "inputs_n": {
      "type": "integer"
    },
    "inputs_value": {
      "$ref": "#/$defs/Amount"
    },
    "locktime": {
      "type": "integer"
    },
    "outputs": {
      "items": {
        "$ref": "#/$defs/Output"
      },
      "type": "array"
    },
    "outputs_n": {
      "type": "integer"
    },
    "outputs_value": {
      "$ref": "#/$defs/Amount"
    },
    "price": {
      "$ref": "#/$defs/Price"
    },
    "size": {
      "type": "integer"
    },
    "time": {
      "description": "Unix seconds: when it was mined, or first seen if unconfirmed. Null for a moment while its block is being added.",
      "type": [
        "integer",
        "null"
      ]
    },
    "version": {
      "type": "integer"
    }
  },
  "required": [
    "hash",
    "confirmations",
    "size",
    "version",
    "locktime",
    "block_hash",
    "block_height",
    "time",
    "inputs_n",
    "inputs_value",
    "outputs_n",
    "outputs_value",
    "fee",
    "price",
    "inputs",
    "outputs"
  ],
  "type": "object",
  "$defs": {
    "Amount": {
      "description": "DOGE with 8 decimals, as a string.",
      "pattern": "^-?[0-9]+\\.[0-9]{8}$",
      "type": "string"
    },
    "Input": {
      "description": "Null value, address and previous_output for a block reward's input (a coinbase).",
      "properties": {
        "address": {
          "type": [
            "string",
            "null"
          ]
        },
        "index": {
          "type": "integer"
        },
        "previous_output": {
          "anyOf": [
            {
              "$ref": "#/$defs/Outpoint"
            },
            {
              "type": "null"
            }
          ]
        },
        "value": {
          "anyOf": [
            {
              "$ref": "#/$defs/Amount"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "index",
        "value",
        "address",
        "previous_output"
      ],
      "type": "object"
    },
    "Outpoint": {
      "properties": {
        "hash": {
          "type": "string"
        },
        "index": {
          "type": "integer"
        }
      },
      "required": [
        "hash",
        "index"
      ],
      "type": "object"
    },
    "Output": {
      "properties": {
        "address": {
          "description": "Null when the script pays no address (data, non-standard).",
          "type": [
            "string",
            "null"
          ]
        },
        "index": {
          "type": "integer"
        },
        "is_change": {
          "description": "Likely change back to the sender; null when unknown.",
          "type": [
            "boolean",
            "null"
          ]
        },
        "spent": {
          "anyOf": [
            {
              "$ref": "#/$defs/Outpoint"
            },
            {
              "type": "null"
            }
          ],
          "description": "The input that spent it; null while unspent."
        },
        "type": {
          "type": [
            "string",
            "null"
          ]
        },
        "value": {
          "$ref": "#/$defs/Amount"
        }
      },
      "required": [
        "index",
        "value",
        "address",
        "type",
        "spent",
        "is_change"
      ],
      "type": "object"
    },
    "Price": {
      "description": "The DOGE price when the block or transaction was mined; null when unknown.",
      "properties": {
        "currency": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "required": [
        "value",
        "currency"
      ],
      "type": [
        "object",
        "null"
      ]
    }
  }
}