aboutsummaryrefslogtreecommitdiff
path: root/doc/schema/sth.schema.json
blob: 86de2d35fd20d33499f011b09f398bbe9dd3b695 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
	"$schema": "https://json-schema.org/draft-07/schema#",
	"title": "signed_tree_head_v0",
	"description": "JSON-formatted signed tree head, version 0.",

	"type": "object",
	"required": [ "timestamp", "tree_size", "root_hash", "signatures" ],
	"properties": {
		"timestamp": {
			"description": "The number of milliseconds since the UNIX epoch (January 1, 1970 00:00:00 UTC).",
			"type": "integer",
			"minimum": 0
		},
		"tree_size": {
			"description": "The number of entries that are stored in the log's Merkle tree.",
			"type": "integer",
			"minimum": 0
		},
		"root_hash": {
			"description": "The log's Merkle tree root hash in base64.",
			"type": "string",
			"minLength": 44,
			"maxLength": 44
		},
		"signatures": {
			"description": "A list of signer-signature pairs.",
			"type": "array",
			"items": {
				"description": "A signer-signature pair.",
				"type": "object",
				"required": [ "key_hash", "signature" ],
				"properties": {
					"key_hash": {
						"description": "A public verification-key hash that identifies the signer in base64.",
						"type": "string",
						"minLength": 44,
						"maxLength": 44
					},
					"signature": {
						"description": "The signer's signature over the log's tree_leaf structure in base64.",
						"type": "string",
						"minLength": 44,
						"maxLength": 44
					}
				}
			},
			"minItems": 1
		}
	}
}