Skip to content

Commit

Permalink
fix: params
Browse files Browse the repository at this point in the history
  • Loading branch information
AdriGeorge committed Nov 20, 2024
1 parent f1ef7e9 commit 1250703
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/SignDDO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ export async function signCredential(
publicKeyHex: string
): Promise<SignedCredential> {
try {
const key = await importJWK(issuerKeyJWK, 'ES256K')
const key = await importJWK(issuerKeyJWK, issuerKeyJWK.alg)

const jws = await new SignJWT(verifiableCredential as unknown as JWTPayload)
.setProtectedHeader({ alg: 'ES256K' })
.setProtectedHeader({ alg: issuerKeyJWK.alg })
.setIssuedAt()
.setIssuer(publicKeyHex)
.sign(key)
const header = { alg: 'ES256K' }
const header = { alg: issuerKeyJWK.alg }

return { jws, header, issuer: publicKeyHex }
} catch (error) {
Expand Down

0 comments on commit 1250703

Please sign in to comment.