function JWKToMultikeyBinary
JWKToMultikeyBinary(
_curve: CryptoCurves,
x: Uint8Array,
d: Uint8Array | undefined,
_y?: Uint8Array,
): MultikeyBinary

Convert the Crypto values from JWK to the equivalent Multikey Pairs' binary data. The final encoding, with preambles, are done in the general level.

For EDDSA, this is essentially, an empty function, which simply returns the x and d values. The interface is there to be reused by the ECDSA equivalent, which must do some extra processing.

Parameters

  • unused in this function, just a placeholder
x: Uint8Array
  • x value for the elliptical curve, as extracted from JWK
d: Uint8Array | undefined
  • d (private) value for the elliptical curve, as extracted from JWK
optional
_y: Uint8Array
  • unused in this function, just a placeholder

Return Type

Usage

import { JWKToMultikeyBinary } from "lib/eddsa.ts";