Creates a new SHCIssuer instance.
Configuration parameters for the issuer
// Using PEM format keys
const issuer = new SHCIssuer({
issuer: 'https://your-healthcare-org.com',
privateKey: privateKeyPKCS8String, // ES256 private key in PKCS#8 format
publicKey: publicKeySPKIString, // ES256 public key in SPKI format
});
// Using JsonWebKey format
const issuerJWK = new SHCIssuer({
issuer: 'https://your-healthcare-org.com',
privateKey: { kty: 'EC', crv: 'P-256', x: '...', y: '...', d: '...' },
publicKey: { kty: 'EC', crv: 'P-256', x: '...', y: '...' },
});
Issues a new SMART Health Card from a FHIR Bundle.
FHIR R4 Bundle containing medical data
Optional Verifiable Credential parameters. See VerifiableCredentialParams.
Promise resolving to SHC object
CredentialValidationError When FHIR bundle is invalid
JWSError When signing fails
Issues new SMART Health Cards from FHIR Bundles.
Security Warning: Issue/sign on a secure backend only; never expose the private key in browsers.