generated from TBD54566975/tbd-project-template
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffa0989
commit 416f551
Showing
8 changed files
with
580 additions
and
119 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,41 @@ | ||
## Credentials | ||
|
||
|
||
### VC Creation and Verification | ||
|
||
The `VC` class provides methods for the creation, handling, and signing of Verifiable Credentials (VCs) in JWT format. | ||
|
||
- **VC.createVerifiableCredentialJwt**: Creates a Verifiable Credential (VC) in JWT format. | ||
- **VC.decodeVerifiableCredentialJwt**: Decodes a VC JWT into its constituent parts: header, payload, and signature. | ||
- **VC.verifyVerifiableCredentialJwt**: Verifies the integrity of a VC JWT. | ||
- **VC.validateVerifiableCredentialPayload**: Validates the structure and integrity of a Verifiable Credential payload. | ||
|
||
### VP Creation and Verification | ||
|
||
The `VP` class provides utility methods for creation and handling Verifiable Presentations (VPs) in JWT format. | ||
|
||
- **VP.createVerifiablePresentationJwt**: Creates a Verifiable Presentation (VP) in JWT format from a presentation definition and set of credentials. | ||
- **VP.decodeVerifiablePresentationJwt**: Decodes a VP JWT into its constituent parts: header, payload, and signature. | ||
- **VP.verifyVerifiablePresentationJwt**: Verifies the integrity of a VP JWT. | ||
- **VP.validateVerifiablePresentationPayload**: Validates the structure and integrity of a Verifiable Presentation payload. | ||
|
||
### Presentation Exchange Helpers | ||
|
||
These methods assist in evaluating verifiable credentials and presentations against specified presentation definitions. | ||
|
||
- **VC.evaluateCredentials**: Evaluates a set of verifiable credentials against a specified presentation definition. | ||
- **VP.evaluatePresentation**: Evaluates a given Verifiable Presentation against a specified presentation definition. | ||
|
||
### Verifiable Credentials and Presentations Library | ||
Note: you do not have to use the functions to create SSI objects, you can instead create them yourselves with the boilerplate types in types.ts | ||
|
||
### Signer Options Object | ||
|
||
The `Signer` represents a function that takes a byte array as input and returns a promise that resolves to a byte array, representing the signature of the input data. | ||
|
||
### Type Definition | ||
|
||
```typescript | ||
type Signer = (data: Uint8Array) => Promise<Uint8Array>; | ||
``` | ||
|
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.