@hyperscale0/udl 2.6.0 → 3.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.
Files changed (213) hide show
  1. package/CHANGELOG.md +2 -322
  2. package/LICENSING.md +1 -2
  3. package/README.md +3 -114
  4. package/TRADEMARKS.md +2 -2
  5. package/dist/diagnostics.d.ts +21 -201
  6. package/dist/diagnostics.d.ts.map +1 -1
  7. package/dist/diagnostics.js +29 -193
  8. package/dist/diagnostics.js.map +1 -1
  9. package/dist/evolution.d.ts +3 -132
  10. package/dist/evolution.d.ts.map +1 -1
  11. package/dist/evolution.js +29 -633
  12. package/dist/evolution.js.map +1 -1
  13. package/dist/finance.d.ts +5 -72
  14. package/dist/finance.d.ts.map +1 -1
  15. package/dist/finance.js +233 -737
  16. package/dist/finance.js.map +1 -1
  17. package/dist/index.d.ts +7 -18
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +7 -12
  20. package/dist/index.js.map +1 -1
  21. package/dist/instrument-references.d.ts.map +1 -1
  22. package/dist/instrument-references.js +3 -2
  23. package/dist/instrument-references.js.map +1 -1
  24. package/dist/schema.d.ts +2079 -4564
  25. package/dist/schema.d.ts.map +1 -1
  26. package/dist/schema.js +270 -1609
  27. package/dist/schema.js.map +1 -1
  28. package/dist/validation.d.ts +8 -104
  29. package/dist/validation.d.ts.map +1 -1
  30. package/dist/validation.js +653 -3271
  31. package/dist/validation.js.map +1 -1
  32. package/docs/README.md +147 -14
  33. package/package.json +7 -11
  34. package/spec/README.md +151 -164
  35. package/spec/darb.udl.json +249 -0
  36. package/spec/udl.schema.json +4104 -3202
  37. package/src/diagnostics.ts +51 -246
  38. package/src/evolution.ts +39 -1045
  39. package/src/finance.ts +287 -1127
  40. package/src/index.ts +18 -142
  41. package/src/instrument-references.ts +3 -2
  42. package/src/schema.ts +285 -1843
  43. package/src/validation.ts +870 -5611
  44. package/conformance/README.md +0 -82
  45. package/conformance/evolution/action-contract.expected.json +0 -10
  46. package/conformance/evolution/action-contract.live.udl +0 -44
  47. package/conformance/evolution/action-contract.next.udl +0 -45
  48. package/conformance/evolution/product-identity.expected.json +0 -10
  49. package/conformance/evolution/product-identity.live.udl +0 -55
  50. package/conformance/evolution/product-identity.next.udl +0 -55
  51. package/conformance/evolution/version-required.expected.json +0 -10
  52. package/conformance/evolution/version-required.live.udl +0 -55
  53. package/conformance/evolution/version-required.next.udl +0 -58
  54. package/conformance/invalid/action-without-transition.expected.json +0 -10
  55. package/conformance/invalid/action-without-transition.udl +0 -60
  56. package/conformance/invalid/agent-description-too-long.expected.json +0 -10
  57. package/conformance/invalid/agent-description-too-long.udl +0 -57
  58. package/conformance/invalid/blank-title.expected.json +0 -10
  59. package/conformance/invalid/blank-title.udl +0 -54
  60. package/conformance/invalid/call-binds-results.expected.json +0 -10
  61. package/conformance/invalid/call-binds-results.udl +0 -314
  62. package/conformance/invalid/call-unknown-action.expected.json +0 -10
  63. package/conformance/invalid/call-unknown-action.udl +0 -314
  64. package/conformance/invalid/composition-dial-duplicate-key.expected.json +0 -10
  65. package/conformance/invalid/composition-dial-duplicate-key.udl +0 -73
  66. package/conformance/invalid/depth-budget.expected.json +0 -10
  67. package/conformance/invalid/depth-budget.udl +0 -49
  68. package/conformance/invalid/duplicate-subject.expected.json +0 -10
  69. package/conformance/invalid/duplicate-subject.udl +0 -230
  70. package/conformance/invalid/forged-effects.expected.json +0 -10
  71. package/conformance/invalid/forged-effects.udl +0 -76
  72. package/conformance/invalid/format-version.expected.json +0 -10
  73. package/conformance/invalid/format-version.udl +0 -54
  74. package/conformance/invalid/instrument-id-not-snake-case.expected.json +0 -10
  75. package/conformance/invalid/instrument-id-not-snake-case.udl +0 -54
  76. package/conformance/invalid/invalid-aggregate-gate-shape.expected.json +0 -10
  77. package/conformance/invalid/invalid-aggregate-gate-shape.udl +0 -1819
  78. package/conformance/invalid/invalid-check-duration.expected.json +0 -10
  79. package/conformance/invalid/invalid-check-duration.udl +0 -219
  80. package/conformance/invalid/invalid-dial-anchor.expected.json +0 -10
  81. package/conformance/invalid/invalid-dial-anchor.udl +0 -219
  82. package/conformance/invalid/invalid-exception-parent-ref.expected.json +0 -10
  83. package/conformance/invalid/invalid-exception-parent-ref.udl +0 -2487
  84. package/conformance/invalid/invalid-exposure-shape.expected.json +0 -10
  85. package/conformance/invalid/invalid-exposure-shape.udl +0 -1819
  86. package/conformance/invalid/invalid-journeys.expected.json +0 -10
  87. package/conformance/invalid/invalid-journeys.udl +0 -77
  88. package/conformance/invalid/invalid-remainder.expected.json +0 -10
  89. package/conformance/invalid/invalid-remainder.udl +0 -220
  90. package/conformance/invalid/invalid-schema-keyword.expected.json +0 -10
  91. package/conformance/invalid/invalid-schema-keyword.udl +0 -220
  92. package/conformance/invalid/invalid-utf8.expected.json +0 -10
  93. package/conformance/invalid/invalid-utf8.udl +0 -1
  94. package/conformance/invalid/leaf-effect-mismatch.expected.json +0 -10
  95. package/conformance/invalid/leaf-effect-mismatch.udl +0 -314
  96. package/conformance/invalid/malformed-json.expected.json +0 -10
  97. package/conformance/invalid/malformed-json.udl +0 -1
  98. package/conformance/invalid/missing-create-action.expected.json +0 -10
  99. package/conformance/invalid/missing-create-action.udl +0 -48
  100. package/conformance/invalid/missing-exception-amount-field.expected.json +0 -10
  101. package/conformance/invalid/missing-exception-amount-field.udl +0 -2487
  102. package/conformance/invalid/missing-exception-contract.expected.json +0 -14
  103. package/conformance/invalid/missing-exception-contract.udl +0 -2523
  104. package/conformance/invalid/missing-exception-reason-field.expected.json +0 -10
  105. package/conformance/invalid/missing-exception-reason-field.udl +0 -2487
  106. package/conformance/invalid/not-an-object.expected.json +0 -10
  107. package/conformance/invalid/not-an-object.udl +0 -1
  108. package/conformance/invalid/payout-reconcile-not-a-bank-debit.expected.json +0 -10
  109. package/conformance/invalid/payout-reconcile-not-a-bank-debit.udl +0 -259
  110. package/conformance/invalid/piece-plan-without-partition.expected.json +0 -10
  111. package/conformance/invalid/piece-plan-without-partition.udl +0 -305
  112. package/conformance/invalid/private-action-independent-approval.expected.json +0 -10
  113. package/conformance/invalid/private-action-independent-approval.udl +0 -314
  114. package/conformance/invalid/quote-freeze-set-incomplete.expected.json +0 -10
  115. package/conformance/invalid/quote-freeze-set-incomplete.udl +0 -261
  116. package/conformance/invalid/quote-named-reference-gate.expected.json +0 -10
  117. package/conformance/invalid/quote-named-reference-gate.udl +0 -50
  118. package/conformance/invalid/reconcile-named-reference-gate.expected.json +0 -10
  119. package/conformance/invalid/reconcile-named-reference-gate.udl +0 -50
  120. package/conformance/invalid/unfund-order-not-reversed.expected.json +0 -10
  121. package/conformance/invalid/unfund-order-not-reversed.udl +0 -314
  122. package/conformance/invalid/unknown-key.expected.json +0 -10
  123. package/conformance/invalid/unknown-key.udl +0 -55
  124. package/conformance/invalid/unknown-reference-gate-field.expected.json +0 -10
  125. package/conformance/invalid/unknown-reference-gate-field.udl +0 -1819
  126. package/conformance/invalid/unknown-required-field.expected.json +0 -10
  127. package/conformance/invalid/unknown-required-field.udl +0 -220
  128. package/conformance/invalid/unreachable-state.expected.json +0 -10
  129. package/conformance/invalid/unreachable-state.udl +0 -55
  130. package/conformance/invalid/wrong-exception-amount-field.expected.json +0 -10
  131. package/conformance/invalid/wrong-exception-amount-field.udl +0 -2487
  132. package/conformance/invalid/wrong-exception-reason-field.expected.json +0 -10
  133. package/conformance/invalid/wrong-exception-reason-field.udl +0 -2487
  134. package/conformance/valid/agent-description.expected.json +0 -6
  135. package/conformance/valid/agent-description.udl +0 -66
  136. package/conformance/valid/attested.expected.json +0 -6
  137. package/conformance/valid/attested.udl +0 -251
  138. package/conformance/valid/cards.expected.json +0 -6
  139. package/conformance/valid/cards.udl +0 -1579
  140. package/conformance/valid/commerce-escrow.expected.json +0 -6
  141. package/conformance/valid/commerce-escrow.udl +0 -1512
  142. package/conformance/valid/compiled-crowdfunding.expected.json +0 -6
  143. package/conformance/valid/compiled-crowdfunding.udl +0 -1843
  144. package/conformance/valid/compiled-watch-club.expected.json +0 -6
  145. package/conformance/valid/compiled-watch-club.udl +0 -2486
  146. package/conformance/valid/complete-contract.expected.json +0 -6
  147. package/conformance/valid/complete-contract.udl +0 -218
  148. package/conformance/valid/effect-signatures.expected.json +0 -6
  149. package/conformance/valid/effect-signatures.udl +0 -75
  150. package/conformance/valid/hand-edited.expected.json +0 -6
  151. package/conformance/valid/hand-edited.udl +0 -1
  152. package/conformance/valid/insured-car-marketplace.expected.json +0 -6
  153. package/conformance/valid/insured-car-marketplace.udl +0 -1050
  154. package/conformance/valid/insured-travel.expected.json +0 -6
  155. package/conformance/valid/insured-travel.udl +0 -3469
  156. package/conformance/valid/minimal.expected.json +0 -6
  157. package/conformance/valid/minimal.udl +0 -62
  158. package/conformance/valid/piece-plan-calls.expected.json +0 -6
  159. package/conformance/valid/piece-plan-calls.udl +0 -314
  160. package/conformance/valid/protection.expected.json +0 -6
  161. package/conformance/valid/protection.udl +0 -1551
  162. package/conformance/valid/string-escaping.expected.json +0 -6
  163. package/conformance/valid/string-escaping.udl +0 -54
  164. package/conformance/valid/vocabulary.expected.json +0 -6
  165. package/conformance/valid/vocabulary.udl +0 -2012
  166. package/dist/allocation.d.ts +0 -60
  167. package/dist/allocation.d.ts.map +0 -1
  168. package/dist/allocation.js +0 -177
  169. package/dist/allocation.js.map +0 -1
  170. package/dist/check-profiles.d.ts +0 -57
  171. package/dist/check-profiles.d.ts.map +0 -1
  172. package/dist/check-profiles.js +0 -62
  173. package/dist/check-profiles.js.map +0 -1
  174. package/dist/distribution.d.ts +0 -15
  175. package/dist/distribution.d.ts.map +0 -1
  176. package/dist/distribution.js +0 -49
  177. package/dist/distribution.js.map +0 -1
  178. package/dist/effects.d.ts +0 -58
  179. package/dist/effects.d.ts.map +0 -1
  180. package/dist/effects.js +0 -1126
  181. package/dist/effects.js.map +0 -1
  182. package/dist/reference.d.ts +0 -3
  183. package/dist/reference.d.ts.map +0 -1
  184. package/dist/reference.js +0 -28
  185. package/dist/reference.js.map +0 -1
  186. package/dist/vocabulary.d.ts +0 -23
  187. package/dist/vocabulary.d.ts.map +0 -1
  188. package/dist/vocabulary.js +0 -1052
  189. package/dist/vocabulary.js.map +0 -1
  190. package/docs/funding-custody.md +0 -165
  191. package/docs/guide/01-a-document.md +0 -37
  192. package/docs/guide/02-money-steps.md +0 -23
  193. package/docs/guide/03-laws.md +0 -18
  194. package/docs/guide/04-fees-and-remainder.md +0 -36
  195. package/docs/guide/05-checks-updates-dials.md +0 -7
  196. package/docs/guide/06-effects.md +0 -11
  197. package/docs/guide/07-evolution.md +0 -11
  198. package/docs/guide/08-implementing.md +0 -13
  199. package/docs/guide/09-schedules-and-allocation.md +0 -132
  200. package/docs/llms-full.txt +0 -2008
  201. package/docs/llms.txt +0 -14
  202. package/docs/piece-plans.md +0 -148
  203. package/docs/reference/canonical.md +0 -16
  204. package/docs/reference/clauses.md +0 -1585
  205. package/docs/reference/cli.md +0 -24
  206. package/docs/reference/diagnostics.md +0 -38
  207. package/skills/udl/SKILL.md +0 -28
  208. package/src/allocation.ts +0 -259
  209. package/src/check-profiles.ts +0 -80
  210. package/src/distribution.ts +0 -61
  211. package/src/effects.ts +0 -1920
  212. package/src/reference.ts +0 -31
  213. package/src/vocabulary.ts +0 -1635
