@keytrace/lexicon 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "dev.keytrace.claim",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "record",
|
|
7
|
+
"key": "tid",
|
|
8
|
+
"description": "An identity claim linking this DID to an external account",
|
|
9
|
+
"record": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": ["type", "claimUri", "identity", "sig", "createdAt"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"knownValues": ["github", "dns", "mastodon", "twitter", "website"],
|
|
16
|
+
"description": "The claim type identifier"
|
|
17
|
+
},
|
|
18
|
+
"claimUri": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "The identity claim URI (e.g., for github: https://gist.github.com/username/id, dns:example.com)"
|
|
21
|
+
},
|
|
22
|
+
"identity": {
|
|
23
|
+
"type": "ref",
|
|
24
|
+
"ref": "#identity",
|
|
25
|
+
"description": "Structured data about the claimed identity"
|
|
26
|
+
},
|
|
27
|
+
"sig": {
|
|
28
|
+
"type": "ref",
|
|
29
|
+
"ref": "dev.keytrace.signature#main",
|
|
30
|
+
"description": "Cryptographic attestation signature from the keytrace service"
|
|
31
|
+
},
|
|
32
|
+
"comment": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"maxLength": 256,
|
|
35
|
+
"description": "Optional user-provided label for this claim"
|
|
36
|
+
},
|
|
37
|
+
"createdAt": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"format": "datetime"
|
|
40
|
+
},
|
|
41
|
+
"prerelease": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"description": "Whether this claim was created during the prerelease/alpha period"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"identity": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"description": "Generic identity data for the claimed account",
|
|
51
|
+
"required": ["subject"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"subject": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "Primary identifier (username, domain, handle, etc.)"
|
|
56
|
+
},
|
|
57
|
+
"avatarUrl": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"format": "uri",
|
|
60
|
+
"description": "Avatar/profile image URL"
|
|
61
|
+
},
|
|
62
|
+
"profileUrl": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"format": "uri",
|
|
65
|
+
"description": "Profile page URL"
|
|
66
|
+
},
|
|
67
|
+
"displayName": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"description": "Display name if different from subject"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "dev.keytrace.key",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "record",
|
|
7
|
+
"key": "any",
|
|
8
|
+
"description": "A daily signing key for claim attestations. Record key is the date in YYYY-MM-DD format.",
|
|
9
|
+
"record": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": ["publicJwk", "validFrom", "validUntil"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"publicJwk": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "JWK public key as a JSON string (RFC 7517 format)"
|
|
16
|
+
},
|
|
17
|
+
"validFrom": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "datetime"
|
|
20
|
+
},
|
|
21
|
+
"validUntil": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"format": "datetime"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "dev.keytrace.recipe",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "record",
|
|
7
|
+
"key": "any",
|
|
8
|
+
"description": "A claim verification recipe. Record key should be kebab-case (e.g., 'github-gist', 'dns-txt').",
|
|
9
|
+
"record": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": ["type", "version", "displayName", "instructions", "verification"],
|
|
12
|
+
"properties": {
|
|
13
|
+
"type": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Claim type identifier (e.g., 'github', 'dns', 'mastodon')"
|
|
16
|
+
},
|
|
17
|
+
"version": {
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"description": "Recipe version for breaking changes"
|
|
20
|
+
},
|
|
21
|
+
"displayName": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "Human-readable name (e.g., 'GitHub Account')"
|
|
24
|
+
},
|
|
25
|
+
"params": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": { "type": "ref", "ref": "#param" },
|
|
28
|
+
"description": "User-provided parameters needed for verification"
|
|
29
|
+
},
|
|
30
|
+
"instructions": {
|
|
31
|
+
"type": "ref",
|
|
32
|
+
"ref": "#instructions"
|
|
33
|
+
},
|
|
34
|
+
"verification": {
|
|
35
|
+
"type": "ref",
|
|
36
|
+
"ref": "#verification"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"param": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"description": "A user-provided parameter for the claim",
|
|
44
|
+
"required": ["key", "label", "type"],
|
|
45
|
+
"properties": {
|
|
46
|
+
"key": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Parameter key used in templates (e.g., 'gistUrl', 'domain')"
|
|
49
|
+
},
|
|
50
|
+
"label": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "Human-readable label (e.g., 'Gist URL', 'Domain name')"
|
|
53
|
+
},
|
|
54
|
+
"type": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"knownValues": ["url", "text", "domain"],
|
|
57
|
+
"description": "Input type for validation"
|
|
58
|
+
},
|
|
59
|
+
"placeholder": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"description": "Placeholder text for the input"
|
|
62
|
+
},
|
|
63
|
+
"pattern": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "Regex pattern to validate input"
|
|
66
|
+
},
|
|
67
|
+
"extractFrom": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"description": "Regex with capture group to extract subject from param (e.g., extract 'octocat' from gist URL)"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"instructions": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"description": "User-facing instructions for making the claim",
|
|
76
|
+
"required": ["steps"],
|
|
77
|
+
"properties": {
|
|
78
|
+
"steps": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"items": { "type": "string" },
|
|
81
|
+
"description": "Ordered steps the user must follow"
|
|
82
|
+
},
|
|
83
|
+
"proofTemplate": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "Template for proof content. Supports {claimId}, {did}, {handle}, and param keys"
|
|
86
|
+
},
|
|
87
|
+
"proofLocation": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"description": "Where to place the proof (e.g., 'Create a public gist')"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
"verification": {
|
|
94
|
+
"type": "object",
|
|
95
|
+
"description": "Machine-readable verification steps",
|
|
96
|
+
"required": ["steps"],
|
|
97
|
+
"properties": {
|
|
98
|
+
"steps": {
|
|
99
|
+
"type": "array",
|
|
100
|
+
"items": { "type": "ref", "ref": "#verificationStep" }
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"verificationStep": {
|
|
105
|
+
"type": "object",
|
|
106
|
+
"required": ["action"],
|
|
107
|
+
"properties": {
|
|
108
|
+
"action": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"knownValues": ["http-get", "http-paginate", "css-select", "json-path", "regex-match", "dns-txt"]
|
|
111
|
+
},
|
|
112
|
+
"url": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"description": "URL template with {user}, {claimId} placeholders"
|
|
115
|
+
},
|
|
116
|
+
"selector": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "CSS selector or JSONPath expression"
|
|
119
|
+
},
|
|
120
|
+
"pattern": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"description": "Regex pattern to match"
|
|
123
|
+
},
|
|
124
|
+
"pagination": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"properties": {
|
|
127
|
+
"nextUrl": { "type": "string" },
|
|
128
|
+
"maxPages": { "type": "integer" }
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"expect": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"description": "What to expect (e.g., 'contains:{claimId}')"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"lexicon": 1,
|
|
3
|
+
"id": "dev.keytrace.signature",
|
|
4
|
+
"defs": {
|
|
5
|
+
"main": {
|
|
6
|
+
"type": "object",
|
|
7
|
+
"description": "A cryptographic signature attesting to a claim",
|
|
8
|
+
"required": ["kid", "src", "signedAt", "attestation"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"kid": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Key identifier (e.g., date in YYYY-MM-DD format)"
|
|
13
|
+
},
|
|
14
|
+
"src": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"format": "at-uri",
|
|
17
|
+
"description": "AT URI reference to the signing key record (e.g., at://did:plc:xxx/dev.keytrace.key/2024-01-15)"
|
|
18
|
+
},
|
|
19
|
+
"signedAt": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "datetime",
|
|
22
|
+
"description": "Timestamp when the signature was created"
|
|
23
|
+
},
|
|
24
|
+
"attestation": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "The cryptographic signature (base64-encoded)"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|