Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add didcomm, dids, issuance, revocation & anoncred services to client #13

Merged
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 48 additions & 4 deletions src/client.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
import {
AnoncredsCredentialTemplatesService,
DiDsService,
DidCommConnectionsService,
DidCommInvitationsService,
DidCommIssuanceService,
DidCommMessagingService,
DidCommVerificationService,
IssuanceService,
OpenAPI,
OpenId4VcIssuanceService,
OpenId4VcVerificationService,
PresentationTemplatesService,
ProjectProfileService,
ProjectsService,
RevocationService,
SdJwtVcCredentialTemplatesService,
WebhooksService,
} from '../generated'
Expand All @@ -14,14 +23,32 @@ export default class Paradym {
projectProfile: typeof ProjectProfileService
webhooks: typeof WebhooksService
templates: {
credentials: typeof SdJwtVcCredentialTemplatesService
presentations: typeof PresentationTemplatesService
sdJwtVc: {
credentials: typeof SdJwtVcCredentialTemplatesService
presentations: typeof PresentationTemplatesService
}
anoncreds: {
credentials: typeof AnoncredsCredentialTemplatesService
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sdJwtVc: {
credentials: typeof SdJwtVcCredentialTemplatesService
presentations: typeof PresentationTemplatesService
}
anoncreds: {
credentials: typeof AnoncredsCredentialTemplatesService
}
presentations: typeof PresentationTemplatesService,
credentials: {
sdJwtVc: typeof SdJwtVcCredentialTemplatesService,
anoncreds: typeof AnoncredsCredentialTemplatesService
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still not correct. See my suggestion from previous review

}

openId4Vc: {
issuance: typeof OpenId4VcIssuanceService
verification: typeof OpenId4VcVerificationService
}

didComm: {
issuance: typeof DidCommIssuanceService
verification: typeof DidCommVerificationService
messaging: typeof DidCommMessagingService
connections: typeof DidCommConnectionsService
invitations: typeof DidCommInvitationsService
}

revocation: typeof RevocationService
issuance: typeof IssuanceService
dids: typeof DiDsService

constructor({ apiKey, baseUrl = 'https://api.paradym.id' }: { apiKey: string; baseUrl?: string }) {
OpenAPI.HEADERS = {
'x-access-token': apiKey,
Expand All @@ -34,13 +61,30 @@ export default class Paradym {
this.webhooks = WebhooksService

this.templates = {
credentials: SdJwtVcCredentialTemplatesService,
presentations: PresentationTemplatesService,
sdJwtVc: {
credentials: SdJwtVcCredentialTemplatesService,
presentations: PresentationTemplatesService,
},
anoncreds: {
credentials: AnoncredsCredentialTemplatesService,
},
}
this.openId4Vc = {
issuance: OpenId4VcIssuanceService,
verification: OpenId4VcVerificationService,
}

this.didComm = {
issuance: DidCommIssuanceService,
verification: DidCommVerificationService,
messaging: DidCommMessagingService,
connections: DidCommConnectionsService,
invitations: DidCommInvitationsService,
}

this.revocation = RevocationService
this.issuance = IssuanceService
this.dids = DiDsService
}
}

Expand Down