@@ -1,314 +0,0 @@
1
- {
2
- "instruments": [
3
- {
4
- "actionOrder": [
5
- "create",
6
- "fund_piece",
7
- "payout_piece"
8
- ],
9
- "actions": {
10
- "create": {
11
- "moves": [],
12
- "steps": [],
13
- "summary": "Create watch instrument"
14
- },
15
- "fund_piece": {
16
- "calls": [
17
- {
18
- "action": "transfers.execute_fund",
19
- "bind": {
20
- "inst": "$instance",
21
- "p": "$piece"
22
- },
23
- "id": "call_fund"
24
- }
25
- ],
26
- "effects": {
27
- "moves": [
28
- {
29
- "signature": "moves.transfer.internal",
30
- "source": "fund_piece.call_fund.leaf_fund"
31
- }
32
- ]
33
- },
34
- "input": {
35
- "additionalProperties": false,
36
- "properties": {
37
- "pieceId": {
38
- "enum": [
39
- "p1",
40
- "p2"
41
- ],
42
- "type": "string"
43
- }
44
- },
45
- "required": [
46
- "pieceId"
47
- ],
48
- "type": "object"
49
- },
50
- "moves": [],
51
- "pieceStage": {
52
- "plan": "split_plan",
53
- "stage": "fund"
54
- },
55
- "steps": [],
56
- "summary": "Fund one piece in stage"
57
- },
58
- "payout_piece": {
59
- "calls": [
60
- {
61
- "action": "transfers.execute_release",
62
- "bind": {
63
- "inst": "$instance",
64
- "p": "$piece"
65
- },
66
- "id": "call_rel"
67
- }
68
- ],
69
- "effects": {
70
- "moves": [
71
- {
72
- "signature": "moves.transfer.internal",
73
- "source": "payout_piece.call_rel.leaf_rel"
74
- }
75
- ]
76
- },
77
- "input": {
78
- "additionalProperties": false,
79
- "properties": {
80
- "pieceId": {
81
- "enum": [
82
- "p1",
83
- "p2"
84
- ],
85
- "type": "string"
86
- }
87
- },
88
- "required": [
89
- "pieceId"
90
- ],
91
- "type": "object"
92
- },
93
- "moves": [],
94
- "pieceStage": {
95
- "plan": "split_plan",
96
- "stage": "release"
97
- },
98
- "steps": [],
99
- "summary": "Release piece"
100
- }
101
- },
102
- "actionLibrary": {
103
- "transfers": {
104
- "actionOrder": [
105
- "execute_fund",
106
- "execute_release"
107
- ],
108
- "actions": {
109
- "execute_fund": {
110
- "approval": "independent",
111
- "calls": [],
112
- "leaves": [
113
- {
114
- "bind": {
115
- "amount": "$p.amount",
116
- "destinationAccountId": "$p.release_to",
117
- "sourceAccountId": "$inst.fields.buyerAccount"
118
- },
119
- "effects": [
120
- {
121
- "kind": "moves",
122
- "signature": "moves.transfer.internal"
123
- }
124
- ],
125
- "evidence": "bank transfer confirmation receipt",
126
- "id": "leaf_fund",
127
- "operation": "internal_transfer.create"
128
- }
129
- ],
130
- "order": [
131
- "leaf_fund"
132
- ],
133
- "parameters": {
134
- "inst": {
135
- "kind": "instance"
136
- },
137
- "p": {
138
- "kind": "piece"
139
- }
140
- },
141
- "principal": "api_key",
142
- "recovery": "local"
143
- },
144
- "execute_release": {
145
- "approval": "inherit",
146
- "calls": [],
147
- "leaves": [
148
- {
149
- "bind": {
150
- "amount": "$p.amount",
151
- "destinationAccountId": "$p.release_to",
152
- "sourceAccountId": "$inst.fields.escrowAccount"
153
- },
154
- "effects": [
155
- {
156
- "kind": "moves",
157
- "signature": "moves.transfer.internal"
158
- }
159
- ],
160
- "evidence": "release to payee confirmation",
161
- "id": "leaf_rel",
162
- "operation": "internal_transfer.create"
163
- }
164
- ],
165
- "order": [
166
- "leaf_rel"
167
- ],
168
- "parameters": {
169
- "inst": {
170
- "kind": "instance"
171
- },
172
- "p": {
173
- "kind": "piece"
174
- }
175
- },
176
- "principal": "api_key",
177
- "recovery": "local"
178
- }
179
- }
180
- }
181
- },
182
- "fields": {
183
- "buyerAccount": {
184
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
185
- "type": "string"
186
- },
187
- "currency": {
188
- "const": "USD",
189
- "pattern": "^[A-Z]{3}$",
190
- "type": "string"
191
- },
192
- "escrowAccount": {
193
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
194
- "type": "string"
195
- },
196
- "p1Amount": {
197
- "pattern": "^[1-9][0-9]{0,17}$",
198
- "type": "string",
199
- "x-hyperscale-currency": "USD"
200
- },
201
- "p1Refund": {
202
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
203
- "type": "string"
204
- },
205
- "p1Release": {
206
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
207
- "type": "string"
208
- },
209
- "p2Amount": {
210
- "pattern": "^[1-9][0-9]{0,17}$",
211
- "type": "string",
212
- "x-hyperscale-currency": "USD"
213
- },
214
- "p2Refund": {
215
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
216
- "type": "string"
217
- },
218
- "p2Release": {
219
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
220
- "type": "string"
221
- },
222
- "totalAmount": {
223
- "pattern": "^[1-9][0-9]{0,17}$",
224
- "type": "string",
225
- "x-hyperscale-currency": "USD"
226
- }
227
- },
228
- "id": "escrow_watch",
229
- "idPrefix": "ew",
230
- "lifecycle": {
231
- "initial": "draft",
232
- "states": [
233
- "draft",
234
- "funded",
235
- "released"
236
- ],
237
- "transitions": {
238
- "fund_piece": {
239
- "from": [
240
- "draft"
241
- ],
242
- "to": "funded"
243
- },
244
- "payout_piece": {
245
- "from": [
246
- "funded"
247
- ],
248
- "to": "released"
249
- }
250
- }
251
- },
252
- "partitions": [
253
- {
254
- "pieceFields": [
255
- "p1Amount",
256
- "p2Amount"
257
- ],
258
- "totalField": "totalAmount"
259
- }
260
- ],
261
- "piecePlan": {
262
- "fund_order": [
263
- "p1",
264
- "p2"
265
- ],
266
- "id": "split_plan",
267
- "pieces": [
268
- {
269
- "amount": "p1Amount",
270
- "id": "p1",
271
- "refund_to": "p1Refund",
272
- "release_to": "p1Release"
273
- },
274
- {
275
- "amount": "p2Amount",
276
- "id": "p2",
277
- "refund_to": "p2Refund",
278
- "release_to": "p2Release"
279
- }
280
- ],
281
- "refund_order": [
282
- "p1"
283
- ],
284
- "release_order": [
285
- "p1",
286
- "p2"
287
- ],
288
- "total": "totalAmount",
289
- "unfund_order": [
290
- "p2",
291
- "p1"
292
- ]
293
- },
294
- "required": [
295
- "totalAmount",
296
- "p1Amount",
297
- "p2Amount",
298
- "p1Release",
299
- "p1Refund",
300
- "p2Release",
301
- "p2Refund",
302
- "buyerAccount",
303
- "escrowAccount"
304
- ],
305
- "summary": "Escrow watch contract with piece plan",
306
- "title": "Escrow Watch"
307
- }
308
- ],
309
- "product": "escrow_watch",
310
- "subjects": [],
311
- "title": "Escrow Watch Document",
312
- "udl": 1,
313
- "version": 1
314
- }
@@ -1,10 +0,0 @@
1
- {
2
- "issues": [
3
- {
4
- "code": "UDL5006",
5
- "path": "$.instruments[0].actions.quote.quote.baseField"
6
- }
7
- ],
8
- "summary": "Freeze set completeness: an offer must freeze the base amount it prices and the account it pays, or the commit fingerprints values the price never pinned.",
9
- "verdict": "invalid"
10
- }
@@ -1,261 +0,0 @@
1
- {
2
- "instruments": [
3
- {
4
- "actionOrder": [
5
- "create",
6
- "fund",
7
- "dispute",
8
- "quote",
9
- "refund"
10
- ],
11
- "actions": {
12
- "create": {
13
- "description": "Opens escrow against an active listing and provisions its dedicated product escrow account. The amount, currency, and seller are derived from the locked listing -- never caller-supplied -- so escrow economics are the listing's by construction.",
14
- "moves": [],
15
- "steps": [
16
- {
17
- "bind": {
18
- "currency": {
19
- "from": "instance",
20
- "path": "fields.currency"
21
- },
22
- "owner.id": {
23
- "from": "instance",
24
- "path": "productId"
25
- },
26
- "owner.type": {
27
- "from": "const",
28
- "value": "product"
29
- },
30
- "productId": {
31
- "from": "instance",
32
- "path": "productId"
33
- },
34
- "role": {
35
- "from": "const",
36
- "value": "product_escrow"
37
- }
38
- },
39
- "capture": {
40
- "escrowAccountId": "accountId"
41
- },
42
- "operation": "account.escrow.provision"
43
- }
44
- ],
45
- "summary": "Create an escrow order"
46
- },
47
- "dispute": {
48
- "description": "Freezes the fully funded escrow before either milestone releases, preserving the entire balance while the parties decide what happens next.",
49
- "moves": [],
50
- "steps": [],
51
- "summary": "Dispute an escrow order"
52
- },
53
- "fund": {
54
- "description": "Moves the full purchase amount from the buyer account into the dedicated escrow account while the listing remains active.",
55
- "moves": [
56
- {
57
- "bind": {
58
- "amount": {
59
- "from": "instance",
60
- "path": "fields.amount"
61
- },
62
- "currency": {
63
- "from": "instance",
64
- "path": "fields.currency"
65
- },
66
- "destinationAccountId": {
67
- "from": "instance",
68
- "path": "refs.escrowAccountId"
69
- },
70
- "productId": {
71
- "from": "instance",
72
- "path": "productId"
73
- },
74
- "sourceAccountId": {
75
- "from": "instance",
76
- "path": "fields.buyerAccountId"
77
- }
78
- },
79
- "capture": {
80
- "fundTransferId": "transferId"
81
- },
82
- "key": "transfer",
83
- "operation": "internal_transfer.create"
84
- }
85
- ],
86
- "sandboxFailurePoint": "funding",
87
- "steps": [],
88
- "summary": "Fund an escrow order"
89
- },
90
- "quote": {
91
- "description": "Calculates the full buyer refund while disputed and parks the escrow for explicit confirmation. No money moves at quote time.",
92
- "moves": [],
93
- "quote": {
94
- "baseField": "amount",
95
- "chargeRef": "unwindPenalty",
96
- "charges": [
97
- {
98
- "bps": 0
99
- }
100
- ],
101
- "expires": {
102
- "offset": "PT15M"
103
- },
104
- "fixes": [
105
- "buyerAccountId"
106
- ],
107
- "netDestinationField": "buyerAccountId",
108
- "netRef": "unwindRefund"
109
- },
110
- "steps": [],
111
- "summary": "Quote an escrow refund"
112
- },
113
- "refund": {
114
- "commit": "quote",
115
- "description": "Confirms the quoted retreat and returns the full held amount from escrow to the buyer.",
116
- "moves": [
117
- {
118
- "bind": {
119
- "amount": {
120
- "from": "instance",
121
- "path": "refs.unwindRefund"
122
- },
123
- "currency": {
124
- "from": "instance",
125
- "path": "fields.currency"
126
- },
127
- "destinationAccountId": {
128
- "from": "instance",
129
- "path": "fields.buyerAccountId"
130
- },
131
- "productId": {
132
- "from": "instance",
133
- "path": "productId"
134
- },
135
- "sourceAccountId": {
136
- "from": "instance",
137
- "path": "refs.escrowAccountId"
138
- }
139
- },
140
- "capture": {
141
- "refundTransferId": "transferId"
142
- },
143
- "key": "transfer",
144
- "operation": "internal_transfer.create"
145
- }
146
- ],
147
- "steps": [],
148
- "summary": "Refund an escrow order"
149
- }
150
- },
151
- "callerParkedStates": {
152
- "created": "expire fires only when fundBy is set; without a funding deadline the escrow waits on the buyer to fund or cancel",
153
- "disputed": "dispute resolution is a human judgment; the parties resume the escrow or quote a refund",
154
- "funded": "releasing or disputing held value is a party decision; escrow deliberately holds until the parties act",
155
- "refund_quoted": "a quoted refund moves money only when the caller confirms it"
156
- },
157
- "description": "An escrow order holds the full purchase amount and releases it to the seller exactly once. Before release, a dispute freezes the full balance until work resumes or a quoted refund is confirmed.",
158
- "fields": {
159
- "amount": {
160
- "description": "Positive minor-unit integer amount serialized as a string (at most 18 digits)",
161
- "pattern": "^[1-9][0-9]{0,17}$",
162
- "type": "string"
163
- },
164
- "buyerAccountId": {
165
- "description": "Hyperscale account ID",
166
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
167
- "type": "string",
168
- "x-hyperscale-reference-filter": {
169
- "column": "role",
170
- "values": [
171
- "customer_balance"
172
- ]
173
- }
174
- },
175
- "currency": {
176
- "description": "ISO 4217 currency code",
177
- "maxLength": 3,
178
- "minLength": 3,
179
- "pattern": "^[A-Z]{3}$",
180
- "type": "string"
181
- },
182
- "fundBy": {
183
- "format": "hyperscale-date-time",
184
- "type": "string"
185
- },
186
- "memo": {
187
- "maxLength": 180,
188
- "minLength": 1,
189
- "type": "string"
190
- },
191
- "sellerAccountId": {
192
- "description": "Hyperscale account ID",
193
- "pattern": "^acct_(sandbox|live)_[a-z0-9]{8,64}$",
194
- "type": "string",
195
- "x-hyperscale-reference-filter": {
196
- "column": "role",
197
- "values": [
198
- "customer_balance"
199
- ]
200
- }
201
- }
202
- },
203
- "id": "escrow_order",
204
- "idPrefix": "eord",
205
- "lifecycle": {
206
- "initial": "created",
207
- "states": [
208
- "created",
209
- "funded",
210
- "disputed",
211
- "refunded",
212
- "refund_quoted"
213
- ],
214
- "transitions": {
215
- "dispute": {
216
- "from": [
217
- "funded"
218
- ],
219
- "to": "disputed"
220
- },
221
- "fund": {
222
- "from": [
223
- "created"
224
- ],
225
- "to": "funded"
226
- },
227
- "quote": {
228
- "from": [
229
- "disputed"
230
- ],
231
- "to": "refund_quoted"
232
- },
233
- "refund": {
234
- "from": [
235
- "refund_quoted"
236
- ],
237
- "to": "refunded"
238
- }
239
- }
240
- },
241
- "parties": {
242
- "beneficiary": "sellerAccountId",
243
- "payer": "buyerAccountId"
244
- },
245
- "required": [
246
- "buyerAccountId",
247
- "sellerAccountId",
248
- "amount",
249
- "currency"
250
- ],
251
- "summary": "An escrow order whose refund quote omits its own base field.",
252
- "templateId": "escrow",
253
- "title": "Escrow order"
254
- }
255
- ],
256
- "product": "quote_freeze_set",
257
- "subjects": [],
258
- "title": "Quote freeze set",
259
- "udl": 1,
260
- "version": 1
261
- }
@@ -1,10 +0,0 @@
1
- {
2
- "issues": [
3
- {
4
- "code": "UDL5001",
5
- "path": "$.instruments[0].actions.quote.requiresRefs[0].field"
6
- }
7
- ],
8
- "summary": "An action named quote does not change the code for an ordinary reference-gate defect.",
9
- "verdict": "invalid"
10
- }
@@ -1,50 +0,0 @@
1
- {
2
- "instruments": [
3
- {
4
- "actionOrder": ["create", "quote"],
5
- "actions": {
6
- "create": {
7
- "moves": [],
8
- "steps": [],
9
- "summary": "File the note."
10
- },
11
- "quote": {
12
- "moves": [],
13
- "requiresRefs": [
14
- {
15
- "field": "reference",
16
- "statuses": ["open"]
17
- }
18
- ],
19
- "steps": [],
20
- "summary": "Close the note."
21
- }
22
- },
23
- "fields": {
24
- "reference": {
25
- "type": "string"
26
- }
27
- },
28
- "id": "note",
29
- "idPrefix": "note",
30
- "lifecycle": {
31
- "initial": "open",
32
- "states": ["open", "closed"],
33
- "transitions": {
34
- "quote": {
35
- "from": ["open"],
36
- "to": "closed"
37
- }
38
- }
39
- },
40
- "required": ["reference"],
41
- "summary": "A note a tenant files and later closes.",
42
- "title": "Note"
43
- }
44
- ],
45
- "product": "quote_named_reference_gate",
46
- "subjects": [],
47
- "title": "Quote named reference gate",
48
- "udl": 1,
49
- "version": 1
50
- }
@@ -1,10 +0,0 @@
1
- {
2
- "issues": [
3
- {
4
- "code": "UDL5001",
5
- "path": "$.instruments[0].actions.reconcile.requiresRefs[0].field"
6
- }
7
- ],
8
- "summary": "An action named reconcile does not change the code for an ordinary reference-gate defect.",
9
- "verdict": "invalid"
10
- }