@cancore/contracts 0.1.0 → 0.2.0-rc.10

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 (62) hide show
  1. package/README.md +448 -10
  2. package/dist/abi.d.ts +6598 -1675
  3. package/dist/abi.js +1 -1
  4. package/dist/chunk-2ELHDMZ7.js +9911 -0
  5. package/dist/chunk-2ELHDMZ7.js.map +1 -0
  6. package/dist/{chunk-CIBYXHSX.js → chunk-IAPV7XWJ.js} +2 -2
  7. package/dist/chunk-IAPV7XWJ.js.map +1 -0
  8. package/dist/index.d.ts +1559 -29
  9. package/dist/index.js +2925 -17
  10. package/dist/index.js.map +1 -1
  11. package/dist/networks.d.ts +2 -2
  12. package/dist/networks.js +1 -1
  13. package/package.json +10 -8
  14. package/spec/abi/AttestorSet.json +476 -0
  15. package/spec/abi/CNRX.json +1294 -0
  16. package/spec/abi/CNRXStaking.json +510 -0
  17. package/spec/abi/CancoreRouter.json +2666 -0
  18. package/spec/abi/FeeVault.json +604 -0
  19. package/spec/abi/HTLC.json +717 -0
  20. package/spec/abi/IAttribute.json +110 -0
  21. package/spec/abi/IBurnMintERC20.json +252 -0
  22. package/spec/abi/ICancoreRouter.json +1361 -0
  23. package/spec/abi/IFormula.json +28 -0
  24. package/spec/abi/IHTLC.json +382 -0
  25. package/spec/abi/IPayment.json +40 -0
  26. package/spec/abi/IPermit2.json +150 -0
  27. package/spec/abi/IResolver.json +55 -0
  28. package/spec/abi/IStep.json +30 -0
  29. package/spec/abi/IVariableRole.json +141 -0
  30. package/spec/abi/MultiBalanceChecker.json +34 -0
  31. package/spec/abi/PointsClaim.json +791 -0
  32. package/spec/constants.json +66 -0
  33. package/spec/protocol/asyncapi.json +1265 -0
  34. package/spec/protocol/messages.schema.json +543 -0
  35. package/spec/protocol/records.schema.json +94 -0
  36. package/spec/protocol/rest.schema.json +134 -0
  37. package/spec/protocol/typed-data/CantonTicketReceipt.json +77 -0
  38. package/spec/protocol/typed-data/FillerAuth.json +58 -0
  39. package/spec/protocol/typed-data/FillerKeyRegistration.json +69 -0
  40. package/spec/protocol/typed-data/FillerMessage.json +115 -0
  41. package/spec/protocol/typed-data/FillerQuote.json +75 -0
  42. package/spec/protocol/typed-data/GatewayMessage.json +95 -0
  43. package/spec/protocol/typed-data/StakeBinding.json +75 -0
  44. package/spec/protocol/typed-data/TicketIntent.json +113 -0
  45. package/spec/protocol/typed-data/TicketReceipt.json +51 -0
  46. package/spec/protocol/vectors/draw.json +61 -0
  47. package/spec/protocol/vectors/jcs.json +59 -0
  48. package/spec/protocol/vectors/messages.json +550 -0
  49. package/spec/protocol/vectors/records.json +81 -0
  50. package/spec/protocol/vectors/settle-attestations.json +542 -0
  51. package/spec/typed-data/FillProof.json +227 -0
  52. package/spec/typed-data/FillTicket.json +116 -0
  53. package/spec/typed-data/Order.json +169 -0
  54. package/spec/typed-data/Quote.json +79 -0
  55. package/spec/vectors/canton-destination.json +60 -0
  56. package/spec/vectors/canton-order.json +70 -0
  57. package/spec/vectors/evm-order.json +50 -0
  58. package/spec/vectors/fee-split.json +179 -0
  59. package/spec/vectors/permit-witness.json +150 -0
  60. package/dist/chunk-CIBYXHSX.js.map +0 -1
  61. package/dist/chunk-ZSX67S72.js +0 -3423
  62. package/dist/chunk-ZSX67S72.js.map +0 -1
