Skip to content

Commit

Permalink
feat(verifyVc): update resolve method and add method for offchain verify
Browse files Browse the repository at this point in the history
  • Loading branch information
whitneypurdum committed Jul 6, 2022
1 parent 0da3229 commit 800c903
Show file tree
Hide file tree
Showing 24 changed files with 583 additions and 82 deletions.
50 changes: 49 additions & 1 deletion docs/api/classes/modules_claims.ClaimsService.md
Expand Up @@ -43,8 +43,10 @@ claimsService.getClaimById(claim.id);
- [publishPublicClaim](modules_claims.ClaimsService.md#publishpublicclaim)
- [registerOnchain](modules_claims.ClaimsService.md#registeronchain)
- [rejectClaimRequest](modules_claims.ClaimsService.md#rejectclaimrequest)
- [resolveCredentialAndVerify](modules_claims.ClaimsService.md#resolvecredentialandverify)
- [revokeClaim](modules_claims.ClaimsService.md#revokeclaim)
- [revokeMultipleClaim](modules_claims.ClaimsService.md#revokemultipleclaim)
- [verifyOffChainClaim](modules_claims.ClaimsService.md#verifyoffchainclaim)
- [verifyVc](modules_claims.ClaimsService.md#verifyvc)
- [create](modules_claims.ClaimsService.md#create)

Expand Down Expand Up @@ -692,6 +694,27 @@ claimsService.rejectClaimRequest({

___

### resolveCredentialAndVerify

**resolveCredentialAndVerify**(`subjectDID`, `roleNamespace`): `Promise`<`void`\>

Resolve a credential from storage and verify its proof/signature and its issuer's authority

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `subjectDID` | `string` | The DID to try to resolve a credential for |
| `roleNamespace` | `string` | - |

#### Returns

`Promise`<`void`\>

void. Returns "Proof Not Verified" error if VC not verified. Returns error if issuer not verified

___

### revokeClaim

**revokeClaim**(`options`): `Promise`<`boolean`\>
Expand Down Expand Up @@ -769,11 +792,36 @@ claimsService.revokeMultipleClaim({

___

### verifyOffChainClaim

**verifyOffChainClaim**(`subjectDID`, `roleNamespace`): `Promise`<`void`\>

Verifies:
- That off-chain claim was issued by authorized issuer
- That off-chain claim proof is valid

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `subjectDID` | `string` | The DID to try to resolve a credential for |
| `roleNamespace` | `string` | - |

#### Returns

`Promise`<`void`\>

void. Returns "Proof Not Verified" error if VC not verified. Returns error if issuer not verified

___

### verifyVc

**verifyVc**(`vc`): `Promise`<`void`\>

Verifies that credential was issued by authorized issuer
Verifies:
- That credential proof is valid
- That credential was issued by authorized issuer

#### Parameters

Expand Down
8 changes: 4 additions & 4 deletions docs/api/classes/modules_domains.DomainsService.md
Expand Up @@ -467,7 +467,7 @@ ___

### getDefinition

**getDefinition**(`options`): `Promise`<`IRoleDefinition` \| `IRoleDefinitionV2` \| `IOrganizationDefinition` \| `IAppDefinition`\>
**getDefinition**(`options`): `Promise`<`IRoleDefinition` \| `IOrganizationDefinition` \| `IAppDefinition` \| `IRoleDefinitionV2`\>

Fetch cached domain definition for organization, application or role.

Expand All @@ -486,15 +486,15 @@ domainsService.getDefinition({

#### Returns

`Promise`<`IRoleDefinition` \| `IRoleDefinitionV2` \| `IOrganizationDefinition` \| `IAppDefinition`\>
`Promise`<`IRoleDefinition` \| `IOrganizationDefinition` \| `IAppDefinition` \| `IRoleDefinitionV2`\>

domain definition

___

### getENSTypesByOwner

**getENSTypesByOwner**(`options`): `Promise`<[`IApp`](../interfaces/modules_domains.IApp.md)[] \| [`IRole`](../interfaces/modules_domains.IRole.md)[] \| [`IOrganization`](../interfaces/modules_domains.IOrganization.md)[]\>
**getENSTypesByOwner**(`options`): `Promise`<[`IRole`](../interfaces/modules_domains.IRole.md)[] \| [`IOrganization`](../interfaces/modules_domains.IOrganization.md)[] \| [`IApp`](../interfaces/modules_domains.IApp.md)[]\>

Get all organization/application/role for certain owner.

Expand All @@ -514,7 +514,7 @@ domainsService.getENSTypesByOwner({

#### Returns

`Promise`<[`IApp`](../interfaces/modules_domains.IApp.md)[] \| [`IRole`](../interfaces/modules_domains.IRole.md)[] \| [`IOrganization`](../interfaces/modules_domains.IOrganization.md)[]\>
`Promise`<[`IRole`](../interfaces/modules_domains.IRole.md)[] \| [`IOrganization`](../interfaces/modules_domains.IOrganization.md)[] \| [`IApp`](../interfaces/modules_domains.IApp.md)[]\>

array of organizations/applications/roles for certain owner

Expand Down
14 changes: 7 additions & 7 deletions docs/api/enums/modules_assets.AssetHistoryEventType.md
Expand Up @@ -4,40 +4,40 @@

## Table of contents

### Enumeration Members
### Enumeration members

- [ASSET\_CREATED](modules_assets.AssetHistoryEventType.md#asset_created)
- [ASSET\_OFFERED](modules_assets.AssetHistoryEventType.md#asset_offered)
- [ASSET\_OFFER\_CANCELED](modules_assets.AssetHistoryEventType.md#asset_offer_canceled)
- [ASSET\_OFFER\_REJECTED](modules_assets.AssetHistoryEventType.md#asset_offer_rejected)
- [ASSET\_TRANSFERRED](modules_assets.AssetHistoryEventType.md#asset_transferred)

## Enumeration Members
## Enumeration members

### ASSET\_CREATED

**ASSET\_CREATED**
**ASSET\_CREATED** = `"ASSET_CREATED"`

___

### ASSET\_OFFERED

**ASSET\_OFFERED**
**ASSET\_OFFERED** = `"ASSET_OFFERED"`

___

### ASSET\_OFFER\_CANCELED

**ASSET\_OFFER\_CANCELED**
**ASSET\_OFFER\_CANCELED** = `"ASSET_OFFER_CANCELED"`

___

### ASSET\_OFFER\_REJECTED

**ASSET\_OFFER\_REJECTED**
**ASSET\_OFFER\_REJECTED** = `"ASSET_OFFER_REJECTED"`

___

### ASSET\_TRANSFERRED

**ASSET\_TRANSFERRED**
**ASSET\_TRANSFERRED** = `"ASSET_TRANSFERRED"`
8 changes: 4 additions & 4 deletions docs/api/enums/modules_cache_client.Order.md
Expand Up @@ -4,19 +4,19 @@

## Table of contents

### Enumeration Members
### Enumeration members

- [ASC](modules_cache_client.Order.md#asc)
- [DESC](modules_cache_client.Order.md#desc)

## Enumeration Members
## Enumeration members

### ASC

**ASC**
**ASC** = `"ASC"`

___

### DESC

**DESC**
**DESC** = `"DESC"`
10 changes: 5 additions & 5 deletions docs/api/enums/modules_cache_client.SearchType.md
Expand Up @@ -4,26 +4,26 @@

## Table of contents

### Enumeration Members
### Enumeration members

- [App](modules_cache_client.SearchType.md#app)
- [Org](modules_cache_client.SearchType.md#org)
- [Role](modules_cache_client.SearchType.md#role)

## Enumeration Members
## Enumeration members

### App

**App**
**App** = `"App"`

___

### Org

**Org**
**Org** = `"Org"`

___

### Role

**Role**
**Role** = `"Role"`
10 changes: 5 additions & 5 deletions docs/api/enums/modules_claims.ClaimEventType.md
Expand Up @@ -4,26 +4,26 @@

## Table of contents

### Enumeration Members
### Enumeration members

- [ISSUE\_CREDENTIAL](modules_claims.ClaimEventType.md#issue_credential)
- [REJECT\_CREDENTIAL](modules_claims.ClaimEventType.md#reject_credential)
- [REQUEST\_CREDENTIALS](modules_claims.ClaimEventType.md#request_credentials)

## Enumeration Members
## Enumeration members

### ISSUE\_CREDENTIAL

**ISSUE\_CREDENTIAL**
**ISSUE\_CREDENTIAL** = `"issue-credential"`

___

### REJECT\_CREDENTIAL

**REJECT\_CREDENTIAL**
**REJECT\_CREDENTIAL** = `"reject-credential"`

___

### REQUEST\_CREDENTIALS

**REQUEST\_CREDENTIALS**
**REQUEST\_CREDENTIALS** = `"request-credential"`
8 changes: 4 additions & 4 deletions docs/api/enums/modules_claims.RegistrationTypes.md
Expand Up @@ -4,19 +4,19 @@

## Table of contents

### Enumeration Members
### Enumeration members

- [OffChain](modules_claims.RegistrationTypes.md#offchain)
- [OnChain](modules_claims.RegistrationTypes.md#onchain)

## Enumeration Members
## Enumeration members

### OffChain

**OffChain**
**OffChain** = `"RegistrationTypes::OffChain"`

___

### OnChain

**OnChain**
**OnChain** = `"RegistrationTypes::OnChain"`
10 changes: 5 additions & 5 deletions docs/api/enums/modules_domains.NamespaceType.md
Expand Up @@ -4,26 +4,26 @@

## Table of contents

### Enumeration Members
### Enumeration members

- [Application](modules_domains.NamespaceType.md#application)
- [Organization](modules_domains.NamespaceType.md#organization)
- [Role](modules_domains.NamespaceType.md#role)

## Enumeration Members
## Enumeration members

### Application

**Application**
**Application** = `"apps"`

___

### Organization

**Organization**
**Organization** = `"org"`

___

### Role

**Role**
**Role** = `"roles"`
6 changes: 3 additions & 3 deletions docs/api/enums/modules_messaging.MessagingMethod.md
Expand Up @@ -4,12 +4,12 @@

## Table of contents

### Enumeration Members
### Enumeration members

- [Nats](modules_messaging.MessagingMethod.md#nats)

## Enumeration Members
## Enumeration members

### Nats

**Nats**
**Nats** = `"nats"`
12 changes: 6 additions & 6 deletions docs/api/enums/modules_signer.ProviderEvent.md
Expand Up @@ -4,37 +4,37 @@

## Table of contents

### Enumeration Members
### Enumeration members

- [AccountChanged](modules_signer.ProviderEvent.md#accountchanged)
- [Disconnected](modules_signer.ProviderEvent.md#disconnected)
- [NetworkChanged](modules_signer.ProviderEvent.md#networkchanged)
- [SessionUpdate](modules_signer.ProviderEvent.md#sessionupdate)

## Enumeration Members
## Enumeration members

### AccountChanged

**AccountChanged**
**AccountChanged** = `"accountsChanged"`

Metamask events https://docs.metamask.io/guide/ethereum-provider.html#events

___

### Disconnected

**Disconnected**
**Disconnected** = `"disconnect"`

WalletConnect events https://docs.walletconnect.com/1.0/client-api#register-event-subscription

___

### NetworkChanged

**NetworkChanged**
**NetworkChanged** = `"networkChanged"`

___

### SessionUpdate

**SessionUpdate**
**SessionUpdate** = `"session_update"`

0 comments on commit 800c903

Please sign in to comment.