Kill the Clipboard - SMART Health Cards Library - v0.0.1
    Preparing search index...

    Class SmartHealthCardReader

    Reads and verifies SMART Health Cards from various sources.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Read and verify a SMART Health Card from file content.

      Parameters

      • fileContent: string | Blob

        File content as string or Blob from .smart-health-card files

      Returns Promise<SmartHealthCard>

      Promise resolving to verified SmartHealthCard object

      FileFormatError If the file is not valid JSON or missing the verifiableCredential array

      JWSError If the embedded JWS is malformed or signature verification fails (propagated from fromJWS)

      FhirValidationError If the decoded VC payload or embedded FHIR Bundle is invalid (propagated from fromJWS)

      VerificationError For unexpected errors during verification (propagated from fromJWS)

    • Read and verify a SMART Health Card JWS.

      Parameters

      • jws: string

        JWS string to verify

      Returns Promise<SmartHealthCard>

      Promise resolving to verified SmartHealthCard object

      JWSError If the JWS is malformed, signature verification fails, or the public key cannot be imported

      FhirValidationError If the decoded VC payload or embedded FHIR Bundle is invalid

      VerificationError For unexpected errors during verification