Skip to content

Commit

Permalink
build: Bump did-provider-cheqd
Browse files Browse the repository at this point in the history
  • Loading branch information
DaevMithran committed Jul 11, 2023
1 parent 9186061 commit 9b71adc
Show file tree
Hide file tree
Showing 7 changed files with 220 additions and 218 deletions.
407 changes: 210 additions & 197 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"README.md"
],
"dependencies": {
"@cheqd/did-provider-cheqd": "^3.4.1",
"@cheqd/did-provider-cheqd": "^3.5.0",
"@cosmjs/amino": "^0.31.0",
"@cosmjs/encoding": "^0.30.1",
"@logto/express": "^2.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/services/identity/IIdentity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import type {
} from '@veramo/core'
import type { AbstractPrivateKeyStore } from '@veramo/key-manager'
import type { ResourcePayload } from '@cheqd/did-provider-cheqd'
import type { BulkRevocationResult, BulkSuspensionResult, BulkUnsuspensionResult, CreateEncryptedStatusList2021Result, CreateStatusList2021Result, RevocationResult, StatusCheckResult, SuspensionResult, UnsuspensionResult } from '@cheqd/did-provider-cheqd/build/types/agent/ICheqd'
import type { BulkRevocationResult, BulkSuspensionResult, BulkUnsuspensionResult, CreateStatusList2021Result, RevocationResult, StatusCheckResult, SuspensionResult, UnsuspensionResult } from '@cheqd/did-provider-cheqd/build/types/agent/ICheqd'
import type { BroadCastStatusListOptions, CheckStatusListOptions, CreateStatusListOptions, CredentialRequest, StatusOptions, UpdateStatusListOptions, VeramoAgent, VerifyCredentialStatusOptions, VerifyPresentationStatusOptions } from '../../types/types'

export interface IIdentity {
Expand All @@ -32,7 +32,7 @@ export interface IIdentity {
createCredential(credential: CredentialPayload, format: CredentialRequest['format'], statusOptions: StatusOptions | null, agentId?: string): Promise<VerifiableCredential>
verifyCredential(credential: VerifiableCredential | string, statusOptions: VerifyCredentialStatusOptions | null, agentId?: string): Promise<IVerifyResult>
verifyPresentation(presentation: VerifiablePresentation | string, statusOptions: VerifyPresentationStatusOptions, agentId?: string): Promise<IVerifyResult>
createStatusList2021(did: string, resourceOptions: ResourcePayload, statusOptions: CreateStatusListOptions, agentId: string): Promise<CreateStatusList2021Result | CreateEncryptedStatusList2021Result>
createStatusList2021(did: string, resourceOptions: ResourcePayload, statusOptions: CreateStatusListOptions, agentId: string): Promise<CreateStatusList2021Result>
updateStatusList2021(did: string, statusOptions: UpdateStatusListOptions, publish?: boolean, agentId?: string): Promise<BulkRevocationResult | BulkSuspensionResult | BulkUnsuspensionResult>
broadcastStatusList2021(did: string, resourceOptions: ResourcePayload, statusOptions: BroadCastStatusListOptions, agentId?: string): Promise<boolean>
checkStatusList2021(did: string, statusOptions: CheckStatusListOptions, agentId?: string): Promise<StatusCheckResult>
Expand Down
5 changes: 1 addition & 4 deletions src/services/identity/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,7 @@ export class Veramo {
issuerDid: did,
...statusOptions,
},
decryptionOptions: {
accessControlConditions: []
},
bootstrapOptions: {}
fetchList: true
} satisfies ICheqdCheckCredentialStatusWithStatusList2021Args)
}
}
4 changes: 2 additions & 2 deletions src/services/identity/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
import { AbstractPrivateKeyStore, MemoryPrivateKeyStore } from '@veramo/key-manager'
import { KeyManagementSystem } from '@veramo/kms-local'
import { CheqdDIDProvider, ResourcePayload } from '@cheqd/did-provider-cheqd'
import { BulkRevocationResult, BulkSuspensionResult, BulkUnsuspensionResult, CreateEncryptedStatusList2021Result, CreateStatusList2021Result, ICheqdBroadcastEncryptedStatusList2021Args, StatusCheckResult } from '@cheqd/did-provider-cheqd/build/types/agent/ICheqd'
import { BulkRevocationResult, BulkSuspensionResult, BulkUnsuspensionResult, CreateStatusList2021Result, StatusCheckResult } from '@cheqd/did-provider-cheqd/build/types/agent/ICheqd'
import { CheqdNetwork } from '@cheqd/sdk'

