JSR

Signs the given JSON-LD document with the private key and returns the signed JSON-LD document.

Parameters

jsonLd: unknown

View code

The JSON-LD document to sign.

The private key to sign the document.

The key ID to use in the signature. It will be used by the verifier to fetch the corresponding public key.

Additional options for signing the document. See also SignJsonLdOptions.

Return Type

Promise<{ signature: Signature; }>

View code

The signed JSON-LD document.

Throws

TypeError

View code

If the private key is invalid or unsupported.

Read the original on jsr.io ↗