Skip to content

Error: Cannot get schema for 'PrivateKeyInfo' target #50

@victorpayclip

Description

@victorpayclip

I am generating keys with ecdh

const { Crypto } = require("@peculiar/webcrypto");
const crypto = new Crypto();

const { publicKey, privateKey } = await crypto.subtle.generateKey(
  {
    name: "ECDH",
    namedCurve: "P-256", // P-256, P-384, or P-521
  },
  true,
  ["deriveKey", "deriveBits"],
);

but when exporting them it throws me this error

Error: Cannot get schema for 'PrivateKeyInfo' target

Can someone guide me how to solve this problem?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions