@avow-finance/spec 0.0.0-stage → 0.2.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.
Files changed (179) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +119 -2
  3. package/dist/agent-connect.d.ts +90 -0
  4. package/dist/agent-connect.d.ts.map +1 -0
  5. package/dist/agent-connect.js +102 -0
  6. package/dist/agent-connect.js.map +1 -0
  7. package/dist/agent-session.d.ts +791 -0
  8. package/dist/agent-session.d.ts.map +1 -0
  9. package/dist/agent-session.js +176 -0
  10. package/dist/agent-session.js.map +1 -0
  11. package/dist/ap2.d.ts +79 -0
  12. package/dist/ap2.d.ts.map +1 -0
  13. package/dist/ap2.js +151 -0
  14. package/dist/ap2.js.map +1 -0
  15. package/dist/api-request.d.ts +144 -0
  16. package/dist/api-request.d.ts.map +1 -0
  17. package/dist/api-request.js +246 -0
  18. package/dist/api-request.js.map +1 -0
  19. package/dist/api.d.ts +288 -0
  20. package/dist/api.d.ts.map +1 -0
  21. package/dist/api.js +332 -0
  22. package/dist/api.js.map +1 -0
  23. package/dist/canonical.d.ts +22 -0
  24. package/dist/canonical.d.ts.map +1 -0
  25. package/dist/canonical.js +66 -0
  26. package/dist/canonical.js.map +1 -0
  27. package/dist/commitment-card.d.ts +78 -0
  28. package/dist/commitment-card.d.ts.map +1 -0
  29. package/dist/commitment-card.js +224 -0
  30. package/dist/commitment-card.js.map +1 -0
  31. package/dist/commitment.d.ts +185 -0
  32. package/dist/commitment.d.ts.map +1 -0
  33. package/dist/commitment.js +148 -0
  34. package/dist/commitment.js.map +1 -0
  35. package/dist/compute-offers.d.ts +128 -0
  36. package/dist/compute-offers.d.ts.map +1 -0
  37. package/dist/compute-offers.js +111 -0
  38. package/dist/compute-offers.js.map +1 -0
  39. package/dist/contest.d.ts +88 -0
  40. package/dist/contest.d.ts.map +1 -0
  41. package/dist/contest.js +131 -0
  42. package/dist/contest.js.map +1 -0
  43. package/dist/demo.d.ts +69 -0
  44. package/dist/demo.d.ts.map +1 -0
  45. package/dist/demo.js +152 -0
  46. package/dist/demo.js.map +1 -0
  47. package/dist/dependencies.d.ts +308 -0
  48. package/dist/dependencies.d.ts.map +1 -0
  49. package/dist/dependencies.js +133 -0
  50. package/dist/dependencies.js.map +1 -0
  51. package/dist/eip712.d.ts +1569 -0
  52. package/dist/eip712.d.ts.map +1 -0
  53. package/dist/eip712.js +550 -0
  54. package/dist/eip712.js.map +1 -0
  55. package/dist/elided-terms.d.ts +37 -0
  56. package/dist/elided-terms.d.ts.map +1 -0
  57. package/dist/elided-terms.js +48 -0
  58. package/dist/elided-terms.js.map +1 -0
  59. package/dist/erc8183.d.ts +78 -0
  60. package/dist/erc8183.d.ts.map +1 -0
  61. package/dist/erc8183.js +88 -0
  62. package/dist/erc8183.js.map +1 -0
  63. package/dist/facts.d.ts +70 -0
  64. package/dist/facts.d.ts.map +1 -0
  65. package/dist/facts.js +33 -0
  66. package/dist/facts.js.map +1 -0
  67. package/dist/gpu-reservation.d.ts +79 -0
  68. package/dist/gpu-reservation.d.ts.map +1 -0
  69. package/dist/gpu-reservation.js +135 -0
  70. package/dist/gpu-reservation.js.map +1 -0
  71. package/dist/index.d.ts +49 -0
  72. package/dist/index.d.ts.map +1 -0
  73. package/dist/index.js +49 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/job-session.d.ts +981 -0
  76. package/dist/job-session.d.ts.map +1 -0
  77. package/dist/job-session.js +170 -0
  78. package/dist/job-session.js.map +1 -0
  79. package/dist/job-verification.d.ts +244 -0
  80. package/dist/job-verification.d.ts.map +1 -0
  81. package/dist/job-verification.js +89 -0
  82. package/dist/job-verification.js.map +1 -0
  83. package/dist/job-wording.d.ts +48 -0
  84. package/dist/job-wording.d.ts.map +1 -0
  85. package/dist/job-wording.js +134 -0
  86. package/dist/job-wording.js.map +1 -0
  87. package/dist/job.d.ts +117 -0
  88. package/dist/job.d.ts.map +1 -0
  89. package/dist/job.js +166 -0
  90. package/dist/job.js.map +1 -0
  91. package/dist/json-fields.d.ts +13 -0
  92. package/dist/json-fields.d.ts.map +1 -0
  93. package/dist/json-fields.js +30 -0
  94. package/dist/json-fields.js.map +1 -0
  95. package/dist/keychain.d.ts +51 -0
  96. package/dist/keychain.d.ts.map +1 -0
  97. package/dist/keychain.js +133 -0
  98. package/dist/keychain.js.map +1 -0
  99. package/dist/mailbox.d.ts +1650 -0
  100. package/dist/mailbox.d.ts.map +1 -0
  101. package/dist/mailbox.js +87 -0
  102. package/dist/mailbox.js.map +1 -0
  103. package/dist/mandate.d.ts +53 -0
  104. package/dist/mandate.d.ts.map +1 -0
  105. package/dist/mandate.js +97 -0
  106. package/dist/mandate.js.map +1 -0
  107. package/dist/networks.d.ts +18 -0
  108. package/dist/networks.d.ts.map +1 -0
  109. package/dist/networks.js +24 -0
  110. package/dist/networks.js.map +1 -0
  111. package/dist/profiles.d.ts +31 -0
  112. package/dist/profiles.d.ts.map +1 -0
  113. package/dist/profiles.js +33 -0
  114. package/dist/profiles.js.map +1 -0
  115. package/dist/rail.d.ts +48 -0
  116. package/dist/rail.d.ts.map +1 -0
  117. package/dist/rail.js +28 -0
  118. package/dist/rail.js.map +1 -0
  119. package/dist/reasons.d.ts +173 -0
  120. package/dist/reasons.d.ts.map +1 -0
  121. package/dist/reasons.js +174 -0
  122. package/dist/reasons.js.map +1 -0
  123. package/dist/reference-link.d.ts +23 -0
  124. package/dist/reference-link.d.ts.map +1 -0
  125. package/dist/reference-link.js +56 -0
  126. package/dist/reference-link.js.map +1 -0
  127. package/dist/references.d.ts +125 -0
  128. package/dist/references.d.ts.map +1 -0
  129. package/dist/references.js +108 -0
  130. package/dist/references.js.map +1 -0
  131. package/dist/replay.d.ts +30 -0
  132. package/dist/replay.d.ts.map +1 -0
  133. package/dist/replay.js +27 -0
  134. package/dist/replay.js.map +1 -0
  135. package/dist/sandbox-registration.d.ts +200 -0
  136. package/dist/sandbox-registration.d.ts.map +1 -0
  137. package/dist/sandbox-registration.js +172 -0
  138. package/dist/sandbox-registration.js.map +1 -0
  139. package/dist/sandbox.d.ts +3478 -0
  140. package/dist/sandbox.d.ts.map +1 -0
  141. package/dist/sandbox.js +316 -0
  142. package/dist/sandbox.js.map +1 -0
  143. package/dist/session-fields.d.ts +203 -0
  144. package/dist/session-fields.d.ts.map +1 -0
  145. package/dist/session-fields.js +43 -0
  146. package/dist/session-fields.js.map +1 -0
  147. package/dist/supplier-adapter.d.ts +65 -0
  148. package/dist/supplier-adapter.d.ts.map +1 -0
  149. package/dist/supplier-adapter.js +91 -0
  150. package/dist/supplier-adapter.js.map +1 -0
  151. package/dist/terms-v1.d.ts +74 -0
  152. package/dist/terms-v1.d.ts.map +1 -0
  153. package/dist/terms-v1.js +156 -0
  154. package/dist/terms-v1.js.map +1 -0
  155. package/dist/terms.d.ts +341 -0
  156. package/dist/terms.d.ts.map +1 -0
  157. package/dist/terms.js +715 -0
  158. package/dist/terms.js.map +1 -0
  159. package/dist/test-customer.d.ts +1525 -0
  160. package/dist/test-customer.d.ts.map +1 -0
  161. package/dist/test-customer.js +260 -0
  162. package/dist/test-customer.js.map +1 -0
  163. package/dist/types.d.ts +272 -0
  164. package/dist/types.d.ts.map +1 -0
  165. package/dist/types.js +32 -0
  166. package/dist/types.js.map +1 -0
  167. package/dist/version.d.ts +51 -0
  168. package/dist/version.d.ts.map +1 -0
  169. package/dist/version.js +66 -0
  170. package/dist/version.js.map +1 -0
  171. package/dist/wire.d.ts +2698 -0
  172. package/dist/wire.d.ts.map +1 -0
  173. package/dist/wire.js +678 -0
  174. package/dist/wire.js.map +1 -0
  175. package/package.json +37 -3
  176. package/vectors/api-request-v1.json +53 -0
  177. package/vectors/contest-statement-v1.json +42 -0
  178. package/vectors/terms-v2.json +398 -0
  179. package/vectors/terms-v3.json +2103 -0
