diff --git a/packages/legacy/core/App/modules/openid/resolver.tsx b/packages/legacy/core/App/modules/openid/resolver.tsx index 990f437386..1bc8547efc 100644 --- a/packages/legacy/core/App/modules/openid/resolver.tsx +++ b/packages/legacy/core/App/modules/openid/resolver.tsx @@ -4,6 +4,7 @@ import { DidKey, JwaSignatureAlgorithm, JwkDidCreateOptions, + KeyBackend, KeyDidCreateOptions, KeyType, SdJwtVcRecord, @@ -12,7 +13,11 @@ import { W3cCredentialRepository, getJwkFromKey, } from '@credo-ts/core' -import { OpenId4VciCredentialFormatProfile, OpenId4VciCredentialSupportedWithId, OpenId4VciSupportedCredentialFormats } from '@credo-ts/openid4vc' +import { + OpenId4VciCredentialFormatProfile, + OpenId4VciCredentialSupportedWithId, + OpenId4VciSupportedCredentialFormats, +} from '@credo-ts/openid4vc' import { extractOpenId4VcCredentialMetadata, setOpenId4VcCredentialMetadata } from './metadata' export type OpenID4VCIParam = { @@ -103,6 +108,7 @@ export const receiveCredentialFromOpenId4VciOffer = async ({ agent, data, uri }: if (supportsJwk && credentialFormat === OpenId4VciCredentialFormatProfile.SdJwtVc) { const key = await agent.wallet.createKey({ keyType, + keyBackend: KeyBackend.SecureElement, }) return { method: 'jwk', @@ -156,7 +162,6 @@ export const receiveCredentialFromOpenId4VciOffer = async ({ agent, data, uri }: return record } - export async function storeCredential(agent: Agent, credentialRecord: W3cCredentialRecord | SdJwtVcRecord) { if (credentialRecord instanceof W3cCredentialRecord) { await agent.dependencyManager.resolve(W3cCredentialRepository).save(agent.context, credentialRecord)