Private Secp256r1 key.
decryptAES(): Uint8Array
Decrypt the provided JWE object using the X25519 key and the A256GCM algorithm.
decryptChaCha20(): Uint8Array
Decrypt the provided JWE object using the X25519 key and the XC20P algorithm.
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 Secp256r1 key.
toBytes(): Uint8Array
Get Secp256r1 private key bytes.
toDIDKeyURLFragment(): string
Get the did:key DID URL fragment value of the Secp256r1 key.
toPrivateJWK(): JWK
Get the JWK value (with the private key) of the Secp256r1 key.
toPublicJWK(): JWK
Get the JWK value (without the private key) of the Secp256r1 key.
Derive a Secp256r1 public key from the private key.
fromBytes(value: Uint8Array): PrivateSecp256r1
Convert private key bytes into a public/private Secp256r1 keypair.
fromPKCS8PEM(value: string): PrivateSecp256r1
Convert private key PKCS#8 PEM value into a public/private Secp256r1 keypair.
Create a new random keypair.