class PrivateEd25519

Private Ed25519 key.

Constructors

new
PrivateEd25519()

Methods

free(): void
issueVC(
verification_method: DIDURL,
vc: object,
context_loader: ContextLoader,
options?: W3CIssueOptions | null,
): Promise<object>

Create a new verifiable credential.

presentVP(
verification_method: DIDURL,
vp: object,
context_loader: ContextLoader,
domain?: string | null,
challenge?: string | null,
options?: W3CPresentOptions | null,
): Promise<object>

Create a new verifiable presentation.

signJWS(
payload: string,
options?: JWSOptions | null,
): string

Sign the provided payload using the Ed25519 key.

toBytes(): Uint8Array

Get Ed25519 private key bytes.

Get the did:key document DID value of the Ed25519 key.

Get the did:key DID URL fragment value of the Ed25519 key.

Get the JWK value (with the private key) of the Ed25519 key.

Get the JWK value (without the private key) of the Ed25519 key.

Derive an Ed25519 public key from the private key.

Convert Ed25519 private key to X25519 private key.

Static Methods

fromBytes(value: Uint8Array): PrivateEd25519

Convert private key bytes into a public/private Ed25519 keypair.

Convert private key PKCS#8 PEM value into a public/private Ed25519 keypair.

Create a new random keypair.