First implementation (#1)
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
1 parent
34c0abb26a
commit
4fa326dc76
534 files changed
+28280
-37
No files matched your search
@@ -0,0 +1,94 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://paperspec.scient.ing/schemas/proof.schema.json",
|
||||
"title": "Merkle proof",
|
||||
"description": "scienting-proof/1: an RFC 9162 inclusion proof of one item of a receipt, or a consistency proof between two revisions of a document's history; spec/08-fidelity.md §8.5, spec/11-corrections.md §11.5.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"format": {
|
||||
"const": "scienting-proof/1"
|
||||
},
|
||||
"kind": {
|
||||
"enum": [
|
||||
"inclusion",
|
||||
"consistency"
|
||||
]
|
||||
},
|
||||
"receipt": {
|
||||
"$ref": "common.schema.json#/$defs/recordId"
|
||||
},
|
||||
"doc": {
|
||||
"$ref": "common.schema.json#/$defs/qualifiedKey"
|
||||
},
|
||||
"item": {
|
||||
"type": "array",
|
||||
"minItems": 1
|
||||
},
|
||||
"index": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"size": {
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"root": {
|
||||
"$ref": "common.schema.json#/$defs/hash"
|
||||
},
|
||||
"from_rev": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"to_rev": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
},
|
||||
"from_root": {
|
||||
"$ref": "common.schema.json#/$defs/hash"
|
||||
},
|
||||
"to_root": {
|
||||
"$ref": "common.schema.json#/$defs/hash"
|
||||
},
|
||||
"path": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "common.schema.json#/$defs/hash"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"format",
|
||||
"kind",
|
||||
"path"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"kind": {
|
||||
"const": "inclusion"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"required": [
|
||||
"receipt",
|
||||
"item",
|
||||
"index",
|
||||
"size",
|
||||
"root"
|
||||
]
|
||||
},
|
||||
"else": {
|
||||
"required": [
|
||||
"doc",
|
||||
"from_rev",
|
||||
"to_rev",
|
||||
"from_root",
|
||||
"to_root"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user