@ottochain/sdk 2.3.0 → 2.5.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 (287) hide show
  1. package/dist/cjs/apps/compute/index.js +33 -0
  2. package/dist/cjs/apps/compute/state-machines/compute-rule110.js +164 -0
  3. package/dist/cjs/apps/compute/state-machines/index.js +9 -0
  4. package/dist/cjs/apps/contracts/index.js +16 -9
  5. package/dist/cjs/apps/contracts/state-machines/contract-agreement.js +134 -161
  6. package/dist/cjs/apps/contracts/state-machines/contract-escrow.js +192 -170
  7. package/dist/cjs/apps/contracts/state-machines/contract-universal.js +46 -58
  8. package/dist/cjs/apps/corporate/index.js +2 -2
  9. package/dist/cjs/apps/corporate/state-machines/corp-board.js +500 -456
  10. package/dist/cjs/apps/corporate/state-machines/corp-entity.js +487 -361
  11. package/dist/cjs/apps/corporate/state-machines/corp-securities.js +769 -576
  12. package/dist/cjs/apps/corporate/state-machines/corp-shareholders.js +567 -557
  13. package/dist/cjs/apps/governance/index.js +21 -21
  14. package/dist/cjs/apps/governance/state-machines/dao-multisig.js +188 -209
  15. package/dist/cjs/apps/governance/state-machines/dao-reputation.js +181 -228
  16. package/dist/cjs/apps/governance/state-machines/dao-single.js +105 -88
  17. package/dist/cjs/apps/governance/state-machines/dao-token.js +199 -227
  18. package/dist/cjs/apps/governance/state-machines/governance-simple.js +231 -231
  19. package/dist/cjs/apps/governance/state-machines/governance-universal.js +64 -64
  20. package/dist/cjs/apps/identity/constants.js +55 -22
  21. package/dist/cjs/apps/identity/index.js +28 -12
  22. package/dist/cjs/apps/identity/state-machines/identity-agent.js +124 -158
  23. package/dist/cjs/apps/identity/state-machines/identity-oracle.js +158 -173
  24. package/dist/cjs/apps/identity/state-machines/identity-registry.js +262 -0
  25. package/dist/cjs/apps/identity/state-machines/identity-universal.js +51 -57
  26. package/dist/cjs/apps/identity/state-machines/index.js +3 -1
  27. package/dist/cjs/apps/index.js +22 -8
  28. package/dist/cjs/apps/lending/assets.js +247 -0
  29. package/dist/cjs/apps/lending/credit-scoring.js +87 -0
  30. package/dist/cjs/apps/lending/eligibility.js +105 -0
  31. package/dist/cjs/apps/lending/index.js +91 -0
  32. package/dist/cjs/apps/lending/state-machines/index.js +9 -0
  33. package/dist/cjs/apps/lending/state-machines/lending-zk-loan.js +433 -0
  34. package/dist/cjs/apps/markets/index.js +22 -12
  35. package/dist/cjs/apps/markets/state-machines/market-auction.js +116 -134
  36. package/dist/cjs/apps/markets/state-machines/market-crowdfund.js +131 -141
  37. package/dist/cjs/apps/markets/state-machines/market-group-buy.js +163 -184
  38. package/dist/cjs/apps/markets/state-machines/market-prediction.js +226 -233
  39. package/dist/cjs/apps/markets/state-machines/market-universal.js +65 -80
  40. package/dist/cjs/apps/oracles/index.js +3 -3
  41. package/dist/cjs/apps/privacy/index.js +67 -0
  42. package/dist/cjs/apps/privacy/state-machines/index.js +17 -0
  43. package/dist/cjs/apps/privacy/state-machines/mixer-ddhRing.js +286 -0
  44. package/dist/cjs/apps/privacy/state-machines/note-pool.js +476 -0
  45. package/dist/cjs/apps/staked-pool/assets.js +103 -0
  46. package/dist/cjs/apps/staked-pool/base.js +498 -0
  47. package/dist/cjs/apps/staked-pool/consumer.js +55 -0
  48. package/dist/cjs/apps/staked-pool/index.js +83 -0
  49. package/dist/cjs/apps/staked-pool/state-machines/index.js +12 -0
  50. package/dist/cjs/apps/staked-pool/state-machines/staked-pool-base.js +49 -0
  51. package/dist/cjs/apps/staked-pool/state-machines/staked-pool-oracle.js +131 -0
  52. package/dist/cjs/errors.js +3 -3
  53. package/dist/cjs/generated/google/protobuf/struct.js +5 -5
  54. package/dist/cjs/generated/google/protobuf/timestamp.js +1 -1
  55. package/dist/cjs/generated/index.js +11 -7
  56. package/dist/cjs/generated/openapi.js +6 -0
  57. package/dist/cjs/generated/ottochain/apps/contracts/v1/contract.js +51 -51
  58. package/dist/cjs/generated/ottochain/apps/corporate/v1/corporate.js +20 -21
  59. package/dist/cjs/generated/ottochain/apps/governance/v1/governance.js +14 -14
  60. package/dist/cjs/generated/ottochain/apps/identity/v1/attestation.js +5 -5
  61. package/dist/cjs/generated/ottochain/apps/identity/v1/identity.js +125 -131
  62. package/dist/cjs/generated/ottochain/apps/markets/v1/market.js +108 -108
  63. package/dist/cjs/generated/ottochain/v1/common.js +5 -5
  64. package/dist/cjs/generated/ottochain/v1/fiber.js +44 -6
  65. package/dist/cjs/generated/ottochain/v1/messages.js +1 -1
  66. package/dist/cjs/generated/ottochain/v1/records.js +1 -1
  67. package/dist/cjs/index.js +58 -7
  68. package/dist/cjs/openapi.js +2 -0
  69. package/dist/cjs/ottochain/drop-nulls.js +1 -2
  70. package/dist/cjs/ottochain/genesis-manifest.js +17 -11
  71. package/dist/cjs/ottochain/index.js +23 -13
  72. package/dist/cjs/ottochain/metagraph-client.js +81 -16
  73. package/dist/cjs/ottochain/snapshot.js +13 -16
  74. package/dist/cjs/ottochain/transaction.js +67 -14
  75. package/dist/cjs/ottochain/types.js +16 -2
  76. package/dist/cjs/privacy/index.js +14 -0
  77. package/dist/cjs/privacy/sealed-bid.js +213 -0
  78. package/dist/cjs/privacy/shield-app.js +131 -0
  79. package/dist/cjs/schema/effects.js +156 -0
  80. package/dist/cjs/schema/fiber-app.js +150 -15
  81. package/dist/cjs/schema/guard-lint.js +343 -0
  82. package/dist/cjs/schema/guards.js +246 -0
  83. package/dist/cjs/signing.js +80 -0
  84. package/dist/cjs/templates/asset-policy.js +190 -0
  85. package/dist/cjs/templates/index.js +86 -0
  86. package/dist/cjs/templates/machine.js +130 -0
  87. package/dist/cjs/templates/migration.js +39 -0
  88. package/dist/cjs/templates/state-shape.js +38 -0
  89. package/dist/cjs/types.js +2 -3
  90. package/dist/cjs/validation.js +9 -11
  91. package/dist/cjs/verify.js +9 -4
  92. package/dist/cjs/zk/commit.js +53 -0
  93. package/dist/cjs/zk/guard.js +107 -0
  94. package/dist/cjs/zk/index.js +48 -0
  95. package/dist/cjs/zk/preimage.js +37 -0
  96. package/dist/cjs/zk/prover.js +87 -0
  97. package/dist/cjs/zk/registry.js +62 -0
  98. package/dist/cjs/zk/types.js +28 -0
  99. package/dist/cjs/zk/witness.js +19 -0
  100. package/dist/esm/apps/compute/index.js +29 -0
  101. package/dist/esm/apps/compute/state-machines/compute-rule110.js +161 -0
  102. package/dist/esm/apps/compute/state-machines/index.js +5 -0
  103. package/dist/esm/apps/contracts/index.js +9 -5
  104. package/dist/esm/apps/contracts/state-machines/contract-agreement.js +135 -162
  105. package/dist/esm/apps/contracts/state-machines/contract-escrow.js +193 -171
  106. package/dist/esm/apps/contracts/state-machines/contract-universal.js +47 -59
  107. package/dist/esm/apps/corporate/index.js +2 -2
  108. package/dist/esm/apps/corporate/state-machines/corp-board.js +501 -457
  109. package/dist/esm/apps/corporate/state-machines/corp-entity.js +488 -362
  110. package/dist/esm/apps/corporate/state-machines/corp-securities.js +770 -577
  111. package/dist/esm/apps/corporate/state-machines/corp-shareholders.js +568 -558
  112. package/dist/esm/apps/governance/index.js +10 -10
  113. package/dist/esm/apps/governance/state-machines/dao-multisig.js +189 -210
  114. package/dist/esm/apps/governance/state-machines/dao-reputation.js +182 -229
  115. package/dist/esm/apps/governance/state-machines/dao-single.js +106 -89
  116. package/dist/esm/apps/governance/state-machines/dao-token.js +200 -228
  117. package/dist/esm/apps/governance/state-machines/governance-simple.js +232 -232
  118. package/dist/esm/apps/governance/state-machines/governance-universal.js +65 -65
  119. package/dist/esm/apps/identity/constants.js +52 -21
  120. package/dist/esm/apps/identity/index.js +14 -9
  121. package/dist/esm/apps/identity/state-machines/identity-agent.js +125 -159
  122. package/dist/esm/apps/identity/state-machines/identity-oracle.js +159 -174
  123. package/dist/esm/apps/identity/state-machines/identity-registry.js +259 -0
  124. package/dist/esm/apps/identity/state-machines/identity-universal.js +52 -58
  125. package/dist/esm/apps/identity/state-machines/index.js +1 -0
  126. package/dist/esm/apps/index.js +9 -5
  127. package/dist/esm/apps/lending/assets.js +231 -0
  128. package/dist/esm/apps/lending/credit-scoring.js +81 -0
  129. package/dist/esm/apps/lending/eligibility.js +99 -0
  130. package/dist/esm/apps/lending/index.js +69 -0
  131. package/dist/esm/apps/lending/state-machines/index.js +5 -0
  132. package/dist/esm/apps/lending/state-machines/lending-zk-loan.js +430 -0
  133. package/dist/esm/apps/markets/index.js +11 -7
  134. package/dist/esm/apps/markets/state-machines/market-auction.js +117 -135
  135. package/dist/esm/apps/markets/state-machines/market-crowdfund.js +132 -142
  136. package/dist/esm/apps/markets/state-machines/market-group-buy.js +164 -185
  137. package/dist/esm/apps/markets/state-machines/market-prediction.js +227 -234
  138. package/dist/esm/apps/markets/state-machines/market-universal.js +66 -81
  139. package/dist/esm/apps/oracles/index.js +3 -3
  140. package/dist/esm/apps/privacy/index.js +56 -0
  141. package/dist/esm/apps/privacy/state-machines/index.js +6 -0
  142. package/dist/esm/apps/privacy/state-machines/mixer-ddhRing.js +282 -0
  143. package/dist/esm/apps/privacy/state-machines/note-pool.js +470 -0
  144. package/dist/esm/apps/staked-pool/assets.js +91 -0
  145. package/dist/esm/apps/staked-pool/base.js +493 -0
  146. package/dist/esm/apps/staked-pool/consumer.js +49 -0
  147. package/dist/esm/apps/staked-pool/index.js +60 -0
  148. package/dist/esm/apps/staked-pool/state-machines/index.js +6 -0
  149. package/dist/esm/apps/staked-pool/state-machines/staked-pool-base.js +46 -0
  150. package/dist/esm/apps/staked-pool/state-machines/staked-pool-oracle.js +127 -0
  151. package/dist/esm/generated/google/protobuf/struct.js +1 -1
  152. package/dist/esm/generated/google/protobuf/timestamp.js +1 -1
  153. package/dist/esm/generated/index.js +9 -5
  154. package/dist/esm/generated/openapi.js +5 -0
  155. package/dist/esm/generated/ottochain/apps/contracts/v1/contract.js +47 -47
  156. package/dist/esm/generated/ottochain/apps/corporate/v1/corporate.js +1 -1
  157. package/dist/esm/generated/ottochain/apps/governance/v1/governance.js +1 -1
  158. package/dist/esm/generated/ottochain/apps/identity/v1/attestation.js +1 -1
  159. package/dist/esm/generated/ottochain/apps/identity/v1/identity.js +115 -121
  160. package/dist/esm/generated/ottochain/apps/markets/v1/market.js +101 -101
  161. package/dist/esm/generated/ottochain/v1/common.js +1 -1
  162. package/dist/esm/generated/ottochain/v1/fiber.js +40 -2
  163. package/dist/esm/generated/ottochain/v1/messages.js +1 -1
  164. package/dist/esm/generated/ottochain/v1/records.js +1 -1
  165. package/dist/esm/index.js +28 -3
  166. package/dist/esm/openapi.js +1 -0
  167. package/dist/esm/ottochain/genesis-manifest.js +15 -9
  168. package/dist/esm/ottochain/index.js +2 -3
  169. package/dist/esm/ottochain/metagraph-client.js +81 -16
  170. package/dist/esm/ottochain/snapshot.js +6 -8
  171. package/dist/esm/ottochain/transaction.js +51 -3
  172. package/dist/esm/ottochain/types.js +15 -1
  173. package/dist/esm/privacy/index.js +6 -0
  174. package/dist/esm/privacy/sealed-bid.js +209 -0
  175. package/dist/esm/privacy/shield-app.js +127 -0
  176. package/dist/esm/schema/effects.js +145 -0
  177. package/dist/esm/schema/fiber-app.js +139 -8
  178. package/dist/esm/schema/guard-lint.js +337 -0
  179. package/dist/esm/schema/guards.js +228 -0
  180. package/dist/esm/signing.js +74 -0
  181. package/dist/esm/templates/asset-policy.js +182 -0
  182. package/dist/esm/templates/index.js +41 -0
  183. package/dist/esm/templates/machine.js +125 -0
  184. package/dist/esm/templates/migration.js +34 -0
  185. package/dist/esm/templates/state-shape.js +34 -0
  186. package/dist/esm/validation.js +1 -3
  187. package/dist/esm/verify.js +8 -2
  188. package/dist/esm/zk/commit.js +44 -0
  189. package/dist/esm/zk/guard.js +99 -0
  190. package/dist/esm/zk/index.js +19 -0
  191. package/dist/esm/zk/preimage.js +30 -0
  192. package/dist/esm/zk/prover.js +82 -0
  193. package/dist/esm/zk/registry.js +55 -0
  194. package/dist/esm/zk/types.js +25 -0
  195. package/dist/esm/zk/witness.js +15 -0
  196. package/dist/types/apps/compute/index.d.ts +176 -0
  197. package/dist/types/apps/compute/state-machines/compute-rule110.d.ts +157 -0
  198. package/dist/types/apps/compute/state-machines/index.d.ts +5 -0
  199. package/dist/types/apps/contracts/index.d.ts +81 -221
  200. package/dist/types/apps/contracts/state-machines/contract-agreement.d.ts +23 -98
  201. package/dist/types/apps/contracts/state-machines/contract-escrow.d.ts +49 -115
  202. package/dist/types/apps/contracts/state-machines/contract-universal.d.ts +4 -4
  203. package/dist/types/apps/corporate/index.d.ts +1176 -440
  204. package/dist/types/apps/corporate/state-machines/corp-board.d.ts +271 -135
  205. package/dist/types/apps/corporate/state-machines/corp-entity.d.ts +279 -74
  206. package/dist/types/apps/corporate/state-machines/corp-securities.d.ts +373 -149
  207. package/dist/types/apps/corporate/state-machines/corp-shareholders.d.ts +252 -80
  208. package/dist/types/apps/governance/index.d.ts +368 -470
  209. package/dist/types/apps/governance/state-machines/dao-multisig.d.ts +92 -107
  210. package/dist/types/apps/governance/state-machines/dao-reputation.d.ts +61 -85
  211. package/dist/types/apps/governance/state-machines/dao-single.d.ts +25 -47
  212. package/dist/types/apps/governance/state-machines/dao-token.d.ts +79 -68
  213. package/dist/types/apps/governance/state-machines/governance-simple.d.ts +95 -125
  214. package/dist/types/apps/governance/state-machines/governance-universal.d.ts +6 -6
  215. package/dist/types/apps/identity/constants.d.ts +33 -5
  216. package/dist/types/apps/identity/index.d.ts +415 -131
  217. package/dist/types/apps/identity/state-machines/identity-agent.d.ts +23 -23
  218. package/dist/types/apps/identity/state-machines/identity-oracle.d.ts +27 -98
  219. package/dist/types/apps/identity/state-machines/identity-registry.d.ts +379 -0
  220. package/dist/types/apps/identity/state-machines/identity-universal.d.ts +4 -4
  221. package/dist/types/apps/identity/state-machines/index.d.ts +1 -0
  222. package/dist/types/apps/index.d.ts +9 -5
  223. package/dist/types/apps/lending/assets.d.ts +258 -0
  224. package/dist/types/apps/lending/credit-scoring.d.ts +80 -0
  225. package/dist/types/apps/lending/eligibility.d.ts +83 -0
  226. package/dist/types/apps/lending/index.d.ts +556 -0
  227. package/dist/types/apps/lending/state-machines/index.d.ts +5 -0
  228. package/dist/types/apps/lending/state-machines/lending-zk-loan.d.ts +536 -0
  229. package/dist/types/apps/markets/index.d.ts +181 -276
  230. package/dist/types/apps/markets/state-machines/market-auction.d.ts +25 -49
  231. package/dist/types/apps/markets/state-machines/market-crowdfund.d.ts +35 -53
  232. package/dist/types/apps/markets/state-machines/market-group-buy.d.ts +35 -61
  233. package/dist/types/apps/markets/state-machines/market-prediction.d.ts +65 -86
  234. package/dist/types/apps/markets/state-machines/market-universal.d.ts +12 -12
  235. package/dist/types/apps/oracles/index.d.ts +1 -1
  236. package/dist/types/apps/privacy/index.d.ts +328 -0
  237. package/dist/types/apps/privacy/state-machines/index.d.ts +6 -0
  238. package/dist/types/apps/privacy/state-machines/mixer-ddhRing.d.ts +337 -0
  239. package/dist/types/apps/privacy/state-machines/note-pool.d.ts +196 -0
  240. package/dist/types/apps/staked-pool/assets.d.ts +53 -0
  241. package/dist/types/apps/staked-pool/base.d.ts +80 -0
  242. package/dist/types/apps/staked-pool/consumer.d.ts +29 -0
  243. package/dist/types/apps/staked-pool/index.d.ts +51 -0
  244. package/dist/types/apps/staked-pool/state-machines/index.d.ts +6 -0
  245. package/dist/types/apps/staked-pool/state-machines/staked-pool-base.d.ts +8 -0
  246. package/dist/types/apps/staked-pool/state-machines/staked-pool-oracle.d.ts +34 -0
  247. package/dist/types/generated/index.d.ts +5 -5
  248. package/dist/types/generated/openapi.d.ts +1270 -0
  249. package/dist/types/generated/ottochain/apps/contracts/v1/contract.d.ts +5 -5
  250. package/dist/types/generated/ottochain/apps/identity/v1/identity.d.ts +12 -12
  251. package/dist/types/generated/ottochain/apps/markets/v1/market.d.ts +11 -11
  252. package/dist/types/generated/ottochain/v1/fiber.d.ts +7 -0
  253. package/dist/types/index.d.ts +7 -3
  254. package/dist/types/openapi.d.ts +24 -0
  255. package/dist/types/ottochain/genesis-manifest.d.ts +11 -5
  256. package/dist/types/ottochain/index.d.ts +5 -6
  257. package/dist/types/ottochain/metagraph-client.d.ts +49 -7
  258. package/dist/types/ottochain/snapshot.d.ts +6 -6
  259. package/dist/types/ottochain/transaction.d.ts +41 -1
  260. package/dist/types/ottochain/types.d.ts +336 -31
  261. package/dist/types/privacy/index.d.ts +6 -0
  262. package/dist/types/privacy/sealed-bid.d.ts +348 -0
  263. package/dist/types/privacy/shield-app.d.ts +48 -0
  264. package/dist/types/schema/effects.d.ts +141 -0
  265. package/dist/types/schema/fiber-app.d.ts +282 -2
  266. package/dist/types/schema/guard-lint.d.ts +111 -0
  267. package/dist/types/schema/guards.d.ts +146 -0
  268. package/dist/types/signing.d.ts +45 -0
  269. package/dist/types/templates/asset-policy.d.ts +119 -0
  270. package/dist/types/templates/index.d.ts +26 -0
  271. package/dist/types/templates/machine.d.ts +139 -0
  272. package/dist/types/templates/migration.d.ts +34 -0
  273. package/dist/types/templates/state-shape.d.ts +30 -0
  274. package/dist/types/validation.d.ts +22 -217
  275. package/dist/types/verify.d.ts +4 -0
  276. package/dist/types/zk/commit.d.ts +28 -0
  277. package/dist/types/zk/guard.d.ts +46 -0
  278. package/dist/types/zk/index.d.ts +19 -0
  279. package/dist/types/zk/preimage.d.ts +10 -0
  280. package/dist/types/zk/prover.d.ts +34 -0
  281. package/dist/types/zk/registry.d.ts +34 -0
  282. package/dist/types/zk/types.d.ts +33 -0
  283. package/dist/types/zk/witness.d.ts +40 -0
  284. package/package.json +47 -15
  285. package/dist/cjs/ottochain/normalize.js +0 -186
  286. package/dist/esm/ottochain/normalize.js +0 -179
  287. package/dist/types/ottochain/normalize.d.ts +0 -79
