---
source: crates/aiken-project/src/blueprint/validator.rs
description: "Code:\n\n/// On-chain state\npub type State {\n    /// The contestation period as a number of seconds\n    contestationPeriod: ContestationPeriod,\n    /// List of public key hashes of all participants\n    parties: List<Party>,\n    utxoHash: Hash<Blake2b_256>,\n}\n\n/// A Hash digest for a given algorithm.\npub type Hash<alg> = ByteArray\n\npub type Blake2b_256 { Blake2b_256 }\n\n/// Whatever\npub type ContestationPeriod {\n  /// A positive, non-zero number of seconds.\n  ContestationPeriod(Int)\n}\n\npub type Party =\n  ByteArray\n\npub type Input {\n    CollectCom\n    Close\n    /// Abort a transaction\n    Abort\n}\n\nvalidator simplified_hydra {\n  spend(datum: Option<State>, redeemer: Input, output_reference: Data, transaction: Data) {\n    True\n  }\n}\n"
---
{
  "title": "test_module.simplified_hydra.spend",
  "datum": {
    "title": "datum",
    "schema": {
      "$ref": "#/definitions/test_module~1State"
    }
  },
  "redeemer": {
    "title": "redeemer",
    "schema": {
      "$ref": "#/definitions/test_module~1Input"
    }
  },
  "compiledCode": "<redacted>",
  "hash": "<redacted>",
  "definitions": {
    "ByteArray": {
      "title": "ByteArray",
      "dataType": "bytes"
    },
    "Int": {
      "dataType": "integer"
    },
    "List$test_module/Party": {
      "dataType": "list",
      "items": {
        "$ref": "#/definitions/test_module~1Party"
      }
    },
    "test_module/ContestationPeriod": {
      "title": "ContestationPeriod",
      "description": "Whatever",
      "anyOf": [
        {
          "title": "ContestationPeriod",
          "description": "A positive, non-zero number of seconds.",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "$ref": "#/definitions/Int"
            }
          ]
        }
      ]
    },
    "test_module/Input": {
      "title": "Input",
      "anyOf": [
        {
          "title": "CollectCom",
          "dataType": "constructor",
          "index": 0,
          "fields": []
        },
        {
          "title": "Close",
          "dataType": "constructor",
          "index": 1,
          "fields": []
        },
        {
          "title": "Abort",
          "description": "Abort a transaction",
          "dataType": "constructor",
          "index": 2,
          "fields": []
        }
      ]
    },
    "test_module/Party": {
      "title": "Party",
      "dataType": "bytes"
    },
    "test_module/State": {
      "title": "State",
      "description": "On-chain state",
      "anyOf": [
        {
          "title": "State",
          "dataType": "constructor",
          "index": 0,
          "fields": [
            {
              "title": "contestationPeriod",
              "description": "The contestation period as a number of seconds",
              "$ref": "#/definitions/test_module~1ContestationPeriod"
            },
            {
              "title": "parties",
              "description": "List of public key hashes of all participants",
              "$ref": "#/definitions/List$test_module~1Party"
            },
            {
              "title": "utxoHash",
              "$ref": "#/definitions/ByteArray"
            }
          ]
        }
      ]
    }
  }
}
