writeRecord
functionAudit & helpersAppend an immutable record to the Curb audit topic on HCS.
signature
writeRecord(client, cfg, partial): Promise<CurbRecord>Used internally by the policies/hooks. Errors are caught and logged so a transient HCS hiccup never breaks enforcement.
Parameters
NameTypeDescription
clientreqClientHedera client (the one running the agent).cfgreqCurbConfigProvides the audit topic id + agent id.partialreqOmit<CurbRecord,'v'|'agent'|'ts'>The record fields (type, amount, reason, …).Returns
Promise<CurbRecord>The assembled record — returned even if the HCS write failed (the error is logged, not thrown).