@cancore/contracts 0.2.0-rc.3 → 0.2.0-rc.7
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.
- package/README.md +137 -28
- package/dist/abi.d.ts +110 -178
- package/dist/abi.js +1 -1
- package/dist/{chunk-NV5IUURP.js → chunk-GJPX4H5K.js} +132 -232
- package/dist/chunk-GJPX4H5K.js.map +1 -0
- package/dist/{chunk-VODZRADO.js → chunk-IAPV7XWJ.js} +2 -2
- package/dist/chunk-IAPV7XWJ.js.map +1 -0
- package/dist/index.d.ts +416 -86
- package/dist/index.js +699 -165
- package/dist/index.js.map +1 -1
- package/dist/networks.d.ts +1 -1
- package/dist/networks.js +1 -1
- package/package.json +1 -1
- package/spec/abi/CancoreRouter.json +64 -155
- package/spec/abi/ICancoreRouter.json +64 -69
- package/spec/protocol/asyncapi.json +265 -27
- package/spec/protocol/messages.schema.json +135 -24
- package/spec/protocol/records.schema.json +3 -2
- package/spec/protocol/rest.schema.json +7 -4
- package/spec/protocol/typed-data/FillerKeyRegistration.json +69 -0
- package/spec/protocol/typed-data/FillerMessage.json +115 -0
- package/spec/protocol/typed-data/FillerQuote.json +12 -12
- package/spec/protocol/typed-data/GatewayMessage.json +12 -9
- package/spec/protocol/typed-data/TicketIntent.json +57 -9
- package/spec/protocol/typed-data/TicketReceipt.json +2 -2
- package/spec/protocol/vectors/messages.json +190 -10
- package/spec/protocol/vectors/settle-attestations.json +542 -0
- package/spec/typed-data/FillProof.json +61 -33
- package/spec/typed-data/FillTicket.json +46 -13
- package/dist/chunk-NV5IUURP.js.map +0 -1
- package/dist/chunk-VODZRADO.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://cancore.io/schemas/filler-protocol/v1/messages.schema.json",
|
|
4
4
|
"title": "Cancore filler protocol v1 — WebSocket frames",
|
|
5
|
-
"$comment": "One $def per frame type, validated by name ($defs/<type>). The schemas encode the SENDER rule (protocol §3.1): lowercase hex, uint64 and wider as canonical decimal strings, uint8/16/32 as JSON integers, gateway times in milliseconds. No object is closed (V-2): receivers ignore unknown fields, takers ignore unknown S→F types, and treat an unknown reason/result/code as OTHER/generic. Every enum is open: anyOf [known values, futureEnumValue]. x-direction: S2F = gateway to
|
|
5
|
+
"$comment": "One $def per frame type, validated by name ($defs/<type>). The schemas encode the SENDER rule (protocol §3.1): lowercase hex, uint64 and wider as canonical decimal strings, uint8/16/32 as JSON integers, gateway times in milliseconds. No object is closed (V-2): receivers ignore unknown fields, takers ignore unknown S→F types, and treat an unknown reason/result/code as OTHER/generic. Every enum is open: anyOf [known values, futureEnumValue]. x-direction: S2F = gateway to filler, F2S = filler to gateway, both = either way (ping, pong, error; <type>S2F is the gateway's copy, <type>F2S the filler's). Every frame in both directions carries id, sentAt and fillerId (absent only on auth.challenge, optional on a pre-auth gateway error) and is signed (protocol §3.4): `sig` = the gateway key over GatewayMessage{bodyHash} on S2F, `msgSig` = the filler's message key over FillerMessage{bodyHash} on F2S, bodyHash = keccak256(JCS(frame without that field)). No exceptions: ticket.decline, a declining quote.reconfirm.reply, fill.reported, pong and error from the filler are signed too.",
|
|
6
6
|
"$defs": {
|
|
7
7
|
"uintDec64": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 20, "description": "uint64 as a decimal string: digits only, no sign, no exponent, no leading zero" },
|
|
8
8
|
"uintDec256": { "type": "string", "pattern": "^(0|[1-9][0-9]*)$", "maxLength": 78, "description": "uint256 as a decimal string" },
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
"uint32": { "type": "integer", "minimum": 0, "maximum": 4294967295 },
|
|
13
13
|
"address": { "type": "string", "pattern": "^0x[0-9a-f]{40}$", "description": "EVM address, lowercase hex" },
|
|
14
14
|
"bytes32": { "type": "string", "pattern": "^0x[0-9a-f]{64}$" },
|
|
15
|
-
"
|
|
15
|
+
"repayTo": { "$ref": "#/$defs/bytes32", "description": "where settle pays the filler, encoded for the SOURCE chain (protocol §3.15): EVM — the address left-padded to 32 bytes (repayToEvm); Canton — keccak256(utf8(partyId)) of the filler's registered party" },
|
|
16
|
+
"repayToEvm": { "type": "string", "pattern": "^0x0{24}(?!0{40})[0-9a-f]{40}$", "description": "repayTo for an EVM source: zero top 12 bytes (the router refuses others, InvalidBytes32Address) and not the zero address (ZeroAddress). A receiver that knows the source chain checks repayTo against this" },
|
|
17
|
+
"deliveryKey": { "$ref": "#/$defs/address", "description": "the address that sends fill on the destination (FillTicket.deliveryKey); the zero address for a Canton destination" },
|
|
18
|
+
"sig65": { "type": "string", "pattern": "^0x[0-9a-f]{64}[0-7][0-9a-f]{63}(1b|1c)$", "description": "65-byte r ‖ s ‖ v of an EOA, low-s, v ∈ {27, 28}; no EIP-1271. The pattern refuses any other length or v and an s with its top bit set; isEoaSignature checks the exact bound s ≤ n/2" },
|
|
16
19
|
"timeMs": { "type": "integer", "minimum": 1000000000000, "maximum": 9007199254740991, "description": "unix milliseconds, gateway clock; the minimum rejects seconds" },
|
|
17
20
|
"durationMs": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 },
|
|
18
21
|
"timeS": { "$ref": "#/$defs/uintDec64", "description": "unix seconds as a decimal string (on-chain and signed times)" },
|
|
@@ -25,7 +28,7 @@
|
|
|
25
28
|
"asset": { "oneOf": [{ "$ref": "#/$defs/address" }, { "$ref": "#/$defs/cantonAsset" }] },
|
|
26
29
|
"requestId": { "type": "string", "pattern": "^[!-~]{1,64}$", "description": "1..64 printable ASCII (Canonical.daml:90-93)" },
|
|
27
30
|
"fillerId": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]{0,62}$" },
|
|
28
|
-
"messageId": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
31
|
+
"messageId": { "type": "string", "minLength": 1, "maxLength": 64, "description": "unique per fillerId and direction across every session of that fillerId; never reused by its sender within maxMessageAgeMs" },
|
|
29
32
|
"protocolVersion": { "const": "1" },
|
|
30
33
|
"order": {
|
|
31
34
|
"type": "object",
|
|
@@ -47,10 +50,13 @@
|
|
|
47
50
|
},
|
|
48
51
|
"ticket": {
|
|
49
52
|
"type": "object",
|
|
50
|
-
"
|
|
53
|
+
"description": "FillTicket(bytes32 orderHash,bytes32 fillerId,address deliveryKey,bytes32 repayTo,uint32 attempt,uint64 validFrom,uint64 validUntil); fillerId is keccak256(utf8(fillerId)), deliveryKey and repayTo are those of the filler's signed ticket.intent (S-22)",
|
|
54
|
+
"required": ["orderHash", "fillerId", "deliveryKey", "repayTo", "attempt", "validFrom", "validUntil"],
|
|
51
55
|
"properties": {
|
|
52
56
|
"orderHash": { "$ref": "#/$defs/bytes32" },
|
|
53
|
-
"
|
|
57
|
+
"fillerId": { "$ref": "#/$defs/bytes32" },
|
|
58
|
+
"deliveryKey": { "$ref": "#/$defs/address" },
|
|
59
|
+
"repayTo": { "$ref": "#/$defs/repayTo" },
|
|
54
60
|
"attempt": { "$ref": "#/$defs/uint32" },
|
|
55
61
|
"validFrom": { "$ref": "#/$defs/timeS" },
|
|
56
62
|
"validUntil": { "$ref": "#/$defs/timeS" }
|
|
@@ -65,19 +71,27 @@
|
|
|
65
71
|
},
|
|
66
72
|
"errorCode": {
|
|
67
73
|
"anyOf": [
|
|
68
|
-
{ "enum": ["BAD_REQUEST", "UNAUTHENTICATED", "UNSUPPORTED_VERSION", "UNSUPPORTED_TYPE", "BAD_SIGNATURE", "UNKNOWN_REQUEST", "UNKNOWN_TICKET", "TICKET_CLOSED", "NOT_ELIGIBLE", "RATE_LIMITED", "INTERNAL"] },
|
|
74
|
+
{ "enum": ["BAD_REQUEST", "UNAUTHENTICATED", "UNSUPPORTED_VERSION", "UNSUPPORTED_TYPE", "BAD_SIGNATURE", "STALE_MESSAGE", "REPLAYED_MESSAGE", "TICKET_REFUSED", "UNKNOWN_REQUEST", "UNKNOWN_TICKET", "TICKET_CLOSED", "NOT_ELIGIBLE", "RATE_LIMITED", "INTERNAL", "ATTESTATIONS_NOT_READY"] },
|
|
69
75
|
{ "$ref": "#/$defs/futureEnumValue" }
|
|
70
76
|
]
|
|
71
77
|
},
|
|
78
|
+
"ticketRefusedReason": {
|
|
79
|
+
"anyOf": [
|
|
80
|
+
{ "enum": ["REPAY_TO_INVALID", "REPAY_TO_BLOCKLISTED", "DELIVERY_KEY_INVALID", "PAYOUT_NOT_READY", "RECIPIENT_NOT_READY", "OPEN_TICKET_LIMIT", "PROOF_WINDOW_TOO_SHORT", "ATTESTOR_REVOCATION_PENDING", "SERVICE_DEGRADED", "OTHER"] },
|
|
81
|
+
{ "$ref": "#/$defs/futureEnumValue" }
|
|
82
|
+
],
|
|
83
|
+
"description": "error.reason with TICKET_REFUSED: the pre-ticket check that failed (S-21); the order is re-drawn, nothing is recorded against the filler"
|
|
84
|
+
},
|
|
72
85
|
"expiredResult": { "anyOf": [{ "enum": ["FILLED", "NO_SHOW", "NO_SHOW_UNCONFIRMED", "EXEMPT"] }, { "$ref": "#/$defs/futureEnumValue" }] },
|
|
73
86
|
"exemptReason": { "anyOf": [{ "enum": ["DESTINATION_HALTED", "GATEWAY_FAULT", "REORGED_AFTER_INCLUSION", "RECIPIENT_NOT_READY", "OTHER"] }, { "$ref": "#/$defs/futureEnumValue" }] },
|
|
74
87
|
"quoteAckStatus": { "anyOf": [{ "enum": ["COUNTED", "LATE", "SHORT_TTL"] }, { "$ref": "#/$defs/futureEnumValue" }], "description": "verdict at receipt time; the final status is on GET /v1/filler/quotes" },
|
|
75
88
|
"penaltyStep": { "anyOf": [{ "enum": ["L1", "L2", "L3", "L4"] }, { "$ref": "#/$defs/futureEnumValue" }] },
|
|
76
89
|
"s2fEnvelope": {
|
|
77
90
|
"type": "object",
|
|
78
|
-
"required": ["type", "sentAt", "sig"],
|
|
91
|
+
"required": ["type", "id", "sentAt", "sig"],
|
|
79
92
|
"properties": {
|
|
80
93
|
"type": { "type": "string" },
|
|
94
|
+
"id": { "$ref": "#/$defs/messageId" },
|
|
81
95
|
"fillerId": { "$ref": "#/$defs/fillerId", "description": "the addressee" },
|
|
82
96
|
"sentAt": { "$ref": "#/$defs/timeMs" },
|
|
83
97
|
"sig": { "$ref": "#/$defs/sig65", "description": "gateway key over GatewayMessage{bodyHash = keccak256(JCS(frame without sig))}" },
|
|
@@ -85,10 +99,29 @@
|
|
|
85
99
|
}
|
|
86
100
|
},
|
|
87
101
|
"s2fBase": { "allOf": [{ "$ref": "#/$defs/s2fEnvelope" }, { "type": "object", "required": ["fillerId"], "properties": { "fillerId": { "$ref": "#/$defs/fillerId" } } }] },
|
|
88
|
-
"
|
|
102
|
+
"f2sEnvelope": {
|
|
89
103
|
"type": "object",
|
|
90
|
-
"
|
|
91
|
-
"
|
|
104
|
+
"description": "What every filler → filler-gateway message and REST request body carries (protocol §3.4, S-19): the gateway refuses one without it, with another fillerId than the session's, with a stale sentAt or a reused id",
|
|
105
|
+
"required": ["id", "fillerId", "sentAt", "msgSig"],
|
|
106
|
+
"properties": {
|
|
107
|
+
"id": { "$ref": "#/$defs/messageId" },
|
|
108
|
+
"fillerId": { "$ref": "#/$defs/fillerId", "description": "the sender; must be the fillerId the session is authenticated for" },
|
|
109
|
+
"sentAt": { "$ref": "#/$defs/timeMs" },
|
|
110
|
+
"msgSig": { "$ref": "#/$defs/sig65", "description": "the filler's message key over FillerMessage{bodyHash = keccak256(JCS(message without msgSig))}; the body keeps id, fillerId, sentAt and any inner sig" },
|
|
111
|
+
"re": { "$ref": "#/$defs/messageId" }
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"f2sBase": { "allOf": [{ "$ref": "#/$defs/f2sEnvelope" }, { "type": "object", "required": ["type"], "properties": { "type": { "type": "string" } } }] },
|
|
115
|
+
"fillerKeyRegistration": {
|
|
116
|
+
"type": "object",
|
|
117
|
+
"description": "Proof of possession of a message key (protocol §3.16): FillerKeyRegistration{fillerId, messageKey, issuedAt} signed by that key — at onboarding, and with the NEW key at a manual key change by Cancore staff, who submit it to the key registry of filler-gateway. Not a frame: there is no key-change message. sig must be an EOA signature (65 bytes, low-s, v ∈ {27, 28}) that recovers to messageKey; an EIP-1271 signature is refused",
|
|
118
|
+
"required": ["fillerId", "messageKey", "issuedAt", "sig"],
|
|
119
|
+
"properties": {
|
|
120
|
+
"fillerId": { "$ref": "#/$defs/fillerId" },
|
|
121
|
+
"messageKey": { "$ref": "#/$defs/address" },
|
|
122
|
+
"issuedAt": { "$ref": "#/$defs/timeS" },
|
|
123
|
+
"sig": { "$ref": "#/$defs/sig65" }
|
|
124
|
+
}
|
|
92
125
|
},
|
|
93
126
|
"auth.challenge": {
|
|
94
127
|
"x-direction": "S2F",
|
|
@@ -101,7 +134,7 @@
|
|
|
101
134
|
"auth.response": {
|
|
102
135
|
"x-direction": "F2S",
|
|
103
136
|
"type": "object",
|
|
104
|
-
"description": "sig = FillerAuth{fillerId, nonce, expiresAt} by
|
|
137
|
+
"description": "sig = FillerAuth{fillerId, nonce, expiresAt} by the registered message key of fillerId (keyAddress = its address); msgSig by the same key",
|
|
105
138
|
"allOf": [{ "$ref": "#/$defs/f2sBase" }],
|
|
106
139
|
"required": ["type", "fillerId", "keyAddress", "protocolVersion", "sig"],
|
|
107
140
|
"properties": {
|
|
@@ -109,6 +142,7 @@
|
|
|
109
142
|
"fillerId": { "$ref": "#/$defs/fillerId" },
|
|
110
143
|
"keyAddress": { "$ref": "#/$defs/address" },
|
|
111
144
|
"protocolVersion": { "type": "string", "description": "the gateway answers UNSUPPORTED_VERSION to anything it does not serve; v1 senders send \"1\"" },
|
|
145
|
+
"nonce": { "$ref": "#/$defs/bytes32", "description": "optional: the auth.challenge nonce this response answers, so the REST login (POST /v1/filler/auth) finds its challenge without trying every live one; on WebSocket the challenge is the connection's own" },
|
|
112
146
|
"sig": { "$ref": "#/$defs/sig65" }
|
|
113
147
|
}
|
|
114
148
|
},
|
|
@@ -121,11 +155,12 @@
|
|
|
121
155
|
},
|
|
122
156
|
"ping": {
|
|
123
157
|
"x-direction": "both",
|
|
124
|
-
"description": "Heartbeat, either way. A receiver checks the copy of its direction: pingS2F (gateway
|
|
158
|
+
"description": "Heartbeat, either way. A receiver checks the copy of its direction: pingS2F (gateway sig) or pingF2S (filler msgSig)",
|
|
125
159
|
"anyOf": [{ "$ref": "#/$defs/pingF2S" }, { "$ref": "#/$defs/pingS2F" }]
|
|
126
160
|
},
|
|
127
161
|
"pingF2S": {
|
|
128
162
|
"type": "object",
|
|
163
|
+
"allOf": [{ "$ref": "#/$defs/f2sBase" }],
|
|
129
164
|
"required": ["type", "id"],
|
|
130
165
|
"properties": { "type": { "const": "ping" }, "id": { "$ref": "#/$defs/messageId" } }
|
|
131
166
|
},
|
|
@@ -137,11 +172,12 @@
|
|
|
137
172
|
},
|
|
138
173
|
"pong": {
|
|
139
174
|
"x-direction": "both",
|
|
140
|
-
"description": "Answer to a ping, re = ping.id. A receiver checks the copy of its direction: pongS2F (
|
|
175
|
+
"description": "Answer to a ping, re = ping.id. A receiver checks the copy of its direction: pongS2F (gateway sig) or pongF2S (filler msgSig)",
|
|
141
176
|
"anyOf": [{ "$ref": "#/$defs/pongF2S" }, { "$ref": "#/$defs/pongS2F" }]
|
|
142
177
|
},
|
|
143
178
|
"pongF2S": {
|
|
144
179
|
"type": "object",
|
|
180
|
+
"allOf": [{ "$ref": "#/$defs/f2sBase" }],
|
|
145
181
|
"required": ["type", "re"],
|
|
146
182
|
"properties": { "type": { "const": "pong" }, "re": { "$ref": "#/$defs/messageId" } }
|
|
147
183
|
},
|
|
@@ -152,12 +188,25 @@
|
|
|
152
188
|
"properties": { "type": { "const": "pong" }, "re": { "$ref": "#/$defs/messageId" } }
|
|
153
189
|
},
|
|
154
190
|
"error": {
|
|
155
|
-
"x-direction": "
|
|
191
|
+
"x-direction": "both",
|
|
192
|
+
"description": "Either way. A receiver checks the copy of its direction: errorS2F (the gateway's reply, also the REST error body) or errorF2S (the filler's reply to a gateway frame it cannot handle)",
|
|
193
|
+
"anyOf": [{ "$ref": "#/$defs/errorF2S" }, { "$ref": "#/$defs/errorS2F" }]
|
|
194
|
+
},
|
|
195
|
+
"errorS2F": {
|
|
156
196
|
"type": "object",
|
|
157
|
-
"description": "Reply to the F→S frame `re`; also the REST error body. fillerId is absent before authentication",
|
|
197
|
+
"description": "Reply to the F→S frame `re`; also the REST error body. fillerId is absent before authentication. reason names the failed pre-ticket check with TICKET_REFUSED",
|
|
158
198
|
"allOf": [{ "$ref": "#/$defs/s2fEnvelope" }],
|
|
159
199
|
"required": ["type", "code", "message"],
|
|
160
|
-
"properties": { "type": { "const": "error" }, "code": { "$ref": "#/$defs/errorCode" }, "message": { "type": "string" } }
|
|
200
|
+
"properties": { "type": { "const": "error" }, "code": { "$ref": "#/$defs/errorCode" }, "message": { "type": "string" }, "reason": { "$ref": "#/$defs/ticketRefusedReason" } },
|
|
201
|
+
"if": { "type": "object", "properties": { "code": { "const": "TICKET_REFUSED" } }, "required": ["code"] },
|
|
202
|
+
"then": { "type": "object", "required": ["reason"], "properties": { "reason": true } }
|
|
203
|
+
},
|
|
204
|
+
"errorF2S": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"description": "The filler's reply to the S→F frame `re` it cannot handle (malformed, unknown orderHash); informational, it changes no state in filler-gateway. Signed like every filler message",
|
|
207
|
+
"allOf": [{ "$ref": "#/$defs/f2sBase" }],
|
|
208
|
+
"required": ["type", "re", "code", "message"],
|
|
209
|
+
"properties": { "type": { "const": "error" }, "re": { "$ref": "#/$defs/messageId" }, "code": { "$ref": "#/$defs/errorCode" }, "message": { "type": "string" } }
|
|
161
210
|
},
|
|
162
211
|
"epoch.weights": {
|
|
163
212
|
"x-direction": "S2F",
|
|
@@ -202,13 +251,12 @@
|
|
|
202
251
|
"quote": {
|
|
203
252
|
"x-direction": "F2S",
|
|
204
253
|
"type": "object",
|
|
205
|
-
"description": "sig = FillerQuote{keccak256(utf8(requestId)),
|
|
254
|
+
"description": "sig = FillerQuote{keccak256(utf8(requestId)), fillerId, amountOut, validUntil, nonce} by the message key, fillerId the envelope's; counts only if validUntil × 1000 ≥ windowCloseAt + quoteTtlMs",
|
|
206
255
|
"allOf": [{ "$ref": "#/$defs/f2sBase" }],
|
|
207
|
-
"required": ["type", "requestId", "
|
|
256
|
+
"required": ["type", "requestId", "amountOut", "validUntil", "nonce", "sig"],
|
|
208
257
|
"properties": {
|
|
209
258
|
"type": { "const": "quote" },
|
|
210
259
|
"requestId": { "$ref": "#/$defs/requestId" },
|
|
211
|
-
"filler": { "$ref": "#/$defs/address" },
|
|
212
260
|
"amountOut": { "$ref": "#/$defs/uintDec256" },
|
|
213
261
|
"validUntil": { "$ref": "#/$defs/timeS" },
|
|
214
262
|
"nonce": { "$ref": "#/$defs/uintDec64" },
|
|
@@ -247,6 +295,7 @@
|
|
|
247
295
|
"quote.reconfirm.reply": {
|
|
248
296
|
"x-direction": "F2S",
|
|
249
297
|
"type": "object",
|
|
298
|
+
"description": "An accept carries sig = FillerQuote{keccak256(utf8(requestId)), fillerId, amountOut, validUntil, nonce} by the message key; a decline carries only the envelope msgSig",
|
|
250
299
|
"allOf": [{ "$ref": "#/$defs/f2sBase" }],
|
|
251
300
|
"required": ["type", "orderHash", "accept"],
|
|
252
301
|
"properties": {
|
|
@@ -279,15 +328,17 @@
|
|
|
279
328
|
"ticket.intent": {
|
|
280
329
|
"x-direction": "F2S",
|
|
281
330
|
"type": "object",
|
|
282
|
-
"description": "sig = TicketIntent{orderHash, attempt, validFrom, validUntil} by the
|
|
331
|
+
"description": "sig = TicketIntent{orderHash, attempt, validFrom, validUntil, fillerId, deliveryKey, repayTo} by the message key, fillerId the envelope's; orderHash, attempt, validFrom, validUntil equal the offer; the issued ticket carries exactly this deliveryKey and repayTo (S-22), or the gateway answers error TICKET_REFUSED (S-21)",
|
|
283
332
|
"allOf": [{ "$ref": "#/$defs/f2sBase" }],
|
|
284
|
-
"required": ["type", "orderHash", "attempt", "validFrom", "validUntil", "sig"],
|
|
333
|
+
"required": ["type", "orderHash", "attempt", "validFrom", "validUntil", "deliveryKey", "repayTo", "sig"],
|
|
285
334
|
"properties": {
|
|
286
335
|
"type": { "const": "ticket.intent" },
|
|
287
336
|
"orderHash": { "$ref": "#/$defs/bytes32" },
|
|
288
337
|
"attempt": { "$ref": "#/$defs/uint32" },
|
|
289
338
|
"validFrom": { "$ref": "#/$defs/timeS" },
|
|
290
339
|
"validUntil": { "$ref": "#/$defs/timeS" },
|
|
340
|
+
"deliveryKey": { "$ref": "#/$defs/deliveryKey" },
|
|
341
|
+
"repayTo": { "$ref": "#/$defs/repayTo" },
|
|
291
342
|
"sig": { "$ref": "#/$defs/sig65" }
|
|
292
343
|
}
|
|
293
344
|
},
|
|
@@ -321,7 +372,7 @@
|
|
|
321
372
|
"ticket.issued": {
|
|
322
373
|
"x-direction": "S2F",
|
|
323
374
|
"type": "object",
|
|
324
|
-
"description": "form discriminates the EVM-destination ticket (FillTicket + ticketSig) from the Canton-destination one (DeliveryOrder); a form added within v1 (V-2) is checked against the common fields only",
|
|
375
|
+
"description": "form discriminates the EVM-destination ticket (FillTicket + ticketSig) from the Canton-destination one (DeliveryOrder, with its repayTo); a form added within v1 (V-2) is checked against the common fields only. The filler checks fillerId, deliveryKey and repayTo against its own ticket.intent before it delivers (T-15)",
|
|
325
376
|
"required": ["type", "form", "orderHash", "attempt"],
|
|
326
377
|
"properties": {
|
|
327
378
|
"type": { "const": "ticket.issued" },
|
|
@@ -337,14 +388,14 @@
|
|
|
337
388
|
},
|
|
338
389
|
{
|
|
339
390
|
"if": { "type": "object", "properties": { "form": { "const": "canton" } }, "required": ["form"] },
|
|
340
|
-
"then": { "type": "object", "required": ["deliveryOrderCid", "validUntil"], "properties": { "deliveryOrderCid": { "type": "string", "minLength": 1 }, "validUntil": { "$ref": "#/$defs/timeS" } } }
|
|
391
|
+
"then": { "type": "object", "required": ["deliveryOrderCid", "validUntil", "repayTo"], "properties": { "deliveryOrderCid": { "type": "string", "minLength": 1 }, "validUntil": { "$ref": "#/$defs/timeS" }, "repayTo": { "$ref": "#/$defs/repayTo", "description": "the repayTo of the DeliveryOrder, = the filler's signed ticket.intent (S-22); fillerId is the envelope's" } } }
|
|
341
392
|
}
|
|
342
393
|
]
|
|
343
394
|
},
|
|
344
395
|
"ticket.receipt": {
|
|
345
396
|
"x-direction": "F2S",
|
|
346
397
|
"type": "object",
|
|
347
|
-
"description": "sig = TicketReceipt{ticketHash, ticketSigHash} by the
|
|
398
|
+
"description": "sig = TicketReceipt{ticketHash, ticketSigHash} by the message key",
|
|
348
399
|
"allOf": [{ "$ref": "#/$defs/f2sBase" }],
|
|
349
400
|
"required": ["type", "orderHash", "attempt", "ticketHash", "ticketSigHash", "sig"],
|
|
350
401
|
"properties": {
|
|
@@ -409,6 +460,66 @@
|
|
|
409
460
|
"step": { "$ref": "#/$defs/penaltyStep" },
|
|
410
461
|
"details": { "type": "object" }
|
|
411
462
|
}
|
|
463
|
+
},
|
|
464
|
+
"fillProof": {
|
|
465
|
+
"type": "object",
|
|
466
|
+
"description": "FillProof as the source router hashes it (FILL_PROOF_TYPES, the twelve variant A fields, protocol §3.3), encoded per protocol §3.1: kind, attempt, setId JSON integers; amountDelivered, filledAt decimal strings; fillerId the on-chain form keccak256(utf8(fillerId))",
|
|
467
|
+
"required": ["kind", "orderHash", "destination", "fillRef", "recipient", "outputAsset", "amountDelivered", "filledAt", "fillerId", "repayTo", "attempt", "setId"],
|
|
468
|
+
"properties": {
|
|
469
|
+
"kind": { "$ref": "#/$defs/uint8" },
|
|
470
|
+
"orderHash": { "$ref": "#/$defs/bytes32" },
|
|
471
|
+
"destination": { "$ref": "#/$defs/bytes32" },
|
|
472
|
+
"fillRef": { "$ref": "#/$defs/bytes32" },
|
|
473
|
+
"recipient": { "$ref": "#/$defs/bytes32" },
|
|
474
|
+
"outputAsset": { "$ref": "#/$defs/bytes32" },
|
|
475
|
+
"amountDelivered": { "$ref": "#/$defs/uintDec256" },
|
|
476
|
+
"filledAt": { "$ref": "#/$defs/timeS" },
|
|
477
|
+
"fillerId": { "$ref": "#/$defs/bytes32", "description": "keccak256(utf8(fillerId)) of the filler that delivered: this filler's" },
|
|
478
|
+
"repayTo": { "$ref": "#/$defs/repayTo", "description": "the payee of settle, encoded for the source chain: the repayTo of this filler's ticket" },
|
|
479
|
+
"attempt": { "$ref": "#/$defs/uint32" },
|
|
480
|
+
"setId": { "$ref": "#/$defs/uint32" }
|
|
481
|
+
}
|
|
482
|
+
},
|
|
483
|
+
"attestationEvm": {
|
|
484
|
+
"type": "object",
|
|
485
|
+
"description": "One attestor signature for an EVM source: EIP-712 over FillProof in the source-router domain; in the payload's order the signature values are the sigs argument of settle",
|
|
486
|
+
"required": ["signer", "signature"],
|
|
487
|
+
"properties": { "signer": { "$ref": "#/$defs/address" }, "signature": { "$ref": "#/$defs/sig65" } }
|
|
488
|
+
},
|
|
489
|
+
"attestationCanton": {
|
|
490
|
+
"type": "object",
|
|
491
|
+
"description": "One attestor signature for a Canton source: the same digest, carried as SwapIntent_SettleWithProof takes it (SigEntry {pubKey, sig}; strip 0x for Daml). signer is the address Daml derives from pubKey",
|
|
492
|
+
"required": ["signer", "pubKey", "signature"],
|
|
493
|
+
"properties": {
|
|
494
|
+
"signer": { "$ref": "#/$defs/address" },
|
|
495
|
+
"pubKey": { "type": "string", "pattern": "^0x3056301006072a8648ce3d020106052b8104000a03420004[0-9a-f]{128}$", "description": "DER SubjectPublicKeyInfo of the uncompressed secp256k1 key (88 bytes), as KMS GetPublicKey returns it" },
|
|
496
|
+
"signature": { "type": "string", "pattern": "^0x30([0-9a-f]{2}){7,71}$", "description": "minimal DER ECDSA signature, low-s, no recovery byte" }
|
|
497
|
+
}
|
|
498
|
+
},
|
|
499
|
+
"settle.attestations": {
|
|
500
|
+
"x-direction": "S2F",
|
|
501
|
+
"type": "object",
|
|
502
|
+
"description": "≥ threshold attestor signatures over the filler's FillProof (§10 D-N, S-13). Sent once per (orderHash, attempt); GET /v1/filler/attestations/{orderHash} serves the same payload. signatures: at least threshold entries, strictly ascending by signer (not expressible here; settleAttestationsErrors checks it). sourceChainId picks the entry form: eip155 → attestationEvm, canton → attestationCanton",
|
|
503
|
+
"allOf": [
|
|
504
|
+
{ "$ref": "#/$defs/s2fBase" },
|
|
505
|
+
{
|
|
506
|
+
"if": { "type": "object", "properties": { "sourceChainId": { "type": "string", "pattern": "^canton:" } }, "required": ["sourceChainId"] },
|
|
507
|
+
"then": { "type": "object", "properties": { "signatures": { "type": "array", "items": { "$ref": "#/$defs/attestationCanton" } } } },
|
|
508
|
+
"else": { "type": "object", "properties": { "signatures": { "type": "array", "items": { "$ref": "#/$defs/attestationEvm" } } } }
|
|
509
|
+
}
|
|
510
|
+
],
|
|
511
|
+
"required": ["type", "orderHash", "attempt", "sourceChainId", "proof", "signatures", "setId", "threshold", "refundAfter"],
|
|
512
|
+
"properties": {
|
|
513
|
+
"type": { "const": "settle.attestations" },
|
|
514
|
+
"orderHash": { "$ref": "#/$defs/bytes32" },
|
|
515
|
+
"attempt": { "$ref": "#/$defs/uint32", "description": "equals proof.attempt" },
|
|
516
|
+
"sourceChainId": { "$ref": "#/$defs/caip2", "description": "where settle is submitted" },
|
|
517
|
+
"proof": { "$ref": "#/$defs/fillProof" },
|
|
518
|
+
"signatures": { "type": "array", "minItems": 1 },
|
|
519
|
+
"setId": { "$ref": "#/$defs/uint32", "description": "equals proof.setId; EVM: attestationSetFor(orderHash)" },
|
|
520
|
+
"threshold": { "type": "integer", "minimum": 1, "maximum": 4294967295, "description": "k of that set" },
|
|
521
|
+
"refundAfter": { "$ref": "#/$defs/timeS", "description": "from this time settle reverts; the node gets its settle included before it" }
|
|
522
|
+
}
|
|
412
523
|
}
|
|
413
524
|
}
|
|
414
525
|
}
|
|
@@ -81,12 +81,13 @@
|
|
|
81
81
|
"gatewayInfo": {
|
|
82
82
|
"type": "object",
|
|
83
83
|
"description": "GET /v1/gateway: the mirror of @cancore/contracts FILLER_GATEWAYS for this environment. A taker trusts the package, and uses this to notice a rotation",
|
|
84
|
-
"required": ["env", "gateway", "ticketSigners", "protocolVersion"],
|
|
84
|
+
"required": ["env", "gateway", "ticketSigners", "protocolVersion", "maxMessageAgeMs"],
|
|
85
85
|
"properties": {
|
|
86
86
|
"env": { "type": "string", "minLength": 1 },
|
|
87
87
|
"gateway": { "$ref": "messages.schema.json#/$defs/address" },
|
|
88
88
|
"ticketSigners": { "type": "array", "items": { "$ref": "messages.schema.json#/$defs/address" } },
|
|
89
|
-
"protocolVersion": { "$ref": "messages.schema.json#/$defs/protocolVersion" }
|
|
89
|
+
"protocolVersion": { "$ref": "messages.schema.json#/$defs/protocolVersion" },
|
|
90
|
+
"maxMessageAgeMs": { "$ref": "messages.schema.json#/$defs/durationMs", "description": "freshness bound of §3.4 in both directions: |receivedAt − sentAt| ≤ maxMessageAgeMs, and a message id is not reused within it" }
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://cancore.io/schemas/filler-protocol/v1/rest.schema.json",
|
|
4
4
|
"title": "Cancore filler protocol v1 — REST fallback",
|
|
5
|
-
"$comment": "protocol §3.6. Bodies are the WebSocket frames (
|
|
5
|
+
"$comment": "protocol §3.6. Bodies are the WebSocket frames: every request body is a filler message with its envelope (id, fillerId, sentAt) and msgSig, verified before processing as on the WebSocket (S-19); every response is a freshly signed S→F message. /v1/filler/* needs `Authorization: Bearer <token>` from POST /v1/filler/auth; the token is bound to the fillerId it was issued for, and a ticket of another filler is 404 UNKNOWN_TICKET. GET /v1/filler/attestations/{orderHash} answers 404 ATTESTATIONS_NOT_READY until the gateway holds ≥ threshold verified signatures for this filler's fill, and 404 UNKNOWN_TICKET when this filler holds no ticket on the order. /v1/draws/* and /v1/gateway are public. Every non-2xx body is the `error` frame, with the HTTP status of x-error-status. x-endpoints: request/response name a $def here or in messages.schema.json.",
|
|
6
6
|
"x-endpoints": [
|
|
7
7
|
{ "method": "GET", "path": "/v1/filler/auth/challenge", "auth": "none", "response": "messages.schema.json#/$defs/auth.challenge" },
|
|
8
8
|
{ "method": "POST", "path": "/v1/filler/auth", "auth": "none", "request": "messages.schema.json#/$defs/auth.response", "response": "#/$defs/authToken" },
|
|
@@ -14,16 +14,18 @@
|
|
|
14
14
|
{ "method": "GET", "path": "/v1/filler/quotes", "auth": "bearer", "query": "#/$defs/quoteListQuery", "response": "#/$defs/quoteList" },
|
|
15
15
|
{ "method": "GET", "path": "/v1/filler/stats", "auth": "bearer", "response": "#/$defs/fillerStats" },
|
|
16
16
|
{ "method": "GET", "path": "/v1/filler/penalties", "auth": "bearer", "query": "#/$defs/pageQuery", "response": "#/$defs/penaltyList" },
|
|
17
|
+
{ "method": "GET", "path": "/v1/filler/attestations/{orderHash}", "auth": "bearer", "response": "messages.schema.json#/$defs/settle.attestations" },
|
|
17
18
|
{ "method": "GET", "path": "/v1/draws/{orderHash}", "auth": "none", "response": "records.schema.json#/$defs/drawRecord" },
|
|
18
19
|
{ "method": "GET", "path": "/v1/draws/epochs/{id}", "auth": "none", "response": "records.schema.json#/$defs/epochRecord" },
|
|
19
20
|
{ "method": "GET", "path": "/v1/gateway", "auth": "none", "response": "records.schema.json#/$defs/gatewayInfo" }
|
|
20
21
|
],
|
|
21
22
|
"x-error-status": {
|
|
22
23
|
"BAD_REQUEST": 400, "UNAUTHENTICATED": 401, "UNSUPPORTED_VERSION": 400, "UNSUPPORTED_TYPE": 400, "BAD_SIGNATURE": 422,
|
|
23
|
-
"UNKNOWN_REQUEST": 404, "UNKNOWN_TICKET": 404, "TICKET_CLOSED": 409, "NOT_ELIGIBLE": 403, "RATE_LIMITED": 429, "INTERNAL": 500
|
|
24
|
+
"STALE_MESSAGE": 400, "REPLAYED_MESSAGE": 409, "TICKET_REFUSED": 409, "UNKNOWN_REQUEST": 404, "UNKNOWN_TICKET": 404, "TICKET_CLOSED": 409, "NOT_ELIGIBLE": 403, "RATE_LIMITED": 429, "INTERNAL": 500,
|
|
25
|
+
"ATTESTATIONS_NOT_READY": 404
|
|
24
26
|
},
|
|
25
27
|
"$defs": {
|
|
26
|
-
"errorBody": { "$ref": "messages.schema.json#/$defs/
|
|
28
|
+
"errorBody": { "$ref": "messages.schema.json#/$defs/errorS2F" },
|
|
27
29
|
"empty": { "type": "object", "description": "no fields in v1; receivers ignore unknown ones (V-2)" },
|
|
28
30
|
"authToken": {
|
|
29
31
|
"type": "object",
|
|
@@ -57,7 +59,8 @@
|
|
|
57
59
|
},
|
|
58
60
|
"stakeBindingRequest": {
|
|
59
61
|
"type": "object",
|
|
60
|
-
"description": "sig = StakeBinding{partnerId, stakingAddress, chainId, nonce} by the staking address",
|
|
62
|
+
"description": "sig = StakeBinding{partnerId, stakingAddress, chainId, nonce} by the staking address; the body carries the filler envelope and msgSig like every request body",
|
|
63
|
+
"allOf": [{ "$ref": "messages.schema.json#/$defs/f2sEnvelope" }],
|
|
61
64
|
"required": ["partnerId", "stakingAddress", "chainId", "nonce", "sig"],
|
|
62
65
|
"properties": {
|
|
63
66
|
"partnerId": { "$ref": "messages.schema.json#/$defs/fillerId" },
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Filler protocol v1, settlement design (variant A, CAN-2139; protocol.md §3.3): Signed by the key being registered (an EOA: 65 bytes, low-s, v ∈ {27, 28}; no EIP-1271) — at onboarding, and with the NEW key at a manual key change by Cancore staff; there is no rotation type. issuedAt in unix seconds. Signed vectors carry `signature` by a test key derived from a public label: it recovers to messageKey. Domain CancoreFillerProtocol v1, no chainId, no verifyingContract. Digests by ethers TypedDataEncoder.",
|
|
3
|
+
"primaryType": "FillerKeyRegistration",
|
|
4
|
+
"domain": {
|
|
5
|
+
"name": "CancoreFillerProtocol",
|
|
6
|
+
"version": "1",
|
|
7
|
+
"fields": [
|
|
8
|
+
"name",
|
|
9
|
+
"version"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"typeString": "FillerKeyRegistration(string fillerId,address messageKey,uint64 issuedAt)",
|
|
13
|
+
"types": {
|
|
14
|
+
"FillerKeyRegistration": [
|
|
15
|
+
{
|
|
16
|
+
"name": "fillerId",
|
|
17
|
+
"type": "string"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "messageKey",
|
|
21
|
+
"type": "address"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "issuedAt",
|
|
25
|
+
"type": "uint64"
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
"vectors": [
|
|
30
|
+
{
|
|
31
|
+
"note": "onboarding: acme-markets registers its message key",
|
|
32
|
+
"message": {
|
|
33
|
+
"fillerId": "acme-markets",
|
|
34
|
+
"messageKey": "0x4fee983989d3a8046f29d376080ef9c334323105",
|
|
35
|
+
"issuedAt": "1789900000"
|
|
36
|
+
},
|
|
37
|
+
"digest": "0xe73be03b7204b06997bb67d4aefe464f0edbc784e46727a375397cc0c1a508aa",
|
|
38
|
+
"signature": "0x6e2e04d4bd17c204745afb4208c718a77268f6ec07ee39221f12031ccf63fe457bb6fae86dc7fbcbbd6b0818e394d17f1f8812d30fb56ec58b161184af6e5f7d1c"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"note": "manual key change by Cancore staff: the same registration, signed by the NEW key",
|
|
42
|
+
"message": {
|
|
43
|
+
"fillerId": "acme-markets",
|
|
44
|
+
"messageKey": "0x9ee9e7c9421a25e3f77088f23b16022ecce80ec2",
|
|
45
|
+
"issuedAt": "1790100000"
|
|
46
|
+
},
|
|
47
|
+
"digest": "0xbbadffdde7a3aadf87d8c37d4419936581c647e0f92deccaf393456165f50bd3",
|
|
48
|
+
"signature": "0xddd5690d91e92ab1180b40bcac2e34a815121afe76c8ce949c747392e1ff06af206edd720a4bed70948df02e7483d327db0cc68c5e4f097f63fac04f0c5ccc571c"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"note": "every integer at its maximum (unsigned)",
|
|
52
|
+
"message": {
|
|
53
|
+
"fillerId": "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
|
|
54
|
+
"messageKey": "0xffffffffffffffffffffffffffffffffffffffff",
|
|
55
|
+
"issuedAt": "18446744073709551615"
|
|
56
|
+
},
|
|
57
|
+
"digest": "0xc1ffbf3b5782193f003dd8701be0dc59a94fbcee164641fe7aec31ee391e50b9"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"note": "zero values (unsigned)",
|
|
61
|
+
"message": {
|
|
62
|
+
"fillerId": "",
|
|
63
|
+
"messageKey": "0x0000000000000000000000000000000000000000",
|
|
64
|
+
"issuedAt": "0"
|
|
65
|
+
},
|
|
66
|
+
"digest": "0xf0170117e8dfc4f1e76def69dffe11d7bf46d2f3f0b849851650bd374b552549"
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "Filler protocol v1, settlement design (variant A, CAN-2139; protocol.md §3.3): `bodyHash` = keccak256(utf8(JCS(message without \"msgSig\"))), JCS = RFC 8785; the body keeps id, fillerId, sentAt and any inner typed sig. Each vector carries the F→S body, its canonical text and the hash. msgSig in a body is a placeholder: the excluded field. Domain CancoreFillerProtocol v1, no chainId, no verifyingContract. Digests by ethers TypedDataEncoder.",
|
|
3
|
+
"primaryType": "FillerMessage",
|
|
4
|
+
"domain": {
|
|
5
|
+
"name": "CancoreFillerProtocol",
|
|
6
|
+
"version": "1",
|
|
7
|
+
"fields": [
|
|
8
|
+
"name",
|
|
9
|
+
"version"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"typeString": "FillerMessage(bytes32 bodyHash)",
|
|
13
|
+
"types": {
|
|
14
|
+
"FillerMessage": [
|
|
15
|
+
{
|
|
16
|
+
"name": "bodyHash",
|
|
17
|
+
"type": "bytes32"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
"vectors": [
|
|
22
|
+
{
|
|
23
|
+
"note": "ticket.intent: the inner TicketIntent sig is in the body, msgSig is not",
|
|
24
|
+
"body": {
|
|
25
|
+
"type": "ticket.intent",
|
|
26
|
+
"id": "i-1",
|
|
27
|
+
"fillerId": "acme-markets",
|
|
28
|
+
"sentAt": 1790000021000,
|
|
29
|
+
"orderHash": "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
|
|
30
|
+
"attempt": 0,
|
|
31
|
+
"validFrom": "1790000040",
|
|
32
|
+
"validUntil": "1790000400",
|
|
33
|
+
"deliveryKey": "0x742d35cc6634c0532925a3b844bc454e4438f44e",
|
|
34
|
+
"repayTo": "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc",
|
|
35
|
+
"sig": "0x111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222221c",
|
|
36
|
+
"msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
|
|
37
|
+
},
|
|
38
|
+
"jcs": "{\"attempt\":0,\"deliveryKey\":\"0x742d35cc6634c0532925a3b844bc454e4438f44e\",\"fillerId\":\"acme-markets\",\"id\":\"i-1\",\"orderHash\":\"0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6\",\"repayTo\":\"0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc\",\"sentAt\":1790000021000,\"sig\":\"0x111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222221c\",\"type\":\"ticket.intent\",\"validFrom\":\"1790000040\",\"validUntil\":\"1790000400\"}",
|
|
39
|
+
"message": {
|
|
40
|
+
"bodyHash": "0xfb7c6cbfc7c9db05936598d58d8691affe325f5aa23dc750228b9c55299fbf5a"
|
|
41
|
+
},
|
|
42
|
+
"digest": "0x6d290885737e5c0045c9374bea1a1d55ac27c8b638cdad4fbdb15d25378ba586"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"note": "ticket.decline: no inner signature, the envelope is the only one",
|
|
46
|
+
"body": {
|
|
47
|
+
"type": "ticket.decline",
|
|
48
|
+
"id": "d-1",
|
|
49
|
+
"fillerId": "acme-markets",
|
|
50
|
+
"sentAt": 1790000027001,
|
|
51
|
+
"orderHash": "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
|
|
52
|
+
"attempt": 0,
|
|
53
|
+
"reason": "TICKET_ISSUED_LATE",
|
|
54
|
+
"detail": "ticket.issued 3001 ms after acceptBy",
|
|
55
|
+
"msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
|
|
56
|
+
},
|
|
57
|
+
"jcs": "{\"attempt\":0,\"detail\":\"ticket.issued 3001 ms after acceptBy\",\"fillerId\":\"acme-markets\",\"id\":\"d-1\",\"orderHash\":\"0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6\",\"reason\":\"TICKET_ISSUED_LATE\",\"sentAt\":1790000027001,\"type\":\"ticket.decline\"}",
|
|
58
|
+
"message": {
|
|
59
|
+
"bodyHash": "0xbce98e0bf252ac12261023c2182f57109ae8464e9e5732a90b2b456a8b8c7b41"
|
|
60
|
+
},
|
|
61
|
+
"digest": "0xf3902941f23658e47a4085e26270b084619a2fce12a7ca7356120890feaea1be"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"note": "quote.reconfirm.reply declining: signed by the envelope only",
|
|
65
|
+
"body": {
|
|
66
|
+
"type": "quote.reconfirm.reply",
|
|
67
|
+
"id": "r-2",
|
|
68
|
+
"fillerId": "acme-markets",
|
|
69
|
+
"sentAt": 1790000014000,
|
|
70
|
+
"orderHash": "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
|
|
71
|
+
"accept": false,
|
|
72
|
+
"msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
|
|
73
|
+
},
|
|
74
|
+
"jcs": "{\"accept\":false,\"fillerId\":\"acme-markets\",\"id\":\"r-2\",\"orderHash\":\"0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6\",\"sentAt\":1790000014000,\"type\":\"quote.reconfirm.reply\"}",
|
|
75
|
+
"message": {
|
|
76
|
+
"bodyHash": "0x3408b67652613536d8c2b1cf1be3acf7e7fa2ec5dd9515a9729e19108b4aa67e"
|
|
77
|
+
},
|
|
78
|
+
"digest": "0x1aa4c883ead3820c13bb033585574a5b1b9a318333f896a5e55222c31073abfb"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"note": "pong to a gateway ping",
|
|
82
|
+
"body": {
|
|
83
|
+
"type": "pong",
|
|
84
|
+
"id": "po-1",
|
|
85
|
+
"fillerId": "acme-markets",
|
|
86
|
+
"sentAt": 1789999995100,
|
|
87
|
+
"re": "gp-1",
|
|
88
|
+
"msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
|
|
89
|
+
},
|
|
90
|
+
"jcs": "{\"fillerId\":\"acme-markets\",\"id\":\"po-1\",\"re\":\"gp-1\",\"sentAt\":1789999995100,\"type\":\"pong\"}",
|
|
91
|
+
"message": {
|
|
92
|
+
"bodyHash": "0x59ce596a6f75b446a92f1a8e26a3e299a1c963e06ad2fce66f17671e9b0d3eba"
|
|
93
|
+
},
|
|
94
|
+
"digest": "0xd2cf52769b873de0eec06857660e595e6b25ddad5f1ff782ebc74d7ec4cf9ab7"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"note": "error from the filler: a frame it cannot handle",
|
|
98
|
+
"body": {
|
|
99
|
+
"type": "error",
|
|
100
|
+
"id": "e-1",
|
|
101
|
+
"fillerId": "acme-markets",
|
|
102
|
+
"sentAt": 1790000030000,
|
|
103
|
+
"re": "g-77",
|
|
104
|
+
"code": "UNKNOWN_TICKET",
|
|
105
|
+
"message": "no ticket for this orderHash",
|
|
106
|
+
"msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
|
|
107
|
+
},
|
|
108
|
+
"jcs": "{\"code\":\"UNKNOWN_TICKET\",\"fillerId\":\"acme-markets\",\"id\":\"e-1\",\"message\":\"no ticket for this orderHash\",\"re\":\"g-77\",\"sentAt\":1790000030000,\"type\":\"error\"}",
|
|
109
|
+
"message": {
|
|
110
|
+
"bodyHash": "0xc9cd1026df66737e04da90ecd692f7c2d13b1dc328d3aca964baebfe78be96b6"
|
|
111
|
+
},
|
|
112
|
+
"digest": "0x3fba365492f3b5498fa1861648f4625d94d15278fd07e92fb95e5733c2434b2f"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|