@ottochain/sdk 2.3.0 → 2.4.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 (209) hide show
  1. package/dist/cjs/apps/contracts/index.js +15 -8
  2. package/dist/cjs/apps/contracts/state-machines/contract-agreement.js +35 -40
  3. package/dist/cjs/apps/contracts/state-machines/contract-escrow.js +80 -37
  4. package/dist/cjs/apps/contracts/state-machines/contract-universal.js +4 -4
  5. package/dist/cjs/apps/corporate/index.js +2 -2
  6. package/dist/cjs/apps/corporate/state-machines/corp-board.js +169 -59
  7. package/dist/cjs/apps/corporate/state-machines/corp-entity.js +245 -47
  8. package/dist/cjs/apps/corporate/state-machines/corp-securities.js +407 -99
  9. package/dist/cjs/apps/corporate/state-machines/corp-shareholders.js +151 -37
  10. package/dist/cjs/apps/governance/index.js +14 -14
  11. package/dist/cjs/apps/governance/state-machines/dao-multisig.js +58 -40
  12. package/dist/cjs/apps/governance/state-machines/dao-reputation.js +46 -40
  13. package/dist/cjs/apps/governance/state-machines/dao-single.js +28 -11
  14. package/dist/cjs/apps/governance/state-machines/dao-token.js +67 -41
  15. package/dist/cjs/apps/governance/state-machines/governance-simple.js +93 -61
  16. package/dist/cjs/apps/governance/state-machines/governance-universal.js +2 -2
  17. package/dist/cjs/apps/identity/constants.js +55 -14
  18. package/dist/cjs/apps/identity/index.js +27 -11
  19. package/dist/cjs/apps/identity/state-machines/identity-agent.js +3 -3
  20. package/dist/cjs/apps/identity/state-machines/identity-oracle.js +25 -22
  21. package/dist/cjs/apps/identity/state-machines/identity-registry.js +288 -0
  22. package/dist/cjs/apps/identity/state-machines/identity-universal.js +3 -3
  23. package/dist/cjs/apps/identity/state-machines/index.js +3 -1
  24. package/dist/cjs/apps/index.js +19 -8
  25. package/dist/cjs/apps/lending/assets.js +223 -0
  26. package/dist/cjs/apps/lending/credit-scoring.js +87 -0
  27. package/dist/cjs/apps/lending/eligibility.js +121 -0
  28. package/dist/cjs/apps/lending/index.js +91 -0
  29. package/dist/cjs/apps/lending/state-machines/index.js +9 -0
  30. package/dist/cjs/apps/lending/state-machines/lending-zk-loan.js +412 -0
  31. package/dist/cjs/apps/markets/index.js +21 -11
  32. package/dist/cjs/apps/markets/state-machines/market-auction.js +14 -13
  33. package/dist/cjs/apps/markets/state-machines/market-crowdfund.js +29 -24
  34. package/dist/cjs/apps/markets/state-machines/market-group-buy.js +24 -26
  35. package/dist/cjs/apps/markets/state-machines/market-prediction.js +80 -53
  36. package/dist/cjs/apps/markets/state-machines/market-universal.js +5 -5
  37. package/dist/cjs/apps/oracles/index.js +2 -2
  38. package/dist/cjs/errors.js +3 -3
  39. package/dist/cjs/generated/google/protobuf/struct.js +4 -4
  40. package/dist/cjs/generated/index.js +11 -7
  41. package/dist/cjs/generated/openapi.js +6 -0
  42. package/dist/cjs/generated/ottochain/apps/contracts/v1/contract.js +50 -50
  43. package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate.js +19 -20
  44. package/dist/cjs/generated/ottochain/apps/governance/v1/governance.js +13 -13
  45. package/dist/cjs/generated/ottochain/apps/identity/v1/attestation.js +4 -4
  46. package/dist/cjs/generated/ottochain/apps/identity/v1/identity.js +124 -130
  47. package/dist/cjs/generated/ottochain/apps/markets/v1/market.js +107 -107
  48. package/dist/cjs/generated/ottochain/v1/common.js +4 -4
  49. package/dist/cjs/generated/ottochain/v1/fiber.js +4 -4
  50. package/dist/cjs/index.js +41 -7
  51. package/dist/cjs/openapi.js +2 -0
  52. package/dist/cjs/ottochain/drop-nulls.js +1 -2
  53. package/dist/cjs/ottochain/genesis-manifest.js +11 -11
  54. package/dist/cjs/ottochain/index.js +23 -13
  55. package/dist/cjs/ottochain/metagraph-client.js +65 -8
  56. package/dist/cjs/ottochain/snapshot.js +11 -12
  57. package/dist/cjs/ottochain/transaction.js +57 -14
  58. package/dist/cjs/ottochain/types.js +16 -2
  59. package/dist/cjs/privacy/index.js +14 -0
  60. package/dist/cjs/privacy/sealed-bid.js +210 -0
  61. package/dist/cjs/privacy/shield-app.js +131 -0
  62. package/dist/cjs/schema/effects.js +40 -0
  63. package/dist/cjs/schema/fiber-app.js +19 -13
  64. package/dist/cjs/schema/guard-lint.js +352 -0
  65. package/dist/cjs/schema/guards.js +246 -0
  66. package/dist/cjs/signing.js +80 -0
  67. package/dist/cjs/types.js +2 -3
  68. package/dist/cjs/validation.js +8 -8
  69. package/dist/cjs/verify.js +9 -4
  70. package/dist/cjs/zk/commit.js +53 -0
  71. package/dist/cjs/zk/guard.js +107 -0
  72. package/dist/cjs/zk/index.js +48 -0
  73. package/dist/cjs/zk/preimage.js +37 -0
  74. package/dist/cjs/zk/prover.js +87 -0
  75. package/dist/cjs/zk/registry.js +62 -0
  76. package/dist/cjs/zk/types.js +28 -0
  77. package/dist/cjs/zk/witness.js +19 -0
  78. package/dist/esm/apps/contracts/index.js +7 -3
  79. package/dist/esm/apps/contracts/state-machines/contract-agreement.js +35 -40
  80. package/dist/esm/apps/contracts/state-machines/contract-escrow.js +80 -37
  81. package/dist/esm/apps/contracts/state-machines/contract-universal.js +4 -4
  82. package/dist/esm/apps/corporate/state-machines/corp-board.js +169 -59
  83. package/dist/esm/apps/corporate/state-machines/corp-entity.js +245 -47
  84. package/dist/esm/apps/corporate/state-machines/corp-securities.js +407 -99
  85. package/dist/esm/apps/corporate/state-machines/corp-shareholders.js +151 -37
  86. package/dist/esm/apps/governance/state-machines/dao-multisig.js +58 -40
  87. package/dist/esm/apps/governance/state-machines/dao-reputation.js +46 -40
  88. package/dist/esm/apps/governance/state-machines/dao-single.js +28 -11
  89. package/dist/esm/apps/governance/state-machines/dao-token.js +67 -41
  90. package/dist/esm/apps/governance/state-machines/governance-simple.js +93 -61
  91. package/dist/esm/apps/governance/state-machines/governance-universal.js +2 -2
  92. package/dist/esm/apps/identity/constants.js +51 -12
  93. package/dist/esm/apps/identity/index.js +12 -7
  94. package/dist/esm/apps/identity/state-machines/identity-agent.js +3 -3
  95. package/dist/esm/apps/identity/state-machines/identity-oracle.js +25 -22
  96. package/dist/esm/apps/identity/state-machines/identity-registry.js +285 -0
  97. package/dist/esm/apps/identity/state-machines/identity-universal.js +3 -3
  98. package/dist/esm/apps/identity/state-machines/index.js +1 -0
  99. package/dist/esm/apps/index.js +1 -0
  100. package/dist/esm/apps/lending/assets.js +207 -0
  101. package/dist/esm/apps/lending/credit-scoring.js +81 -0
  102. package/dist/esm/apps/lending/eligibility.js +115 -0
  103. package/dist/esm/apps/lending/index.js +69 -0
  104. package/dist/esm/apps/lending/state-machines/index.js +5 -0
  105. package/dist/esm/apps/lending/state-machines/lending-zk-loan.js +409 -0
  106. package/dist/esm/apps/markets/index.js +8 -4
  107. package/dist/esm/apps/markets/state-machines/market-auction.js +14 -13
  108. package/dist/esm/apps/markets/state-machines/market-crowdfund.js +29 -24
  109. package/dist/esm/apps/markets/state-machines/market-group-buy.js +24 -26
  110. package/dist/esm/apps/markets/state-machines/market-prediction.js +80 -53
  111. package/dist/esm/apps/markets/state-machines/market-universal.js +5 -5
  112. package/dist/esm/generated/index.js +9 -5
  113. package/dist/esm/generated/openapi.js +5 -0
  114. package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +46 -46
  115. package/dist/esm/generated/ottochain/apps/identity/v1/identity.js +114 -120
  116. package/dist/esm/generated/ottochain/apps/markets/v1/market.js +100 -100
  117. package/dist/esm/index.js +21 -2
  118. package/dist/esm/openapi.js +1 -0
  119. package/dist/esm/ottochain/genesis-manifest.js +9 -9
  120. package/dist/esm/ottochain/index.js +2 -3
  121. package/dist/esm/ottochain/metagraph-client.js +65 -8
  122. package/dist/esm/ottochain/snapshot.js +4 -4
  123. package/dist/esm/ottochain/transaction.js +43 -3
  124. package/dist/esm/ottochain/types.js +15 -1
  125. package/dist/esm/privacy/index.js +6 -0
  126. package/dist/esm/privacy/sealed-bid.js +206 -0
  127. package/dist/esm/privacy/shield-app.js +127 -0
  128. package/dist/esm/schema/effects.js +35 -0
  129. package/dist/esm/schema/fiber-app.js +13 -6
  130. package/dist/esm/schema/guard-lint.js +346 -0
  131. package/dist/esm/schema/guards.js +229 -0
  132. package/dist/esm/signing.js +74 -0
  133. package/dist/esm/verify.js +8 -2
  134. package/dist/esm/zk/commit.js +44 -0
  135. package/dist/esm/zk/guard.js +99 -0
  136. package/dist/esm/zk/index.js +19 -0
  137. package/dist/esm/zk/preimage.js +30 -0
  138. package/dist/esm/zk/prover.js +82 -0
  139. package/dist/esm/zk/registry.js +55 -0
  140. package/dist/esm/zk/types.js +25 -0
  141. package/dist/esm/zk/witness.js +15 -0
  142. package/dist/types/apps/contracts/index.d.ts +69 -209
  143. package/dist/types/apps/contracts/state-machines/contract-agreement.d.ts +20 -95
  144. package/dist/types/apps/contracts/state-machines/contract-escrow.d.ts +46 -112
  145. package/dist/types/apps/corporate/index.d.ts +1040 -304
  146. package/dist/types/apps/corporate/state-machines/corp-board.d.ts +188 -52
  147. package/dist/types/apps/corporate/state-machines/corp-entity.d.ts +267 -62
  148. package/dist/types/apps/corporate/state-machines/corp-securities.d.ts +355 -131
  149. package/dist/types/apps/corporate/state-machines/corp-shareholders.d.ts +225 -53
  150. package/dist/types/apps/governance/index.d.ts +296 -398
  151. package/dist/types/apps/governance/state-machines/dao-multisig.d.ts +77 -92
  152. package/dist/types/apps/governance/state-machines/dao-reputation.d.ts +42 -66
  153. package/dist/types/apps/governance/state-machines/dao-single.d.ts +25 -47
  154. package/dist/types/apps/governance/state-machines/dao-token.d.ts +60 -49
  155. package/dist/types/apps/governance/state-machines/governance-simple.d.ts +87 -117
  156. package/dist/types/apps/governance/state-machines/governance-universal.d.ts +2 -2
  157. package/dist/types/apps/identity/constants.d.ts +32 -4
  158. package/dist/types/apps/identity/index.d.ts +378 -94
  159. package/dist/types/apps/identity/state-machines/identity-oracle.d.ts +16 -87
  160. package/dist/types/apps/identity/state-machines/identity-registry.d.ts +379 -0
  161. package/dist/types/apps/identity/state-machines/index.d.ts +1 -0
  162. package/dist/types/apps/index.d.ts +1 -0
  163. package/dist/types/apps/lending/assets.d.ts +258 -0
  164. package/dist/types/apps/lending/credit-scoring.d.ts +80 -0
  165. package/dist/types/apps/lending/eligibility.d.ts +83 -0
  166. package/dist/types/apps/lending/index.d.ts +548 -0
  167. package/dist/types/apps/lending/state-machines/index.d.ts +5 -0
  168. package/dist/types/apps/lending/state-machines/lending-zk-loan.d.ts +528 -0
  169. package/dist/types/apps/markets/index.d.ts +108 -203
  170. package/dist/types/apps/markets/state-machines/market-auction.d.ts +13 -37
  171. package/dist/types/apps/markets/state-machines/market-crowdfund.d.ts +16 -34
  172. package/dist/types/apps/markets/state-machines/market-group-buy.d.ts +17 -43
  173. package/dist/types/apps/markets/state-machines/market-prediction.d.ts +51 -72
  174. package/dist/types/apps/markets/state-machines/market-universal.d.ts +5 -5
  175. package/dist/types/generated/index.d.ts +5 -5
  176. package/dist/types/generated/openapi.d.ts +1257 -0
  177. package/dist/types/generated/ottochain/apps/contracts/v1/contract.d.ts +5 -5
  178. package/dist/types/generated/ottochain/apps/identity/v1/identity.d.ts +12 -12
  179. package/dist/types/generated/ottochain/apps/markets/v1/market.d.ts +11 -11
  180. package/dist/types/index.d.ts +6 -2
  181. package/dist/types/openapi.d.ts +22 -0
  182. package/dist/types/ottochain/genesis-manifest.d.ts +5 -5
  183. package/dist/types/ottochain/index.d.ts +5 -6
  184. package/dist/types/ottochain/metagraph-client.d.ts +49 -7
  185. package/dist/types/ottochain/snapshot.d.ts +6 -6
  186. package/dist/types/ottochain/transaction.d.ts +33 -1
  187. package/dist/types/ottochain/types.d.ts +335 -30
  188. package/dist/types/privacy/index.d.ts +6 -0
  189. package/dist/types/privacy/sealed-bid.d.ts +348 -0
  190. package/dist/types/privacy/shield-app.d.ts +48 -0
  191. package/dist/types/schema/effects.d.ts +34 -0
  192. package/dist/types/schema/fiber-app.d.ts +1 -2
  193. package/dist/types/schema/guard-lint.d.ts +111 -0
  194. package/dist/types/schema/guards.d.ts +134 -0
  195. package/dist/types/signing.d.ts +45 -0
  196. package/dist/types/validation.d.ts +22 -217
  197. package/dist/types/verify.d.ts +4 -0
  198. package/dist/types/zk/commit.d.ts +28 -0
  199. package/dist/types/zk/guard.d.ts +46 -0
  200. package/dist/types/zk/index.d.ts +19 -0
  201. package/dist/types/zk/preimage.d.ts +10 -0
  202. package/dist/types/zk/prover.d.ts +34 -0
  203. package/dist/types/zk/registry.d.ts +34 -0
  204. package/dist/types/zk/types.d.ts +33 -0
  205. package/dist/types/zk/witness.d.ts +40 -0
  206. package/package.json +27 -13
  207. package/dist/cjs/ottochain/normalize.js +0 -186
  208. package/dist/esm/ottochain/normalize.js +0 -179
  209. package/dist/types/ottochain/normalize.d.ts +0 -79
