LVE SDK
    Preparing search index...

    Function exportMetadata

    • Reads the public header of a .lve file and returns its metadata — no passkey or PRF output required.

      Use this to inspect file identity, creation time, RP origin, and which credential IDs are authorized, before prompting the user for authentication.

      Safe to call on untrusted bytes — parsing errors are surfaced as typed LveInvalidFormatError instances rather than raw exceptions.

      Parameters

      • lveBytes: ArrayBuffer

        Raw .lve file bytes (ArrayBuffer).

      Returns LveMetadata

      Public metadata extracted from the file header.

      LveInvalidFormatError if the bytes are not a valid .lve file.

      LveUnsupportedVersionError if the format version is not supported.

      const meta = exportMetadata(lveBytes);
      console.log(`File ${meta.file_id}${meta.recipient_count} authorized credential(s)`);
      // Prompt the user for the matching passkey, then call openLveFile(...)