function · Browser and Node
issueCredential
Creates and signs a VC-shaped credential with a fresh UUID and the issuer's DID.
@toip-tools/trust-coreView sourceimport { issueCredential } from "@toip-tools/trust-core";
Declaration
issueCredential(issuer: Identity, clock: Clock, body: CredentialBody): Credential;
Parameters
issuerrequiredIdentityIdentity that issues and signs the credential.
clockrequiredClockSupplies
validFromand the proof creation time.bodyrequiredCredentialBodyCredential types, subject claims, optional expiry, and optional status-list reference.
Returns
CredentialA credential with the W3C VC v2 context and a Data Integrity proof.