class PrivateEd25519

Private Ed25519 key.

Methods

free(): void
issueVC(
verification_method: string,
vc: object,
context_loader: ContextLoader,
): Promise<object>

Create a new verifiable credential.

presentVP(
verification_method: string,
vp: object,
context_loader: ContextLoader,
domain?: string,
challenge?: string,
): Promise<object>

Create a new verifiable presentation.

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

Sign the provided payload using the Ed25519 key.

toBytes(): Uint8Array

Get Ed25519 private key bytes.

toDIDKey(): string

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.

toPublicKey(
id: string,
controller: string,
): PublicEd25519

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.

Create a new random keypair.