-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Refactor and add inline documentation to daf-w3c package
BREAKING CHANGE: the `IW3c` type and `W3c` class have been renamed to `ICredentialIssuer` and `CredentialIssuer` fix(deps): update `did-resolver` and `did-jwt` libs for all packages to maintain type consistency
- Loading branch information
Showing
61 changed files
with
540 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [daf-w3c](./daf-w3c.md) > [CredentialIssuer](./daf-w3c.credentialissuer.md) > [(constructor)](./daf-w3c.credentialissuer._constructor_.md) | ||
|
||
## CredentialIssuer.(constructor) | ||
|
||
Constructs a new instance of the `CredentialIssuer` class | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
constructor(); | ||
``` |
31 changes: 31 additions & 0 deletions
31
docs/api/daf-w3c.credentialissuer.createverifiablecredential.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [daf-w3c](./daf-w3c.md) > [CredentialIssuer](./daf-w3c.credentialissuer.md) > [createVerifiableCredential](./daf-w3c.credentialissuer.createverifiablecredential.md) | ||
|
||
## CredentialIssuer.createVerifiableCredential() method | ||
|
||
Creates a Verifiable Credential. The payload, signer and format are chosen based on the `args` parameter. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
createVerifiableCredential(args: ICreateVerifiableCredentialArgs, context: IContext): Promise<VerifiableCredential>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| args | [ICreateVerifiableCredentialArgs](./daf-w3c.icreateverifiablecredentialargs.md) | Arguments necessary to create the Presentation. | | ||
| context | IContext | This reserved param is automatically added and handled by the framework, \*do not override\* | | ||
|
||
<b>Returns:</b> | ||
|
||
Promise<[VerifiableCredential](./daf-core.verifiablecredential.md)<!-- -->> | ||
|
||
- a promise that resolves to the [VerifiableCredential](./daf-core.verifiablecredential.md) that was requested or rejects with an error if there was a problem with the input or while getting the key to sign | ||
|
||
## Remarks | ||
|
||
Please see [Verifiable Credential data model](https://www.w3.org/TR/vc-data-model/#credentials) | ||
|
31 changes: 31 additions & 0 deletions
31
docs/api/daf-w3c.credentialissuer.createverifiablepresentation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [daf-w3c](./daf-w3c.md) > [CredentialIssuer](./daf-w3c.credentialissuer.md) > [createVerifiablePresentation](./daf-w3c.credentialissuer.createverifiablepresentation.md) | ||
|
||
## CredentialIssuer.createVerifiablePresentation() method | ||
|
||
Creates a Verifiable Presentation. The payload, signer and format are chosen based on the `args` parameter. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
createVerifiablePresentation(args: ICreateVerifiablePresentationArgs, context: IContext): Promise<VerifiablePresentation>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| args | [ICreateVerifiablePresentationArgs](./daf-w3c.icreateverifiablepresentationargs.md) | Arguments necessary to create the Presentation. | | ||
| context | IContext | This reserved param is automatically added and handled by the framework, \*do not override\* | | ||
|
||
<b>Returns:</b> | ||
|
||
Promise<[VerifiablePresentation](./daf-core.verifiablepresentation.md)<!-- -->> | ||
|
||
- a promise that resolves to the [VerifiablePresentation](./daf-core.verifiablepresentation.md) that was requested or rejects with an error if there was a problem with the input or while getting the key to sign | ||
|
||
## Remarks | ||
|
||
Please see [Verifiable Presentation data model](https://www.w3.org/TR/vc-data-model/#presentations) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [daf-w3c](./daf-w3c.md) > [CredentialIssuer](./daf-w3c.credentialissuer.md) | ||
|
||
## CredentialIssuer class | ||
|
||
A DAF plugin that implements the [ICredentialIssuer](./daf-w3c.icredentialissuer.md) methods. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare class CredentialIssuer implements IAgentPlugin | ||
``` | ||
<b>Implements:</b> [IAgentPlugin](./daf-core.iagentplugin.md) | ||
## Constructors | ||
| Constructor | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [(constructor)()](./daf-w3c.credentialissuer._constructor_.md) | | Constructs a new instance of the <code>CredentialIssuer</code> class | | ||
## Properties | ||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [methods](./daf-w3c.credentialissuer.methods.md) | | [ICredentialIssuer](./daf-w3c.icredentialissuer.md) | | | ||
## Methods | ||
| Method | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [createVerifiableCredential(args, context)](./daf-w3c.credentialissuer.createverifiablecredential.md) | | Creates a Verifiable Credential. The payload, signer and format are chosen based on the <code>args</code> parameter. | | ||
| [createVerifiablePresentation(args, context)](./daf-w3c.credentialissuer.createverifiablepresentation.md) | | Creates a Verifiable Presentation. The payload, signer and format are chosen based on the <code>args</code> parameter. | | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [daf-w3c](./daf-w3c.md) > [CredentialIssuer](./daf-w3c.credentialissuer.md) > [methods](./daf-w3c.credentialissuer.methods.md) | ||
|
||
## CredentialIssuer.methods property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
readonly methods: ICredentialIssuer; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.