Skip to content

Commit

Permalink
refactor(credentials): remove formats for version (openwallet-foundat…
Browse files Browse the repository at this point in the history
…ion#903)

Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra authored Jun 24, 2022
1 parent 39c4c0d commit bd89741
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ export type FindCredentialMessageReturn<CSs extends CredentialService[]> = Retur
/**
* Get the supported protocol versions based on the provided credential services.
*/
export type ProtocolVersionType<
CFs extends CredentialFormat[],
CSs extends CredentialService<CFs>[]
> = CSs[number]['version']
export type ProtocolVersionType<CSs extends CredentialService[]> = CSs[number]['version']

/**
* Get the service map for usage in the credentials module. Will return a type mapping of protocol version to service.
Expand Down Expand Up @@ -51,7 +48,7 @@ export interface ProposeCredentialOptions<
CSs extends CredentialService[] = CredentialService[]
> extends BaseOptions {
connectionId: string
protocolVersion: ProtocolVersionType<CFs, CSs>
protocolVersion: ProtocolVersionType<CSs>
credentialFormats: CredentialFormatPayload<CFs, 'createProposal'>
}

Expand Down Expand Up @@ -80,7 +77,7 @@ export interface CreateOfferOptions<
CFs extends CredentialFormat[] = CredentialFormat[],
CSs extends CredentialService[] = CredentialService[]
> extends BaseOptions {
protocolVersion: ProtocolVersionType<CFs, CSs>
protocolVersion: ProtocolVersionType<CSs>
credentialFormats: CredentialFormatPayload<CFs, 'createOffer'>
}

Expand Down

0 comments on commit bd89741

Please sign in to comment.