@kortexya/reasoninglayer 16.1.0 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/index.cjs +1463 -83
- package/dist/index.d.cts +19913 -16780
- package/dist/index.d.ts +19913 -16780
- package/dist/index.js +1463 -84
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -241,6 +241,21 @@ const sort = await client.sorts.createSort({ name: 'person' });
|
|
|
241
241
|
On a **failure**, the thrown `ApiError` carries `status` and `headers`
|
|
242
242
|
directly — see Error Handling below.
|
|
243
243
|
|
|
244
|
+
### Causal audit headers
|
|
245
|
+
|
|
246
|
+
Pass `{ causal: { causedBy: recordId, scope } }` as the request options on an
|
|
247
|
+
audited write. The SDK sends `x-reasoninglayer-caused-by` and
|
|
248
|
+
`x-reasoninglayer-scope`. In a response interceptor, call
|
|
249
|
+
`readAuditHeaders(response.headers)` to read `auditRecord`, `sealCommitment`
|
|
250
|
+
and `auditError`. A successful append names the new record in
|
|
251
|
+
`x-reasoninglayer-audit-record`.
|
|
252
|
+
|
|
253
|
+
To attest a scope seal, sign the UTF-8 bytes returned by
|
|
254
|
+
`sealPreimage(tenantId, scopeId, commitment)` with Ed25519. Use lowercase,
|
|
255
|
+
hyphenated UUIDs and the ledger's lowercase hex commitment. Send the raw public
|
|
256
|
+
key and signature in standard base64 as `causal.sealSigner` and
|
|
257
|
+
`causal.sealSignature`, together with `causal.sealsScope`.
|
|
258
|
+
|
|
244
259
|
## Error Handling
|
|
245
260
|
|
|
246
261
|
```typescript
|