@@ -0,0 +1,550 @@
1
+ {
2
+ "$comment": "Valid example frames of filler protocol v1, one or more per type, built on the golden vectors (hashes are real). sig and msgSig are a zero placeholder (r = s = 0, v = 27): no key signs them — except settle.attestations, which carries the TEST gateway sig of its golden vector (settle-attestations.json). Generated by scripts/gen-protocol-docs.mjs.",
3
+ "examples": {
4
+ "auth.challenge": [
5
+ {
6
+ "type": "auth.challenge",
7
+ "id": "g-1",
8
+ "fillerId": "acme-markets",
9
+ "sentAt": 1789999980000,
10
+ "nonce": "0x63ed6389bd2a1d23bb678583c227172bda874e82b97b1c170bfeeb4373b4b0d5",
11
+ "expiresAt": "1790000030",
12
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
13
+ }
14
+ ],
15
+ "auth.response": [
16
+ {
17
+ "type": "auth.response",
18
+ "id": "a-1",
19
+ "fillerId": "acme-markets",
20
+ "sentAt": 1789999980100,
21
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
22
+ "keyAddress": "0x90f79bf6eb2c4f870365e785982e1f101e93b906",
23
+ "protocolVersion": "1",
24
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
25
+ },
26
+ {
27
+ "type": "auth.response",
28
+ "id": "a-2",
29
+ "fillerId": "acme-markets",
30
+ "sentAt": 1789999980100,
31
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
32
+ "keyAddress": "0x90f79bf6eb2c4f870365e785982e1f101e93b906",
33
+ "protocolVersion": "1",
34
+ "nonce": "0x63ed6389bd2a1d23bb678583c227172bda874e82b97b1c170bfeeb4373b4b0d5",
35
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
36
+ }
37
+ ],
38
+ "auth.ok": [
39
+ {
40
+ "type": "auth.ok",
41
+ "id": "g-2",
42
+ "fillerId": "acme-markets",
43
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
44
+ "sentAt": 1789999980200,
45
+ "re": "a-1",
46
+ "heartbeatIntervalMs": 15000
47
+ }
48
+ ],
49
+ "ping": [
50
+ {
51
+ "type": "ping",
52
+ "id": "p-1",
53
+ "fillerId": "acme-markets",
54
+ "sentAt": 1789999994000,
55
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
56
+ },
57
+ {
58
+ "type": "ping",
59
+ "fillerId": "acme-markets",
60
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
61
+ "sentAt": 1789999995000,
62
+ "id": "gp-1"
63
+ }
64
+ ],
65
+ "pong": [
66
+ {
67
+ "type": "pong",
68
+ "id": "po-1",
69
+ "fillerId": "acme-markets",
70
+ "sentAt": 1789999995100,
71
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
72
+ "re": "gp-1"
73
+ },
74
+ {
75
+ "type": "pong",
76
+ "id": "g-3",
77
+ "fillerId": "acme-markets",
78
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
79
+ "sentAt": 1789999994100,
80
+ "re": "p-1"
81
+ }
82
+ ],
83
+ "error": [
84
+ {
85
+ "type": "error",
86
+ "id": "g-4",
87
+ "fillerId": "acme-markets",
88
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
89
+ "sentAt": 1790000023500,
90
+ "re": "i-2",
91
+ "code": "TICKET_CLOSED",
92
+ "message": "ticket.intent after acceptBy"
93
+ },
94
+ {
95
+ "type": "error",
96
+ "id": "g-5",
97
+ "sentAt": 1789999980150,
98
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
99
+ "re": "a-2",
100
+ "code": "UNAUTHENTICATED",
101
+ "message": "no live challenge of this fillerId with this nonce"
102
+ },
103
+ {
104
+ "type": "error",
105
+ "id": "g-6",
106
+ "fillerId": "acme-markets",
107
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
108
+ "sentAt": 1790000021500,
109
+ "re": "i-3",
110
+ "code": "TICKET_REFUSED",
111
+ "reason": "REPAY_TO_BLOCKLISTED",
112
+ "message": "repayTo is blocklisted by the input token"
113
+ },
114
+ {
115
+ "type": "error",
116
+ "id": "e-1",
117
+ "fillerId": "acme-markets",
118
+ "sentAt": 1790000030000,
119
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
120
+ "re": "g-77",
121
+ "code": "UNKNOWN_TICKET",
122
+ "message": "no ticket for this orderHash"
123
+ },
124
+ {
125
+ "type": "error",
126
+ "id": "g-18",
127
+ "fillerId": "acme-markets",
128
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
129
+ "sentAt": 1789999991500,
130
+ "re": "q-2",
131
+ "code": "RATE_LIMITED",
132
+ "message": "quote rate class over its limit",
133
+ "retryAfterMs": 850
134
+ }
135
+ ],
136
+ "epoch.weights": [
137
+ {
138
+ "type": "epoch.weights",
139
+ "id": "g-7",
140
+ "fillerId": "acme-markets",
141
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
142
+ "sentAt": 1789999980300,
143
+ "epochId": "20717",
144
+ "startsAt": "1789948800",
145
+ "endsAt": "1790035200",
146
+ "weightsRoot": "0xa1c24765b55b34e0c206f808d2fac2e448d9db6f154d89f898921a80bad76e92"
147
+ }
148
+ ],
149
+ "quote.request": [
150
+ {
151
+ "type": "quote.request",
152
+ "id": "g-8",
153
+ "fillerId": "acme-markets",
154
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
155
+ "sentAt": 1789999990000,
156
+ "requestId": "req-7f3a9c21-4d88-4e5b-9a1e-0c2f6b8d4e31",
157
+ "route": {
158
+ "src": "eip155:11155111",
159
+ "dst": "eip155:421614"
160
+ },
161
+ "inputToken": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
162
+ "inputAmount": "1003000000",
163
+ "outputAsset": "0x75faf114eafb1bdbe2f0316df893fd58ce46aa4d",
164
+ "feeBps": 30,
165
+ "fillDeadlineHint": "1790000600",
166
+ "windowCloseAt": 1789999992000,
167
+ "quoteTtlMs": 60000,
168
+ "imbalanceHint": {
169
+ "dstAsset": "0x75faf114eafb1bdbe2f0316df893fd58ce46aa4d",
170
+ "netFlow24hUsd": "-12500.50"
171
+ }
172
+ }
173
+ ],
174
+ "quote": [
175
+ {
176
+ "type": "quote",
177
+ "id": "q-1",
178
+ "fillerId": "acme-markets",
179
+ "sentAt": 1789999991000,
180
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
181
+ "requestId": "req-7f3a9c21-4d88-4e5b-9a1e-0c2f6b8d4e31",
182
+ "amountOut": "999000000",
183
+ "validUntil": "1790000060",
184
+ "nonce": "1",
185
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
186
+ }
187
+ ],
188
+ "quote.ack": [
189
+ {
190
+ "type": "quote.ack",
191
+ "id": "g-9",
192
+ "fillerId": "acme-markets",
193
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
194
+ "sentAt": 1789999991001,
195
+ "re": "q-1",
196
+ "requestId": "req-7f3a9c21-4d88-4e5b-9a1e-0c2f6b8d4e31",
197
+ "quoteHash": "0xe3b63a6ae2730532fb841002059d6e8c92124d95e98c09857d7e0f5ba3512e3b",
198
+ "receivedAt": 1789999991000,
199
+ "status": "COUNTED"
200
+ }
201
+ ],
202
+ "quote.reconfirm": [
203
+ {
204
+ "type": "quote.reconfirm",
205
+ "id": "g-10",
206
+ "fillerId": "acme-markets",
207
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
208
+ "sentAt": 1790000013000,
209
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
210
+ "requestId": "req-7f3a9c21-4d88-4e5b-9a1e-0c2f6b8d4e31",
211
+ "order": {
212
+ "user": "0xa11ce00000000000000000000000000000000001",
213
+ "originChainId": "11155111",
214
+ "inputToken": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
215
+ "inputAmount": "1003000000",
216
+ "destination": "0x0000000000000000000000000000000000000000000000000000000000066eee",
217
+ "outputAsset": "0x00000000000000000000000075faf114eafb1bdbe2f0316df893fd58ce46aa4d",
218
+ "minReceived": "999000000",
219
+ "recipient": "0x000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e",
220
+ "createdAt": "1790000000",
221
+ "fillDeadline": "1790000600",
222
+ "feeBps": "30",
223
+ "fillerId": "0x112e2693409c427698100f54d0439fc3593fedb25221fe3a54c4823c0a0ee2d5"
224
+ },
225
+ "amountOut": "999000000",
226
+ "ticketTtl": 360,
227
+ "replyBy": 1790000016000
228
+ }
229
+ ],
230
+ "quote.reconfirm.reply": [
231
+ {
232
+ "type": "quote.reconfirm.reply",
233
+ "id": "r-1",
234
+ "fillerId": "acme-markets",
235
+ "sentAt": 1790000014000,
236
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
237
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
238
+ "accept": true,
239
+ "validUntil": "1790000400",
240
+ "nonce": "2",
241
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
242
+ },
243
+ {
244
+ "type": "quote.reconfirm.reply",
245
+ "id": "r-2",
246
+ "fillerId": "acme-markets",
247
+ "sentAt": 1790000014000,
248
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
249
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
250
+ "accept": false
251
+ }
252
+ ],
253
+ "ticket.offer": [
254
+ {
255
+ "type": "ticket.offer",
256
+ "id": "g-20",
257
+ "fillerId": "acme-markets",
258
+ "sentAt": 1790000020000,
259
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
260
+ "attempt": 0,
261
+ "order": {
262
+ "user": "0xa11ce00000000000000000000000000000000001",
263
+ "originChainId": "11155111",
264
+ "inputToken": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
265
+ "inputAmount": "1003000000",
266
+ "destination": "0x0000000000000000000000000000000000000000000000000000000000066eee",
267
+ "outputAsset": "0x00000000000000000000000075faf114eafb1bdbe2f0316df893fd58ce46aa4d",
268
+ "minReceived": "999000000",
269
+ "recipient": "0x000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e",
270
+ "createdAt": "1790000000",
271
+ "fillDeadline": "1790000600",
272
+ "feeBps": "30",
273
+ "fillerId": "0x112e2693409c427698100f54d0439fc3593fedb25221fe3a54c4823c0a0ee2d5"
274
+ },
275
+ "amountOut": "999000000",
276
+ "validFrom": "1790000040",
277
+ "validUntil": "1790000400",
278
+ "acceptBy": 1790000023000,
279
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
280
+ }
281
+ ],
282
+ "ticket.intent": [
283
+ {
284
+ "type": "ticket.intent",
285
+ "id": "i-1",
286
+ "fillerId": "acme-markets",
287
+ "sentAt": 1790000021000,
288
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
289
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
290
+ "attempt": 0,
291
+ "validFrom": "1790000040",
292
+ "validUntil": "1790000400",
293
+ "deliveryKey": "0x742d35cc6634c0532925a3b844bc454e4438f44e",
294
+ "repayTo": "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc",
295
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
296
+ },
297
+ {
298
+ "type": "ticket.intent",
299
+ "id": "i-4",
300
+ "fillerId": "acme-markets",
301
+ "sentAt": 1790000021000,
302
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
303
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
304
+ "attempt": 2,
305
+ "validFrom": "1790000040",
306
+ "validUntil": "1790000400",
307
+ "deliveryKey": "0x0000000000000000000000000000000000000000",
308
+ "repayTo": "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc",
309
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
310
+ }
311
+ ],
312
+ "ticket.decline": [
313
+ {
314
+ "type": "ticket.decline",
315
+ "id": "d-1",
316
+ "fillerId": "acme-markets",
317
+ "sentAt": 1790000027001,
318
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
319
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
320
+ "attempt": 0,
321
+ "reason": "TICKET_ISSUED_LATE",
322
+ "detail": "ticket.issued 3001 ms after acceptBy"
323
+ }
324
+ ],
325
+ "ticket.intent.ack": [
326
+ {
327
+ "type": "ticket.intent.ack",
328
+ "id": "g-11",
329
+ "fillerId": "acme-markets",
330
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
331
+ "sentAt": 1790000021001,
332
+ "re": "i-1",
333
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
334
+ "attempt": 0,
335
+ "intentHash": "0x53dcabb35a92525e69f2637f618e2cd1eed25bb9ee3caf608e7e9025825abfe0",
336
+ "receivedAt": 1790000021000
337
+ }
338
+ ],
339
+ "ticket.issued": [
340
+ {
341
+ "type": "ticket.issued",
342
+ "id": "g-12",
343
+ "fillerId": "acme-markets",
344
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
345
+ "sentAt": 1790000024000,
346
+ "form": "evm",
347
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
348
+ "attempt": 0,
349
+ "ticket": {
350
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
351
+ "fillerId": "0x112e2693409c427698100f54d0439fc3593fedb25221fe3a54c4823c0a0ee2d5",
352
+ "deliveryKey": "0x742d35cc6634c0532925a3b844bc454e4438f44e",
353
+ "repayTo": "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc",
354
+ "attempt": 0,
355
+ "validFrom": "1790000040",
356
+ "validUntil": "1790000400"
357
+ },
358
+ "ticketSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
359
+ },
360
+ {
361
+ "type": "ticket.issued",
362
+ "id": "g-13",
363
+ "fillerId": "acme-markets",
364
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
365
+ "sentAt": 1790000024000,
366
+ "form": "canton",
367
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
368
+ "attempt": 2,
369
+ "deliveryOrderCid": "00a1b2c3d4e5f6#fixture-delivery-order",
370
+ "validUntil": "1790000400",
371
+ "repayTo": "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc"
372
+ }
373
+ ],
374
+ "ticket.receipt": [
375
+ {
376
+ "type": "ticket.receipt",
377
+ "id": "rc-1",
378
+ "fillerId": "acme-markets",
379
+ "sentAt": 1790000025000,
380
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
381
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
382
+ "attempt": 0,
383
+ "ticketHash": "0x963e823a2d9709d6630515731512094e45976407536974cb9f81817591ed1f16",
384
+ "ticketSigHash": "0x9d30145c6e97cad96cf7cee181ac9d5b879dea7fed0730d7197e84e28487292b",
385
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
386
+ },
387
+ {
388
+ "type": "ticket.receipt",
389
+ "id": "rc-2",
390
+ "fillerId": "acme-markets",
391
+ "sentAt": 1790000025000,
392
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
393
+ "form": "canton",
394
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
395
+ "attempt": 2,
396
+ "deliveryOrderCid": "00a1b2c3d4e5f6#fixture-delivery-order",
397
+ "validUntil": "1790000400",
398
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
399
+ }
400
+ ],
401
+ "fill.reported": [
402
+ {
403
+ "type": "fill.reported",
404
+ "id": "f-1",
405
+ "fillerId": "acme-markets",
406
+ "sentAt": 1790000060000,
407
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
408
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
409
+ "attempt": 0,
410
+ "txRef": "0xfc4cba975d6b96ed2be00adae2d970f61413b963279089dcfc6402ddccc42740"
411
+ }
412
+ ],
413
+ "ticket.expired": [
414
+ {
415
+ "type": "ticket.expired",
416
+ "id": "g-14",
417
+ "fillerId": "acme-markets",
418
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
419
+ "sentAt": 1790000460000,
420
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
421
+ "attempt": 0,
422
+ "result": "FILLED"
423
+ },
424
+ {
425
+ "type": "ticket.expired",
426
+ "id": "g-15",
427
+ "fillerId": "acme-markets",
428
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
429
+ "sentAt": 1790000460000,
430
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
431
+ "attempt": 0,
432
+ "result": "EXEMPT",
433
+ "exemptReason": "DESTINATION_HALTED"
434
+ }
435
+ ],
436
+ "order.settled": [
437
+ {
438
+ "type": "order.settled",
439
+ "id": "g-16",
440
+ "fillerId": "acme-markets",
441
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
442
+ "sentAt": 1790000900000,
443
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
444
+ "payout": "1000000000",
445
+ "fee": "3000000",
446
+ "penaltyWithheld": "0",
447
+ "txRef": "0x8d99b79edaf0d9c062753bb308a72f52ec1ed8873fe06580c14524bb66a9f614"
448
+ }
449
+ ],
450
+ "penalty.applied": [
451
+ {
452
+ "type": "penalty.applied",
453
+ "id": "g-17",
454
+ "fillerId": "acme-markets",
455
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
456
+ "sentAt": 1790001000000,
457
+ "violationId": "v-1",
458
+ "code": "NO_SHOW",
459
+ "step": "L1",
460
+ "details": {
461
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
462
+ "attempt": 0
463
+ }
464
+ }
465
+ ],
466
+ "settle.attestations": [
467
+ {
468
+ "type": "settle.attestations",
469
+ "id": "g-sa-1",
470
+ "fillerId": "acme-markets",
471
+ "sentAt": 1790000160000,
472
+ "orderHash": "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
473
+ "attempt": 0,
474
+ "sourceChainId": "eip155:11155111",
475
+ "proof": {
476
+ "kind": 1,
477
+ "orderHash": "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
478
+ "destination": "0x0000000000000000000000000000000000000000000000000000000000066eee",
479
+ "fillRef": "0xfc4cba975d6b96ed2be00adae2d970f61413b963279089dcfc6402ddccc42740",
480
+ "recipient": "0x000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e",
481
+ "outputAsset": "0x00000000000000000000000075faf114eafb1bdbe2f0316df893fd58ce46aa4d",
482
+ "amountDelivered": "999000000",
483
+ "filledAt": "1790000100",
484
+ "fillerId": "0x112e2693409c427698100f54d0439fc3593fedb25221fe3a54c4823c0a0ee2d5",
485
+ "repayTo": "0x000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e",
486
+ "attempt": 0,
487
+ "setId": 1
488
+ },
489
+ "signatures": [
490
+ {
491
+ "signer": "0x5e877d05b3bfef8b53a59dde76b911fb521415cd",
492
+ "signature": "0x4efcf401d43002b059a1bf5f12a1a6c868a1917a533cb2df79022845bd8704da1d5a6a67e206d057e29bd06efc19fef0afcc0ece462e732268da4cedb57e4c321c"
493
+ },
494
+ {
495
+ "signer": "0x6805cf7ce01e1c392d47806813503e367c932544",
496
+ "signature": "0x29a0148c3a5cdcadf63a4aaef763784751a3fa6064dc276330227729ddbc69015ea1efdab546cf1552ca726de9ccf4480e8d5ff3c3ed9b718c4964b5bc03ddcf1c"
497
+ }
498
+ ],
499
+ "setId": 1,
500
+ "threshold": 2,
501
+ "refundAfter": "1790002400",
502
+ "sig": "0x1d81fa8e56999d9bf8365f2aa18025291198a51b769dcddd7ebaaa3b61eca32f262f218caf2618bc8b351c65eca89417defeb5f3905f7327a68e9cdd1d29f99d1b"
503
+ },
504
+ {
505
+ "type": "settle.attestations",
506
+ "id": "g-sa-3",
507
+ "fillerId": "cancore-reserve",
508
+ "sentAt": 1789999760000,
509
+ "orderHash": "0x770f1ebba8ab5b96e3efbed39c0f630d56f934f9f232771abaccdb0cf17ca204",
510
+ "attempt": 1,
511
+ "sourceChainId": "canton:mainnet",
512
+ "proof": {
513
+ "kind": 1,
514
+ "orderHash": "0x770f1ebba8ab5b96e3efbed39c0f630d56f934f9f232771abaccdb0cf17ca204",
515
+ "destination": "0x0000000000000000000000000000000000000000000000000000000000000001",
516
+ "fillRef": "0xfba8fd8a079872a9efe9646fcf34cfbbe8711ebd63665e8f2e0924949264c471",
517
+ "recipient": "0x000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e",
518
+ "outputAsset": "0x000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
519
+ "amountDelivered": "1200250000",
520
+ "filledAt": "1789999700",
521
+ "fillerId": "0xe3a8297b35498225c7903ca1a305ef64fcd783cf42c6c687b7b332c83d4dd837",
522
+ "repayTo": "0x4fa94ace29856f88ebea07ce6d18e21f52c60b4f66d147134c03c82b62957f9d",
523
+ "attempt": 1,
524
+ "setId": 3
525
+ },
526
+ "signatures": [
527
+ {
528
+ "signer": "0x5e877d05b3bfef8b53a59dde76b911fb521415cd",
529
+ "pubKey": "0x3056301006072a8648ce3d020106052b8104000a034200046e4ce4835ad9bacce317724d5a85bfb72f73c0e0e0d9bb0ece443a23c405994056f031b0c83296033a1fd06fc21cbfdab8a821b09c0172ed64ef1b1ee3469be3",
530
+ "signature": "0x3045022100a7554c31e432a90ae7384910ae3f9128b41034769dd072319fcf8131bb8062b1022006ac576ed5858c881238334835d35f5aacb765b16842a3f926a540355997883e"
531
+ },
532
+ {
533
+ "signer": "0x6805cf7ce01e1c392d47806813503e367c932544",
534
+ "pubKey": "0x3056301006072a8648ce3d020106052b8104000a034200044f15010d9f9457006502d7cbe0cfc5ed67076c2d6f2d4d034b8412e1c07561c370356c5da930ec7a271c3c8d11d00a14e36a3cd3a2a4fad8c05b367357f15b7e",
535
+ "signature": "0x3044022035cdea625125d6b555d9ab2405afb085c1d9a65d780048e607ace4f78740f5fc02207d4236924fd1e29bdc1576077c56da025ebfe63ed0c13bb720baa9ed4a444a93"
536
+ },
537
+ {
538
+ "signer": "0x695ba7eb3c2a35bfc8d16562560a01ba1f9931d0",
539
+ "pubKey": "0x3056301006072a8648ce3d020106052b8104000a0342000479d89465d2de95e32eb728c63c58f4554dbecd39dacf7b680a326672cbc601af2abda0dd84f5b8a4bf8efebcb5eb0d24643dc0cc32af3f76a6ef877b71e19e2b",
540
+ "signature": "0x3045022100b4523bba8213ce348a7334680f4b3c54bfa3b815c907993415a43dc54452cb0e02201fc0f93a9199dfe16f3aff06684146bf6f28ff1df5efea5d874b3d877051678b"
541
+ }
542
+ ],
543
+ "setId": 3,
544
+ "threshold": 2,
545
+ "refundAfter": "1790001800",
546
+ "sig": "0x31ef2d7b9fb10cc97215e965e9cc866e6e595ba92d9f630a00fbaedc3241399f0d65b0e75c81504ba0989eb4264e55e46b571bd7252f45699ab4792d40e5ca931b"
547
+ }
548
+ ]
549
+ }
550
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "$comment": "Fixture draw record (attempt 0 of the test-kit fixture order, spec/protocol/vectors/draw.json) and the epoch record containing its t0, without sig — the gateway signs them. weightsRoot: OpenZeppelin StandardMerkleTree over [\"string\",\"uint256\",\"uint8\",\"uint16\"] = (fillerId, base, tier, reliabilityBps); weight = (base + step(tier)) × reliabilityBps.",
3
+ "draw": {
4
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
5
+ "source": "eip155:11155111",
6
+ "openRef": "0xbf27995945a87053970c38b8d6e1991aad68ab122b7b45147e9c38b2d33dc89a",
7
+ "t0": "1790000012",
8
+ "epochId": "20717",
9
+ "deltaDrand": 6,
10
+ "attempts": [
11
+ {
12
+ "attempt": 0,
13
+ "tBase": "1790000012",
14
+ "closedBy": null,
15
+ "drandRound": "32398885",
16
+ "drandRandomness": "0xb6d412641a7d58b20ef5dded4ae48e9358cc35710f90961d8fe6e99d0e0281ef",
17
+ "drandSignature": "0x8f6d5ddd520329a4ce9a25db41c0552a5ac04bd56577138cbb0ec2b9326af2b8012c7dc2c5bcddc439d922c93a281d24",
18
+ "candidates": [
19
+ {
20
+ "fillerId": "acme-markets",
21
+ "weight": "1500000"
22
+ },
23
+ {
24
+ "fillerId": "cancore-reserve",
25
+ "weight": "900000"
26
+ },
27
+ {
28
+ "fillerId": "zeta-liquidity",
29
+ "weight": "1000000"
30
+ }
31
+ ],
32
+ "r": "2872806",
33
+ "winnerFillerId": "zeta-liquidity",
34
+ "fallbackReason": null
35
+ }
36
+ ]
37
+ },
38
+ "epoch": {
39
+ "epochId": "20717",
40
+ "startsAt": "1789948800",
41
+ "endsAt": "1790035200",
42
+ "weightsRoot": "0xa1c24765b55b34e0c206f808d2fac2e448d9db6f154d89f898921a80bad76e92",
43
+ "leaves": [
44
+ {
45
+ "fillerId": "acme-markets",
46
+ "base": "100",
47
+ "tier": 1,
48
+ "reliabilityBps": 10000
49
+ },
50
+ {
51
+ "fillerId": "cancore-reserve",
52
+ "base": "100",
53
+ "tier": 0,
54
+ "reliabilityBps": 9000
55
+ },
56
+ {
57
+ "fillerId": "zeta-liquidity",
58
+ "base": "100",
59
+ "tier": 0,
60
+ "reliabilityBps": 10000
61
+ }
62
+ ],
63
+ "stakeSteps": [
64
+ {
65
+ "tier": 0,
66
+ "minStake": "0",
67
+ "step": "0"
68
+ },
69
+ {
70
+ "tier": 1,
71
+ "minStake": "100000000000000000000000",
72
+ "step": "50"
73
+ }
74
+ ],
75
+ "rMinBps": 5000,
76
+ "snapshotBlocks": {
77
+ "eip155:1": "23456789",
78
+ "eip155:56": "61234567"
79
+ }
80
+ }
81
+ }