@kaana.ai/contracts 4.4.0 → 4.4.1

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.
@@ -111,6 +111,21 @@ export declare const settlementAcknowledgementSchema: z.ZodObject<{
111
111
  settled: "settled";
112
112
  }>;
113
113
  }, z.core.$strict>;
114
+ /**
115
+ * The signature domain of Oxy's reconciliation read, under the Oxy edge key
116
+ * (`KAANA_EDGE_PUBLIC_KEYS`). New in package 4.4.1; Kaana has verified under it
117
+ * since contract set 4.2.0.
118
+ */
119
+ export declare const SETTLEMENT_READ_SIGNATURE_DOMAIN = "oxy-kaana-settlement-read:v1";
120
+ /** Where Oxy reads the outbox, on `https://kaana.ai`. */
121
+ export declare const SETTLEMENT_READ_PATH = "/internal/v1/settlements";
122
+ /**
123
+ * The query string of a reconciliation read, without its `?`: both what Oxy
124
+ * sends and the exact bytes it signs. Kaana verifies the raw query and nothing
125
+ * else — the path is fixed by the domain — so signing `path?query`, or encoding
126
+ * the cursor differently from what is sent, is refused as unsigned.
127
+ */
128
+ export declare function settlementReadQuery(cursor: string | null): string;
114
129
  /** `GET /internal/v1/settlements?cursor=`: what Oxy reconciles against. */
115
130
  export declare const settlementPageSchema: z.ZodObject<{
116
131
  data: z.ZodArray<z.ZodObject<{
@@ -61,6 +61,23 @@ export const settlementAcknowledgementSchema = z
61
61
  status: z.enum(['settled', 'duplicate']),
62
62
  })
63
63
  .strict();
64
+ /**
65
+ * The signature domain of Oxy's reconciliation read, under the Oxy edge key
66
+ * (`KAANA_EDGE_PUBLIC_KEYS`). New in package 4.4.1; Kaana has verified under it
67
+ * since contract set 4.2.0.
68
+ */
69
+ export const SETTLEMENT_READ_SIGNATURE_DOMAIN = 'oxy-kaana-settlement-read:v1';
70
+ /** Where Oxy reads the outbox, on `https://kaana.ai`. */
71
+ export const SETTLEMENT_READ_PATH = '/internal/v1/settlements';
72
+ /**
73
+ * The query string of a reconciliation read, without its `?`: both what Oxy
74
+ * sends and the exact bytes it signs. Kaana verifies the raw query and nothing
75
+ * else — the path is fixed by the domain — so signing `path?query`, or encoding
76
+ * the cursor differently from what is sent, is refused as unsigned.
77
+ */
78
+ export function settlementReadQuery(cursor) {
79
+ return cursor === null ? '' : `cursor=${encodeURIComponent(cursor)}`;
80
+ }
64
81
  /** `GET /internal/v1/settlements?cursor=`: what Oxy reconciles against. */
65
82
  export const settlementPageSchema = z
66
83
  .object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaana.ai/contracts",
3
- "version": "4.4.0",
3
+ "version": "4.4.1",
4
4
  "description": "Kaana inference contract: the Zod schemas of the public API at https://kaana.ai/v1 and, under /internal, of the Oxy-Kaana grant, settlement and signed lane.",
5
5
  "type": "module",
6
6
  "sideEffects": false,