function · Browser and Node
signDocument
Signs a JSON object with an eddsa-jcs-2022 Data Integrity proof.
@toip-tools/trust-coreView sourceimport { signDocument } from "@toip-tools/trust-core";
Declaration
signDocument<T extends {
issuer: string;
}>(doc: T, issuer: Identity, clock: Clock): T;
Parameters
docrequiredTDocument whose
issuermust be the signing identity's DID.issuerrequiredIdentityIdentity that signs the document.
clockrequiredClockSupplies the proof's creation time.
Returns
TThe signed document, including its proof.