@originator-profile/opvc 0.5.5 → 0.6.0-beta.2
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.
- package/README.md +477 -225
- package/bin/dev.cmd +1 -1
- package/bin/dev.ts +1 -1
- package/dist/commands/ca/{sign.mjs → sign.js} +2 -2
- package/dist/commands/ca/{unsigned.mjs → unsigned.js} +2 -2
- package/dist/commands/{sign.mjs → sign.js} +1 -1
- package/dist/commands/wsp/sign.d.ts +29 -0
- package/dist/commands/wsp/sign.js +93 -0
- package/dist/commands/wsp/{unsigned.mjs → unsigned.js} +24 -3
- package/dist/{content-attestation-duY49Hxp.mjs → content-attestation-Dd-YcVIv.js} +3 -16
- package/dist/help.d.ts +11 -0
- package/dist/help.js +16 -0
- package/dist/{index.d.mts → index.d.ts} +30 -19
- package/dist/{index.mjs → index.js} +2 -2
- package/dist/timing-options-BWzawYM4.js +19 -0
- package/dist/website-profile-Brt0iuRN.js +60 -0
- package/package.json +22 -18
- package/dist/website-profile-B3Q2-h2n.mjs +0 -28
- /package/dist/{chunk-CfYAbeIz.mjs → chunk-pbuEa-1d.js} +0 -0
- /package/dist/commands/ca/{sign.d.mts → sign.d.ts} +0 -0
- /package/dist/commands/ca/{unsigned.d.mts → unsigned.d.ts} +0 -0
- /package/dist/commands/key-gen/{index.d.mts → index.d.ts} +0 -0
- /package/dist/commands/key-gen/{index.mjs → index.js} +0 -0
- /package/dist/commands/{sign.d.mts → sign.d.ts} +0 -0
- /package/dist/commands/wsp/{unsigned.d.mts → unsigned.d.ts} +0 -0
- /package/dist/{flags-BGhMpQzg.mjs → flags-BSM3ANoc.js} +0 -0
package/README.md
CHANGED
|
@@ -2,19 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Originator Profile (OP) 仕様に準拠した Verifiable Credential (VC) を作成・管理するためのツールです。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<!-- prettier-ignore-start -->
|
|
6
|
+
<!-- environments-start -->
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
<!-- NOTE: Auto-generated by ../../scripts/update-readme-environments.ts from package.json, .github/workflows/test.yml, Dockerfile, and manifest.json. Edit the source, not this section. -->
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
## Environment
|
|
11
|
+
|
|
12
|
+
### Verified
|
|
13
|
+
|
|
14
|
+
- OS: Ubuntu 24.04
|
|
15
|
+
|
|
16
|
+
### Development
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
- Node.js: `^22.18.0 || ^24.10.0 || ^26.2.0`
|
|
19
|
+
- pnpm: `11.0.9`
|
|
20
|
+
|
|
21
|
+
<!-- environments-stop -->
|
|
22
|
+
<!-- prettier-ignore-end -->
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
You can install it using `npx` or `npm`.
|
|
18
27
|
|
|
19
28
|
```sh
|
|
20
29
|
# npx
|
|
@@ -25,6 +34,9 @@ npm i -g @originator-profile/opvc
|
|
|
25
34
|
opvc
|
|
26
35
|
```
|
|
27
36
|
|
|
37
|
+
> [!NOTE]
|
|
38
|
+
> When using `npx`, replace `opvc` in the following documentation with `npx @originator-profile/opvc`. (for example: `opvc help ...` becomes `npx @originator-profile/opvc help ...`)
|
|
39
|
+
|
|
28
40
|
## Commands
|
|
29
41
|
|
|
30
42
|
<!-- prettier-ignore-start -->
|
|
@@ -34,6 +46,7 @@ opvc
|
|
|
34
46
|
* [`opvc help [COMMAND]`](#opvc-help-command)
|
|
35
47
|
* [`opvc key-gen`](#opvc-key-gen)
|
|
36
48
|
* [`opvc sign`](#opvc-sign)
|
|
49
|
+
* [`opvc wsp:sign`](#opvc-wspsign)
|
|
37
50
|
* [`opvc wsp:unsigned`](#opvc-wspunsigned)
|
|
38
51
|
|
|
39
52
|
## `opvc ca:sign`
|
|
@@ -75,54 +88,54 @@ FLAG DESCRIPTIONS
|
|
|
75
88
|
Article Content Attestation の例:
|
|
76
89
|
|
|
77
90
|
{
|
|
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
|
-
|
|
91
|
+
"@context": [
|
|
92
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
93
|
+
"https://originator-profile.org/ns/credentials/v1",
|
|
94
|
+
"https://originator-profile.org/ns/cip/v1",
|
|
95
|
+
{
|
|
96
|
+
"@language": "ja"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"type": [
|
|
100
|
+
"VerifiableCredential",
|
|
101
|
+
"ContentAttestation"
|
|
102
|
+
],
|
|
103
|
+
"issuer": "dns:example.com",
|
|
104
|
+
"credentialSubject": {
|
|
105
|
+
"id": "urn:uuid:78550fa7-f846-4e0f-ad5c-8d34461cb95b",
|
|
106
|
+
"type": "Article",
|
|
107
|
+
"headline": "<Webページのタイトル>",
|
|
108
|
+
"image": {
|
|
109
|
+
"id": "<サムネイル画像URL>",
|
|
110
|
+
"content": [
|
|
111
|
+
"<コンテンツ (data:// 形式URL)>"
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"description": "<Webページの説明>",
|
|
115
|
+
"author": [
|
|
116
|
+
"山田花子"
|
|
117
|
+
],
|
|
118
|
+
"editor": [
|
|
119
|
+
"山田太郎"
|
|
120
|
+
],
|
|
121
|
+
"datePublished": "2023-07-04T19:14:00Z",
|
|
122
|
+
"dateModified": "2023-07-04T19:14:00Z",
|
|
123
|
+
"genre": "Arts & Entertainment"
|
|
124
|
+
},
|
|
125
|
+
"allowedUrl": "https://media.example.com/articles/2024-06-30",
|
|
126
|
+
"target": [
|
|
127
|
+
{
|
|
128
|
+
"type": "<Target Integrityの種別>",
|
|
129
|
+
"content": [
|
|
130
|
+
"<コンテンツ本体 (text/html or URL)>"
|
|
131
|
+
],
|
|
132
|
+
"cssSelector": "<CSS セレクター (optional)>"
|
|
133
|
+
}
|
|
134
|
+
]
|
|
122
135
|
}
|
|
123
136
|
```
|
|
124
137
|
|
|
125
|
-
_See code: [src/commands/ca/sign.ts](https://github.com/originator-profile/originator-profile/blob/v0.
|
|
138
|
+
_See code: [src/commands/ca/sign.ts](https://github.com/originator-profile/originator-profile/blob/v0.6.0-beta.2/packages/opvc/src/commands/ca/sign.ts)_
|
|
126
139
|
|
|
127
140
|
## `opvc ca:unsigned`
|
|
128
141
|
|
|
@@ -160,54 +173,54 @@ FLAG DESCRIPTIONS
|
|
|
160
173
|
Article Content Attestation の例:
|
|
161
174
|
|
|
162
175
|
{
|
|
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
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
176
|
+
"@context": [
|
|
177
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
178
|
+
"https://originator-profile.org/ns/credentials/v1",
|
|
179
|
+
"https://originator-profile.org/ns/cip/v1",
|
|
180
|
+
{
|
|
181
|
+
"@language": "<言語・地域コード>"
|
|
182
|
+
}
|
|
183
|
+
],
|
|
184
|
+
"type": [
|
|
185
|
+
"VerifiableCredential",
|
|
186
|
+
"ContentAttestation"
|
|
187
|
+
],
|
|
188
|
+
"issuer": "<OP ID>",
|
|
189
|
+
"credentialSubject": {
|
|
190
|
+
"id": "<CA ID>",
|
|
191
|
+
"type": "Article",
|
|
192
|
+
"headline": "<コンテンツのタイトル>",
|
|
193
|
+
"description": "<コンテンツの説明>",
|
|
194
|
+
"image": {
|
|
195
|
+
"id": "<サムネイル画像URL>",
|
|
196
|
+
"content": [
|
|
197
|
+
"<コンテンツ (data:// 形式URL)>"
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
"datePublished": "<公開日時>",
|
|
201
|
+
"dateModified": "<最終更新日時>",
|
|
202
|
+
"author": [
|
|
203
|
+
"<著者名>"
|
|
204
|
+
],
|
|
205
|
+
"editor": [
|
|
206
|
+
"<編集者名>"
|
|
207
|
+
],
|
|
208
|
+
"genre": "<ジャンル>"
|
|
209
|
+
},
|
|
210
|
+
"allowedUrl": "<CAの使用を許可するWebページのURL Pattern>",
|
|
211
|
+
"target": [
|
|
212
|
+
{
|
|
213
|
+
"type": "<Target Integrityの種別>",
|
|
214
|
+
"content": [
|
|
215
|
+
"<コンテンツ本体 (text/html or URL)>"
|
|
216
|
+
],
|
|
217
|
+
"cssSelector": "<CSS セレクター (optional)>"
|
|
218
|
+
}
|
|
219
|
+
]
|
|
207
220
|
}
|
|
208
221
|
```
|
|
209
222
|
|
|
210
|
-
_See code: [src/commands/ca/unsigned.ts](https://github.com/originator-profile/originator-profile/blob/v0.
|
|
223
|
+
_See code: [src/commands/ca/unsigned.ts](https://github.com/originator-profile/originator-profile/blob/v0.6.0-beta.2/packages/opvc/src/commands/ca/unsigned.ts)_
|
|
211
224
|
|
|
212
225
|
## `opvc help [COMMAND]`
|
|
213
226
|
|
|
@@ -227,7 +240,7 @@ DESCRIPTION
|
|
|
227
240
|
Display help for opvc.
|
|
228
241
|
```
|
|
229
242
|
|
|
230
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.
|
|
243
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.2.48/src/commands/help.ts)_
|
|
231
244
|
|
|
232
245
|
## `opvc key-gen`
|
|
233
246
|
|
|
@@ -245,7 +258,7 @@ DESCRIPTION
|
|
|
245
258
|
鍵ペアの生成
|
|
246
259
|
```
|
|
247
260
|
|
|
248
|
-
_See code: [src/commands/key-gen/index.ts](https://github.com/originator-profile/originator-profile/blob/v0.
|
|
261
|
+
_See code: [src/commands/key-gen/index.ts](https://github.com/originator-profile/originator-profile/blob/v0.6.0-beta.2/packages/opvc/src/commands/key-gen/index.ts)_
|
|
249
262
|
|
|
250
263
|
## `opvc sign`
|
|
251
264
|
|
|
@@ -302,117 +315,255 @@ FLAG DESCRIPTIONS
|
|
|
302
315
|
コアプロファイル (CP) の例:
|
|
303
316
|
|
|
304
317
|
{
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
318
|
+
"@context": [
|
|
319
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
320
|
+
"https://originator-profile.org/ns/credentials/v1"
|
|
321
|
+
],
|
|
322
|
+
"type": [
|
|
323
|
+
"VerifiableCredential",
|
|
324
|
+
"CoreProfile"
|
|
325
|
+
],
|
|
326
|
+
"issuer": "dns:example.org",
|
|
327
|
+
"credentialSubject": {
|
|
328
|
+
"id": "dns:example.jp",
|
|
329
|
+
"type": "Core",
|
|
330
|
+
"jwks": {
|
|
331
|
+
"keys": [
|
|
332
|
+
{
|
|
333
|
+
"kid": "LIstkoCvByn4jk8oZPvigQkzTzO9UwnGnE-VMlkZvYQ",
|
|
334
|
+
"kty": "EC",
|
|
335
|
+
"crv": "P-256",
|
|
336
|
+
"x": "QiVI-I-3gv-17KN0RFLHKh5Vj71vc75eSOkyMsxFxbE",
|
|
337
|
+
"y": "bEzRDEy41bihcTnpSILImSVymTQl9BQZq36QpCpJQnI"
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
}
|
|
341
|
+
}
|
|
329
342
|
}
|
|
330
343
|
|
|
331
344
|
ウェブメディアプロファイル (WMP) の例:
|
|
332
345
|
|
|
333
346
|
{
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
347
|
+
"@context": [
|
|
348
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
349
|
+
"https://originator-profile.org/ns/credentials/v1",
|
|
350
|
+
"https://originator-profile.org/ns/cip/v1",
|
|
351
|
+
{
|
|
352
|
+
"@language": "ja"
|
|
353
|
+
}
|
|
354
|
+
],
|
|
355
|
+
"type": [
|
|
356
|
+
"VerifiableCredential",
|
|
357
|
+
"WebMediaProfile"
|
|
358
|
+
],
|
|
359
|
+
"issuer": "dns:wmp-issuer.example.org",
|
|
360
|
+
"credentialSubject": {
|
|
361
|
+
"id": "dns:wmp-holder.example.jp",
|
|
362
|
+
"type": "OnlineBusiness",
|
|
363
|
+
"url": "https://www.wmp-holder.example.jp/",
|
|
364
|
+
"name": "○○メディア (※開発用サンプル)",
|
|
365
|
+
"logo": {
|
|
366
|
+
"id": "https://www.wmp-holder.example.jp/image.png",
|
|
367
|
+
"digestSRI": "sha256-Upwn7gYMuRmJlD1ZivHk876vXHzokXrwXj50VgfnMnY="
|
|
368
|
+
},
|
|
369
|
+
"email": "contact@wmp-holder.example.jp",
|
|
370
|
+
"telephone": "0000000000",
|
|
371
|
+
"contactPoint": {
|
|
372
|
+
"id": "https://wmp-holder.example.jp/contact",
|
|
373
|
+
"name": "お問い合わせ"
|
|
374
|
+
},
|
|
375
|
+
"informationTransmissionPolicy": {
|
|
376
|
+
"id": "https://wmp-holder.example.jp/statement",
|
|
377
|
+
"name": "情報発信ポリシー"
|
|
378
|
+
},
|
|
379
|
+
"publishingPrinciple": {
|
|
380
|
+
"id": "https://wmp-holder.example.jp/editorial-guidelines",
|
|
381
|
+
"name": "編集ガイドライン"
|
|
382
|
+
},
|
|
383
|
+
"privacyPolicy": {
|
|
384
|
+
"id": "https://wmp-holder.example.jp/privacy",
|
|
385
|
+
"name": "プライバシーポリシー"
|
|
386
|
+
},
|
|
387
|
+
"description": [
|
|
388
|
+
{
|
|
389
|
+
"encodingFormat": "text/plain",
|
|
390
|
+
"text": "この文章はこの Web メディアに関する補足情報です。"
|
|
391
|
+
}
|
|
392
|
+
]
|
|
393
|
+
}
|
|
340
394
|
}
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
"WebMediaProfile"
|
|
345
|
-
],
|
|
346
|
-
"issuer": "dns:wmp-issuer.example.org",
|
|
347
|
-
"credentialSubject": {
|
|
348
|
-
"id": "dns:wmp-holder.example.jp",
|
|
349
|
-
"type": "OnlineBusiness",
|
|
350
|
-
"url": "https://www.wmp-holder.example.jp/",
|
|
351
|
-
"name": "○○メディア (※開発用サンプル)",
|
|
352
|
-
"logo": {
|
|
353
|
-
"id": "https://www.wmp-holder.example.jp/image.png",
|
|
354
|
-
"digestSRI": "sha256-Upwn7gYMuRmJlD1ZivHk876vXHzokXrwXj50VgfnMnY="
|
|
355
|
-
},
|
|
356
|
-
"email": "contact@wmp-holder.example.jp",
|
|
357
|
-
"telephone": "0000000000",
|
|
358
|
-
"contactPoint": {
|
|
359
|
-
"id": "https://wmp-holder.example.jp/contact",
|
|
360
|
-
"name": "お問い合わせ"
|
|
361
|
-
},
|
|
362
|
-
"informationTransmissionPolicy": {
|
|
363
|
-
"id": "https://wmp-holder.example.jp/statement",
|
|
364
|
-
"name": "情報発信ポリシー"
|
|
365
|
-
},
|
|
366
|
-
"publishingPrinciple": {
|
|
367
|
-
"id": "https://wmp-holder.example.jp/editorial-guidelines",
|
|
368
|
-
"name": "編集ガイドライン"
|
|
369
|
-
},
|
|
370
|
-
"privacyPolicy": {
|
|
371
|
-
"id": "https://wmp-holder.example.jp/privacy",
|
|
372
|
-
"name": "プライバシーポリシー"
|
|
373
|
-
},
|
|
374
|
-
"description": [
|
|
395
|
+
|
|
396
|
+
Website Profile (WSP) の例:
|
|
397
|
+
|
|
375
398
|
{
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
399
|
+
"@context": [
|
|
400
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
401
|
+
"https://originator-profile.org/ns/credentials/v1",
|
|
402
|
+
"https://originator-profile.org/ns/cip/v1",
|
|
403
|
+
{
|
|
404
|
+
"@language": "ja"
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
"type": [
|
|
408
|
+
"VerifiableCredential",
|
|
409
|
+
"WebsiteProfile"
|
|
410
|
+
],
|
|
411
|
+
"issuer": "dns:example.com",
|
|
412
|
+
"credentialSubject": {
|
|
413
|
+
"id": "https://media.example.com/",
|
|
414
|
+
"type": "WebSite",
|
|
415
|
+
"name": "<Webサイトのタイトル>",
|
|
416
|
+
"description": "<Webサイトの説明>",
|
|
417
|
+
"image": {
|
|
418
|
+
"id": "https://media.example.com/image.png",
|
|
419
|
+
"digestSRI": "sha256-Upwn7gYMuRmJlD1ZivHk876vXHzokXrwXj50VgfnMnY="
|
|
420
|
+
},
|
|
421
|
+
"allowedOrigin": [
|
|
422
|
+
"https://media.example.com"
|
|
423
|
+
]
|
|
424
|
+
}
|
|
381
425
|
}
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
_See code: [src/commands/sign.ts](https://github.com/originator-profile/originator-profile/blob/v0.6.0-beta.2/packages/opvc/src/commands/sign.ts)_
|
|
429
|
+
|
|
430
|
+
## `opvc wsp:sign`
|
|
431
|
+
|
|
432
|
+
Website Profile の作成
|
|
433
|
+
|
|
434
|
+
```
|
|
435
|
+
USAGE
|
|
436
|
+
$ opvc wsp:sign -i <value> --input <filepath> [--issued-at <value>] [--expired-at <value>]
|
|
437
|
+
|
|
438
|
+
FLAGS
|
|
439
|
+
-i, --identity=<value> (required) プライベート鍵のファイルパス
|
|
440
|
+
--expired-at=<value> 有効期限 (ISO 8601)
|
|
441
|
+
--input=<filepath> (required) 入力ファイルのパス (JSON 形式)
|
|
442
|
+
--issued-at=<value> 発行日時 (ISO 8601)
|
|
443
|
+
|
|
444
|
+
DESCRIPTION
|
|
445
|
+
Website Profile の作成
|
|
446
|
+
|
|
447
|
+
Website Profile に署名します。
|
|
448
|
+
入力が単一オブジェクトの場合は JWT を、配列の場合は JWT の配列を標準出力に出力します。
|
|
449
|
+
配列入力時は全要素が同一の issuer / credentialSubject.id を持ち、
|
|
450
|
+
@context の @language がそれぞれ異なる必要があります。
|
|
451
|
+
|
|
452
|
+
EXAMPLES
|
|
453
|
+
$ opvc wsp:sign \
|
|
454
|
+
-i account-key.example.priv.json \
|
|
455
|
+
--input website-profile.example.json
|
|
456
|
+
|
|
457
|
+
$ opvc wsp:sign \
|
|
458
|
+
-i account-key.example.priv.json \
|
|
459
|
+
--input website-profile.multilingual.example.json
|
|
460
|
+
|
|
461
|
+
FLAG DESCRIPTIONS
|
|
462
|
+
-i, --identity=<value> プライベート鍵のファイルパス
|
|
463
|
+
|
|
464
|
+
プライベート鍵のファイルパスを渡してください。プライベート鍵は JWK 形式か、PEM base64 でエンコードされた PKCS #8
|
|
465
|
+
形式にしてください。
|
|
466
|
+
|
|
467
|
+
--expired-at=<value> 有効期限 (ISO 8601)
|
|
468
|
+
|
|
469
|
+
日付のみの場合、その日の 24:00:00.000 より前まで有効、それ以外の場合、期限切れとなる日付・時刻・秒を指定します。
|
|
470
|
+
|
|
471
|
+
--input=<filepath> 入力ファイルのパス (JSON 形式)
|
|
382
472
|
|
|
383
473
|
Website Profile (WSP) の例:
|
|
384
474
|
|
|
385
475
|
{
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
476
|
+
"@context": [
|
|
477
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
478
|
+
"https://originator-profile.org/ns/credentials/v1",
|
|
479
|
+
"https://originator-profile.org/ns/cip/v1",
|
|
480
|
+
{
|
|
481
|
+
"@language": "ja"
|
|
482
|
+
}
|
|
483
|
+
],
|
|
484
|
+
"type": [
|
|
485
|
+
"VerifiableCredential",
|
|
486
|
+
"WebsiteProfile"
|
|
487
|
+
],
|
|
488
|
+
"issuer": "dns:example.com",
|
|
489
|
+
"credentialSubject": {
|
|
490
|
+
"id": "https://media.example.com/",
|
|
491
|
+
"type": "WebSite",
|
|
492
|
+
"name": "<Webサイトのタイトル>",
|
|
493
|
+
"description": "<Webサイトの説明>",
|
|
494
|
+
"image": {
|
|
495
|
+
"id": "https://media.example.com/image.png",
|
|
496
|
+
"digestSRI": "sha256-Upwn7gYMuRmJlD1ZivHk876vXHzokXrwXj50VgfnMnY="
|
|
497
|
+
},
|
|
498
|
+
"allowedOrigin": [
|
|
499
|
+
"https://media.example.com"
|
|
500
|
+
]
|
|
501
|
+
}
|
|
392
502
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
503
|
+
|
|
504
|
+
多言語 Website Profile (配列) の例:
|
|
505
|
+
|
|
506
|
+
[
|
|
507
|
+
{
|
|
508
|
+
"@context": [
|
|
509
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
510
|
+
"https://originator-profile.org/ns/credentials/v1",
|
|
511
|
+
"https://originator-profile.org/ns/cip/v1",
|
|
512
|
+
{
|
|
513
|
+
"@language": "ja"
|
|
514
|
+
}
|
|
515
|
+
],
|
|
516
|
+
"type": [
|
|
517
|
+
"VerifiableCredential",
|
|
518
|
+
"WebsiteProfile"
|
|
519
|
+
],
|
|
520
|
+
"issuer": "dns:example.com",
|
|
521
|
+
"credentialSubject": {
|
|
522
|
+
"id": "https://media.example.com/",
|
|
523
|
+
"type": "WebSite",
|
|
524
|
+
"name": "<Webサイトのタイトル>",
|
|
525
|
+
"description": "<Webサイトの説明>",
|
|
526
|
+
"image": {
|
|
527
|
+
"id": "https://media.example.com/image.png",
|
|
528
|
+
"digestSRI": "sha256-Upwn7gYMuRmJlD1ZivHk876vXHzokXrwXj50VgfnMnY="
|
|
529
|
+
},
|
|
530
|
+
"allowedOrigin": [
|
|
531
|
+
"https://media.example.com"
|
|
532
|
+
]
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"@context": [
|
|
537
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
538
|
+
"https://originator-profile.org/ns/credentials/v1",
|
|
539
|
+
"https://originator-profile.org/ns/cip/v1",
|
|
540
|
+
{
|
|
541
|
+
"@language": "en"
|
|
542
|
+
}
|
|
543
|
+
],
|
|
544
|
+
"type": [
|
|
545
|
+
"VerifiableCredential",
|
|
546
|
+
"WebsiteProfile"
|
|
547
|
+
],
|
|
548
|
+
"issuer": "dns:example.com",
|
|
549
|
+
"credentialSubject": {
|
|
550
|
+
"id": "https://media.example.com/",
|
|
551
|
+
"type": "WebSite",
|
|
552
|
+
"name": "<Website title>",
|
|
553
|
+
"description": "<Website description>",
|
|
554
|
+
"image": {
|
|
555
|
+
"id": "https://media.example.com/image.png",
|
|
556
|
+
"digestSRI": "sha256-Upwn7gYMuRmJlD1ZivHk876vXHzokXrwXj50VgfnMnY="
|
|
557
|
+
},
|
|
558
|
+
"allowedOrigin": [
|
|
559
|
+
"https://media.example.com"
|
|
560
|
+
]
|
|
561
|
+
}
|
|
562
|
+
}
|
|
410
563
|
]
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
564
|
```
|
|
414
565
|
|
|
415
|
-
_See code: [src/commands/sign.ts](https://github.com/originator-profile/originator-profile/blob/v0.
|
|
566
|
+
_See code: [src/commands/wsp/sign.ts](https://github.com/originator-profile/originator-profile/blob/v0.6.0-beta.2/packages/opvc/src/commands/wsp/sign.ts)_
|
|
416
567
|
|
|
417
568
|
## `opvc wsp:unsigned`
|
|
418
569
|
|
|
@@ -446,38 +597,103 @@ FLAG DESCRIPTIONS
|
|
|
446
597
|
Website Profile の例:
|
|
447
598
|
|
|
448
599
|
{
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
600
|
+
"@context": [
|
|
601
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
602
|
+
"https://originator-profile.org/ns/credentials/v1",
|
|
603
|
+
"https://originator-profile.org/ns/cip/v1",
|
|
604
|
+
{
|
|
605
|
+
"@language": "<言語・地域コード>"
|
|
606
|
+
}
|
|
607
|
+
],
|
|
608
|
+
"type": [
|
|
609
|
+
"VerifiableCredential",
|
|
610
|
+
"WebsiteProfile"
|
|
611
|
+
],
|
|
612
|
+
"issuer": "<OP ID>",
|
|
613
|
+
"credentialSubject": {
|
|
614
|
+
"id": "<Web サイトのオリジン (形式: https://<ホスト名>)>",
|
|
615
|
+
"type": "WebSite",
|
|
616
|
+
"name": "<Web サイトの名称>",
|
|
617
|
+
"description": "<Web サイトの説明>",
|
|
618
|
+
"image": {
|
|
619
|
+
"id": "<サムネイル画像URL>",
|
|
620
|
+
"content": [
|
|
621
|
+
"<コンテンツ (data:// 形式URL)>"
|
|
622
|
+
]
|
|
623
|
+
},
|
|
624
|
+
"allowedOrigin": [
|
|
625
|
+
"<Web サイトのオリジン (形式: https://<ホスト名>)>"
|
|
626
|
+
]
|
|
627
|
+
}
|
|
455
628
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
629
|
+
|
|
630
|
+
多言語の Website Profile (配列) の例:
|
|
631
|
+
|
|
632
|
+
[
|
|
633
|
+
{
|
|
634
|
+
"@context": [
|
|
635
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
636
|
+
"https://originator-profile.org/ns/credentials/v1",
|
|
637
|
+
"https://originator-profile.org/ns/cip/v1",
|
|
638
|
+
{
|
|
639
|
+
"@language": "ja"
|
|
640
|
+
}
|
|
641
|
+
],
|
|
642
|
+
"type": [
|
|
643
|
+
"VerifiableCredential",
|
|
644
|
+
"WebsiteProfile"
|
|
645
|
+
],
|
|
646
|
+
"issuer": "<OP ID>",
|
|
647
|
+
"credentialSubject": {
|
|
648
|
+
"id": "<Web サイトのオリジン (形式: https://<ホスト名>)>",
|
|
649
|
+
"type": "WebSite",
|
|
650
|
+
"name": "<Web サイトの名称>",
|
|
651
|
+
"description": "<Web サイトの説明>",
|
|
652
|
+
"image": {
|
|
653
|
+
"id": "<サムネイル画像URL>",
|
|
654
|
+
"content": [
|
|
655
|
+
"<コンテンツ (data:// 形式URL)>"
|
|
656
|
+
]
|
|
657
|
+
},
|
|
658
|
+
"allowedOrigin": [
|
|
659
|
+
"<Web サイトのオリジン (形式: https://<ホスト名>)>"
|
|
660
|
+
]
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
"@context": [
|
|
665
|
+
"https://www.w3.org/ns/credentials/v2",
|
|
666
|
+
"https://originator-profile.org/ns/credentials/v1",
|
|
667
|
+
"https://originator-profile.org/ns/cip/v1",
|
|
668
|
+
{
|
|
669
|
+
"@language": "en"
|
|
670
|
+
}
|
|
671
|
+
],
|
|
672
|
+
"type": [
|
|
673
|
+
"VerifiableCredential",
|
|
674
|
+
"WebsiteProfile"
|
|
675
|
+
],
|
|
676
|
+
"issuer": "<OP ID>",
|
|
677
|
+
"credentialSubject": {
|
|
678
|
+
"id": "<Web サイトのオリジン (形式: https://<ホスト名>)>",
|
|
679
|
+
"type": "WebSite",
|
|
680
|
+
"name": "<Web サイトの名称>",
|
|
681
|
+
"description": "<Web サイトの説明>",
|
|
682
|
+
"image": {
|
|
683
|
+
"id": "<サムネイル画像URL>",
|
|
684
|
+
"content": [
|
|
685
|
+
"<コンテンツ (data:// 形式URL)>"
|
|
686
|
+
]
|
|
687
|
+
},
|
|
688
|
+
"allowedOrigin": [
|
|
689
|
+
"<Web サイトのオリジン (形式: https://<ホスト名>)>"
|
|
690
|
+
]
|
|
691
|
+
}
|
|
692
|
+
}
|
|
475
693
|
]
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
694
|
```
|
|
479
695
|
|
|
480
|
-
_See code: [src/commands/wsp/unsigned.ts](https://github.com/originator-profile/originator-profile/blob/v0.
|
|
696
|
+
_See code: [src/commands/wsp/unsigned.ts](https://github.com/originator-profile/originator-profile/blob/v0.6.0-beta.2/packages/opvc/src/commands/wsp/unsigned.ts)_
|
|
481
697
|
<!-- commandsstop -->
|
|
482
698
|
<!-- prettier-ignore-end -->
|
|
483
699
|
|
|
@@ -485,6 +701,19 @@ _See code: [src/commands/wsp/unsigned.ts](https://github.com/originator-profile/
|
|
|
485
701
|
|
|
486
702
|
`@originator-profile/opvc` は TypeScript/JavaScript からも利用できます。
|
|
487
703
|
|
|
704
|
+
### ローカル環境でのWebsite Profileの署名
|
|
705
|
+
|
|
706
|
+
ローカルのプライベート鍵で署名する場合は `WebsiteProfile.sign()` を使います。
|
|
707
|
+
|
|
708
|
+
```ts
|
|
709
|
+
import { WebsiteProfile } from "@originator-profile/opvc";
|
|
710
|
+
|
|
711
|
+
const jwt = await WebsiteProfile.sign(input, privateKey, {
|
|
712
|
+
issuedAt: new Date(),
|
|
713
|
+
expiredAt: "2027-03-31",
|
|
714
|
+
});
|
|
715
|
+
```
|
|
716
|
+
|
|
488
717
|
### ローカル環境でのContent Attestationの署名
|
|
489
718
|
|
|
490
719
|
ローカルのプライベート鍵で署名する場合は `ContentAttestation.sign()` を使います。
|
|
@@ -527,6 +756,29 @@ const jwt = await ContentAttestation.signByServer(input, {
|
|
|
527
756
|
});
|
|
528
757
|
```
|
|
529
758
|
|
|
759
|
+
### Website Profile の署名 (単一 / 多言語)
|
|
760
|
+
|
|
761
|
+
`WebsiteProfile.sign()` は単一の未署名 Website Profile を JWT 文字列として署名するほか、
|
|
762
|
+
配列を渡すと JWT 文字列の配列を返します。これは SiteProfile の `sites` に直接組み込めます。
|
|
763
|
+
配列入力時は全要素が同一の `issuer` / `credentialSubject.id` を持ち、
|
|
764
|
+
`@context` の `@language` がそれぞれ異なる必要があります。
|
|
765
|
+
|
|
766
|
+
```ts
|
|
767
|
+
import { WebsiteProfile } from "@originator-profile/opvc";
|
|
768
|
+
|
|
769
|
+
// 単一の場合: JWT 文字列を返します
|
|
770
|
+
const jwt = await WebsiteProfile.sign(input, privateKey, {
|
|
771
|
+
issuedAt: new Date(),
|
|
772
|
+
expiredAt: "2027-03-31",
|
|
773
|
+
});
|
|
774
|
+
|
|
775
|
+
// 多言語の場合: JWT 文字列の配列を返します
|
|
776
|
+
const sites = await WebsiteProfile.sign([inputJa, inputEn], privateKey, {
|
|
777
|
+
issuedAt: new Date(),
|
|
778
|
+
expiredAt: "2027-03-31",
|
|
779
|
+
});
|
|
780
|
+
```
|
|
781
|
+
|
|
530
782
|
## Development
|
|
531
783
|
|
|
532
784
|
```sh
|