@@ -6,8 +6,8 @@
6
6
  * @example
7
7
  * ```typescript
8
8
  * import {
9
- * MarketType,
10
- * MarketState,
9
+ * Type,
10
+ * State,
11
11
  * Market,
12
12
  * getMarketDefinition,
13
13
  * MARKETS_DEFINITIONS
@@ -19,7 +19,8 @@
19
19
  *
20
20
  * @packageDocumentation
21
21
  */
22
- export { MarketType, MarketState, Commitment, Resolution, Market, CreateMarketRequest, CommitToMarketRequest, SubmitResolutionRequest, CancelMarketRequest, MarketDefinition, marketTypeFromJSON, marketTypeToJSON, marketStateFromJSON, marketStateToJSON, } from "../../generated/ottochain/apps/markets/v1/market.js";
22
+ export { Type, State, Commitment, Resolution, Market, CreateMarketRequest, CommitToMarketRequest, SubmitResolutionRequest, CancelMarketRequest, MarketDefinition, typeFromJSON, typeToJSON, stateFromJSON, stateToJSON, } from "../../generated/ottochain/apps/markets/v1/market.js";
23
+ export { Type as MarketType, State as MarketState, typeFromJSON as marketTypeFromJSON, typeToJSON as marketTypeToJSON, stateFromJSON as marketStateFromJSON, stateToJSON as marketStateToJSON, } from "../../generated/ottochain/apps/markets/v1/market.js";
23
24
  import { marketUniversalDef, marketPredictionDef, marketAuctionDef, marketCrowdfundDef, marketGroupBuyDef } from "./state-machines/index.js";
24
25
  import type { FiberAppDefinition } from "../../schema/fiber-app.js";
25
26
  export { marketUniversalDef, marketPredictionDef, marketAuctionDef, marketCrowdfundDef, marketGroupBuyDef, };
@@ -103,10 +104,7 @@ export declare const MARKETS_DEFINITIONS: {
103
104
  readonly isFinal: true;
104
105
  readonly metadata: {
105
106
  readonly label: "Settled";
106
- readonly description: "Market settled and payouts available (terminal)"; /**
107
- * Get a market state machine definition by type.
108
- * @param type - 'universal' | 'prediction' | 'auction' | 'crowdfund' | 'groupBuy' (default: 'universal')
109
- */
107
+ readonly description: "Market settled and payouts available (terminal)";
110
108
  readonly category: "terminal";
111
109
  };
112
110
  };
@@ -134,7 +132,7 @@ export declare const MARKETS_DEFINITIONS: {
134
132
  }, {
135
133
  readonly status: "OPEN";
136
134
  readonly openedAt: {
137
- readonly var: "$timestamp";
135
+ readonly var: "$ordinal";
138
136
  };
139
137
  }];
140
138
  };
@@ -152,7 +150,7 @@ export declare const MARKETS_DEFINITIONS: {
152
150
  }, {
153
151
  readonly status: "CANCELLED";
154
152
  readonly cancelledAt: {
155
- readonly var: "$timestamp";
153
+ readonly var: "$ordinal";
156
154
  };
157
155
  }];
158
156
  };
@@ -193,7 +191,7 @@ export declare const MARKETS_DEFINITIONS: {
193
191
  }, {
194
192
  readonly status: "CLOSED";
195
193
  readonly closedAt: {
196
- readonly var: "$timestamp";
194
+ readonly var: "$ordinal";
197
195
  };
198
196
  }];
199
197
  };
@@ -211,7 +209,7 @@ export declare const MARKETS_DEFINITIONS: {
211
209
  }, {
212
210
  readonly status: "SETTLED";
213
211
  readonly settledAt: {
214
- readonly var: "$timestamp";
212
+ readonly var: "$ordinal";
215
213
  };
216
214
  }];
217
215
  };
@@ -229,7 +227,7 @@ export declare const MARKETS_DEFINITIONS: {
229
227
  }, {
230
228
  readonly status: "CANCELLED";
231
229
  readonly cancelledAt: {
232
- readonly var: "$timestamp";
230
+ readonly var: "$ordinal";
233
231
  };
234
232
  }];
235
233
  };
@@ -249,13 +247,18 @@ export declare const MARKETS_DEFINITIONS: {
249
247
  };
250
248
  };
251
249
  readonly createSchema: {
252
- readonly required: readonly ["creator", "outcomes", "oracles", "quorum"];
250
+ readonly required: readonly ["creator", "outcomes", "oracles", "quorum", "arbiter"];
253
251
  readonly properties: {
254
252
  readonly creator: {
255
253
  readonly type: "address";
256
254
  readonly description: "DAG address of the market creator";
257
255
  readonly immutable: true;
258
256
  };
257
+ readonly arbiter: {
258
+ readonly type: "address";
259
+ readonly description: "DAG address of the arbiter authorized to rule on a disputed resolution";
260
+ readonly immutable: true;
261
+ };
259
262
  readonly outcomes: {
260
263
  readonly type: "array";
261
264
  readonly description: "Valid outcome identifiers";
@@ -287,6 +290,10 @@ export declare const MARKETS_DEFINITIONS: {
287
290
  readonly type: "address";
288
291
  readonly immutable: true;
289
292
  };
293
+ readonly arbiter: {
294
+ readonly type: "address";
295
+ readonly immutable: true;
296
+ };
290
297
  readonly outcomes: {
291
298
  readonly type: "array";
292
299
  readonly immutable: true;
@@ -366,11 +373,6 @@ export declare const MARKETS_DEFINITIONS: {
366
373
  };
367
374
  readonly finalize: {
368
375
  readonly description: "Finalize market after quorum reached";
369
- readonly properties: {
370
- readonly outcome: {
371
- readonly type: "string";
372
- };
373
- };
374
376
  };
375
377
  readonly dispute: {
376
378
  readonly description: "Dispute the resolution";
@@ -388,10 +390,7 @@ export declare const MARKETS_DEFINITIONS: {
388
390
  readonly ruling: {
389
391
  readonly description: "Judicial ruling on dispute";
390
392
  readonly properties: {
391
- readonly judicialRuling: {
392
- readonly type: "boolean";
393
- };
394
- readonly outcome: {
393
+ readonly finalOutcome: {
395
394
  readonly type: "string";
396
395
  };
397
396
  readonly rulingId: {
@@ -490,20 +489,14 @@ export declare const MARKETS_DEFINITIONS: {
490
489
  readonly from: "PROPOSED";
491
490
  readonly to: "OPEN";
492
491
  readonly eventName: "open";
493
- readonly guard: {
494
- readonly "===": readonly [{
495
- readonly var: "event.agent";
496
- }, {
497
- readonly var: "state.creator";
498
- }];
499
- };
492
+ readonly guard: import("../../index.js").GuardRule;
500
493
  readonly effect: {
501
494
  readonly merge: readonly [{
502
495
  readonly var: "state";
503
496
  }, {
504
497
  readonly status: "OPEN";
505
498
  readonly openedAt: {
506
- readonly var: "$timestamp";
499
+ readonly var: "$ordinal";
507
500
  };
508
501
  readonly positions: {};
509
502
  readonly totalPool: 0;
@@ -514,20 +507,14 @@ export declare const MARKETS_DEFINITIONS: {
514
507
  readonly from: "PROPOSED";
515
508
  readonly to: "CANCELLED";
516
509
  readonly eventName: "cancel";
517
- readonly guard: {
518
- readonly "===": readonly [{
519
- readonly var: "event.agent";
520
- }, {
521
- readonly var: "state.creator";
522
- }];
523
- };
510
+ readonly guard: import("../../index.js").GuardRule;
524
511
  readonly effect: {
525
512
  readonly merge: readonly [{
526
513
  readonly var: "state";
527
514
  }, {
528
515
  readonly status: "CANCELLED";
529
516
  readonly cancelledAt: {
530
- readonly var: "$timestamp";
517
+ readonly var: "$ordinal";
531
518
  };
532
519
  readonly reason: {
533
520
  readonly var: "event.reason";
@@ -557,7 +544,7 @@ export declare const MARKETS_DEFINITIONS: {
557
544
  }];
558
545
  }, {
559
546
  readonly "<=": readonly [{
560
- readonly var: "$timestamp";
547
+ readonly var: "$ordinal";
561
548
  }, {
562
549
  readonly var: "state.deadline";
563
550
  }];
@@ -596,18 +583,12 @@ export declare const MARKETS_DEFINITIONS: {
596
583
  readonly to: "CLOSED";
597
584
  readonly eventName: "close";
598
585
  readonly guard: {
599
- readonly or: readonly [{
600
- readonly "===": readonly [{
601
- readonly var: "event.agent";
602
- }, {
603
- readonly var: "state.creator";
604
- }];
605
- }, {
586
+ readonly or: readonly [import("../../index.js").GuardRule, {
606
587
  readonly and: readonly [{
607
588
  readonly var: "state.deadline";
608
589
  }, {
609
590
  readonly ">=": readonly [{
610
- readonly var: "$timestamp";
591
+ readonly var: "$ordinal";
611
592
  }, {
612
593
  readonly var: "state.deadline";
613
594
  }];
@@ -620,7 +601,7 @@ export declare const MARKETS_DEFINITIONS: {
620
601
  }, {
621
602
  readonly status: "CLOSED";
622
603
  readonly closedAt: {
623
- readonly var: "$timestamp";
604
+ readonly var: "$ordinal";
624
605
  };
625
606
  }];
626
607
  };
@@ -629,13 +610,7 @@ export declare const MARKETS_DEFINITIONS: {
629
610
  readonly from: "CLOSED";
630
611
  readonly to: "RESOLVING";
631
612
  readonly eventName: "submit_resolution";
632
- readonly guard: {
633
- readonly in: readonly [{
634
- readonly var: "event.agent";
635
- }, {
636
- readonly var: "state.oracles";
637
- }];
638
- };
613
+ readonly guard: import("../../index.js").GuardRule;
639
614
  readonly effect: {
640
615
  readonly merge: readonly [{
641
616
  readonly var: "state";
@@ -652,7 +627,7 @@ export declare const MARKETS_DEFINITIONS: {
652
627
  readonly var: "event.proof";
653
628
  };
654
629
  readonly submittedAt: {
655
- readonly var: "$timestamp";
630
+ readonly var: "$ordinal";
656
631
  };
657
632
  }];
658
633
  }];
@@ -663,13 +638,7 @@ export declare const MARKETS_DEFINITIONS: {
663
638
  readonly to: "RESOLVING";
664
639
  readonly eventName: "submit_resolution";
665
640
  readonly guard: {
666
- readonly and: readonly [{
667
- readonly in: readonly [{
668
- readonly var: "event.agent";
669
- }, {
670
- readonly var: "state.oracles";
671
- }];
672
- }, {
641
+ readonly and: readonly [import("../../index.js").GuardRule, {
673
642
  readonly "!": readonly [{
674
643
  readonly in: readonly [{
675
644
  readonly var: "event.agent";
@@ -701,7 +670,7 @@ export declare const MARKETS_DEFINITIONS: {
701
670
  readonly var: "event.proof";
702
671
  };
703
672
  readonly submittedAt: {
704
- readonly var: "$timestamp";
673
+ readonly var: "$ordinal";
705
674
  };
706
675
  }]];
707
676
  };
@@ -713,12 +682,14 @@ export declare const MARKETS_DEFINITIONS: {
713
682
  readonly to: "SETTLED";
714
683
  readonly eventName: "finalize";
715
684
  readonly guard: {
716
- readonly ">=": readonly [{
717
- readonly size: {
718
- readonly var: "state.resolutions";
719
- };
720
- }, {
721
- readonly var: "state.quorum";
685
+ readonly and: readonly [import("../../index.js").GuardRule, {
686
+ readonly ">=": readonly [{
687
+ readonly count: {
688
+ readonly var: "state.resolutions";
689
+ };
690
+ }, {
691
+ readonly var: "state.quorum";
692
+ }];
722
693
  }];
723
694
  };
724
695
  readonly effect: {
@@ -727,10 +698,10 @@ export declare const MARKETS_DEFINITIONS: {
727
698
  }, {
728
699
  readonly status: "SETTLED";
729
700
  readonly settledAt: {
730
- readonly var: "$timestamp";
701
+ readonly var: "$ordinal";
731
702
  };
732
703
  readonly finalOutcome: {
733
- readonly var: "event.outcome";
704
+ readonly var: "state.resolutions.0.outcome";
734
705
  };
735
706
  readonly claims: readonly [];
736
707
  }];
@@ -743,7 +714,7 @@ export declare const MARKETS_DEFINITIONS: {
743
714
  readonly guard: {
744
715
  readonly and: readonly [{
745
716
  readonly ">": readonly [{
746
- readonly size: {
717
+ readonly length: readonly [{
747
718
  readonly filter: readonly [{
748
719
  readonly var: "state.positions";
749
720
  }, {
@@ -753,7 +724,7 @@ export declare const MARKETS_DEFINITIONS: {
753
724
  readonly var: "event.agent";
754
725
  }];
755
726
  }];
756
- };
727
+ }];
757
728
  }, 0];
758
729
  }, {
759
730
  readonly var: "event.stake";
@@ -765,7 +736,7 @@ export declare const MARKETS_DEFINITIONS: {
765
736
  }, {
766
737
  readonly status: "DISPUTED";
767
738
  readonly disputedAt: {
768
- readonly var: "$timestamp";
739
+ readonly var: "$ordinal";
769
740
  };
770
741
  readonly disputedBy: {
771
742
  readonly var: "event.agent";
@@ -784,7 +755,13 @@ export declare const MARKETS_DEFINITIONS: {
784
755
  readonly to: "SETTLED";
785
756
  readonly eventName: "ruling";
786
757
  readonly guard: {
787
- readonly var: "event.judicialRuling";
758
+ readonly and: readonly [import("../../index.js").GuardRule, {
759
+ readonly in: readonly [{
760
+ readonly var: "event.finalOutcome";
761
+ }, {
762
+ readonly var: "state.outcomes";
763
+ }];
764
+ }];
788
765
  };
789
766
  readonly effect: {
790
767
  readonly merge: readonly [{
@@ -792,10 +769,10 @@ export declare const MARKETS_DEFINITIONS: {
792
769
  }, {
793
770
  readonly status: "SETTLED";
794
771
  readonly settledAt: {
795
- readonly var: "$timestamp";
772
+ readonly var: "$ordinal";
796
773
  };
797
774
  readonly finalOutcome: {
798
- readonly var: "event.outcome";
775
+ readonly var: "event.finalOutcome";
799
776
  };
800
777
  readonly rulingId: {
801
778
  readonly var: "event.rulingId";
@@ -810,7 +787,7 @@ export declare const MARKETS_DEFINITIONS: {
810
787
  readonly eventName: "invalidate";
811
788
  readonly guard: {
812
789
  readonly ">=": readonly [{
813
- readonly size: {
790
+ readonly length: readonly [{
814
791
  readonly filter: readonly [{
815
792
  readonly var: "state.resolutions";
816
793
  }, {
@@ -818,7 +795,7 @@ export declare const MARKETS_DEFINITIONS: {
818
795
  readonly var: "outcome";
819
796
  }, "INVALID"];
820
797
  }];
821
- };
798
+ }];
822
799
  }, {
823
800
  readonly var: "state.quorum";
824
801
  }];
@@ -829,7 +806,7 @@ export declare const MARKETS_DEFINITIONS: {
829
806
  }, {
830
807
  readonly status: "REFUNDED";
831
808
  readonly refundedAt: {
832
- readonly var: "$timestamp";
809
+ readonly var: "$ordinal";
833
810
  };
834
811
  readonly reason: "oracle_invalidation";
835
812
  }];
@@ -842,7 +819,7 @@ export declare const MARKETS_DEFINITIONS: {
842
819
  readonly guard: {
843
820
  readonly and: readonly [{
844
821
  readonly ">": readonly [{
845
- readonly size: {
822
+ readonly length: readonly [{
846
823
  readonly filter: readonly [{
847
824
  readonly var: "state.positions";
848
825
  }, {
@@ -860,7 +837,7 @@ export declare const MARKETS_DEFINITIONS: {
860
837
  }];
861
838
  }];
862
839
  }];
863
- };
840
+ }];
864
841
  }, 0];
865
842
  }, {
866
843
  readonly "!": readonly [{
@@ -891,7 +868,7 @@ export declare const MARKETS_DEFINITIONS: {
891
868
  readonly var: "event.amount";
892
869
  };
893
870
  readonly claimedAt: {
894
- readonly var: "$timestamp";
871
+ readonly var: "$ordinal";
895
872
  };
896
873
  }]];
897
874
  };
@@ -983,10 +960,6 @@ export declare const MARKETS_DEFINITIONS: {
983
960
  readonly open: {
984
961
  readonly description: "Open the auction";
985
962
  };
986
- /**
987
- * Get a market state machine definition by type.
988
- * @param type - 'universal' | 'prediction' | 'auction' | 'crowdfund' | 'groupBuy' (default: 'universal')
989
- */
990
963
  readonly cancel: {
991
964
  readonly description: "Cancel the auction";
992
965
  };
@@ -1071,20 +1044,14 @@ export declare const MARKETS_DEFINITIONS: {
1071
1044
  readonly from: "PROPOSED";
1072
1045
  readonly to: "OPEN";
1073
1046
  readonly eventName: "open";
1074
- readonly guard: {
1075
- readonly "===": readonly [{
1076
- readonly var: "event.agent";
1077
- }, {
1078
- readonly var: "state.seller";
1079
- }];
1080
- };
1047
+ readonly guard: import("../../index.js").GuardRule;
1081
1048
  readonly effect: {
1082
1049
  readonly merge: readonly [{
1083
1050
  readonly var: "state";
1084
1051
  }, {
1085
1052
  readonly status: "OPEN";
1086
1053
  readonly openedAt: {
1087
- readonly var: "$timestamp";
1054
+ readonly var: "$ordinal";
1088
1055
  };
1089
1056
  readonly bids: readonly [];
1090
1057
  readonly highBid: null;
@@ -1096,20 +1063,14 @@ export declare const MARKETS_DEFINITIONS: {
1096
1063
  readonly from: "PROPOSED";
1097
1064
  readonly to: "CANCELLED";
1098
1065
  readonly eventName: "cancel";
1099
- readonly guard: {
1100
- readonly "===": readonly [{
1101
- readonly var: "event.agent";
1102
- }, {
1103
- readonly var: "state.seller";
1104
- }];
1105
- };
1066
+ readonly guard: import("../../index.js").GuardRule;
1106
1067
  readonly effect: {
1107
1068
  readonly merge: readonly [{
1108
1069
  readonly var: "state";
1109
1070
  }, {
1110
1071
  readonly status: "CANCELLED";
1111
1072
  readonly cancelledAt: {
1112
- readonly var: "$timestamp";
1073
+ readonly var: "$ordinal";
1113
1074
  };
1114
1075
  }];
1115
1076
  };
@@ -1119,13 +1080,7 @@ export declare const MARKETS_DEFINITIONS: {
1119
1080
  readonly to: "OPEN";
1120
1081
  readonly eventName: "bid";
1121
1082
  readonly guard: {
1122
- readonly and: readonly [{
1123
- readonly "!==": readonly [{
1124
- readonly var: "event.agent";
1125
- }, {
1126
- readonly var: "state.seller";
1127
- }];
1128
- }, {
1083
+ readonly and: readonly [import("../../index.js").GuardRule, {
1129
1084
  readonly ">=": readonly [{
1130
1085
  readonly var: "event.amount";
1131
1086
  }, {
@@ -1154,7 +1109,7 @@ export declare const MARKETS_DEFINITIONS: {
1154
1109
  }];
1155
1110
  }, {
1156
1111
  readonly "<=": readonly [{
1157
- readonly var: "$timestamp";
1112
+ readonly var: "$ordinal";
1158
1113
  }, {
1159
1114
  readonly var: "state.deadline";
1160
1115
  }];
@@ -1176,7 +1131,7 @@ export declare const MARKETS_DEFINITIONS: {
1176
1131
  readonly var: "event.amount";
1177
1132
  };
1178
1133
  readonly bidAt: {
1179
- readonly var: "$timestamp";
1134
+ readonly var: "$ordinal";
1180
1135
  };
1181
1136
  }]];
1182
1137
  };
@@ -1187,7 +1142,7 @@ export declare const MARKETS_DEFINITIONS: {
1187
1142
  readonly var: "event.agent";
1188
1143
  };
1189
1144
  readonly lastBidAt: {
1190
- readonly var: "$timestamp";
1145
+ readonly var: "$ordinal";
1191
1146
  };
1192
1147
  }];
1193
1148
  };
@@ -1197,18 +1152,12 @@ export declare const MARKETS_DEFINITIONS: {
1197
1152
  readonly to: "CLOSING";
1198
1153
  readonly eventName: "close";
1199
1154
  readonly guard: {
1200
- readonly or: readonly [{
1201
- readonly "===": readonly [{
1202
- readonly var: "event.agent";
1203
- }, {
1204
- readonly var: "state.seller";
1205
- }];
1206
- }, {
1155
+ readonly or: readonly [import("../../index.js").GuardRule, {
1207
1156
  readonly and: readonly [{
1208
1157
  readonly var: "state.deadline";
1209
1158
  }, {
1210
1159
  readonly ">=": readonly [{
1211
- readonly var: "$timestamp";
1160
+ readonly var: "$ordinal";
1212
1161
  }, {
1213
1162
  readonly var: "state.deadline";
1214
1163
  }];
@@ -1221,7 +1170,7 @@ export declare const MARKETS_DEFINITIONS: {
1221
1170
  }, {
1222
1171
  readonly status: "CLOSING";
1223
1172
  readonly closedAt: {
1224
- readonly var: "$timestamp";
1173
+ readonly var: "$ordinal";
1225
1174
  };
1226
1175
  }];
1227
1176
  };
@@ -1253,7 +1202,7 @@ export declare const MARKETS_DEFINITIONS: {
1253
1202
  }, {
1254
1203
  readonly status: "SETTLED";
1255
1204
  readonly settledAt: {
1256
- readonly var: "$timestamp";
1205
+ readonly var: "$ordinal";
1257
1206
  };
1258
1207
  readonly winner: {
1259
1208
  readonly var: "state.highBidder";
@@ -1291,7 +1240,7 @@ export declare const MARKETS_DEFINITIONS: {
1291
1240
  }, {
1292
1241
  readonly status: "NO_SALE";
1293
1242
  readonly closedAt: {
1294
- readonly var: "$timestamp";
1243
+ readonly var: "$ordinal";
1295
1244
  };
1296
1245
  readonly reason: {
1297
1246
  readonly if: readonly [{
@@ -1478,20 +1427,14 @@ export declare const MARKETS_DEFINITIONS: {
1478
1427
  readonly from: "PROPOSED";
1479
1428
  readonly to: "OPEN";
1480
1429
  readonly eventName: "launch";
1481
- readonly guard: {
1482
- readonly "===": readonly [{
1483
- readonly var: "event.agent";
1484
- }, {
1485
- readonly var: "state.creator";
1486
- }];
1487
- };
1430
+ readonly guard: import("../../index.js").GuardRule;
1488
1431
  readonly effect: {
1489
1432
  readonly merge: readonly [{
1490
1433
  readonly var: "state";
1491
1434
  }, {
1492
1435
  readonly status: "OPEN";
1493
1436
  readonly launchedAt: {
1494
- readonly var: "$timestamp";
1437
+ readonly var: "$ordinal";
1495
1438
  };
1496
1439
  readonly pledges: readonly [];
1497
1440
  readonly totalPledged: 0;
@@ -1503,20 +1446,14 @@ export declare const MARKETS_DEFINITIONS: {
1503
1446
  readonly from: "PROPOSED";
1504
1447
  readonly to: "CANCELLED";
1505
1448
  readonly eventName: "cancel";
1506
- readonly guard: {
1507
- readonly "===": readonly [{
1508
- readonly var: "event.agent";
1509
- }, {
1510
- readonly var: "state.creator";
1511
- }];
1512
- };
1449
+ readonly guard: import("../../index.js").GuardRule;
1513
1450
  readonly effect: {
1514
1451
  readonly merge: readonly [{
1515
1452
  readonly var: "state";
1516
1453
  }, {
1517
1454
  readonly status: "CANCELLED";
1518
1455
  readonly cancelledAt: {
1519
- readonly var: "$timestamp";
1456
+ readonly var: "$ordinal";
1520
1457
  };
1521
1458
  }];
1522
1459
  };
@@ -1530,13 +1467,7 @@ export declare const MARKETS_DEFINITIONS: {
1530
1467
  readonly ">": readonly [{
1531
1468
  readonly var: "event.amount";
1532
1469
  }, 0];
1533
- }, {
1534
- readonly "!==": readonly [{
1535
- readonly var: "event.agent";
1536
- }, {
1537
- readonly var: "state.creator";
1538
- }];
1539
- }, {
1470
+ }, import("../../index.js").GuardRule, {
1540
1471
  readonly or: readonly [{
1541
1472
  readonly "!": readonly [{
1542
1473
  readonly var: "state.minPledge";
@@ -1550,7 +1481,7 @@ export declare const MARKETS_DEFINITIONS: {
1550
1481
  }];
1551
1482
  }, {
1552
1483
  readonly "<=": readonly [{
1553
- readonly var: "$timestamp";
1484
+ readonly var: "$ordinal";
1554
1485
  }, {
1555
1486
  readonly var: "state.deadline";
1556
1487
  }];
@@ -1574,7 +1505,7 @@ export declare const MARKETS_DEFINITIONS: {
1574
1505
  readonly var: "event.rewardTier";
1575
1506
  };
1576
1507
  readonly pledgedAt: {
1577
- readonly var: "$timestamp";
1508
+ readonly var: "$ordinal";
1578
1509
  };
1579
1510
  }]];
1580
1511
  };
@@ -1604,13 +1535,13 @@ export declare const MARKETS_DEFINITIONS: {
1604
1535
  }, 0];
1605
1536
  }, {
1606
1537
  readonly "<=": readonly [{
1607
- readonly var: "$timestamp";
1538
+ readonly var: "$ordinal";
1608
1539
  }, {
1609
1540
  readonly var: "state.deadline";
1610
1541
  }];
1611
1542
  }, {
1612
1543
  readonly ">": readonly [{
1613
- readonly size: {
1544
+ readonly length: readonly [{
1614
1545
  readonly filter: readonly [{
1615
1546
  readonly var: "state.pledges";
1616
1547
  }, {
@@ -1620,7 +1551,7 @@ export declare const MARKETS_DEFINITIONS: {
1620
1551
  readonly var: "event.agent";
1621
1552
  }];
1622
1553
  }];
1623
- };
1554
+ }];
1624
1555
  }, 0];
1625
1556
  }];
1626
1557
  };
@@ -1651,7 +1582,7 @@ export declare const MARKETS_DEFINITIONS: {
1651
1582
  }];
1652
1583
  }, {
1653
1584
  readonly ">=": readonly [{
1654
- readonly var: "$timestamp";
1585
+ readonly var: "$ordinal";
1655
1586
  }, {
1656
1587
  readonly var: "state.deadline";
1657
1588
  }];
@@ -1663,7 +1594,7 @@ export declare const MARKETS_DEFINITIONS: {
1663
1594
  }, {
1664
1595
  readonly status: "FUNDED";
1665
1596
  readonly fundedAt: {
1666
- readonly var: "$timestamp";
1597
+ readonly var: "$ordinal";
1667
1598
  };
1668
1599
  readonly stretchGoalsReached: {
1669
1600
  readonly filter: readonly [{
@@ -1692,7 +1623,7 @@ export declare const MARKETS_DEFINITIONS: {
1692
1623
  }];
1693
1624
  }, {
1694
1625
  readonly ">=": readonly [{
1695
- readonly var: "$timestamp";
1626
+ readonly var: "$ordinal";
1696
1627
  }, {
1697
1628
  readonly var: "state.deadline";
1698
1629
  }];
@@ -1704,7 +1635,7 @@ export declare const MARKETS_DEFINITIONS: {
1704
1635
  }, {
1705
1636
  readonly status: "REFUNDED";
1706
1637
  readonly refundedAt: {
1707
- readonly var: "$timestamp";
1638
+ readonly var: "$ordinal";
1708
1639
  };
1709
1640
  readonly reason: "threshold_not_met";
1710
1641
  }];
@@ -1717,7 +1648,7 @@ export declare const MARKETS_DEFINITIONS: {
1717
1648
  readonly guard: {
1718
1649
  readonly and: readonly [{
1719
1650
  readonly ">": readonly [{
1720
- readonly size: {
1651
+ readonly length: readonly [{
1721
1652
  readonly filter: readonly [{
1722
1653
  readonly var: "state.pledges";
1723
1654
  }, {
@@ -1727,7 +1658,7 @@ export declare const MARKETS_DEFINITIONS: {
1727
1658
  readonly var: "event.agent";
1728
1659
  }];
1729
1660
  }];
1730
- };
1661
+ }];
1731
1662
  }, 0];
1732
1663
  }, {
1733
1664
  readonly "!": readonly [{
@@ -1804,7 +1735,7 @@ export declare const MARKETS_DEFINITIONS: {
1804
1735
  readonly stateSchema: {
1805
1736
  readonly properties: {
1806
1737
  readonly status: {
1807
- readonly type: "string"; /** All market state machine definitions */
1738
+ readonly type: "string";
1808
1739
  readonly computed: true;
1809
1740
  };
1810
1741
  readonly organizer: {
@@ -1949,20 +1880,14 @@ export declare const MARKETS_DEFINITIONS: {
1949
1880
  readonly from: "PROPOSED";
1950
1881
  readonly to: "OPEN";
1951
1882
  readonly eventName: "open";
1952
- readonly guard: {
1953
- readonly "===": readonly [{
1954
- readonly var: "event.agent";
1955
- }, {
1956
- readonly var: "state.organizer";
1957
- }];
1958
- };
1883
+ readonly guard: import("../../index.js").GuardRule;
1959
1884
  readonly effect: {
1960
1885
  readonly merge: readonly [{
1961
1886
  readonly var: "state";
1962
1887
  }, {
1963
1888
  readonly status: "OPEN";
1964
1889
  readonly openedAt: {
1965
- readonly var: "$timestamp";
1890
+ readonly var: "$ordinal";
1966
1891
  };
1967
1892
  readonly orders: readonly [];
1968
1893
  readonly totalQuantity: 0;
@@ -1974,20 +1899,14 @@ export declare const MARKETS_DEFINITIONS: {
1974
1899
  readonly from: "PROPOSED";
1975
1900
  readonly to: "CANCELLED";
1976
1901
  readonly eventName: "cancel";
1977
- readonly guard: {
1978
- readonly "===": readonly [{
1979
- readonly var: "event.agent";
1980
- }, {
1981
- readonly var: "state.organizer";
1982
- }];
1983
- };
1902
+ readonly guard: import("../../index.js").GuardRule;
1984
1903
  readonly effect: {
1985
1904
  readonly merge: readonly [{
1986
1905
  readonly var: "state";
1987
1906
  }, {
1988
1907
  readonly status: "CANCELLED";
1989
1908
  readonly cancelledAt: {
1990
- readonly var: "$timestamp";
1909
+ readonly var: "$ordinal";
1991
1910
  };
1992
1911
  }];
1993
1912
  };
@@ -2015,7 +1934,7 @@ export declare const MARKETS_DEFINITIONS: {
2015
1934
  }];
2016
1935
  }, {
2017
1936
  readonly "<=": readonly [{
2018
- readonly var: "$timestamp";
1937
+ readonly var: "$ordinal";
2019
1938
  }, {
2020
1939
  readonly var: "state.deadline";
2021
1940
  }];
@@ -2039,7 +1958,7 @@ export declare const MARKETS_DEFINITIONS: {
2039
1958
  readonly var: "event.shippingInfo";
2040
1959
  };
2041
1960
  readonly orderedAt: {
2042
- readonly var: "$timestamp";
1961
+ readonly var: "$ordinal";
2043
1962
  };
2044
1963
  }]];
2045
1964
  };
@@ -2070,7 +1989,7 @@ export declare const MARKETS_DEFINITIONS: {
2070
1989
  }, {
2071
1990
  readonly status: "THRESHOLD_MET";
2072
1991
  readonly thresholdMetAt: {
2073
- readonly var: "$timestamp";
1992
+ readonly var: "$ordinal";
2074
1993
  };
2075
1994
  readonly currentTier: {
2076
1995
  readonly reduce: readonly [{
@@ -2103,7 +2022,7 @@ export declare const MARKETS_DEFINITIONS: {
2103
2022
  }, 0];
2104
2023
  }, {
2105
2024
  readonly "<=": readonly [{
2106
- readonly var: "$timestamp";
2025
+ readonly var: "$ordinal";
2107
2026
  }, {
2108
2027
  readonly var: "state.deadline";
2109
2028
  }];
@@ -2127,7 +2046,7 @@ export declare const MARKETS_DEFINITIONS: {
2127
2046
  readonly var: "event.shippingInfo";
2128
2047
  };
2129
2048
  readonly orderedAt: {
2130
- readonly var: "$timestamp";
2049
+ readonly var: "$ordinal";
2131
2050
  };
2132
2051
  }]];
2133
2052
  };
@@ -2170,7 +2089,7 @@ export declare const MARKETS_DEFINITIONS: {
2170
2089
  readonly eventName: "finalize";
2171
2090
  readonly guard: {
2172
2091
  readonly ">=": readonly [{
2173
- readonly var: "$timestamp";
2092
+ readonly var: "$ordinal";
2174
2093
  }, {
2175
2094
  readonly var: "state.deadline";
2176
2095
  }];
@@ -2181,7 +2100,7 @@ export declare const MARKETS_DEFINITIONS: {
2181
2100
  }, {
2182
2101
  readonly status: "PROCESSING";
2183
2102
  readonly finalizedAt: {
2184
- readonly var: "$timestamp";
2103
+ readonly var: "$ordinal";
2185
2104
  };
2186
2105
  readonly finalTier: {
2187
2106
  readonly var: "state.currentTier";
@@ -2200,28 +2119,14 @@ export declare const MARKETS_DEFINITIONS: {
2200
2119
  readonly from: "PROCESSING";
2201
2120
  readonly to: "FULFILLED";
2202
2121
  readonly eventName: "fulfill";
2203
- readonly guard: {
2204
- readonly or: readonly [{
2205
- readonly "===": readonly [{
2206
- readonly var: "event.agent";
2207
- }, {
2208
- readonly var: "state.vendor";
2209
- }];
2210
- }, {
2211
- readonly "===": readonly [{
2212
- readonly var: "event.agent";
2213
- }, {
2214
- readonly var: "state.organizer";
2215
- }];
2216
- }];
2217
- };
2122
+ readonly guard: import("../../index.js").GuardRule;
2218
2123
  readonly effect: {
2219
2124
  readonly merge: readonly [{
2220
2125
  readonly var: "state";
2221
2126
  }, {
2222
2127
  readonly status: "FULFILLED";
2223
2128
  readonly fulfilledAt: {
2224
- readonly var: "$timestamp";
2129
+ readonly var: "$ordinal";
2225
2130
  };
2226
2131
  readonly trackingInfo: {
2227
2132
  readonly var: "event.trackingInfo";
@@ -2242,7 +2147,7 @@ export declare const MARKETS_DEFINITIONS: {
2242
2147
  }];
2243
2148
  }, {
2244
2149
  readonly ">=": readonly [{
2245
- readonly var: "$timestamp";
2150
+ readonly var: "$ordinal";
2246
2151
  }, {
2247
2152
  readonly var: "state.deadline";
2248
2153
  }];
@@ -2254,7 +2159,7 @@ export declare const MARKETS_DEFINITIONS: {
2254
2159
  }, {
2255
2160
  readonly status: "REFUNDED";
2256
2161
  readonly refundedAt: {
2257
- readonly var: "$timestamp";
2162
+ readonly var: "$ordinal";
2258
2163
  };
2259
2164
  readonly reason: "threshold_not_met";
2260
2165
  }];
@@ -2267,7 +2172,7 @@ export declare const MARKETS_DEFINITIONS: {
2267
2172
  readonly guard: {
2268
2173
  readonly and: readonly [{
2269
2174
  readonly ">": readonly [{
2270
- readonly size: {
2175
+ readonly length: readonly [{
2271
2176
  readonly filter: readonly [{
2272
2177
  readonly var: "state.orders";
2273
2178
  }, {
@@ -2277,7 +2182,7 @@ export declare const MARKETS_DEFINITIONS: {
2277
2182
  readonly var: "event.agent";
2278
2183
  }];
2279
2184
  }];
2280
- };
2185
+ }];
2281
2186
  }, 0];
2282
2187
  }, {
2283
2188
  readonly "!": readonly [{