@@ -0,0 +1,1525 @@
1
+ import type { Address, Hex } from 'viem';
2
+ import { z } from 'zod';
3
+ import { type CheckedDependency, type PinnedBlock } from './dependencies.js';
4
+ import type { TermsAgreement } from './eip712.js';
5
+ import { type FactBody } from './facts.js';
6
+ import { GPU_RESERVATION } from './gpu-reservation.js';
7
+ import type { ChainedJobTerms, JobTerms } from './job.js';
8
+ import type { ReasonCode } from './reasons.js';
9
+ import { type CommitmentReference, type PaymentReference } from './references.js';
10
+ import type { SupplierProfile } from './types.js';
11
+ import { type Parsed } from './wire.js';
12
+ /**
13
+ * Avow's test customer, a sandbox business on testnet that offers a developer's business paid
14
+ * jobs. Avow's service holds its keys, on testnet only, and it's labelled as Avow's test customer
15
+ * in everything it returns. Its own agent key funds its reserves from its own account, so its lock
16
+ * still pulls only from the account calling it.
17
+ *
18
+ * Orders arrive by pull, so the developer's machine needs no inbound connection. Its job process
19
+ * asks for an order, quotes it, then polls the order until the customer has verified the quote and
20
+ * reserved, and reports delivery.
21
+ *
22
+ * Every POST is a signed API request, as `api-request` defines one, signed by the developer's
23
+ * supplier signing key, with the customer's origin as the audience and the customer's lock as the
24
+ * domain's lock. An order belongs to the supplier it was offered to, which the customer records
25
+ * with the offer. A request for a new order has to be signed by the signing key Avow registered
26
+ * for the supplier it names. A quote or a delivery report has to be signed by the signing key of
27
+ * the supplier the order was offered to, and `orderSignerProblem` refuses any other signer. An
28
+ * order's id is no secret, since every job event names it and anyone with the screen's link can
29
+ * read those, so the id alone lets nobody act on an order. A refusal has the API's error shape and
30
+ * a reason code. The GETs are unsigned. The origin is the sandbox deployment's `customerUrl`.
31
+ */
32
+ /** How the test customer labels itself, in its profile, its offers and every order it returns. */
33
+ export declare const TEST_CUSTOMER_LABEL = "Avow's test customer";
34
+ /** Whether text is an order id, the only form an order's path carries. */
35
+ export declare const isOrderId: (text: string) => boolean;
36
+ /** The test customer's routes, each a path on its origin. */
37
+ export declare const TEST_CUSTOMER_PATHS: {
38
+ /** GET, unsigned. The customer's profile. */
39
+ readonly profile: '/v1/profile';
40
+ /** POST, signed. Asks for a new order and answers with the offer. */
41
+ readonly orders: '/v1/orders';
42
+ /** GET, unsigned and polled. Where the order stands. */
43
+ readonly order: (orderId: string) => string;
44
+ /** POST, signed. Sends the quote, answered with 202 while the customer verifies it. */
45
+ readonly quote: (orderId: string) => string;
46
+ /** POST, signed, with a `DeliveryReport` as the body. Reports delivery, answered with 202. */
47
+ readonly delivery: (orderId: string) => string;
48
+ };
49
+ /** The customer, as each offer, order and session event names it. */
50
+ export interface JobCustomer {
51
+ label: typeof TEST_CUSTOMER_LABEL;
52
+ businessId: string;
53
+ }
54
+ /** The most the test customer commits to, so nobody can drain the sandbox through it. */
55
+ export interface TestCustomerLimits {
56
+ /** The most it reserves for one job, in micros. */
57
+ reserve: bigint;
58
+ /** The most it pays for one job, in micros. */
59
+ price: bigint;
60
+ /** The most orders one supplier can have open at once. */
61
+ openOrders: number;
62
+ }
63
+ /** What GET `/v1/profile` answers. */
64
+ export interface TestCustomerProfile extends JobCustomer {
65
+ account: Address;
66
+ lock: Address;
67
+ chainId: number;
68
+ /** The hash of the mandate its agent key holds, which every terms agreement names. */
69
+ mandateHash: Hex;
70
+ limits: TestCustomerLimits;
71
+ }
72
+ /** The body of POST `/v1/orders`: the developer's business as Avow registered it as a supplier. */
73
+ export interface OrderRequest {
74
+ supplier: SupplierProfile;
75
+ /** How the order should go, when the developer asks for one. Left out, the job runs to payment. */
76
+ scenario?: OrderScenario | undefined;
77
+ }
78
+ /**
79
+ * The booking a quote has to rely on. The customer accepts a quote only when its terms name an
80
+ * accepted GPU reservation in the supplier's own lock that holds the job's compute for its whole
81
+ * run, past its free cancellation, with its subject shown.
82
+ */
83
+ export interface JobRequirement {
84
+ template: typeof GPU_RESERVATION;
85
+ condition: 'accepted';
86
+ disclosed: 'subject';
87
+ }
88
+ /** What POST `/v1/orders` answers: an offer of a job, open until its expiry. */
89
+ export interface JobOffer {
90
+ orderId: string;
91
+ /** The commitment id the job's terms agreement has to name. */
92
+ commitmentId: Hex;
93
+ customer: JobCustomer;
94
+ /** The supplier the order was offered to, the only one that can quote it or report delivery. */
95
+ supplierBusinessId: string;
96
+ /** The job as the customer proposes it, before its terms name any compute. */
97
+ terms: JobTerms;
98
+ requirement: JobRequirement;
99
+ /** When the offer lapses, in unix seconds. */
100
+ expiry: bigint;
101
+ }
102
+ /**
103
+ * The body of POST `/v1/orders/{orderId}/quote`. The supplier's signing key signed the agreement,
104
+ * which names the offer's commitment id, the customer as buyer, the customer's mandate hash and
105
+ * the terms hash of these terms under this salt. Job terms in version 2's shape name no compute,
106
+ * and the customer refuses them with `dependency.required`, as Avow would.
107
+ */
108
+ export interface QuoteRequest {
109
+ terms: ChainedJobTerms | JobTerms;
110
+ salt: Hex;
111
+ agreement: TermsAgreement;
112
+ supplierSignature: Hex;
113
+ /**
114
+ * For each booking the terms rely on, in their order, its subject section as JSON, as
115
+ * `discloseSection` writes it.
116
+ */
117
+ disclosed: readonly unknown[];
118
+ }
119
+ /**
120
+ * Who refused for the customer. `customer` is the customer's own check of the quote. `avow` is
121
+ * Avow's API refusing to approve the customer's reserve. `relay`, `lock` and `keychain` refused the
122
+ * customer's reserve on its way to its lock, as they would any agent's, and `unknown` is a reserve
123
+ * that never landed with no reason given. `supplier` is the developer's business never accepting
124
+ * the customer's reserve by its deadline, as with `supplier.not_accepted`.
125
+ */
126
+ export declare const CUSTOMER_REFUSAL_LAYERS: readonly ['customer', 'supplier', 'avow', 'relay', 'lock', 'keychain', 'unknown'];
127
+ export type CustomerRefusalLayer = (typeof CUSTOMER_REFUSAL_LAYERS)[number];
128
+ /** Why the customer refused a quote, who refused, and the block the refusing check read. */
129
+ export interface CustomerRefusal {
130
+ code: ReasonCode;
131
+ layer: CustomerRefusalLayer;
132
+ /** The block the check that refused read at, or null when it refused before reading the chain. */
133
+ block: PinnedBlock | null;
134
+ /** The booking relied on that failed, by its place in the terms, or null when none did alone. */
135
+ index: number | null;
136
+ }
137
+ /** The customer's reserve for a job, in its own lock. */
138
+ export interface CustomerReserve {
139
+ reference: CommitmentReference;
140
+ /** In micros. */
141
+ amount: bigint;
142
+ /** The transaction that funded the reserve, which the customer's reserve fact names. */
143
+ fundedIn: Hex;
144
+ }
145
+ /**
146
+ * Something the customer said about an order, as a message, numbered from 0 in the order said. The
147
+ * developer's session posts each one once, by its index, as the customer's speech, and never as
148
+ * evidence.
149
+ */
150
+ export interface CustomerSaid {
151
+ index: number;
152
+ text: string;
153
+ }
154
+ /**
155
+ * A fact the customer's verifier stated about an order, numbered from 0, with what it rests on. The
156
+ * developer's session posts each one once, by its index, as the customer's statement, and a reader
157
+ * checks it from the chain before showing it as verified.
158
+ */
159
+ export interface CustomerFact extends FactBody {
160
+ index: number;
161
+ verifiedBy: 'customer';
162
+ }
163
+ /** The longest message the customer says. */
164
+ export declare const CUSTOMER_SAID_MAX = 500;
165
+ /** The most messages or facts one order carries. */
166
+ export declare const ORDER_STATEMENTS_MAX = 32;
167
+ /** The label of the result a delivery hands over, which says plainly that it's a placeholder. */
168
+ export declare const SIMULATED_RESULT_LABEL = "Simulated fine-tuning result, a placeholder, since no model was trained";
169
+ /**
170
+ * The result a delivery hands over. The work is simulated, so it's a placeholder whose label is the
171
+ * one plain label, with the hash of its content.
172
+ */
173
+ export interface DeliveryResult {
174
+ label: typeof SIMULATED_RESULT_LABEL;
175
+ hash: Hex;
176
+ }
177
+ /** The body of POST `/v1/orders/{orderId}/delivery`. */
178
+ export interface DeliveryReport {
179
+ result: DeliveryResult;
180
+ }
181
+ /** Where an order stands, in the order it moves. */
182
+ export declare const ORDER_STATUSES: readonly ['offered', 'verifying', 'refused', 'reserved', 'accepted', 'cancelled', 'delivered', 'paid'];
183
+ export type OrderStatus = (typeof ORDER_STATUSES)[number];
184
+ interface OrderBase {
185
+ orderId: string;
186
+ commitmentId: Hex;
187
+ customer: JobCustomer;
188
+ /** The supplier the order was offered to. */
189
+ supplierBusinessId: string;
190
+ /** What the customer has said about the order so far, in order. */
191
+ said: CustomerSaid[];
192
+ /** The facts the customer's verifier has stated about the order so far, in order. */
193
+ facts: CustomerFact[];
194
+ }
195
+ /**
196
+ * Why a quote or a delivery report for an order can't be taken from this signer, or null when it
197
+ * can. Only the supplier the order was offered to can act on it, through the signing key Avow
198
+ * registered for that supplier, so the order's supplier, the registered profile and the signer are
199
+ * checked together, and a key registered for another supplier never acts on this order.
200
+ */
201
+ export declare function orderSignerProblem(order: {
202
+ supplierBusinessId: string;
203
+ }, registered: Pick<SupplierProfile, 'businessId' | 'signingKey'>, signer: Address): ReasonCode | null;
204
+ /**
205
+ * How an order is asked to go, for a developer who wants to see a promise broken. A test customer
206
+ * asked for `cancels_late` cancels the job shortly after its work starts, which its reserve backs.
207
+ */
208
+ export declare const ORDER_SCENARIOS: readonly ['cancels_late'];
209
+ export type OrderScenario = (typeof ORDER_SCENARIOS)[number];
210
+ /**
211
+ * The customer's word that it cancelled a job after its start, with the time Avow recorded for its
212
+ * signed request. Avow confirms a late-cancellation charge from its own record of that request and
213
+ * never from this statement.
214
+ */
215
+ export interface OrderCancellation {
216
+ cancelledAt: bigint;
217
+ }
218
+ /**
219
+ * What GET `/v1/orders/{orderId}` answers. A refused order says why, and every order past the
220
+ * customer's check lists each booking relied on with the block it was read at. From `reserved` on
221
+ * it names the customer's reserve, and a paid order names the transfer, whose memo is the
222
+ * commitment id. The reserve doesn't secure that payment. A cancelled order says when the customer
223
+ * cancelled, after the job's start, so the supplier can report the charge its terms allow.
224
+ */
225
+ export type OrderState = (OrderBase & {
226
+ status: 'offered' | 'verifying';
227
+ }) | (OrderBase & {
228
+ status: 'refused';
229
+ refusal: CustomerRefusal;
230
+ checks: CheckedDependency[];
231
+ }) | (OrderBase & {
232
+ status: 'reserved' | 'accepted' | 'delivered';
233
+ checks: CheckedDependency[];
234
+ reserve: CustomerReserve;
235
+ }) | (OrderBase & {
236
+ status: 'cancelled';
237
+ checks: CheckedDependency[];
238
+ reserve: CustomerReserve;
239
+ cancellation: OrderCancellation;
240
+ }) | (OrderBase & {
241
+ status: 'paid';
242
+ checks: CheckedDependency[];
243
+ reserve: CustomerReserve;
244
+ payment: PaymentReference;
245
+ });
246
+ /** What the two POSTs that move an order answer with their 202. */
247
+ export interface OrderAnswer {
248
+ orderId: string;
249
+ status: 'verifying' | 'delivered';
250
+ }
251
+ /** An order id's JSON form. */
252
+ export declare const orderIdJson: z.ZodString;
253
+ /** The customer as JSON, labelled as Avow's test customer and nothing else. */
254
+ export declare const jobCustomerJson: z.ZodObject<{
255
+ label: z.ZodLiteral<"Avow's test customer">;
256
+ businessId: z.ZodString;
257
+ }, z.core.$strict>;
258
+ export declare const testCustomerProfileJson: z.ZodObject<{
259
+ label: z.ZodLiteral<"Avow's test customer">;
260
+ businessId: z.ZodString;
261
+ account: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
262
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
263
+ chainId: z.ZodNumber;
264
+ mandateHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
265
+ limits: z.ZodObject<{
266
+ reserve: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
267
+ price: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
268
+ openOrders: z.ZodNumber;
269
+ }, z.core.$strict>;
270
+ }, z.core.$strict>;
271
+ export declare const orderRequestJson: z.ZodObject<{
272
+ supplier: z.ZodObject<{
273
+ businessId: z.ZodString;
274
+ account: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
275
+ payee: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
276
+ signingKey: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
277
+ }, z.core.$strip>;
278
+ scenario: z.ZodOptional<z.ZodEnum<{
279
+ cancels_late: "cancels_late";
280
+ }>>;
281
+ }, z.core.$strict>;
282
+ /** The booking a quote has to rely on, as JSON. */
283
+ export declare const jobRequirementJson: z.ZodObject<{
284
+ template: z.ZodLiteral<"gpu-reservation/1">;
285
+ condition: z.ZodLiteral<"accepted">;
286
+ disclosed: z.ZodLiteral<"subject">;
287
+ }, z.core.$strict>;
288
+ export declare const jobOfferJson: z.ZodObject<{
289
+ orderId: z.ZodString;
290
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
291
+ customer: z.ZodObject<{
292
+ label: z.ZodLiteral<"Avow's test customer">;
293
+ businessId: z.ZodString;
294
+ }, z.core.$strict>;
295
+ supplierBusinessId: z.ZodString;
296
+ terms: z.ZodObject<{
297
+ version: z.ZodLiteral<2>;
298
+ currency: z.ZodEnum<{
299
+ USD: "USD";
300
+ }>;
301
+ amountDecimals: z.ZodLiteral<6>;
302
+ template: z.ZodLiteral<"job/1">;
303
+ subject: z.ZodObject<{
304
+ work: z.ZodObject<{
305
+ kind: z.ZodString;
306
+ summary: z.ZodString;
307
+ }, z.core.$strict>;
308
+ compute: z.ZodObject<{
309
+ gpu: z.ZodString;
310
+ count: z.ZodNumber;
311
+ region: z.ZodString;
312
+ }, z.core.$strict>;
313
+ startsAt: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
314
+ deliverBy: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
315
+ }, z.core.$strict>;
316
+ consideration: z.ZodDiscriminatedUnion<[z.ZodObject<{
317
+ kind: z.ZodLiteral<"rate">;
318
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
319
+ unit: z.ZodString;
320
+ }, z.core.$strict>, z.ZodObject<{
321
+ kind: z.ZodLiteral<"fixed">;
322
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
323
+ }, z.core.$strict>], "kind">;
324
+ remedies: z.ZodObject<{
325
+ acceptBy: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
326
+ freeCancelBy: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
327
+ charges: z.ZodArray<z.ZodObject<{
328
+ kind: z.ZodEnum<{
329
+ lateCancellation: "lateCancellation";
330
+ noShow: "noShow";
331
+ }>;
332
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
333
+ earliest: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
334
+ }, z.core.$strict>>;
335
+ chargeDeadline: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
336
+ }, z.core.$strict>;
337
+ resolution: z.ZodObject<{
338
+ contestWindow: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
339
+ arbiter: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
340
+ day90SupplierShareBps: z.ZodNumber;
341
+ }, z.core.$strict>;
342
+ backing: z.ZodDiscriminatedUnion<[z.ZodObject<{
343
+ kind: z.ZodLiteral<"reserve">;
344
+ side: z.ZodLiteral<"buyer">;
345
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
346
+ releaseDate: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
347
+ }, z.core.$strict>], "kind">;
348
+ }, z.core.$strict>;
349
+ requirement: z.ZodObject<{
350
+ template: z.ZodLiteral<"gpu-reservation/1">;
351
+ condition: z.ZodLiteral<"accepted">;
352
+ disclosed: z.ZodLiteral<"subject">;
353
+ }, z.core.$strict>;
354
+ expiry: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
355
+ }, z.core.$strict>;
356
+ export declare const quoteRequestJson: z.ZodObject<{
357
+ terms: z.ZodUnion<readonly [z.ZodObject<{
358
+ currency: z.ZodEnum<{
359
+ USD: "USD";
360
+ }>;
361
+ amountDecimals: z.ZodLiteral<6>;
362
+ template: z.ZodLiteral<"job/1">;
363
+ subject: z.ZodObject<{
364
+ work: z.ZodObject<{
365
+ kind: z.ZodString;
366
+ summary: z.ZodString;
367
+ }, z.core.$strict>;
368
+ compute: z.ZodObject<{
369
+ gpu: z.ZodString;
370
+ count: z.ZodNumber;
371
+ region: z.ZodString;
372
+ }, z.core.$strict>;
373
+ startsAt: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
374
+ deliverBy: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
375
+ }, z.core.$strict>;
376
+ consideration: z.ZodDiscriminatedUnion<[z.ZodObject<{
377
+ kind: z.ZodLiteral<"rate">;
378
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
379
+ unit: z.ZodString;
380
+ }, z.core.$strict>, z.ZodObject<{
381
+ kind: z.ZodLiteral<"fixed">;
382
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
383
+ }, z.core.$strict>], "kind">;
384
+ remedies: z.ZodObject<{
385
+ acceptBy: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
386
+ freeCancelBy: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
387
+ charges: z.ZodArray<z.ZodObject<{
388
+ kind: z.ZodEnum<{
389
+ lateCancellation: "lateCancellation";
390
+ noShow: "noShow";
391
+ }>;
392
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
393
+ earliest: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
394
+ }, z.core.$strict>>;
395
+ chargeDeadline: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
396
+ }, z.core.$strict>;
397
+ resolution: z.ZodObject<{
398
+ contestWindow: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
399
+ arbiter: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
400
+ day90SupplierShareBps: z.ZodNumber;
401
+ }, z.core.$strict>;
402
+ backing: z.ZodDiscriminatedUnion<[z.ZodObject<{
403
+ kind: z.ZodLiteral<"reserve">;
404
+ side: z.ZodLiteral<"buyer">;
405
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
406
+ releaseDate: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
407
+ }, z.core.$strict>], "kind">;
408
+ version: z.ZodLiteral<3>;
409
+ dependencyCheck: z.ZodEnum<{
410
+ buyer: "buyer";
411
+ }>;
412
+ dependencies: z.ZodUnion<readonly [z.ZodTuple<[z.ZodObject<{
413
+ on: z.ZodObject<{
414
+ kind: z.ZodLiteral<"commitment">;
415
+ chainId: z.ZodNumber;
416
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
417
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
418
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
419
+ side: z.ZodLiteral<"buyer">;
420
+ }, z.core.$strict>;
421
+ condition: z.ZodEnum<{
422
+ accepted: "accepted";
423
+ }>;
424
+ disclosed: z.ZodEnum<{
425
+ subject: "subject";
426
+ }>;
427
+ }, z.core.$strict>], null>, z.ZodTuple<[z.ZodObject<{
428
+ on: z.ZodObject<{
429
+ kind: z.ZodLiteral<"commitment">;
430
+ chainId: z.ZodNumber;
431
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
432
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
433
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
434
+ side: z.ZodLiteral<"buyer">;
435
+ }, z.core.$strict>;
436
+ condition: z.ZodEnum<{
437
+ accepted: "accepted";
438
+ }>;
439
+ disclosed: z.ZodEnum<{
440
+ subject: "subject";
441
+ }>;
442
+ }, z.core.$strict>, z.ZodObject<{
443
+ on: z.ZodObject<{
444
+ kind: z.ZodLiteral<"commitment">;
445
+ chainId: z.ZodNumber;
446
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
447
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
448
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
449
+ side: z.ZodLiteral<"buyer">;
450
+ }, z.core.$strict>;
451
+ condition: z.ZodEnum<{
452
+ accepted: "accepted";
453
+ }>;
454
+ disclosed: z.ZodEnum<{
455
+ subject: "subject";
456
+ }>;
457
+ }, z.core.$strict>], null>, z.ZodTuple<[z.ZodObject<{
458
+ on: z.ZodObject<{
459
+ kind: z.ZodLiteral<"commitment">;
460
+ chainId: z.ZodNumber;
461
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
462
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
463
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
464
+ side: z.ZodLiteral<"buyer">;
465
+ }, z.core.$strict>;
466
+ condition: z.ZodEnum<{
467
+ accepted: "accepted";
468
+ }>;
469
+ disclosed: z.ZodEnum<{
470
+ subject: "subject";
471
+ }>;
472
+ }, z.core.$strict>, z.ZodObject<{
473
+ on: z.ZodObject<{
474
+ kind: z.ZodLiteral<"commitment">;
475
+ chainId: z.ZodNumber;
476
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
477
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
478
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
479
+ side: z.ZodLiteral<"buyer">;
480
+ }, z.core.$strict>;
481
+ condition: z.ZodEnum<{
482
+ accepted: "accepted";
483
+ }>;
484
+ disclosed: z.ZodEnum<{
485
+ subject: "subject";
486
+ }>;
487
+ }, z.core.$strict>, z.ZodObject<{
488
+ on: z.ZodObject<{
489
+ kind: z.ZodLiteral<"commitment">;
490
+ chainId: z.ZodNumber;
491
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
492
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
493
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
494
+ side: z.ZodLiteral<"buyer">;
495
+ }, z.core.$strict>;
496
+ condition: z.ZodEnum<{
497
+ accepted: "accepted";
498
+ }>;
499
+ disclosed: z.ZodEnum<{
500
+ subject: "subject";
501
+ }>;
502
+ }, z.core.$strict>], null>, z.ZodTuple<[z.ZodObject<{
503
+ on: z.ZodObject<{
504
+ kind: z.ZodLiteral<"commitment">;
505
+ chainId: z.ZodNumber;
506
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
507
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
508
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
509
+ side: z.ZodLiteral<"buyer">;
510
+ }, z.core.$strict>;
511
+ condition: z.ZodEnum<{
512
+ accepted: "accepted";
513
+ }>;
514
+ disclosed: z.ZodEnum<{
515
+ subject: "subject";
516
+ }>;
517
+ }, z.core.$strict>, z.ZodObject<{
518
+ on: z.ZodObject<{
519
+ kind: z.ZodLiteral<"commitment">;
520
+ chainId: z.ZodNumber;
521
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
522
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
523
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
524
+ side: z.ZodLiteral<"buyer">;
525
+ }, z.core.$strict>;
526
+ condition: z.ZodEnum<{
527
+ accepted: "accepted";
528
+ }>;
529
+ disclosed: z.ZodEnum<{
530
+ subject: "subject";
531
+ }>;
532
+ }, z.core.$strict>, z.ZodObject<{
533
+ on: z.ZodObject<{
534
+ kind: z.ZodLiteral<"commitment">;
535
+ chainId: z.ZodNumber;
536
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
537
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
538
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
539
+ side: z.ZodLiteral<"buyer">;
540
+ }, z.core.$strict>;
541
+ condition: z.ZodEnum<{
542
+ accepted: "accepted";
543
+ }>;
544
+ disclosed: z.ZodEnum<{
545
+ subject: "subject";
546
+ }>;
547
+ }, z.core.$strict>, z.ZodObject<{
548
+ on: z.ZodObject<{
549
+ kind: z.ZodLiteral<"commitment">;
550
+ chainId: z.ZodNumber;
551
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
552
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
553
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
554
+ side: z.ZodLiteral<"buyer">;
555
+ }, z.core.$strict>;
556
+ condition: z.ZodEnum<{
557
+ accepted: "accepted";
558
+ }>;
559
+ disclosed: z.ZodEnum<{
560
+ subject: "subject";
561
+ }>;
562
+ }, z.core.$strict>], null>]>;
563
+ }, z.core.$strict>, z.ZodObject<{
564
+ version: z.ZodLiteral<2>;
565
+ currency: z.ZodEnum<{
566
+ USD: "USD";
567
+ }>;
568
+ amountDecimals: z.ZodLiteral<6>;
569
+ template: z.ZodLiteral<"job/1">;
570
+ subject: z.ZodObject<{
571
+ work: z.ZodObject<{
572
+ kind: z.ZodString;
573
+ summary: z.ZodString;
574
+ }, z.core.$strict>;
575
+ compute: z.ZodObject<{
576
+ gpu: z.ZodString;
577
+ count: z.ZodNumber;
578
+ region: z.ZodString;
579
+ }, z.core.$strict>;
580
+ startsAt: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
581
+ deliverBy: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
582
+ }, z.core.$strict>;
583
+ consideration: z.ZodDiscriminatedUnion<[z.ZodObject<{
584
+ kind: z.ZodLiteral<"rate">;
585
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
586
+ unit: z.ZodString;
587
+ }, z.core.$strict>, z.ZodObject<{
588
+ kind: z.ZodLiteral<"fixed">;
589
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
590
+ }, z.core.$strict>], "kind">;
591
+ remedies: z.ZodObject<{
592
+ acceptBy: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
593
+ freeCancelBy: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
594
+ charges: z.ZodArray<z.ZodObject<{
595
+ kind: z.ZodEnum<{
596
+ lateCancellation: "lateCancellation";
597
+ noShow: "noShow";
598
+ }>;
599
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
600
+ earliest: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
601
+ }, z.core.$strict>>;
602
+ chargeDeadline: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
603
+ }, z.core.$strict>;
604
+ resolution: z.ZodObject<{
605
+ contestWindow: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
606
+ arbiter: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
607
+ day90SupplierShareBps: z.ZodNumber;
608
+ }, z.core.$strict>;
609
+ backing: z.ZodDiscriminatedUnion<[z.ZodObject<{
610
+ kind: z.ZodLiteral<"reserve">;
611
+ side: z.ZodLiteral<"buyer">;
612
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
613
+ releaseDate: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
614
+ }, z.core.$strict>], "kind">;
615
+ }, z.core.$strict>]>;
616
+ salt: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
617
+ agreement: z.ZodObject<{
618
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
619
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
620
+ category: z.ZodString;
621
+ buyerBusinessId: z.ZodString;
622
+ supplierBusinessId: z.ZodString;
623
+ mandateHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
624
+ nonce: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
625
+ expiry: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
626
+ }, z.core.$strict>;
627
+ supplierSignature: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
628
+ disclosed: z.ZodArray<z.ZodUnknown>;
629
+ }, z.core.$strict>;
630
+ /** A customer's refusal as JSON. */
631
+ export declare const customerRefusalJson: z.ZodObject<{
632
+ code: z.ZodEnum<{
633
+ "administrator.no_authority": "administrator.no_authority";
634
+ "agent.key_mismatch": "agent.key_mismatch";
635
+ "agent.revoked": "agent.revoked";
636
+ "agreement.parties_mismatch": "agreement.parties_mismatch";
637
+ "approval.charges_mismatch": "approval.charges_mismatch";
638
+ "approval.commitment_mismatch": "approval.commitment_mismatch";
639
+ "approval.dispute_mismatch": "approval.dispute_mismatch";
640
+ "approval.human_invalid": "approval.human_invalid";
641
+ "approval.human_required": "approval.human_required";
642
+ "approval.mandate_mismatch": "approval.mandate_mismatch";
643
+ "approval.parties_mismatch": "approval.parties_mismatch";
644
+ "approval.terms_mismatch": "approval.terms_mismatch";
645
+ approved: "approved";
646
+ "authorization.accept_by_passed": "authorization.accept_by_passed";
647
+ "authorization.buyer_mismatch": "authorization.buyer_mismatch";
648
+ "authorization.commitment_mismatch": "authorization.commitment_mismatch";
649
+ "authorization.mandate_mismatch": "authorization.mandate_mismatch";
650
+ "authorization.payee_mismatch": "authorization.payee_mismatch";
651
+ "authorization.terms_mismatch": "authorization.terms_mismatch";
652
+ "authorization.token_not_accepted": "authorization.token_not_accepted";
653
+ "business.test_data": "business.test_data";
654
+ "business.unknown": "business.unknown";
655
+ "business.unverified": "business.unverified";
656
+ "chain.acceptance_reverted": "chain.acceptance_reverted";
657
+ "chain.agent_key_inactive": "chain.agent_key_inactive";
658
+ "chain.approval_mismatch": "chain.approval_mismatch";
659
+ "chain.cancel_reverted": "chain.cancel_reverted";
660
+ "chain.lock_timing_unexpected": "chain.lock_timing_unexpected";
661
+ "chain.lock_unknown": "chain.lock_unknown";
662
+ "chain.mandate_mismatch": "chain.mandate_mismatch";
663
+ "chain.report_reverted": "chain.report_reverted";
664
+ "chain.reserve_accepted": "chain.reserve_accepted";
665
+ "chain.reserve_mismatch": "chain.reserve_mismatch";
666
+ "chain.reserve_missing": "chain.reserve_missing";
667
+ "chain.supplier_mismatch": "chain.supplier_mismatch";
668
+ "commitment.cancel_closed": "commitment.cancel_closed";
669
+ "commitment.cancel_on_lock": "commitment.cancel_on_lock";
670
+ "commitment.ended": "commitment.ended";
671
+ "commitment.unknown": "commitment.unknown";
672
+ "consent.count_out_of_range": "consent.count_out_of_range";
673
+ "consent.count_passed": "consent.count_passed";
674
+ "consent.not_releasable": "consent.not_releasable";
675
+ "contest.already_contested": "contest.already_contested";
676
+ "contest.not_contestable": "contest.not_contestable";
677
+ "contest.not_on_chain": "contest.not_on_chain";
678
+ "contest.reason_not_for_charge": "contest.reason_not_for_charge";
679
+ "contest.statement_invalid": "contest.statement_invalid";
680
+ "contest.statement_mismatch": "contest.statement_mismatch";
681
+ "contest.window_closed": "contest.window_closed";
682
+ "dependency.cancellable": "dependency.cancellable";
683
+ "dependency.charge_pending": "dependency.charge_pending";
684
+ "dependency.disclosure_invalid": "dependency.disclosure_invalid";
685
+ "dependency.does_not_fit": "dependency.does_not_fit";
686
+ "dependency.elided": "dependency.elided";
687
+ "dependency.ended": "dependency.ended";
688
+ "dependency.lock_unknown": "dependency.lock_unknown";
689
+ "dependency.not_accepted": "dependency.not_accepted";
690
+ "dependency.not_found": "dependency.not_found";
691
+ "dependency.not_owned": "dependency.not_owned";
692
+ "dependency.required": "dependency.required";
693
+ "dependency.self_supplied": "dependency.self_supplied";
694
+ "dependency.stale": "dependency.stale";
695
+ "dependency.terms_mismatch": "dependency.terms_mismatch";
696
+ "dependency.unreadable": "dependency.unreadable";
697
+ "dependency.unrecorded": "dependency.unrecorded";
698
+ "keychain.over_daily_limit": "keychain.over_daily_limit";
699
+ "mandate.action_not_permitted": "mandate.action_not_permitted";
700
+ "mandate.ap2_mismatch": "mandate.ap2_mismatch";
701
+ "mandate.category_not_allowed": "mandate.category_not_allowed";
702
+ "mandate.currency_not_allowed": "mandate.currency_not_allowed";
703
+ "mandate.ends_before_window": "mandate.ends_before_window";
704
+ "mandate.expired": "mandate.expired";
705
+ "mandate.invalid": "mandate.invalid";
706
+ "mandate.missing": "mandate.missing";
707
+ "mandate.over_commitment_cap": "mandate.over_commitment_cap";
708
+ "mandate.over_open_reserves_cap": "mandate.over_open_reserves_cap";
709
+ "mandate.over_payment_limit": "mandate.over_payment_limit";
710
+ "mandate.revoked": "mandate.revoked";
711
+ "mandate.signature_invalid": "mandate.signature_invalid";
712
+ "mandate.supplier_not_allowed": "mandate.supplier_not_allowed";
713
+ "mandate.token_not_allowed": "mandate.token_not_allowed";
714
+ "message.expired": "message.expired";
715
+ "message.invalid": "message.invalid";
716
+ "message.replayed": "message.replayed";
717
+ "message.schema_unknown": "message.schema_unknown";
718
+ "message.signature_invalid": "message.signature_invalid";
719
+ "message.signer_unknown": "message.signer_unknown";
720
+ "message.validity_too_long": "message.validity_too_long";
721
+ "message.wrong_chain": "message.wrong_chain";
722
+ "message.wrong_contract": "message.wrong_contract";
723
+ "order.commitment_mismatch": "order.commitment_mismatch";
724
+ "order.limit_reached": "order.limit_reached";
725
+ "order.out_of_step": "order.out_of_step";
726
+ "order.supplier_mismatch": "order.supplier_mismatch";
727
+ "order.terms_changed": "order.terms_changed";
728
+ "order.unknown": "order.unknown";
729
+ "payment.amount_mismatch": "payment.amount_mismatch";
730
+ "payment.attributed_twice": "payment.attributed_twice";
731
+ "payment.failed": "payment.failed";
732
+ "payment.memo_mismatch": "payment.memo_mismatch";
733
+ "payment.not_final": "payment.not_final";
734
+ "payment.not_found": "payment.not_found";
735
+ "payment.not_memo_transfer": "payment.not_memo_transfer";
736
+ "payment.recipient_mismatch": "payment.recipient_mismatch";
737
+ "payment.sender_mismatch": "payment.sender_mismatch";
738
+ "payment.token_mismatch": "payment.token_mismatch";
739
+ "payment.token_not_accepted": "payment.token_not_accepted";
740
+ "reference.commitment_mismatch": "reference.commitment_mismatch";
741
+ "reference.unreadable": "reference.unreadable";
742
+ "report.amount_invalid": "report.amount_invalid";
743
+ "report.kind_not_allowed": "report.kind_not_allowed";
744
+ "report.limit_reached": "report.limit_reached";
745
+ "report.not_reportable": "report.not_reportable";
746
+ "report.open": "report.open";
747
+ "report.too_early": "report.too_early";
748
+ "request.id_reused": "request.id_reused";
749
+ "request.in_progress": "request.in_progress";
750
+ "request.invalid": "request.invalid";
751
+ "request.signer_unknown": "request.signer_unknown";
752
+ "request.unsigned": "request.unsigned";
753
+ "sandbox.budget_spent": "sandbox.budget_spent";
754
+ "sandbox.closed": "sandbox.closed";
755
+ "sandbox.event_too_large": "sandbox.event_too_large";
756
+ "sandbox.faucet_fees_low": "sandbox.faucet_fees_low";
757
+ "sandbox.limit_reached": "sandbox.limit_reached";
758
+ "sandbox.pool_empty": "sandbox.pool_empty";
759
+ "sandbox.session_expired": "sandbox.session_expired";
760
+ "sandbox.session_full": "sandbox.session_full";
761
+ "sandbox.session_rate": "sandbox.session_rate";
762
+ "sandbox.session_taken": "sandbox.session_taken";
763
+ "sandbox.taken": "sandbox.taken";
764
+ "service.booking_required": "service.booking_required";
765
+ "service.cancel_declined": "service.cancel_declined";
766
+ "service.cancel_late": "service.cancel_late";
767
+ "service.check_failed": "service.check_failed";
768
+ "service.compute_off": "service.compute_off";
769
+ "service.over_budget": "service.over_budget";
770
+ "service.quantity_unavailable": "service.quantity_unavailable";
771
+ "service.unavailable": "service.unavailable";
772
+ "service.unknown_booking": "service.unknown_booking";
773
+ "service.unknown_offer": "service.unknown_offer";
774
+ "sponsorship.altered": "sponsorship.altered";
775
+ "sponsorship.budget_spent": "sponsorship.budget_spent";
776
+ "sponsorship.over_cap": "sponsorship.over_cap";
777
+ "sponsorship.rate_limited": "sponsorship.rate_limited";
778
+ "sponsorship.refused": "sponsorship.refused";
779
+ "sponsorship.simulation_failed": "sponsorship.simulation_failed";
780
+ "supplier.declined": "supplier.declined";
781
+ "supplier.not_accepted": "supplier.not_accepted";
782
+ "supplier.unknown": "supplier.unknown";
783
+ "terms.backing_unsupported": "terms.backing_unsupported";
784
+ "terms.category_mismatch": "terms.category_mismatch";
785
+ "terms.charges_invalid": "terms.charges_invalid";
786
+ "terms.contest_window_short": "terms.contest_window_short";
787
+ "terms.currency_mismatch": "terms.currency_mismatch";
788
+ "terms.deadlines_out_of_order": "terms.deadlines_out_of_order";
789
+ "terms.dispute_invalid": "terms.dispute_invalid";
790
+ "terms.hash_mismatch": "terms.hash_mismatch";
791
+ "terms.incomplete": "terms.incomplete";
792
+ "terms.invalid": "terms.invalid";
793
+ "terms.reserve_mismatch": "terms.reserve_mismatch";
794
+ "terms.template_invalid": "terms.template_invalid";
795
+ "terms.template_unknown": "terms.template_unknown";
796
+ "terms.version_unknown": "terms.version_unknown";
797
+ }>;
798
+ layer: z.ZodEnum<{
799
+ avow: "avow";
800
+ customer: "customer";
801
+ keychain: "keychain";
802
+ lock: "lock";
803
+ relay: "relay";
804
+ supplier: "supplier";
805
+ unknown: "unknown";
806
+ }>;
807
+ block: z.ZodNullable<z.ZodObject<{
808
+ number: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
809
+ hash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
810
+ timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
811
+ }, z.core.$strict>>;
812
+ index: z.ZodNullable<z.ZodNumber>;
813
+ }, z.core.$strict>;
814
+ export declare const customerSaidJson: z.ZodObject<{
815
+ index: z.ZodNumber;
816
+ text: z.ZodString;
817
+ }, z.core.$strict>;
818
+ export declare const customerFactJson: z.ZodObject<{
819
+ text: z.ZodString;
820
+ check: z.ZodEnum<{
821
+ commitment: "commitment";
822
+ dependency: "dependency";
823
+ payment: "payment";
824
+ reserve: "reserve";
825
+ }>;
826
+ reference: z.ZodObject<{
827
+ kind: z.ZodLiteral<"commitment">;
828
+ chainId: z.ZodNumber;
829
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
830
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
831
+ side: z.ZodEnum<{
832
+ buyer: "buyer";
833
+ supplier: "supplier";
834
+ }>;
835
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
836
+ }, z.core.$strict>;
837
+ block: z.ZodObject<{
838
+ number: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
839
+ hash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
840
+ timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
841
+ }, z.core.$strict>;
842
+ transactionHash: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>>;
843
+ index: z.ZodNumber;
844
+ verifiedBy: z.ZodLiteral<"customer">;
845
+ }, z.core.$strict>;
846
+ export declare const deliveryReportJson: z.ZodObject<{
847
+ result: z.ZodObject<{
848
+ label: z.ZodLiteral<"Simulated fine-tuning result, a placeholder, since no model was trained">;
849
+ hash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
850
+ }, z.core.$strict>;
851
+ }, z.core.$strict>;
852
+ export declare const orderStateJson: z.ZodDiscriminatedUnion<[z.ZodObject<{
853
+ orderId: z.ZodString;
854
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
855
+ customer: z.ZodObject<{
856
+ label: z.ZodLiteral<"Avow's test customer">;
857
+ businessId: z.ZodString;
858
+ }, z.core.$strict>;
859
+ supplierBusinessId: z.ZodString;
860
+ said: z.ZodArray<z.ZodType<{
861
+ index: number;
862
+ text: string;
863
+ }, unknown, z.core.$ZodTypeInternals<{
864
+ index: number;
865
+ text: string;
866
+ }, unknown>>>;
867
+ facts: z.ZodArray<z.ZodType<{
868
+ text: string;
869
+ check: "commitment" | "dependency" | "payment" | "reserve";
870
+ reference: {
871
+ kind: "commitment";
872
+ chainId: number;
873
+ lock: `0x${string}`;
874
+ commitmentId: `0x${string}`;
875
+ side: "buyer" | "supplier";
876
+ termsHash: `0x${string}`;
877
+ };
878
+ block: {
879
+ number: bigint;
880
+ hash: `0x${string}`;
881
+ timestamp: bigint;
882
+ };
883
+ transactionHash: `0x${string}` | null;
884
+ index: number;
885
+ verifiedBy: "customer";
886
+ }, unknown, z.core.$ZodTypeInternals<{
887
+ text: string;
888
+ check: "commitment" | "dependency" | "payment" | "reserve";
889
+ reference: {
890
+ kind: "commitment";
891
+ chainId: number;
892
+ lock: `0x${string}`;
893
+ commitmentId: `0x${string}`;
894
+ side: "buyer" | "supplier";
895
+ termsHash: `0x${string}`;
896
+ };
897
+ block: {
898
+ number: bigint;
899
+ hash: `0x${string}`;
900
+ timestamp: bigint;
901
+ };
902
+ transactionHash: `0x${string}` | null;
903
+ index: number;
904
+ verifiedBy: "customer";
905
+ }, unknown>>>;
906
+ status: z.ZodLiteral<"offered">;
907
+ }, z.core.$strict>, z.ZodObject<{
908
+ orderId: z.ZodString;
909
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
910
+ customer: z.ZodObject<{
911
+ label: z.ZodLiteral<"Avow's test customer">;
912
+ businessId: z.ZodString;
913
+ }, z.core.$strict>;
914
+ supplierBusinessId: z.ZodString;
915
+ said: z.ZodArray<z.ZodType<{
916
+ index: number;
917
+ text: string;
918
+ }, unknown, z.core.$ZodTypeInternals<{
919
+ index: number;
920
+ text: string;
921
+ }, unknown>>>;
922
+ facts: z.ZodArray<z.ZodType<{
923
+ text: string;
924
+ check: "commitment" | "dependency" | "payment" | "reserve";
925
+ reference: {
926
+ kind: "commitment";
927
+ chainId: number;
928
+ lock: `0x${string}`;
929
+ commitmentId: `0x${string}`;
930
+ side: "buyer" | "supplier";
931
+ termsHash: `0x${string}`;
932
+ };
933
+ block: {
934
+ number: bigint;
935
+ hash: `0x${string}`;
936
+ timestamp: bigint;
937
+ };
938
+ transactionHash: `0x${string}` | null;
939
+ index: number;
940
+ verifiedBy: "customer";
941
+ }, unknown, z.core.$ZodTypeInternals<{
942
+ text: string;
943
+ check: "commitment" | "dependency" | "payment" | "reserve";
944
+ reference: {
945
+ kind: "commitment";
946
+ chainId: number;
947
+ lock: `0x${string}`;
948
+ commitmentId: `0x${string}`;
949
+ side: "buyer" | "supplier";
950
+ termsHash: `0x${string}`;
951
+ };
952
+ block: {
953
+ number: bigint;
954
+ hash: `0x${string}`;
955
+ timestamp: bigint;
956
+ };
957
+ transactionHash: `0x${string}` | null;
958
+ index: number;
959
+ verifiedBy: "customer";
960
+ }, unknown>>>;
961
+ status: z.ZodLiteral<"verifying">;
962
+ }, z.core.$strict>, z.ZodObject<{
963
+ orderId: z.ZodString;
964
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
965
+ customer: z.ZodObject<{
966
+ label: z.ZodLiteral<"Avow's test customer">;
967
+ businessId: z.ZodString;
968
+ }, z.core.$strict>;
969
+ supplierBusinessId: z.ZodString;
970
+ said: z.ZodArray<z.ZodType<{
971
+ index: number;
972
+ text: string;
973
+ }, unknown, z.core.$ZodTypeInternals<{
974
+ index: number;
975
+ text: string;
976
+ }, unknown>>>;
977
+ facts: z.ZodArray<z.ZodType<{
978
+ text: string;
979
+ check: "commitment" | "dependency" | "payment" | "reserve";
980
+ reference: {
981
+ kind: "commitment";
982
+ chainId: number;
983
+ lock: `0x${string}`;
984
+ commitmentId: `0x${string}`;
985
+ side: "buyer" | "supplier";
986
+ termsHash: `0x${string}`;
987
+ };
988
+ block: {
989
+ number: bigint;
990
+ hash: `0x${string}`;
991
+ timestamp: bigint;
992
+ };
993
+ transactionHash: `0x${string}` | null;
994
+ index: number;
995
+ verifiedBy: "customer";
996
+ }, unknown, z.core.$ZodTypeInternals<{
997
+ text: string;
998
+ check: "commitment" | "dependency" | "payment" | "reserve";
999
+ reference: {
1000
+ kind: "commitment";
1001
+ chainId: number;
1002
+ lock: `0x${string}`;
1003
+ commitmentId: `0x${string}`;
1004
+ side: "buyer" | "supplier";
1005
+ termsHash: `0x${string}`;
1006
+ };
1007
+ block: {
1008
+ number: bigint;
1009
+ hash: `0x${string}`;
1010
+ timestamp: bigint;
1011
+ };
1012
+ transactionHash: `0x${string}` | null;
1013
+ index: number;
1014
+ verifiedBy: "customer";
1015
+ }, unknown>>>;
1016
+ status: z.ZodLiteral<"refused">;
1017
+ refusal: z.ZodObject<{
1018
+ code: z.ZodEnum<{
1019
+ "administrator.no_authority": "administrator.no_authority";
1020
+ "agent.key_mismatch": "agent.key_mismatch";
1021
+ "agent.revoked": "agent.revoked";
1022
+ "agreement.parties_mismatch": "agreement.parties_mismatch";
1023
+ "approval.charges_mismatch": "approval.charges_mismatch";
1024
+ "approval.commitment_mismatch": "approval.commitment_mismatch";
1025
+ "approval.dispute_mismatch": "approval.dispute_mismatch";
1026
+ "approval.human_invalid": "approval.human_invalid";
1027
+ "approval.human_required": "approval.human_required";
1028
+ "approval.mandate_mismatch": "approval.mandate_mismatch";
1029
+ "approval.parties_mismatch": "approval.parties_mismatch";
1030
+ "approval.terms_mismatch": "approval.terms_mismatch";
1031
+ approved: "approved";
1032
+ "authorization.accept_by_passed": "authorization.accept_by_passed";
1033
+ "authorization.buyer_mismatch": "authorization.buyer_mismatch";
1034
+ "authorization.commitment_mismatch": "authorization.commitment_mismatch";
1035
+ "authorization.mandate_mismatch": "authorization.mandate_mismatch";
1036
+ "authorization.payee_mismatch": "authorization.payee_mismatch";
1037
+ "authorization.terms_mismatch": "authorization.terms_mismatch";
1038
+ "authorization.token_not_accepted": "authorization.token_not_accepted";
1039
+ "business.test_data": "business.test_data";
1040
+ "business.unknown": "business.unknown";
1041
+ "business.unverified": "business.unverified";
1042
+ "chain.acceptance_reverted": "chain.acceptance_reverted";
1043
+ "chain.agent_key_inactive": "chain.agent_key_inactive";
1044
+ "chain.approval_mismatch": "chain.approval_mismatch";
1045
+ "chain.cancel_reverted": "chain.cancel_reverted";
1046
+ "chain.lock_timing_unexpected": "chain.lock_timing_unexpected";
1047
+ "chain.lock_unknown": "chain.lock_unknown";
1048
+ "chain.mandate_mismatch": "chain.mandate_mismatch";
1049
+ "chain.report_reverted": "chain.report_reverted";
1050
+ "chain.reserve_accepted": "chain.reserve_accepted";
1051
+ "chain.reserve_mismatch": "chain.reserve_mismatch";
1052
+ "chain.reserve_missing": "chain.reserve_missing";
1053
+ "chain.supplier_mismatch": "chain.supplier_mismatch";
1054
+ "commitment.cancel_closed": "commitment.cancel_closed";
1055
+ "commitment.cancel_on_lock": "commitment.cancel_on_lock";
1056
+ "commitment.ended": "commitment.ended";
1057
+ "commitment.unknown": "commitment.unknown";
1058
+ "consent.count_out_of_range": "consent.count_out_of_range";
1059
+ "consent.count_passed": "consent.count_passed";
1060
+ "consent.not_releasable": "consent.not_releasable";
1061
+ "contest.already_contested": "contest.already_contested";
1062
+ "contest.not_contestable": "contest.not_contestable";
1063
+ "contest.not_on_chain": "contest.not_on_chain";
1064
+ "contest.reason_not_for_charge": "contest.reason_not_for_charge";
1065
+ "contest.statement_invalid": "contest.statement_invalid";
1066
+ "contest.statement_mismatch": "contest.statement_mismatch";
1067
+ "contest.window_closed": "contest.window_closed";
1068
+ "dependency.cancellable": "dependency.cancellable";
1069
+ "dependency.charge_pending": "dependency.charge_pending";
1070
+ "dependency.disclosure_invalid": "dependency.disclosure_invalid";
1071
+ "dependency.does_not_fit": "dependency.does_not_fit";
1072
+ "dependency.elided": "dependency.elided";
1073
+ "dependency.ended": "dependency.ended";
1074
+ "dependency.lock_unknown": "dependency.lock_unknown";
1075
+ "dependency.not_accepted": "dependency.not_accepted";
1076
+ "dependency.not_found": "dependency.not_found";
1077
+ "dependency.not_owned": "dependency.not_owned";
1078
+ "dependency.required": "dependency.required";
1079
+ "dependency.self_supplied": "dependency.self_supplied";
1080
+ "dependency.stale": "dependency.stale";
1081
+ "dependency.terms_mismatch": "dependency.terms_mismatch";
1082
+ "dependency.unreadable": "dependency.unreadable";
1083
+ "dependency.unrecorded": "dependency.unrecorded";
1084
+ "keychain.over_daily_limit": "keychain.over_daily_limit";
1085
+ "mandate.action_not_permitted": "mandate.action_not_permitted";
1086
+ "mandate.ap2_mismatch": "mandate.ap2_mismatch";
1087
+ "mandate.category_not_allowed": "mandate.category_not_allowed";
1088
+ "mandate.currency_not_allowed": "mandate.currency_not_allowed";
1089
+ "mandate.ends_before_window": "mandate.ends_before_window";
1090
+ "mandate.expired": "mandate.expired";
1091
+ "mandate.invalid": "mandate.invalid";
1092
+ "mandate.missing": "mandate.missing";
1093
+ "mandate.over_commitment_cap": "mandate.over_commitment_cap";
1094
+ "mandate.over_open_reserves_cap": "mandate.over_open_reserves_cap";
1095
+ "mandate.over_payment_limit": "mandate.over_payment_limit";
1096
+ "mandate.revoked": "mandate.revoked";
1097
+ "mandate.signature_invalid": "mandate.signature_invalid";
1098
+ "mandate.supplier_not_allowed": "mandate.supplier_not_allowed";
1099
+ "mandate.token_not_allowed": "mandate.token_not_allowed";
1100
+ "message.expired": "message.expired";
1101
+ "message.invalid": "message.invalid";
1102
+ "message.replayed": "message.replayed";
1103
+ "message.schema_unknown": "message.schema_unknown";
1104
+ "message.signature_invalid": "message.signature_invalid";
1105
+ "message.signer_unknown": "message.signer_unknown";
1106
+ "message.validity_too_long": "message.validity_too_long";
1107
+ "message.wrong_chain": "message.wrong_chain";
1108
+ "message.wrong_contract": "message.wrong_contract";
1109
+ "order.commitment_mismatch": "order.commitment_mismatch";
1110
+ "order.limit_reached": "order.limit_reached";
1111
+ "order.out_of_step": "order.out_of_step";
1112
+ "order.supplier_mismatch": "order.supplier_mismatch";
1113
+ "order.terms_changed": "order.terms_changed";
1114
+ "order.unknown": "order.unknown";
1115
+ "payment.amount_mismatch": "payment.amount_mismatch";
1116
+ "payment.attributed_twice": "payment.attributed_twice";
1117
+ "payment.failed": "payment.failed";
1118
+ "payment.memo_mismatch": "payment.memo_mismatch";
1119
+ "payment.not_final": "payment.not_final";
1120
+ "payment.not_found": "payment.not_found";
1121
+ "payment.not_memo_transfer": "payment.not_memo_transfer";
1122
+ "payment.recipient_mismatch": "payment.recipient_mismatch";
1123
+ "payment.sender_mismatch": "payment.sender_mismatch";
1124
+ "payment.token_mismatch": "payment.token_mismatch";
1125
+ "payment.token_not_accepted": "payment.token_not_accepted";
1126
+ "reference.commitment_mismatch": "reference.commitment_mismatch";
1127
+ "reference.unreadable": "reference.unreadable";
1128
+ "report.amount_invalid": "report.amount_invalid";
1129
+ "report.kind_not_allowed": "report.kind_not_allowed";
1130
+ "report.limit_reached": "report.limit_reached";
1131
+ "report.not_reportable": "report.not_reportable";
1132
+ "report.open": "report.open";
1133
+ "report.too_early": "report.too_early";
1134
+ "request.id_reused": "request.id_reused";
1135
+ "request.in_progress": "request.in_progress";
1136
+ "request.invalid": "request.invalid";
1137
+ "request.signer_unknown": "request.signer_unknown";
1138
+ "request.unsigned": "request.unsigned";
1139
+ "sandbox.budget_spent": "sandbox.budget_spent";
1140
+ "sandbox.closed": "sandbox.closed";
1141
+ "sandbox.event_too_large": "sandbox.event_too_large";
1142
+ "sandbox.faucet_fees_low": "sandbox.faucet_fees_low";
1143
+ "sandbox.limit_reached": "sandbox.limit_reached";
1144
+ "sandbox.pool_empty": "sandbox.pool_empty";
1145
+ "sandbox.session_expired": "sandbox.session_expired";
1146
+ "sandbox.session_full": "sandbox.session_full";
1147
+ "sandbox.session_rate": "sandbox.session_rate";
1148
+ "sandbox.session_taken": "sandbox.session_taken";
1149
+ "sandbox.taken": "sandbox.taken";
1150
+ "service.booking_required": "service.booking_required";
1151
+ "service.cancel_declined": "service.cancel_declined";
1152
+ "service.cancel_late": "service.cancel_late";
1153
+ "service.check_failed": "service.check_failed";
1154
+ "service.compute_off": "service.compute_off";
1155
+ "service.over_budget": "service.over_budget";
1156
+ "service.quantity_unavailable": "service.quantity_unavailable";
1157
+ "service.unavailable": "service.unavailable";
1158
+ "service.unknown_booking": "service.unknown_booking";
1159
+ "service.unknown_offer": "service.unknown_offer";
1160
+ "sponsorship.altered": "sponsorship.altered";
1161
+ "sponsorship.budget_spent": "sponsorship.budget_spent";
1162
+ "sponsorship.over_cap": "sponsorship.over_cap";
1163
+ "sponsorship.rate_limited": "sponsorship.rate_limited";
1164
+ "sponsorship.refused": "sponsorship.refused";
1165
+ "sponsorship.simulation_failed": "sponsorship.simulation_failed";
1166
+ "supplier.declined": "supplier.declined";
1167
+ "supplier.not_accepted": "supplier.not_accepted";
1168
+ "supplier.unknown": "supplier.unknown";
1169
+ "terms.backing_unsupported": "terms.backing_unsupported";
1170
+ "terms.category_mismatch": "terms.category_mismatch";
1171
+ "terms.charges_invalid": "terms.charges_invalid";
1172
+ "terms.contest_window_short": "terms.contest_window_short";
1173
+ "terms.currency_mismatch": "terms.currency_mismatch";
1174
+ "terms.deadlines_out_of_order": "terms.deadlines_out_of_order";
1175
+ "terms.dispute_invalid": "terms.dispute_invalid";
1176
+ "terms.hash_mismatch": "terms.hash_mismatch";
1177
+ "terms.incomplete": "terms.incomplete";
1178
+ "terms.invalid": "terms.invalid";
1179
+ "terms.reserve_mismatch": "terms.reserve_mismatch";
1180
+ "terms.template_invalid": "terms.template_invalid";
1181
+ "terms.template_unknown": "terms.template_unknown";
1182
+ "terms.version_unknown": "terms.version_unknown";
1183
+ }>;
1184
+ layer: z.ZodEnum<{
1185
+ avow: "avow";
1186
+ customer: "customer";
1187
+ keychain: "keychain";
1188
+ lock: "lock";
1189
+ relay: "relay";
1190
+ supplier: "supplier";
1191
+ unknown: "unknown";
1192
+ }>;
1193
+ block: z.ZodNullable<z.ZodObject<{
1194
+ number: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1195
+ hash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1196
+ timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1197
+ }, z.core.$strict>>;
1198
+ index: z.ZodNullable<z.ZodNumber>;
1199
+ }, z.core.$strict>;
1200
+ checks: z.ZodArray<z.ZodObject<{
1201
+ on: z.ZodObject<{
1202
+ kind: z.ZodLiteral<"commitment">;
1203
+ chainId: z.ZodNumber;
1204
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1205
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1206
+ side: z.ZodEnum<{
1207
+ buyer: "buyer";
1208
+ supplier: "supplier";
1209
+ }>;
1210
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1211
+ }, z.core.$strict>;
1212
+ block: z.ZodObject<{
1213
+ number: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1214
+ hash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1215
+ timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1216
+ }, z.core.$strict>;
1217
+ }, z.core.$strict>>;
1218
+ }, z.core.$strict>, ...z.ZodObject<{
1219
+ orderId: z.ZodString;
1220
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1221
+ customer: z.ZodObject<{
1222
+ label: z.ZodLiteral<"Avow's test customer">;
1223
+ businessId: z.ZodString;
1224
+ }, z.core.$strict>;
1225
+ supplierBusinessId: z.ZodString;
1226
+ said: z.ZodArray<z.ZodType<{
1227
+ index: number;
1228
+ text: string;
1229
+ }, unknown, z.core.$ZodTypeInternals<{
1230
+ index: number;
1231
+ text: string;
1232
+ }, unknown>>>;
1233
+ facts: z.ZodArray<z.ZodType<{
1234
+ text: string;
1235
+ check: "commitment" | "dependency" | "payment" | "reserve";
1236
+ reference: {
1237
+ kind: "commitment";
1238
+ chainId: number;
1239
+ lock: `0x${string}`;
1240
+ commitmentId: `0x${string}`;
1241
+ side: "buyer" | "supplier";
1242
+ termsHash: `0x${string}`;
1243
+ };
1244
+ block: {
1245
+ number: bigint;
1246
+ hash: `0x${string}`;
1247
+ timestamp: bigint;
1248
+ };
1249
+ transactionHash: `0x${string}` | null;
1250
+ index: number;
1251
+ verifiedBy: "customer";
1252
+ }, unknown, z.core.$ZodTypeInternals<{
1253
+ text: string;
1254
+ check: "commitment" | "dependency" | "payment" | "reserve";
1255
+ reference: {
1256
+ kind: "commitment";
1257
+ chainId: number;
1258
+ lock: `0x${string}`;
1259
+ commitmentId: `0x${string}`;
1260
+ side: "buyer" | "supplier";
1261
+ termsHash: `0x${string}`;
1262
+ };
1263
+ block: {
1264
+ number: bigint;
1265
+ hash: `0x${string}`;
1266
+ timestamp: bigint;
1267
+ };
1268
+ transactionHash: `0x${string}` | null;
1269
+ index: number;
1270
+ verifiedBy: "customer";
1271
+ }, unknown>>>;
1272
+ status: z.ZodLiteral<"accepted" | "delivered" | "reserved">;
1273
+ checks: z.ZodArray<z.ZodObject<{
1274
+ on: z.ZodObject<{
1275
+ kind: z.ZodLiteral<"commitment">;
1276
+ chainId: z.ZodNumber;
1277
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1278
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1279
+ side: z.ZodEnum<{
1280
+ buyer: "buyer";
1281
+ supplier: "supplier";
1282
+ }>;
1283
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1284
+ }, z.core.$strict>;
1285
+ block: z.ZodObject<{
1286
+ number: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1287
+ hash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1288
+ timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1289
+ }, z.core.$strict>;
1290
+ }, z.core.$strict>>;
1291
+ reserve: z.ZodObject<{
1292
+ reference: z.ZodObject<{
1293
+ kind: z.ZodLiteral<"commitment">;
1294
+ chainId: z.ZodNumber;
1295
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1296
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1297
+ side: z.ZodEnum<{
1298
+ buyer: "buyer";
1299
+ supplier: "supplier";
1300
+ }>;
1301
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1302
+ }, z.core.$strict>;
1303
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1304
+ fundedIn: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1305
+ }, z.core.$strict>;
1306
+ }, z.core.$strict>[], z.ZodObject<{
1307
+ orderId: z.ZodString;
1308
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1309
+ customer: z.ZodObject<{
1310
+ label: z.ZodLiteral<"Avow's test customer">;
1311
+ businessId: z.ZodString;
1312
+ }, z.core.$strict>;
1313
+ supplierBusinessId: z.ZodString;
1314
+ said: z.ZodArray<z.ZodType<{
1315
+ index: number;
1316
+ text: string;
1317
+ }, unknown, z.core.$ZodTypeInternals<{
1318
+ index: number;
1319
+ text: string;
1320
+ }, unknown>>>;
1321
+ facts: z.ZodArray<z.ZodType<{
1322
+ text: string;
1323
+ check: "commitment" | "dependency" | "payment" | "reserve";
1324
+ reference: {
1325
+ kind: "commitment";
1326
+ chainId: number;
1327
+ lock: `0x${string}`;
1328
+ commitmentId: `0x${string}`;
1329
+ side: "buyer" | "supplier";
1330
+ termsHash: `0x${string}`;
1331
+ };
1332
+ block: {
1333
+ number: bigint;
1334
+ hash: `0x${string}`;
1335
+ timestamp: bigint;
1336
+ };
1337
+ transactionHash: `0x${string}` | null;
1338
+ index: number;
1339
+ verifiedBy: "customer";
1340
+ }, unknown, z.core.$ZodTypeInternals<{
1341
+ text: string;
1342
+ check: "commitment" | "dependency" | "payment" | "reserve";
1343
+ reference: {
1344
+ kind: "commitment";
1345
+ chainId: number;
1346
+ lock: `0x${string}`;
1347
+ commitmentId: `0x${string}`;
1348
+ side: "buyer" | "supplier";
1349
+ termsHash: `0x${string}`;
1350
+ };
1351
+ block: {
1352
+ number: bigint;
1353
+ hash: `0x${string}`;
1354
+ timestamp: bigint;
1355
+ };
1356
+ transactionHash: `0x${string}` | null;
1357
+ index: number;
1358
+ verifiedBy: "customer";
1359
+ }, unknown>>>;
1360
+ status: z.ZodLiteral<"cancelled">;
1361
+ checks: z.ZodArray<z.ZodObject<{
1362
+ on: z.ZodObject<{
1363
+ kind: z.ZodLiteral<"commitment">;
1364
+ chainId: z.ZodNumber;
1365
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1366
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1367
+ side: z.ZodEnum<{
1368
+ buyer: "buyer";
1369
+ supplier: "supplier";
1370
+ }>;
1371
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1372
+ }, z.core.$strict>;
1373
+ block: z.ZodObject<{
1374
+ number: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1375
+ hash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1376
+ timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1377
+ }, z.core.$strict>;
1378
+ }, z.core.$strict>>;
1379
+ reserve: z.ZodObject<{
1380
+ reference: z.ZodObject<{
1381
+ kind: z.ZodLiteral<"commitment">;
1382
+ chainId: z.ZodNumber;
1383
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1384
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1385
+ side: z.ZodEnum<{
1386
+ buyer: "buyer";
1387
+ supplier: "supplier";
1388
+ }>;
1389
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1390
+ }, z.core.$strict>;
1391
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1392
+ fundedIn: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1393
+ }, z.core.$strict>;
1394
+ cancellation: z.ZodObject<{
1395
+ cancelledAt: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1396
+ }, z.core.$strict>;
1397
+ }, z.core.$strict>, z.ZodObject<{
1398
+ orderId: z.ZodString;
1399
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1400
+ customer: z.ZodObject<{
1401
+ label: z.ZodLiteral<"Avow's test customer">;
1402
+ businessId: z.ZodString;
1403
+ }, z.core.$strict>;
1404
+ supplierBusinessId: z.ZodString;
1405
+ said: z.ZodArray<z.ZodType<{
1406
+ index: number;
1407
+ text: string;
1408
+ }, unknown, z.core.$ZodTypeInternals<{
1409
+ index: number;
1410
+ text: string;
1411
+ }, unknown>>>;
1412
+ facts: z.ZodArray<z.ZodType<{
1413
+ text: string;
1414
+ check: "commitment" | "dependency" | "payment" | "reserve";
1415
+ reference: {
1416
+ kind: "commitment";
1417
+ chainId: number;
1418
+ lock: `0x${string}`;
1419
+ commitmentId: `0x${string}`;
1420
+ side: "buyer" | "supplier";
1421
+ termsHash: `0x${string}`;
1422
+ };
1423
+ block: {
1424
+ number: bigint;
1425
+ hash: `0x${string}`;
1426
+ timestamp: bigint;
1427
+ };
1428
+ transactionHash: `0x${string}` | null;
1429
+ index: number;
1430
+ verifiedBy: "customer";
1431
+ }, unknown, z.core.$ZodTypeInternals<{
1432
+ text: string;
1433
+ check: "commitment" | "dependency" | "payment" | "reserve";
1434
+ reference: {
1435
+ kind: "commitment";
1436
+ chainId: number;
1437
+ lock: `0x${string}`;
1438
+ commitmentId: `0x${string}`;
1439
+ side: "buyer" | "supplier";
1440
+ termsHash: `0x${string}`;
1441
+ };
1442
+ block: {
1443
+ number: bigint;
1444
+ hash: `0x${string}`;
1445
+ timestamp: bigint;
1446
+ };
1447
+ transactionHash: `0x${string}` | null;
1448
+ index: number;
1449
+ verifiedBy: "customer";
1450
+ }, unknown>>>;
1451
+ status: z.ZodLiteral<"paid">;
1452
+ checks: z.ZodArray<z.ZodObject<{
1453
+ on: z.ZodObject<{
1454
+ kind: z.ZodLiteral<"commitment">;
1455
+ chainId: z.ZodNumber;
1456
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1457
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1458
+ side: z.ZodEnum<{
1459
+ buyer: "buyer";
1460
+ supplier: "supplier";
1461
+ }>;
1462
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1463
+ }, z.core.$strict>;
1464
+ block: z.ZodObject<{
1465
+ number: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1466
+ hash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1467
+ timestamp: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1468
+ }, z.core.$strict>;
1469
+ }, z.core.$strict>>;
1470
+ reserve: z.ZodObject<{
1471
+ reference: z.ZodObject<{
1472
+ kind: z.ZodLiteral<"commitment">;
1473
+ chainId: z.ZodNumber;
1474
+ lock: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1475
+ commitmentId: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1476
+ side: z.ZodEnum<{
1477
+ buyer: "buyer";
1478
+ supplier: "supplier";
1479
+ }>;
1480
+ termsHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1481
+ }, z.core.$strict>;
1482
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1483
+ fundedIn: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1484
+ }, z.core.$strict>;
1485
+ payment: z.ZodObject<{
1486
+ kind: z.ZodLiteral<"payment">;
1487
+ chainId: z.ZodNumber;
1488
+ transactionHash: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1489
+ logIndex: z.ZodNumber;
1490
+ token: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1491
+ from: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1492
+ to: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1493
+ amount: z.ZodPipe<z.ZodString, z.ZodTransform<bigint, string>>;
1494
+ memo: z.ZodPipe<z.ZodString, z.ZodTransform<`0x${string}`, string>>;
1495
+ }, z.core.$strict>;
1496
+ }, z.core.$strict>], "status">;
1497
+ export declare const orderAnswerJson: z.ZodObject<{
1498
+ orderId: z.ZodString;
1499
+ status: z.ZodEnum<{
1500
+ delivered: "delivered";
1501
+ verifying: "verifying";
1502
+ }>;
1503
+ }, z.core.$strict>;
1504
+ /**
1505
+ * Why a quote's terms aren't the offer's, or null when they are. A quote may add the bookings the
1506
+ * job relies on, which makes its terms version 3 with a setting for who checks them, and may change
1507
+ * nothing else. Anything more is `order.terms_changed`.
1508
+ */
1509
+ export declare function quoteTermsProblem(offered: JobTerms, quoted: ChainedJobTerms | JobTerms): ReasonCode | null;
1510
+ /** Reads the customer's profile. */
1511
+ export declare const parseTestCustomerProfile: (json: unknown) => Parsed<TestCustomerProfile>;
1512
+ /** Reads the body of a request for a new order, as the customer takes it. */
1513
+ export declare const parseOrderRequest: (json: unknown) => Parsed<OrderRequest>;
1514
+ /** Reads the customer's offer. */
1515
+ export declare const parseJobOffer: (json: unknown) => Parsed<JobOffer>;
1516
+ /** Reads the body of a quote, as the customer takes it. */
1517
+ export declare const parseQuoteRequest: (json: unknown) => Parsed<QuoteRequest>;
1518
+ /** Reads where an order stands. */
1519
+ export declare const parseOrderState: (json: unknown) => Parsed<OrderState>;
1520
+ /** Reads the answer to a quote or a delivery report. */
1521
+ export declare const parseOrderAnswer: (json: unknown) => Parsed<OrderAnswer>;
1522
+ /** Reads the body of a delivery report, as the customer takes it. */
1523
+ export declare const parseDeliveryReport: (json: unknown) => Parsed<DeliveryReport>;
1524
+ export {};
1525
+ //# sourceMappingURL=test-customer.d.ts.map