Skip to content

Commit

Permalink
chore: grants type
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra committed Nov 9, 2024
1 parent b0bc4a6 commit 53ded04
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/oid4vci/src/credential-offer/credential-offer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ export async function resolveCredentialOffer(
return credentialOfferParseResult.output
}

export interface CreateCredentialOfferGrantsOptions {
[preAuthorizedCodeGrantIdentifier]?: Partial<CredentialOfferPreAuthorizedCodeGrant>
[authorizationCodeGrantIdentifier]?: CredenialOfferAuthorizationCodeGrant

[key: string]: unknown
}

export interface CreateCredentialOfferOptions {
issuerMetadata: IssuerMetadataResult

Expand All @@ -102,12 +109,7 @@ export interface CreateCredentialOfferOptions {
/**
* Grants to include in the credential offer
*/
grants: {
[preAuthorizedCodeGrantIdentifier]?: Partial<CredentialOfferPreAuthorizedCodeGrant>
[authorizationCodeGrantIdentifier]?: CredenialOfferAuthorizationCodeGrant

[key: string]: unknown
}
grants: CreateCredentialOfferGrantsOptions

/**
* Additional payload to include in the body of the credential offer. Will be applied
Expand Down

0 comments on commit 53ded04

Please sign in to comment.