Skip to content

@stellar-passkey/core API


@stellar-passkey/core API / derToCompact

Function: derToCompact()

derToCompact(der): Uint8Array

Defined in: packages/core/src/sig/derToCompact.ts:35

Unwrap an ASN.1 DER-encoded P-256 ECDSA signature to the 64-byte raw r ‖ s form.

Throws KitError with code === "INVALID_SIGNATURE_DER" on:

  • input longer than 72 bytes
  • input shorter than the minimum sensible DER (30 06 02 01 _ 02 01 _ = 8 bytes)
  • missing SEQUENCE tag (0x30)
  • declared SEQUENCE length disagreeing with the buffer length (trailing junk)
  • any underlying noble parse error

Parameters

der

Uint8Array

Returns

Uint8Array

MIT — SCF-43 RFP submission (2026). Status: pre-1.0.