@cancore/contracts 0.1.0 → 0.2.0-rc.6

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