v51

latestOpenAPI 3.1.0BSLraw.githubusercontent.com2026-08-01285574.9 KB
odf-query

Verify query commitment

A query proof can be stored long-term and then disputed at a later point using this endpoint.

Example request:

{
    "input": {
        "query": "select event_time, from, to, close from \"kamu/eth-to-usd\"",
        "queryDialect": "SqlDataFusion",
        "dataFormat": "JsonAoA",
        "include": ["Input", "Proof", "Schema"],
        "schemaFormat": "ArrowJson",
        "datasets": [{
            "id": "did:odf:fed0..26c4",
            "alias": "kamu/eth-to-usd",
            "blockHash": "f162..9a1a"
        }],
        "skip": 0,
        "limit": 3
    },
    "subQueries": [],
    "commitment": {
        "inputHash": "f162..2efc",
        "outputHash": "f162..b088",
        "subQueriesHash": "f162..d210"
    },
    "proof": {
        "type": "Ed25519Signature2020",
        "verificationMethod": "did:key:z6Mk..fwZp",
        "proofValue": "uJfY..seCg"
    }
}

Example response:

{
    "ok": false,
    "error": {
        "kind": "VerificationFailed::OutputMismatch",
        "actual_hash": "f162..c12a",
        "expected_hash": "f162..2a2d",
        "message": "Query was reproduced but resulted in output hash different from expected.
                    This means that the output was either falsified, or the query
                    reproducibility was not guaranteed by the system.",
    }
}

See commitments documentation for details.

post/verify

Request body

Example request

{
  "commitment": {
    "inputHash": "f162070983d692f648185febe6d6fa607630ae68649f7e6fc45b94680096c06e4fadb",
    "outputHash": "f162070983d692f648185febe6d6fa607630ae68649f7e6fc45b94680096c06e4fadb",
    "subQueriesHash": "f162070983d692f648185febe6d6fa607630ae68649f7e6fc45b94680096c06e4fadb"
  },
  "input": {
    "datasets": [
      {
        "alias": "kamu/eth-to-usd",
        "blockHash": "f162070983d692f648185febe6d6fa607630ae68649f7e6fc45b94680096c06e4fadb",
        "id": "did:odf:fed01969b7413a41f25ba969b7413a41f25ba4016461736574607650ec170632ade10"
      }
    ],
    "query": "select event_time, from, to, close from \"kamu/eth-to-usd\""
  },
  "proof": {
    "proofValue": "uAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
    "verificationMethod": "did:key:z6MkmgVreHBu2ABaD59Jq1J2JneXwzpsUWwEWXS4kLhjb4V4"
  },
  "subQueries": []
}

Response

okboolean required

Whether validation was successful

Example response

{
  "error": {
    "actual_hash": "f162070983d692f648185febe6d6fa607630ae68649f7e6fc45b94680096c06e4fadb",
    "expected_hash": "f162070983d692f648185febe6d6fa607630ae68649f7e6fc45b94680096c06e4fadb"
  }
}