-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathattributes.yaml
More file actions
192 lines (185 loc) · 5.77 KB
/
attributes.yaml
File metadata and controls
192 lines (185 loc) · 5.77 KB
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
190
191
192
openapi: 3.1.1
info:
title: Meter Data Credential Schema
version: 1.0.0
description: >
OpenAPI 3.1.1 schema for the Meter Data Verifiable Credential.
Contains historical time-series interval meter readings aligned with
Green Button (ESPI/NAESB) semantics. Issued by the utility; consumed
by trading apps for demand forecasting.
components:
schemas:
MeterDataCredential:
type: object
description: >
W3C Verifiable Credential wrapping historical meter reading data.
required:
- "@context"
- id
- type
- issuer
- issuanceDate
- credentialSubject
properties:
"@context":
type: array
items:
type: string
contains:
const: "https://www.w3.org/2018/credentials/v1"
minItems: 2
id:
type: string
format: uri
pattern: "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
description: Unique identifier for the credential in URN UUID format
type:
type: array
items:
type: string
contains:
const: MeterDataCredential
minItems: 2
issuer:
$ref: '#/components/schemas/UtilityIssuer'
issuanceDate:
type: string
format: date-time
description: Date and time when the credential was issued
expirationDate:
type: string
format: date-time
description: Optional expiration date of the credential
credentialStatus:
$ref: '#/components/schemas/CredentialStatus'
credentialSubject:
$ref: '#/components/schemas/MeterDataSubject'
proof:
$ref: '#/components/schemas/Proof'
UtilityIssuer:
type: object
required:
- id
- name
- licenseNumber
properties:
id:
type: string
format: uri
description: DID of the issuing distribution utility
name:
type: string
minLength: 1
description: Name of the distribution utility
licenseNumber:
type: string
minLength: 1
description: Regulatory license number issued by the local energy regulator
CredentialStatus:
type: object
required:
- id
- type
description: Revocation status information for the credential
properties:
id:
type: string
format: uri
description: URL to query the revocation status via DeDi registry
type:
type: string
const: dediregistry
description: Type of status check mechanism (DeDi Registry)
Proof:
type: object
required:
- type
- created
- verificationMethod
- proofPurpose
- proofValue
properties:
type:
type: string
description: "Cryptographic signature type (e.g., Ed25519Signature2020)"
created:
type: string
format: date-time
description: Timestamp when the proof was created
verificationMethod:
type: string
format: uri
description: URI of the verification method / public key
proofPurpose:
type: string
enum:
- assertionMethod
- authentication
description: Purpose of the proof
proofValue:
type: string
minLength: 1
description: The cryptographic signature value
# ── credentialSubject ──────────────────────────────────────────
MeterDataSubject:
type: object
description: >
Historical meter reading data for a single meter, using Green Button
(ESPI/NAESB) semantics.
required:
- id
- meterNumber
- serviceKind
- timeZone
- readingType
- coveragePeriod
- intervalBlocks
properties:
id:
type: string
format: uri
description: DID of the customer / credential subject
meterNumber:
type: string
minLength: 1
maxLength: 50
description: >
Meter serial number (links to the physical meter;
reused from Utility Customer Credential)
serviceKind:
$ref: '../../external/schema/green-button/attributes.yaml#/components/schemas/ServiceKind'
timeZone:
type: string
description: >
IANA time-zone identifier for the meter location
(e.g., "Asia/Kolkata"). Critical for demand-forecasting models
that need local solar time.
examples:
- "Asia/Kolkata"
- "America/New_York"
readingType:
$ref: '../../external/schema/green-button/attributes.yaml#/components/schemas/ReadingType'
coveragePeriod:
type: object
description: >
Summary date range of the data contained in this credential.
required:
- start
- end
properties:
start:
type: string
format: date-time
description: Start of the coverage period (ISO 8601)
end:
type: string
format: date-time
description: End of the coverage period (ISO 8601)
intervalBlocks:
type: array
items:
$ref: '../../external/schema/green-button/attributes.yaml#/components/schemas/IntervalBlock'
minItems: 1
description: >
Array of interval blocks containing the actual meter readings.
Each block covers a contiguous time span.