@@ -189,9 +189,10 @@ working with storage backed DID documents.</p>
189
189
<dl >
190
190
<dt ><a href =" #StateMetadataEncoding " >StateMetadataEncoding</a ></dt >
191
191
<dd ></dd >
192
- <dt ><a href =" #StatusPurpose " >StatusPurpose</a ></dt >
193
- <dd ><p >Purpose of a <a href =" #StatusList2021 " >StatusList2021</a >.</p >
194
- </dd >
192
+ <dt ><a href =" #MethodRelationship " >MethodRelationship</a ></dt >
193
+ <dd ></dd >
194
+ <dt ><a href =" #CredentialStatus " >CredentialStatus</a ></dt >
195
+ <dd ></dd >
195
196
<dt ><a href =" #SubjectHolderRelationship " >SubjectHolderRelationship</a ></dt >
196
197
<dd ><p >Declares how credential subjects must relate to the presentation holder.</p >
197
198
<p >See also the <a href =" https://www.w3.org/TR/vc-data-model/#subject-holder-relationships " >Subject-Holder Relationship</a > section of the specification.</p >
@@ -215,6 +216,9 @@ This variant is the default.</p>
215
216
<dt ><a href =" #FirstError " >FirstError</a ></dt >
216
217
<dd ><p >Return after the first error occurs.</p >
217
218
</dd >
219
+ <dt ><a href =" #StatusPurpose " >StatusPurpose</a ></dt >
220
+ <dd ><p >Purpose of a <a href =" #StatusList2021 " >StatusList2021</a >.</p >
221
+ </dd >
218
222
<dt ><a href =" #StatusCheck " >StatusCheck</a ></dt >
219
223
<dd ><p >Controls validation behaviour when checking whether or not a credential has been revoked by its
220
224
<a href =" https://www.w3.org/TR/vc-data-model/#status " ><code >credentialStatus</code ></a >.</p >
@@ -232,15 +236,17 @@ This variant is the default.</p>
232
236
<dt ><a href =" #SkipAll " >SkipAll</a ></dt >
233
237
<dd ><p >Skip all status checks.</p >
234
238
</dd >
235
- <dt ><a href =" #CredentialStatus " >CredentialStatus</a ></dt >
236
- <dd ></dd >
237
- <dt ><a href =" #MethodRelationship " >MethodRelationship</a ></dt >
238
- <dd ></dd >
239
239
</dl >
240
240
241
241
## Functions
242
242
243
243
<dl >
244
+ <dt ><a href =" #encodeB64 " >encodeB64(data)</a > ⇒ <code >string</code ></dt >
245
+ <dd ><p >Encode the given bytes in url-safe base64.</p >
246
+ </dd >
247
+ <dt ><a href =" #decodeB64 " >decodeB64(data)</a > ⇒ <code >Uint8Array</code ></dt >
248
+ <dd ><p >Decode the given url-safe base64-encoded slice into its raw bytes.</p >
249
+ </dd >
244
250
<dt ><a href =" #verifyEd25519 " >verifyEd25519(alg, signingInput, decodedSignature, publicKey)</a ></dt >
245
251
<dd ><p >Verify a JWS signature secured with the <code >EdDSA</code > algorithm and curve <code >Ed25519</code >.</p >
246
252
<p >This function is useful when one is composing a <code >IJwsVerifier</code > that delegates
@@ -249,12 +255,6 @@ This variant is the default.</p>
249
255
<p >This function does not check whether <code >alg = EdDSA</code > in the protected header. Callers are expected to assert this
250
256
prior to calling the function.</p >
251
257
</dd >
252
- <dt ><a href =" #encodeB64 " >encodeB64(data)</a > ⇒ <code >string</code ></dt >
253
- <dd ><p >Encode the given bytes in url-safe base64.</p >
254
- </dd >
255
- <dt ><a href =" #decodeB64 " >decodeB64(data)</a > ⇒ <code >Uint8Array</code ></dt >
256
- <dd ><p >Decode the given url-safe base64-encoded slice into its raw bytes.</p >
257
- </dd >
258
258
<dt ><a href =" #start " >start()</a ></dt >
259
259
<dd ><p >Initializes the console error panic hook for better error messages</p >
260
260
</dd >
@@ -5233,7 +5233,6 @@ Note: digests are created using the sha-256 algorithm.
5233
5233
* [ SdObjectEncoder] ( #SdObjectEncoder )
5234
5234
* [ new SdObjectEncoder(object)] ( #new_SdObjectEncoder_new )
5235
5235
* [ .conceal(path, [ salt] )] ( #SdObjectEncoder+conceal ) ⇒ [ <code >Disclosure</code >] ( #Disclosure )
5236
- * [ .concealArrayEntry(path, element_index, [ salt] )] ( #SdObjectEncoder+concealArrayEntry ) ⇒ [ <code >Disclosure</code >] ( #Disclosure )
5237
5236
* [ .addSdAlgProperty()] ( #SdObjectEncoder+addSdAlgProperty )
5238
5237
* [ .encodeToString()] ( #SdObjectEncoder+encodeToString ) ⇒ <code >string</code >
5239
5238
* [ .toString()] ( #SdObjectEncoder+toString ) ⇒ <code >string</code >
@@ -5257,43 +5256,35 @@ Creates a new `SdObjectEncoder` with `sha-256` hash function.
5257
5256
Substitutes a value with the digest of its disclosure.
5258
5257
If no salt is provided, the disclosure will be created with a random salt value.
5259
5258
5260
- The value of the key specified in ` path ` will be concealed. E.g. for path
5261
- ` ["claim", "subclaim"] ` the value of ` claim.subclaim ` will be concealed .
5259
+ ` path ` indicates the pointer to the value that will be concealed using the syntax of
5260
+ [ JSON pointer ] ( https://datatracker.ietf.org/doc/html/rfc6901 ) .
5262
5261
5263
- ## Error
5264
- ` InvalidPath ` if path is invalid or the path slice is empty.
5265
- ` DataTypeMismatch ` if existing SD format is invalid.
5262
+ For the following object:
5266
5263
5267
- ## Note
5268
- Use ` concealArrayEntry ` for values in arrays.
5264
+ ```
5265
+ {
5266
+ "id": "did:value",
5267
+ "claim1": {
5268
+ "abc": true
5269
+ },
5270
+ "claim2": ["val_1", "val_2"]
5271
+ }
5272
+ ```
5269
5273
5270
- ** Kind** : instance method of [ <code >SdObjectEncoder</code >] ( #SdObjectEncoder )
5274
+ Path "/id" conceals ` "id": "did:value" `
5275
+ Path "/claim1/abc" conceals ` "abc": true `
5276
+ Path "/claim2/0" conceals ` val_1 `
5277
+ ```
5271
5278
5272
- | Param | Type |
5273
- | --- | --- |
5274
- | path | <code >Array.< ; string> ; </code > |
5275
- | [ salt] | <code >string</code > \| <code >undefined</code > |
5276
-
5277
- <a name =" SdObjectEncoder+concealArrayEntry " ></a >
5278
-
5279
- ### sdObjectEncoder.concealArrayEntry(path, element_index, [ salt] ) ⇒ [ <code >Disclosure</code >] ( #Disclosure )
5280
- Substitutes a value within an array with the digest of its disclosure.
5281
- If no salt is provided, the disclosure will be created with random salt value.
5282
-
5283
- ` path ` is used to specify the array in the object, while ` element_index ` specifies
5284
- the index of the element to be concealed (index start at 0).
5285
-
5286
- ## Error
5287
- ` InvalidPath ` if path is invalid or the path slice is empty.
5288
- ` DataTypeMismatch ` if existing SD format is invalid.
5289
- ` IndexOutofBounds ` if ` element_index ` is out of bounds.
5279
+ ## Errors
5280
+ * `InvalidPath` if pointer is invalid.
5281
+ * `DataTypeMismatch` if existing SD format is invalid.
5290
5282
5291
5283
**Kind**: instance method of [<code>SdObjectEncoder</code>](#SdObjectEncoder)
5292
5284
5293
5285
| Param | Type |
5294
5286
| --- | --- |
5295
- | path | <code >Array.< ; string> ; </code > |
5296
- | element_index | <code >number</code > |
5287
+ | path | <code>string</code> |
5297
5288
| [salt] | <code>string</code> \| <code>undefined</code> |
5298
5289
5299
5290
<a name="SdObjectEncoder+addSdAlgProperty"></a>
@@ -5337,7 +5328,7 @@ If path is an empty slice, decoys will be added to the top level.
5337
5328
5338
5329
| Param | Type |
5339
5330
| --- | --- |
5340
- | path | <code >Array. & lt ; string& gt ; </code > |
5331
+ | path | <code>string</code> |
5341
5332
| number_of_decoys | <code>number</code> |
5342
5333
5343
5334
<a name="Service"></a>
@@ -5506,7 +5497,7 @@ A parsed [StatusList2021Credential](https://www.w3.org/TR/2023/WD-vc-status-list
5506
5497
* [new StatusList2021Credential(credential)](#new_StatusList2021Credential_new)
5507
5498
* _instance_
5508
5499
* [.id()](#StatusList2021Credential+id) ⇒ <code>string</code>
5509
- * [ .setCredentialStatus(credential, index, value )] ( #StatusList2021Credential+setCredentialStatus ) ⇒ [ <code >StatusList2021Entry</code >] ( #StatusList2021Entry )
5500
+ * [.setCredentialStatus(credential, index, revoked_or_suspended )](#StatusList2021Credential+setCredentialStatus) ⇒ [<code>StatusList2021Entry</code>](#StatusList2021Entry)
5510
5501
* [.purpose()](#StatusList2021Credential+purpose) ⇒ [<code>StatusPurpose</code>](#StatusPurpose)
5511
5502
* [.entry(index)](#StatusList2021Credential+entry) ⇒ [<code>CredentialStatus</code>](#CredentialStatus)
5512
5503
* [.clone()](#StatusList2021Credential+clone) ⇒ [<code>StatusList2021Credential</code>](#StatusList2021Credential)
@@ -5530,7 +5521,7 @@ Creates a new [StatusList2021Credential](#StatusList2021Credential).
5530
5521
**Kind**: instance method of [<code>StatusList2021Credential</code>](#StatusList2021Credential)
5531
5522
<a name="StatusList2021Credential+setCredentialStatus"></a>
5532
5523
5533
- ### statusList2021Credential.setCredentialStatus(credential, index, value ) ⇒ [ <code >StatusList2021Entry</code >] ( #StatusList2021Entry )
5524
+ ### statusList2021Credential.setCredentialStatus(credential, index, revoked_or_suspended ) ⇒ [<code>StatusList2021Entry</code>](#StatusList2021Entry)
5534
5525
Sets the given credential's status using the `index`-th entry of this status list.
5535
5526
Returns the created `credentialStatus`.
5536
5527
@@ -5540,7 +5531,7 @@ Returns the created `credentialStatus`.
5540
5531
| --- | --- |
5541
5532
| credential | [<code>Credential</code>](#Credential) |
5542
5533
| index | <code>number</code> |
5543
- | value | <code >boolean</code > |
5534
+ | revoked_or_suspended | <code>boolean</code> |
5544
5535
5545
5536
<a name="StatusList2021Credential+purpose"></a>
5546
5537
@@ -5700,7 +5691,7 @@ Attempts to build a valid [StatusList2021Credential](#StatusList2021Credential)
5700
5691
* [.id()](#StatusList2021Entry+id) ⇒ <code>string</code>
5701
5692
* [.purpose()](#StatusList2021Entry+purpose) ⇒ [<code>StatusPurpose</code>](#StatusPurpose)
5702
5693
* [.index()](#StatusList2021Entry+index) ⇒ <code>number</code>
5703
- * [ .status_list_credential ()] ( #StatusList2021Entry+status_list_credential ) ⇒ <code >string</code >
5694
+ * [.statusListCredential ()](#StatusList2021Entry+statusListCredential ) ⇒ <code>string</code>
5704
5695
* [.toStatus()](#StatusList2021Entry+toStatus) ⇒ <code>Status</code>
5705
5696
* [.clone()](#StatusList2021Entry+clone) ⇒ [<code>StatusList2021Entry</code>](#StatusList2021Entry)
5706
5697
* [.toJSON()](#StatusList2021Entry+toJSON) ⇒ <code>any</code>
@@ -5738,9 +5729,9 @@ Returns the purpose of this entry.
5738
5729
Returns the index of this entry.
5739
5730
5740
5731
**Kind**: instance method of [<code>StatusList2021Entry</code>](#StatusList2021Entry)
5741
- <a name =" StatusList2021Entry+status_list_credential " ></a >
5732
+ <a name="StatusList2021Entry+statusListCredential "></a>
5742
5733
5743
- ### statusList2021Entry.status \_ list \_ credential () ⇒ <code >string</code >
5734
+ ### statusList2021Entry.statusListCredential () ⇒ <code>string</code>
5744
5735
Returns the referenced [StatusList2021Credential](#StatusList2021Credential)'s url.
5745
5736
5746
5737
**Kind**: instance method of [<code>StatusList2021Entry</code>](#StatusList2021Entry)
@@ -6117,11 +6108,13 @@ Deserializes an instance from a JSON object.
6117
6108
6118
6109
## StateMetadataEncoding
6119
6110
**Kind**: global variable
6120
- <a name =" StatusPurpose " ></a >
6111
+ <a name="MethodRelationship "></a>
6121
6112
6122
- ## StatusPurpose
6123
- Purpose of a [ StatusList2021] ( #StatusList2021 ) .
6113
+ ## MethodRelationship
6114
+ **Kind**: global variable
6115
+ <a name="CredentialStatus"></a>
6124
6116
6117
+ ## CredentialStatus
6125
6118
**Kind**: global variable
6126
6119
<a name="SubjectHolderRelationship"></a>
6127
6120
@@ -6167,6 +6160,12 @@ Return all errors that occur during validation.
6167
6160
## FirstError
6168
6161
Return after the first error occurs.
6169
6162
6163
+ **Kind**: global variable
6164
+ <a name="StatusPurpose"></a>
6165
+
6166
+ ## StatusPurpose
6167
+ Purpose of a [StatusList2021](#StatusList2021).
6168
+
6170
6169
**Kind**: global variable
6171
6170
<a name="StatusCheck"></a>
6172
6171
@@ -6199,14 +6198,28 @@ Validate the status if supported, skip any unsupported
6199
6198
Skip all status checks.
6200
6199
6201
6200
**Kind**: global variable
6202
- <a name =" CredentialStatus " ></a >
6201
+ <a name="encodeB64 "></a>
6203
6202
6204
- ## CredentialStatus
6205
- ** Kind** : global variable
6206
- <a name =" MethodRelationship " ></a >
6203
+ ## encodeB64(data) ⇒ <code>string</code>
6204
+ Encode the given bytes in url-safe base64.
6205
+
6206
+ **Kind**: global function
6207
+
6208
+ | Param | Type |
6209
+ | --- | --- |
6210
+ | data | <code>Uint8Array</code> |
6211
+
6212
+ <a name="decodeB64"></a>
6213
+
6214
+ ## decodeB64(data) ⇒ <code>Uint8Array</code>
6215
+ Decode the given url-safe base64-encoded slice into its raw bytes.
6216
+
6217
+ **Kind**: global function
6218
+
6219
+ | Param | Type |
6220
+ | --- | --- |
6221
+ | data | <code>Uint8Array</code> |
6207
6222
6208
- ## MethodRelationship
6209
- ** Kind** : global variable
6210
6223
<a name="verifyEd25519"></a>
6211
6224
6212
6225
## verifyEd25519(alg, signingInput, decodedSignature, publicKey)
@@ -6229,28 +6242,6 @@ prior to calling the function.
6229
6242
| decodedSignature | <code>Uint8Array</code> |
6230
6243
| publicKey | [<code>Jwk</code>](#Jwk) |
6231
6244
6232
- <a name =" encodeB64 " ></a >
6233
-
6234
- ## encodeB64(data) ⇒ <code >string</code >
6235
- Encode the given bytes in url-safe base64.
6236
-
6237
- ** Kind** : global function
6238
-
6239
- | Param | Type |
6240
- | --- | --- |
6241
- | data | <code >Uint8Array</code > |
6242
-
6243
- <a name =" decodeB64 " ></a >
6244
-
6245
- ## decodeB64(data) ⇒ <code >Uint8Array</code >
6246
- Decode the given url-safe base64-encoded slice into its raw bytes.
6247
-
6248
- ** Kind** : global function
6249
-
6250
- | Param | Type |
6251
- | --- | --- |
6252
- | data | <code >Uint8Array</code > |
6253
-
6254
6245
<a name="start"></a>
6255
6246
6256
6247
## start()
0 commit comments