Function: causalRequestHeaders()
@kortexya/reasoninglayer / causalRequestHeaders
Function: causalRequestHeaders()
Section titled “Function: causalRequestHeaders()”causalRequestHeaders(
causal):Record<string,string>
Defined in: src/utils/audit-headers.ts:75
Build the request headers for a set of causal assertions.
Parameters
Section titled “Parameters”causal
Section titled “causal”The assertions to send.
Returns
Section titled “Returns”Record<string, string>
One header per field set; informedBy is comma-joined and omitted
when empty.
Remarks
Section titled “Remarks”The values go out verbatim. The engine validates them (a UUID, a 64-hex
commitment, a signer/signature pair) and answers 400 for a malformed one,
so the SDK does not duplicate that check.
Example
Section titled “Example”causalRequestHeaders({ causedBy: id, informedBy: [a, b] });// { 'x-osfkb-caused-by': id, 'x-osfkb-informed-by': `${a},${b}` }