EdDSA (NODE-ED25519) verify() function in a worker

I try Ed25519 signature verification in a worker, according to Cf+Mozilla docs:

const key = await crypto.subtle.importKey(‘raw’,
publicKeyBytes,
‘NODE-ED25519’, false, [‘verify’])

await crypto.subtle.verify(‘NODE-ED25519’, key, sig, data)

I am getting:

Uncaught (in promise) TypeError: Missing field “namedCurve” in “algorithm” in importKey()

In the footnote of Cf docs it says Unlike NodeJS, Cloudflare will not support raw import of private keys However, I am importing public key. If that’s the culprit, nevertheless, what’s the right way to use verify() with NODE-ED25519?

I have now also tried pkcs8 format import with the same behavior. If I do

const key = await crypto.subtle.importKey(‘pkcs8’,
derData,
{ namedCurve: “NODE-ED25519”, },
false, [‘verify’])

I simply get

Uncaught (in promise) DOMException {}

solve it with

const key = await crypto.subtle.importKey(‘raw’,
publicKeyBytes,
{ name: “NODE-ED25519”, namedCurve: “NODE-ED25519”, },
false, [‘verify’])