import { BroadCastStatusListOptions, CheckStatusListOptions, CreateStatusListOptions, CredentialRequest, DefaultRPCUrl, StatusOptions, UpdateStatusListOptions, VeramoAgent, VerifyCredentialStatusOptions, VerifyPresentationStatusOptions } from '../../types/types.js'
Expand Down Expand Up @@ -154,7 +154,7 @@ export class LocalIdentity implements IIdentity {
return await Veramo.instance.verifyPresentation(this.initAgent(), presentation, statusOptions)
}

async createStatusList2021(did: string, resourceOptions: ResourcePayload, statusListOptions: CreateStatusListOptions): Promise<CreateStatusList2021Result | CreateEncryptedStatusList2021Result> {
async createStatusList2021(did: string, resourceOptions: ResourcePayload, statusListOptions: CreateStatusListOptions): Promise<CreateStatusList2021Result> {
return await Veramo.instance.createStatusList2021(this.initAgent(), did, resourceOptions, statusListOptions)
}

Expand Down
4 changes: 2 additions & 2 deletions src/services/identity/postgres.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { CustomerService } from '../customer.js'
import { Veramo } from './agent.js'

import * as dotenv from 'dotenv'
import { BulkRevocationResult, BulkSuspensionResult, BulkUnsuspensionResult, CreateEncryptedStatusList2021Result, CreateStatusList2021Result, StatusCheckResult } from '@cheqd/did-provider-cheqd/build/types/agent/ICheqd.js'
import { BulkRevocationResult, BulkSuspensionResult, BulkUnsuspensionResult, CreateStatusList2021Result, StatusCheckResult } from '@cheqd/did-provider-cheqd/build/types/agent/ICheqd.js'
dotenv.config()

const {
Expand Down Expand Up @@ -224,7 +224,7 @@ export class PostgresIdentity implements IIdentity {
return await Veramo.instance.verifyPresentation(agent, presentation, statusOptions)
}

async createStatusList2021(did: string, resourceOptions: ResourcePayload, statusOptions: CreateStatusListOptions, agentId: string): Promise<CreateStatusList2021Result | CreateEncryptedStatusList2021Result> {
async createStatusList2021(did: string, resourceOptions: ResourcePayload, statusOptions: CreateStatusListOptions, agentId: string): Promise<CreateStatusList2021Result> {
const agent = await this.createAgent(agentId)
return await Veramo.instance.createStatusList2021(agent, did, resourceOptions, statusOptions)
}
Expand Down
12 changes: 2 additions & 10 deletions src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
W3CVerifiableCredential,
TAgent
} from '@veramo/core'
import { AccessControlConditionBalanceArgs, AccessControlConditionMemoNonceArgs, ICheqd, ICheqdCheckCredentialWithStatusList2021StatusOptions, ICheqdStatusList2021Options } from '@cheqd/did-provider-cheqd/build/types/agent/ICheqd'
import { ICheqd, ICheqdCheckCredentialWithStatusList2021StatusOptions, ICheqdStatusList2021Options } from '@cheqd/did-provider-cheqd/build/types/agent/ICheqd'
import { ICredentialIssuerLD } from '@veramo/credential-ld'
import { AbstractIdentifierProvider } from '@veramo/did-manager'
import { AbstractKeyManagementSystem } from '@veramo/key-manager'
Expand Down Expand Up @@ -142,17 +142,9 @@ export type VerifyCredentialStatusOptions = {
fetchList?: boolean
encryptedSymmetricKey?: string
options?: ICheqdStatusList2021Options
decryptionOptions: {
unifiedAccessControlConditions: CosmosAccessControlCondition[]
}
bootstrapOptions: {}
}

export type VerifyPresentationStatusOptions = Omit<VerifyCredentialStatusOptions, 'decryptionOptions'> & {
decryptionOptions: {
accessControlConditions: (AccessControlConditionMemoNonceArgs | AccessControlConditionBalanceArgs)[]
}
}
export type VerifyPresentationStatusOptions = Omit<VerifyCredentialStatusOptions, 'decryptionOptions'>

export interface ResourceMetadata {
collectionId: string
Expand Down

0 comments on commit 9b71adc

Please sign in to comment.