@@ -168,20 +168,14 @@ export declare const marketAuctionDef: {
168
168
  readonly from: "PROPOSED";
169
169
  readonly to: "OPEN";
170
170
  readonly eventName: "open";
171
- readonly guard: {
172
- readonly "===": readonly [{
173
- readonly var: "event.agent";
174
- }, {
175
- readonly var: "state.seller";
176
- }];
177
- };
171
+ readonly guard: import("../../../schema/guards.js").GuardRule;
178
172
  readonly effect: {
179
173
  readonly merge: readonly [{
180
174
  readonly var: "state";
181
175
  }, {
182
176
  readonly status: "OPEN";
183
177
  readonly openedAt: {
184
- readonly var: "$timestamp";
178
+ readonly var: "$ordinal";
185
179
  };
186
180
  readonly bids: readonly [];
187
181
  readonly highBid: null;
@@ -193,20 +187,14 @@ export declare const marketAuctionDef: {
193
187
  readonly from: "PROPOSED";
194
188
  readonly to: "CANCELLED";
195
189
  readonly eventName: "cancel";
196
- readonly guard: {
197
- readonly "===": readonly [{
198
- readonly var: "event.agent";
199
- }, {
200
- readonly var: "state.seller";
201
- }];
202
- };
190
+ readonly guard: import("../../../schema/guards.js").GuardRule;
203
191
  readonly effect: {
204
192
  readonly merge: readonly [{
205
193
  readonly var: "state";
206
194
  }, {
207
195
  readonly status: "CANCELLED";
208
196
  readonly cancelledAt: {
209
- readonly var: "$timestamp";
197
+ readonly var: "$ordinal";
210
198
  };
211
199
  }];
212
200
  };
@@ -216,28 +204,22 @@ export declare const marketAuctionDef: {
216
204
  readonly to: "OPEN";
217
205
  readonly eventName: "bid";
218
206
  readonly guard: {
219
- readonly and: readonly [{
220
- readonly "!==": readonly [{
221
- readonly var: "event.agent";
222
- }, {
223
- readonly var: "state.seller";
224
- }];
225
- }, {
226
- readonly ">=": readonly [{
207
+ readonly and: readonly [import("../../../schema/guards.js").GuardRule, {
208
+ readonly '>=': readonly [{
227
209
  readonly var: "event.amount";
228
210
  }, {
229
211
  readonly var: "state.minBid";
230
212
  }];
231
213
  }, {
232
214
  readonly or: readonly [{
233
- readonly "!": readonly [{
215
+ readonly '!': readonly [{
234
216
  readonly var: "state.highBid";
235
217
  }];
236
218
  }, {
237
- readonly ">=": readonly [{
219
+ readonly '>=': readonly [{
238
220
  readonly var: "event.amount";
239
221
  }, {
240
- readonly "+": readonly [{
222
+ readonly '+': readonly [{
241
223
  readonly var: "state.highBid";
242
224
  }, {
243
225
  readonly var: "state.bidIncrement";
@@ -246,12 +228,12 @@ export declare const marketAuctionDef: {
246
228
  }];
247
229
  }, {
248
230
  readonly or: readonly [{
249
- readonly "!": readonly [{
231
+ readonly '!': readonly [{
250
232
  readonly var: "state.deadline";
251
233
  }];
252
234
  }, {
253
- readonly "<=": readonly [{
254
- readonly var: "$timestamp";
235
+ readonly '<=': readonly [{
236
+ readonly var: "$ordinal";
255
237
  }, {
256
238
  readonly var: "state.deadline";
257
239
  }];
@@ -273,7 +255,7 @@ export declare const marketAuctionDef: {
273
255
  readonly var: "event.amount";
274
256
  };
275
257
  readonly bidAt: {
276
- readonly var: "$timestamp";
258
+ readonly var: "$ordinal";
277
259
  };
278
260
  }]];
279
261
  };
@@ -284,7 +266,7 @@ export declare const marketAuctionDef: {
284
266
  readonly var: "event.agent";
285
267
  };
286
268
  readonly lastBidAt: {
287
- readonly var: "$timestamp";
269
+ readonly var: "$ordinal";
288
270
  };
289
271
  }];
290
272
  };
@@ -294,18 +276,12 @@ export declare const marketAuctionDef: {
294
276
  readonly to: "CLOSING";
295
277
  readonly eventName: "close";
296
278
  readonly guard: {
297
- readonly or: readonly [{
298
- readonly "===": readonly [{
299
- readonly var: "event.agent";
300
- }, {
301
- readonly var: "state.seller";
302
- }];
303
- }, {
279
+ readonly or: readonly [import("../../../schema/guards.js").GuardRule, {
304
280
  readonly and: readonly [{
305
281
  readonly var: "state.deadline";
306
282
  }, {
307
- readonly ">=": readonly [{
308
- readonly var: "$timestamp";
283
+ readonly '>=': readonly [{
284
+ readonly var: "$ordinal";
309
285
  }, {
310
286
  readonly var: "state.deadline";
311
287
  }];
@@ -318,7 +294,7 @@ export declare const marketAuctionDef: {
318
294
  }, {
319
295
  readonly status: "CLOSING";
320
296
  readonly closedAt: {
321
- readonly var: "$timestamp";
297
+ readonly var: "$ordinal";
322
298
  };
323
299
  }];
324
300
  };
@@ -332,11 +308,11 @@ export declare const marketAuctionDef: {
332
308
  readonly var: "state.highBidder";
333
309
  }, {
334
310
  readonly or: readonly [{
335
- readonly "!": readonly [{
311
+ readonly '!': readonly [{
336
312
  readonly var: "state.reservePrice";
337
313
  }];
338
314
  }, {
339
- readonly ">=": readonly [{
315
+ readonly '>=': readonly [{
340
316
  readonly var: "state.highBid";
341
317
  }, {
342
318
  readonly var: "state.reservePrice";
@@ -350,7 +326,7 @@ export declare const marketAuctionDef: {
350
326
  }, {
351
327
  readonly status: "SETTLED";
352
328
  readonly settledAt: {
353
- readonly var: "$timestamp";
329
+ readonly var: "$ordinal";
354
330
  };
355
331
  readonly winner: {
356
332
  readonly var: "state.highBidder";
@@ -367,14 +343,14 @@ export declare const marketAuctionDef: {
367
343
  readonly eventName: "no_sale";
368
344
  readonly guard: {
369
345
  readonly or: readonly [{
370
- readonly "!": readonly [{
346
+ readonly '!': readonly [{
371
347
  readonly var: "state.highBidder";
372
348
  }];
373
349
  }, {
374
350
  readonly and: readonly [{
375
351
  readonly var: "state.reservePrice";
376
352
  }, {
377
- readonly "<": readonly [{
353
+ readonly '<': readonly [{
378
354
  readonly var: "state.highBid";
379
355
  }, {
380
356
  readonly var: "state.reservePrice";
@@ -388,11 +364,11 @@ export declare const marketAuctionDef: {
388
364
  }, {
389
365
  readonly status: "NO_SALE";
390
366
  readonly closedAt: {
391
- readonly var: "$timestamp";
367
+ readonly var: "$ordinal";
392
368
  };
393
369
  readonly reason: {
394
370
  readonly if: readonly [{
395
- readonly "!": readonly [{
371
+ readonly '!': readonly [{
396
372
  readonly var: "state.highBidder";
397
373
  }];
398
374
  }, "no_bids", "reserve_not_met"];
@@ -174,20 +174,14 @@ export declare const marketCrowdfundDef: {
174
174
  readonly from: "PROPOSED";
175
175
  readonly to: "OPEN";
176
176
  readonly eventName: "launch";
177
- readonly guard: {
178
- readonly "===": readonly [{
179
- readonly var: "event.agent";
180
- }, {
181
- readonly var: "state.creator";
182
- }];
183
- };
177
+ readonly guard: import("../../../schema/guards.js").GuardRule;
184
178
  readonly effect: {
185
179
  readonly merge: readonly [{
186
180
  readonly var: "state";
187
181
  }, {
188
182
  readonly status: "OPEN";
189
183
  readonly launchedAt: {
190
- readonly var: "$timestamp";
184
+ readonly var: "$ordinal";
191
185
  };
192
186
  readonly pledges: readonly [];
193
187
  readonly totalPledged: 0;
@@ -199,20 +193,14 @@ export declare const marketCrowdfundDef: {
199
193
  readonly from: "PROPOSED";
200
194
  readonly to: "CANCELLED";
201
195
  readonly eventName: "cancel";
202
- readonly guard: {
203
- readonly "===": readonly [{
204
- readonly var: "event.agent";
205
- }, {
206
- readonly var: "state.creator";
207
- }];
208
- };
196
+ readonly guard: import("../../../schema/guards.js").GuardRule;
209
197
  readonly effect: {
210
198
  readonly merge: readonly [{
211
199
  readonly var: "state";
212
200
  }, {
213
201
  readonly status: "CANCELLED";
214
202
  readonly cancelledAt: {
215
- readonly var: "$timestamp";
203
+ readonly var: "$ordinal";
216
204
  };
217
205
  }];
218
206
  };
@@ -223,30 +211,24 @@ export declare const marketCrowdfundDef: {
223
211
  readonly eventName: "pledge";
224
212
  readonly guard: {
225
213
  readonly and: readonly [{
226
- readonly ">": readonly [{
214
+ readonly '>': readonly [{
227
215
  readonly var: "event.amount";
228
216
  }, 0];
229
- }, {
230
- readonly "!==": readonly [{
231
- readonly var: "event.agent";
232
- }, {
233
- readonly var: "state.creator";
234
- }];
235
- }, {
217
+ }, import("../../../schema/guards.js").GuardRule, {
236
218
  readonly or: readonly [{
237
- readonly "!": readonly [{
219
+ readonly '!': readonly [{
238
220
  readonly var: "state.minPledge";
239
221
  }];
240
222
  }, {
241
- readonly ">=": readonly [{
223
+ readonly '>=': readonly [{
242
224
  readonly var: "event.amount";
243
225
  }, {
244
226
  readonly var: "state.minPledge";
245
227
  }];
246
228
  }];
247
229
  }, {
248
- readonly "<=": readonly [{
249
- readonly var: "$timestamp";
230
+ readonly '<=': readonly [{
231
+ readonly var: "$ordinal";
250
232
  }, {
251
233
  readonly var: "state.deadline";
252
234
  }];
@@ -270,19 +252,19 @@ export declare const marketCrowdfundDef: {
270
252
  readonly var: "event.rewardTier";
271
253
  };
272
254
  readonly pledgedAt: {
273
- readonly var: "$timestamp";
255
+ readonly var: "$ordinal";
274
256
  };
275
257
  }]];
276
258
  };
277
259
  readonly totalPledged: {
278
- readonly "+": readonly [{
260
+ readonly '+': readonly [{
279
261
  readonly var: "state.totalPledged";
280
262
  }, {
281
263
  readonly var: "event.amount";
282
264
  }];
283
265
  };
284
266
  readonly backerCount: {
285
- readonly "+": readonly [{
267
+ readonly '+': readonly [{
286
268
  readonly var: "state.backerCount";
287
269
  }, 1];
288
270
  };
@@ -295,28 +277,28 @@ export declare const marketCrowdfundDef: {
295
277
  readonly eventName: "increase_pledge";
296
278
  readonly guard: {
297
279
  readonly and: readonly [{
298
- readonly ">": readonly [{
280
+ readonly '>': readonly [{
299
281
  readonly var: "event.additionalAmount";
300
282
  }, 0];
301
283
  }, {
302
- readonly "<=": readonly [{
303
- readonly var: "$timestamp";
284
+ readonly '<=': readonly [{
285
+ readonly var: "$ordinal";
304
286
  }, {
305
287
  readonly var: "state.deadline";
306
288
  }];
307
289
  }, {
308
- readonly ">": readonly [{
309
- readonly size: {
290
+ readonly '>': readonly [{
291
+ readonly length: readonly [{
310
292
  readonly filter: readonly [{
311
293
  readonly var: "state.pledges";
312
294
  }, {
313
- readonly "===": readonly [{
295
+ readonly '===': readonly [{
314
296
  readonly var: "backer";
315
297
  }, {
316
298
  readonly var: "event.agent";
317
299
  }];
318
300
  }];
319
- };
301
+ }];
320
302
  }, 0];
321
303
  }];
322
304
  };
@@ -325,7 +307,7 @@ export declare const marketCrowdfundDef: {
325
307
  readonly var: "state";
326
308
  }, {
327
309
  readonly totalPledged: {
328
- readonly "+": readonly [{
310
+ readonly '+': readonly [{
329
311
  readonly var: "state.totalPledged";
330
312
  }, {
331
313
  readonly var: "event.additionalAmount";
@@ -340,14 +322,14 @@ export declare const marketCrowdfundDef: {
340
322
  readonly eventName: "finalize";
341
323
  readonly guard: {
342
324
  readonly and: readonly [{
343
- readonly ">=": readonly [{
325
+ readonly '>=': readonly [{
344
326
  readonly var: "state.totalPledged";
345
327
  }, {
346
328
  readonly var: "state.threshold";
347
329
  }];
348
330
  }, {
349
- readonly ">=": readonly [{
350
- readonly var: "$timestamp";
331
+ readonly '>=': readonly [{
332
+ readonly var: "$ordinal";
351
333
  }, {
352
334
  readonly var: "state.deadline";
353
335
  }];
@@ -359,13 +341,13 @@ export declare const marketCrowdfundDef: {
359
341
  }, {
360
342
  readonly status: "FUNDED";
361
343
  readonly fundedAt: {
362
- readonly var: "$timestamp";
344
+ readonly var: "$ordinal";
363
345
  };
364
346
  readonly stretchGoalsReached: {
365
347
  readonly filter: readonly [{
366
348
  readonly var: "state.stretchGoals";
367
349
  }, {
368
- readonly "<=": readonly [{
350
+ readonly '<=': readonly [{
369
351
  readonly var: "target";
370
352
  }, {
371
353
  readonly var: "state.totalPledged";
@@ -381,14 +363,14 @@ export declare const marketCrowdfundDef: {
381
363
  readonly eventName: "finalize";
382
364
  readonly guard: {
383
365
  readonly and: readonly [{
384
- readonly "<": readonly [{
366
+ readonly '<': readonly [{
385
367
  readonly var: "state.totalPledged";
386
368
  }, {
387
369
  readonly var: "state.threshold";
388
370
  }];
389
371
  }, {
390
- readonly ">=": readonly [{
391
- readonly var: "$timestamp";
372
+ readonly '>=': readonly [{
373
+ readonly var: "$ordinal";
392
374
  }, {
393
375
  readonly var: "state.deadline";
394
376
  }];
@@ -400,7 +382,7 @@ export declare const marketCrowdfundDef: {
400
382
  }, {
401
383
  readonly status: "REFUNDED";
402
384
  readonly refundedAt: {
403
- readonly var: "$timestamp";
385
+ readonly var: "$ordinal";
404
386
  };
405
387
  readonly reason: "threshold_not_met";
406
388
  }];
@@ -412,21 +394,21 @@ export declare const marketCrowdfundDef: {
412
394
  readonly eventName: "claim_refund";
413
395
  readonly guard: {
414
396
  readonly and: readonly [{
415
- readonly ">": readonly [{
416
- readonly size: {
397
+ readonly '>': readonly [{
398
+ readonly length: readonly [{
417
399
  readonly filter: readonly [{
418
400
  readonly var: "state.pledges";
419
401
  }, {
420
- readonly "===": readonly [{
402
+ readonly '===': readonly [{
421
403
  readonly var: "backer";
422
404
  }, {
423
405
  readonly var: "event.agent";
424
406
  }];
425
407
  }];
426
- };
408
+ }];
427
409
  }, 0];
428
410
  }, {
429
- readonly "!": readonly [{
411
+ readonly '!': readonly [{
430
412
  readonly in: readonly [{
431
413
  readonly var: "event.agent";
432
414
  }, {