mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
fix: params
This commit is contained in:
parent
f1ef7e9304
commit
1250703952
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user