-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplugin.schema.json
189 lines (189 loc) · 6.87 KB
/
plugin.schema.json
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
{
"ICredentialIssuerEIP712": {
"components": {
"schemas": {
"ICreateVerifiableCredentialEIP712Args": {
"type": "object",
"properties": {
"credential": {
"$ref": "#/components/schemas/CredentialPayload",
"description": "The json payload of the Credential according to the\n {@link https://www.w3.org/TR/vc-data-model/#credentials | canonical model } \n\nThe signer of the Credential is chosen based on the `issuer.id` property of the `credential`\n\n`@context`, 'type' and 'issuanceDate' will be added automatically if omitted"
},
"ethereumAccountId": {
"type": "string",
"description": "The Ethereum account to be used to sign the credential. Mostly likely will be identical to last element of DID URL, but could differ if controller of DID has been changed."
}
},
"required": [
"credential",
"ethereumAccountId"
],
"description": "Encapsulates the parameters required to create a\n {@link https://www.w3.org/TR/vc-data-model/#credentials | W3C Verifiable Credential }"
},
"CredentialPayload": {
"type": "object",
"properties": {
"issuer": {
"$ref": "#/components/schemas/IssuerType"
},
"credentialSubject": {
"$ref": "#/components/schemas/CredentialSubject"
},
"type": {
"type": "array",
"items": {
"type": "string"
}
},
"@context": {
"type": "array",
"items": {
"type": "string"
}
},
"issuanceDate": {
"$ref": "#/components/schemas/DateType"
},
"expirationDate": {
"$ref": "#/components/schemas/DateType"
},
"credentialStatus": {
"$ref": "#/components/schemas/CredentialStatus"
},
"id": {
"type": "string"
}
},
"required": [
"issuer"
],
"description": "Used as input when creating Verifiable Credentials"
},
"IssuerType": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
]
},
{
"type": "string"
}
],
"description": "The issuer of a Credential or the holder of a Presentation.\n\nThe value of the issuer property MUST be either a URI or an object containing an id property. It is RECOMMENDED that the URI in the issuer or its id be one which, if de-referenced, results in a document containing machine-readable information about the issuer that can be used to verify the information expressed in the credential.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#issuer | Issuer data model }"
},
"CredentialSubject": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"description": "The value of the credentialSubject property is defined as a set of objects that contain one or more properties that are each related to a subject of the verifiable credential. Each object MAY contain an id.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#credential-subject | Credential Subject }"
},
"DateType": {
"type": "string",
"description": "Represents an issuance or expiration date for Credentials / Presentations. This is used as input when creating them."
},
"CredentialStatus": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
}
},
"description": "Used for the discovery of information about the current status of a verifiable credential, such as whether it is suspended or revoked. The precise contents of the credential status information is determined by the specific `credentialStatus` type definition, and varies depending on factors such as whether it is simple to implement or if it is privacy-enhancing.\n\nSee {@link https://www.w3.org/TR/vc-data-model/#status | Credential Status }"
},
"VerifiableCredential": {
"type": "object",
"properties": {
"proof": {
"$ref": "#/components/schemas/ProofType"
},
"issuer": {
"$ref": "#/components/schemas/IssuerType"
},
"credentialSubject": {
"$ref": "#/components/schemas/CredentialSubject"
},
"type": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"@context": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
},
"issuanceDate": {
"type": "string"
},
"expirationDate": {
"type": "string"
},
"credentialStatus": {
"$ref": "#/components/schemas/CredentialStatus"
},
"id": {
"type": "string"
}
},
"required": [
"@context",
"credentialSubject",
"issuanceDate",
"issuer",
"proof"
],
"description": "Represents a signed Verifiable Credential payload (includes proof), using a JSON representation. See {@link https://www.w3.org/TR/vc-data-model/#credentials | VC data model }"
},
"ProofType": {
"type": "object",
"properties": {
"type": {
"type": "string"
}
},
"description": "A proof property of a Verifiable Credential or Presentation"
}
},
"methods": {
"createVerifiableCredentialEIP712": {
"description": "Creates a Verifiable Credential. The payload, signer and format are chosen based on the ",
"arguments": {
"$ref": "#/components/schemas/ICreateVerifiableCredentialEIP712Args"
},
"returnType": {
"$ref": "#/components/schemas/VerifiableCredential"
}
}
}
}
}
}