@cancore/contracts 0.2.0-rc.3 → 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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { ATTESTOR_SET_ABI, ATTESTOR_SET_ERRORS, CANCORE_ROUTER_ABI, CANCORE_ROUTER_ERRORS, CNRX_ABI, CNRX_ERRORS, CNRX_STAKING_ABI, CNRX_STAKING_ERRORS, FEE_VAULT_ABI, FEE_VAULT_ERRORS, HTLC_ABI, HTLC_ERRORS, IBURN_MINT_ERC20_ABI, ICANCORE_ROUTER_ABI, ICANCORE_ROUTER_ERRORS, IHTLC_ABI, IPERMIT2_ABI, MULTI_BALANCE_CHECKER_ABI, POINTS_CLAIM_ABI, POINTS_CLAIM_ERRORS } from './chunk-NV5IUURP.js';
2
- export { NETWORKS, NETWORK_ALIASES, networkByChainId, networkKindOf, networkOf } from './chunk-VODZRADO.js';
2
+ export { NETWORKS, NETWORK_ALIASES, networkByChainId, networkKindOf, networkOf } from './chunk-IAPV7XWJ.js';
3
3
  import { utf8ToBytes, concatBytes, bytesToHex, hexToBytes } from '@noble/hashes/utils';
4
4
  import { keccak_256 } from '@noble/hashes/sha3';
5
5
 
@@ -65,8 +65,12 @@ var FILL_PROOF_TYPES = {
65
65
  "type": "uint64"
66
66
  },
67
67
  {
68
- "name": "filler",
69
- "type": "address"
68
+ "name": "fillerId",
69
+ "type": "bytes32"
70
+ },
71
+ {
72
+ "name": "repayTo",
73
+ "type": "bytes32"
70
74
  },
71
75
  {
72
76
  "name": "attempt",
@@ -78,8 +82,112 @@ var FILL_PROOF_TYPES = {
78
82
  }
79
83
  ]
80
84
  };
81
- var FILL_PROOF_TYPE_STRING = "FillProof(uint8 kind,bytes32 orderHash,bytes32 destination,bytes32 fillRef,bytes32 recipient,bytes32 outputAsset,uint256 amountDelivered,uint64 filledAt,address filler,uint32 attempt,uint32 setId)";
85
+ var FILL_PROOF_TYPE_STRING = "FillProof(uint8 kind,bytes32 orderHash,bytes32 destination,bytes32 fillRef,bytes32 recipient,bytes32 outputAsset,uint256 amountDelivered,uint64 filledAt,bytes32 fillerId,bytes32 repayTo,uint32 attempt,uint32 setId)";
82
86
  var FILL_PROOF_DOMAIN = { "name": "CancoreRouter", "version": "1" };
87
+ var toHex = (bytes) => `0x${bytesToHex(bytes)}`;
88
+ var keccak = (bytes) => keccak_256(bytes);
89
+ function hexBytes(value, field, length) {
90
+ if (typeof value !== "string" || !/^0x([0-9a-fA-F]{2})*$/.test(value)) throw new TypeError(`${field}: expected 0x-prefixed hex, got ${String(value)}`);
91
+ const bytes = hexToBytes(value.slice(2));
92
+ if (length !== void 0 && bytes.length !== length) throw new TypeError(`${field}: expected ${length} bytes, got ${bytes.length}`);
93
+ return bytes;
94
+ }
95
+ function uint(value, bits, field) {
96
+ let n;
97
+ if (typeof value === "bigint") n = value;
98
+ else if (typeof value === "number" && Number.isSafeInteger(value)) n = BigInt(value);
99
+ else if (typeof value === "string" && /^(0|[1-9][0-9]*)$/.test(value)) n = BigInt(value);
100
+ else throw new TypeError(`${field}: expected an unsigned integer, got ${String(value)}`);
101
+ if (n < 0n || n >= 1n << BigInt(bits)) throw new RangeError(`${field}: ${n} does not fit uint${bits}`);
102
+ return n;
103
+ }
104
+ var beBytes = (n, size) => hexToBytes(n.toString(16).padStart(size * 2, "0"));
105
+
106
+ // src/protocol/hash.ts
107
+ var ATOMIC = /^(address|bool|string|bytes([1-9]|[12][0-9]|3[0-2])?|uint(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256))$/;
108
+ var flatOnly = (type, field) => new TypeError(`${field}: type ${type} is not supported \u2014 hashTypedData encodes flat structs of address/bool/bytes/bytesN/string/uintN only`);
109
+ function encodeValue(type, value, field) {
110
+ if (type === "address") return padded(hexBytes(value, field, 20), 12);
111
+ if (type === "string") {
112
+ if (typeof value !== "string") throw new TypeError(`${field}: expected a string`);
113
+ return keccak(utf8ToBytes(value));
114
+ }
115
+ if (type === "bool") {
116
+ if (typeof value !== "boolean") throw new TypeError(`${field}: expected a boolean`);
117
+ return beBytes(value ? 1n : 0n, 32);
118
+ }
119
+ if (type === "bytes") return keccak(hexBytes(value, field));
120
+ if (type.startsWith("bytes")) return padded(hexBytes(value, field, Number(type.slice(5))), 0);
121
+ return beBytes(uint(value, Number(type.slice(4)), field), 32);
122
+ }
123
+ function padded(bytes, offset) {
124
+ const word = new Uint8Array(32);
125
+ word.set(bytes, offset);
126
+ return word;
127
+ }
128
+ function fieldsOf(types, primaryType) {
129
+ const fields = types[primaryType];
130
+ if (!fields) throw new TypeError(`no type ${primaryType}`);
131
+ for (const f of fields) if (!ATOMIC.test(f.type)) throw flatOnly(f.type, `${primaryType}.${f.name}`);
132
+ return fields;
133
+ }
134
+ function encodeType(types, primaryType) {
135
+ return `${primaryType}(${fieldsOf(types, primaryType).map((f) => `${f.type} ${f.name}`).join(",")})`;
136
+ }
137
+ function typeHash(types, primaryType) {
138
+ return toHex(keccak(utf8ToBytes(encodeType(types, primaryType))));
139
+ }
140
+ function structHash(types, primaryType, message) {
141
+ const words = fieldsOf(types, primaryType).map((f) => encodeValue(f.type, message[f.name], `${primaryType}.${f.name}`));
142
+ return keccak(concatBytes(keccak(utf8ToBytes(encodeType(types, primaryType))), ...words));
143
+ }
144
+ function hashStruct(types, primaryType, message) {
145
+ return toHex(structHash(types, primaryType, message));
146
+ }
147
+ var DOMAIN_FIELDS = [
148
+ { name: "name", type: "string" },
149
+ { name: "version", type: "string" },
150
+ { name: "chainId", type: "uint256" },
151
+ { name: "verifyingContract", type: "address" },
152
+ { name: "salt", type: "bytes32" }
153
+ ];
154
+ function hashDomain(domain) {
155
+ const present = DOMAIN_FIELDS.filter((f) => domain[f.name] !== void 0);
156
+ return hashStruct({ EIP712Domain: present }, "EIP712Domain", domain);
157
+ }
158
+ function hashTypedData({ domain, types, primaryType, message }) {
159
+ const separator = hexBytes(hashDomain(domain), "domain", 32);
160
+ return toHex(keccak(concatBytes(new Uint8Array([25, 1]), separator, structHash(types, primaryType, message))));
161
+ }
162
+ function jcs(value) {
163
+ if (value === null || typeof value === "boolean") return JSON.stringify(value);
164
+ if (typeof value === "string") {
165
+ if (/\p{Cs}/u.test(value)) throw new TypeError("jcs: lone surrogate in a string");
166
+ return JSON.stringify(value);
167
+ }
168
+ if (typeof value === "number") {
169
+ if (!Number.isSafeInteger(value)) throw new TypeError(`jcs: ${value} is not a safe integer`);
170
+ return JSON.stringify(value);
171
+ }
172
+ if (Array.isArray(value)) return `[${value.map(jcs).join(",")}]`;
173
+ if (typeof value === "object") {
174
+ const obj = value;
175
+ return `{${Object.keys(obj).sort().map((k) => `${jcs(k)}:${jcs(obj[k])}`).join(",")}}`;
176
+ }
177
+ throw new TypeError(`jcs: a ${typeof value} has no JSON form`);
178
+ }
179
+ function gatewayBodyHash(message) {
180
+ const { sig: _sig, ...body } = message;
181
+ return toHex(keccak(utf8ToBytes(jcs(body))));
182
+ }
183
+ function fillerMessageBodyHash(message) {
184
+ const { msgSig: _msgSig, ...body } = message;
185
+ return toHex(keccak(utf8ToBytes(jcs(body))));
186
+ }
187
+ function requestIdHash(requestId) {
188
+ if (!/^[\x21-\x7e]{1,64}$/.test(requestId)) throw new TypeError(`requestId must be 1..64 printable ASCII characters: ${JSON.stringify(requestId)}`);
189
+ return toHex(keccak(utf8ToBytes(requestId)));
190
+ }
83
191
 
84
192
  // src/eip712.ts
85
193
  var FEE_CLAIM_DOMAIN_NAME = "CancoreFeeVault";
@@ -105,6 +213,9 @@ var PROOF_KIND_ATTESTATION = 1;
105
213
  function fillProofDomain(chainId, verifyingContract) {
106
214
  return { ...FILL_PROOF_DOMAIN, chainId, verifyingContract };
107
215
  }
216
+ function hashFillProof(proof, chainId, verifyingContract) {
217
+ return hashTypedData({ domain: fillProofDomain(chainId, verifyingContract), types: FILL_PROOF_TYPES, primaryType: "FillProof", message: { ...proof } });
218
+ }
108
219
 
109
220
  // src/protocol/typedData.ts
110
221
  var FILLER_PROTOCOL_DOMAIN = { name: "CancoreFillerProtocol", version: "1" };
@@ -136,7 +247,9 @@ var QUOTE_TYPES = {
136
247
  var FILL_TICKET_TYPES = {
137
248
  FillTicket: [
138
249
  { name: "orderHash", type: "bytes32" },
139
- { name: "filler", type: "address" },
250
+ { name: "fillerId", type: "bytes32" },
251
+ { name: "deliveryKey", type: "address" },
252
+ { name: "repayTo", type: "bytes32" },
140
253
  { name: "attempt", type: "uint32" },
141
254
  { name: "validFrom", type: "uint64" },
142
255
  { name: "validUntil", type: "uint64" }
@@ -145,7 +258,7 @@ var FILL_TICKET_TYPES = {
145
258
  var FILLER_QUOTE_TYPES = {
146
259
  FillerQuote: [
147
260
  { name: "requestId", type: "bytes32" },
148
- { name: "filler", type: "address" },
261
+ { name: "fillerId", type: "string" },
149
262
  { name: "amountOut", type: "uint256" },
150
263
  { name: "validUntil", type: "uint64" },
151
264
  { name: "nonce", type: "uint64" }
@@ -156,7 +269,10 @@ var TICKET_INTENT_TYPES = {
156
269
  { name: "orderHash", type: "bytes32" },
157
270
  { name: "attempt", type: "uint32" },
158
271
  { name: "validFrom", type: "uint64" },
159
- { name: "validUntil", type: "uint64" }
272
+ { name: "validUntil", type: "uint64" },
273
+ { name: "fillerId", type: "string" },
274
+ { name: "deliveryKey", type: "address" },
275
+ { name: "repayTo", type: "bytes32" }
160
276
  ]
161
277
  };
162
278
  var TICKET_RECEIPT_TYPES = {
@@ -183,105 +299,65 @@ var FILLER_AUTH_TYPES = {
183
299
  var GATEWAY_MESSAGE_TYPES = {
184
300
  GatewayMessage: [{ name: "bodyHash", type: "bytes32" }]
185
301
  };
186
- var toHex = (bytes) => `0x${bytesToHex(bytes)}`;
187
- var keccak = (bytes) => keccak_256(bytes);
188
- function hexBytes(value, field, length) {
189
- if (typeof value !== "string" || !/^0x([0-9a-fA-F]{2})*$/.test(value)) throw new TypeError(`${field}: expected 0x-prefixed hex, got ${String(value)}`);
190
- const bytes = hexToBytes(value.slice(2));
191
- if (length !== void 0 && bytes.length !== length) throw new TypeError(`${field}: expected ${length} bytes, got ${bytes.length}`);
192
- return bytes;
193
- }
194
- function uint(value, bits, field) {
195
- let n;
196
- if (typeof value === "bigint") n = value;
197
- else if (typeof value === "number" && Number.isSafeInteger(value)) n = BigInt(value);
198
- else if (typeof value === "string" && /^(0|[1-9][0-9]*)$/.test(value)) n = BigInt(value);
199
- else throw new TypeError(`${field}: expected an unsigned integer, got ${String(value)}`);
200
- if (n < 0n || n >= 1n << BigInt(bits)) throw new RangeError(`${field}: ${n} does not fit uint${bits}`);
201
- return n;
202
- }
203
- var beBytes = (n, size) => hexToBytes(n.toString(16).padStart(size * 2, "0"));
204
-
205
- // src/protocol/hash.ts
206
- var ATOMIC = /^(address|bool|string|bytes([1-9]|[12][0-9]|3[0-2])?|uint(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256))$/;
207
- var flatOnly = (type, field) => new TypeError(`${field}: type ${type} is not supported \u2014 hashTypedData encodes flat structs of address/bool/bytes/bytesN/string/uintN only`);
208
- function encodeValue(type, value, field) {
209
- if (type === "address") return padded(hexBytes(value, field, 20), 12);
210
- if (type === "string") {
211
- if (typeof value !== "string") throw new TypeError(`${field}: expected a string`);
212
- return keccak(utf8ToBytes(value));
213
- }
214
- if (type === "bool") {
215
- if (typeof value !== "boolean") throw new TypeError(`${field}: expected a boolean`);
216
- return beBytes(value ? 1n : 0n, 32);
217
- }
218
- if (type === "bytes") return keccak(hexBytes(value, field));
219
- if (type.startsWith("bytes")) return padded(hexBytes(value, field, Number(type.slice(5))), 0);
220
- return beBytes(uint(value, Number(type.slice(4)), field), 32);
221
- }
222
- function padded(bytes, offset) {
223
- const word = new Uint8Array(32);
224
- word.set(bytes, offset);
225
- return word;
226
- }
227
- function fieldsOf(types, primaryType) {
228
- const fields = types[primaryType];
229
- if (!fields) throw new TypeError(`no type ${primaryType}`);
230
- for (const f of fields) if (!ATOMIC.test(f.type)) throw flatOnly(f.type, `${primaryType}.${f.name}`);
231
- return fields;
232
- }
233
- function encodeType(types, primaryType) {
234
- return `${primaryType}(${fieldsOf(types, primaryType).map((f) => `${f.type} ${f.name}`).join(",")})`;
235
- }
236
- function typeHash(types, primaryType) {
237
- return toHex(keccak(utf8ToBytes(encodeType(types, primaryType))));
302
+ var FILLER_MESSAGE_TYPES = {
303
+ FillerMessage: [{ name: "bodyHash", type: "bytes32" }]
304
+ };
305
+ var FILLER_KEY_REGISTRATION_TYPES = {
306
+ FillerKeyRegistration: [
307
+ { name: "fillerId", type: "string" },
308
+ { name: "messageKey", type: "address" },
309
+ { name: "issuedAt", type: "uint64" }
310
+ ]
311
+ };
312
+ var FILLER_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,62}$/;
313
+ var SECP256K1_N = 0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n;
314
+ function fillerIdHash(fillerId) {
315
+ if (typeof fillerId !== "string" || !FILLER_ID_PATTERN.test(fillerId)) throw new TypeError(`fillerId must match ${FILLER_ID_PATTERN}: ${JSON.stringify(fillerId)}`);
316
+ return toHex(keccak(utf8ToBytes(fillerId)));
238
317
  }
239
- function structHash(types, primaryType, message) {
240
- const words = fieldsOf(types, primaryType).map((f) => encodeValue(f.type, message[f.name], `${primaryType}.${f.name}`));
241
- return keccak(concatBytes(keccak(utf8ToBytes(encodeType(types, primaryType))), ...words));
318
+ function repayToFromEvm(address) {
319
+ const bytes = hexBytes(address, "repayTo address", 20);
320
+ if (bytes.every((b) => b === 0)) throw new RangeError("repayTo: the zero address is not a payee");
321
+ return `0x${"00".repeat(12)}${address.slice(2).toLowerCase()}`;
242
322
  }
243
- function hashStruct(types, primaryType, message) {
244
- return toHex(structHash(types, primaryType, message));
323
+ function repayToFromParty(partyId) {
324
+ if (typeof partyId !== "string" || partyId.length === 0) throw new TypeError("repayTo: a Canton party id is a non-empty string");
325
+ return toHex(keccak(utf8ToBytes(partyId)));
245
326
  }
246
- var DOMAIN_FIELDS = [
247
- { name: "name", type: "string" },
248
- { name: "version", type: "string" },
249
- { name: "chainId", type: "uint256" },
250
- { name: "verifyingContract", type: "address" },
251
- { name: "salt", type: "bytes32" }
252
- ];
253
- function hashDomain(domain) {
254
- const present = DOMAIN_FIELDS.filter((f) => domain[f.name] !== void 0);
255
- return hashStruct({ EIP712Domain: present }, "EIP712Domain", domain);
327
+ function isEvmRepayTo(repayTo) {
328
+ return /^0x0{24}[0-9a-fA-F]{40}$/.test(repayTo) && !/^0x0{64}$/.test(repayTo);
256
329
  }
257
- function hashTypedData({ domain, types, primaryType, message }) {
258
- const separator = hexBytes(hashDomain(domain), "domain", 32);
259
- return toHex(keccak(concatBytes(new Uint8Array([25, 1]), separator, structHash(types, primaryType, message))));
330
+ function evmAddressFromRepayTo(repayTo) {
331
+ hexBytes(repayTo, "repayTo", 32);
332
+ if (!isEvmRepayTo(repayTo)) throw new RangeError(`repayTo ${repayTo} is not a padded, non-zero EVM address`);
333
+ return `0x${repayTo.slice(26).toLowerCase()}`;
260
334
  }
261
- function jcs(value) {
262
- if (value === null || typeof value === "boolean") return JSON.stringify(value);
263
- if (typeof value === "string") {
264
- if (/\p{Cs}/u.test(value)) throw new TypeError("jcs: lone surrogate in a string");
265
- return JSON.stringify(value);
266
- }
267
- if (typeof value === "number") {
268
- if (!Number.isSafeInteger(value)) throw new TypeError(`jcs: ${value} is not a safe integer`);
269
- return JSON.stringify(value);
270
- }
271
- if (Array.isArray(value)) return `[${value.map(jcs).join(",")}]`;
272
- if (typeof value === "object") {
273
- const obj = value;
274
- return `{${Object.keys(obj).sort().map((k) => `${jcs(k)}:${jcs(obj[k])}`).join(",")}}`;
275
- }
276
- throw new TypeError(`jcs: a ${typeof value} has no JSON form`);
335
+ function isEoaSignature(sig) {
336
+ if (typeof sig !== "string" || !/^0x[0-9a-fA-F]{128}(1[bB]|1[cC])$/.test(sig)) return false;
337
+ const r = BigInt(`0x${sig.slice(2, 66)}`);
338
+ const s = BigInt(`0x${sig.slice(66, 130)}`);
339
+ return r > 0n && r < SECP256K1_N && s > 0n && s <= SECP256K1_N / 2n;
277
340
  }
278
- function gatewayBodyHash(message) {
279
- const { sig: _sig, ...body } = message;
280
- return toHex(keccak(utf8ToBytes(jcs(body))));
341
+
342
+ // src/protocol/digests.ts
343
+ var hashFillTicket = (ticket) => hashTypedData({ domain: FILL_TICKET_DOMAIN, types: FILL_TICKET_TYPES, primaryType: "FillTicket", message: { ...ticket } });
344
+ var hashFillerQuote = (quote) => hashTypedData({ domain: FILLER_PROTOCOL_DOMAIN, types: FILLER_QUOTE_TYPES, primaryType: "FillerQuote", message: { ...quote } });
345
+ var hashTicketIntent = (intent) => hashTypedData({ domain: FILLER_PROTOCOL_DOMAIN, types: TICKET_INTENT_TYPES, primaryType: "TicketIntent", message: { ...intent } });
346
+ var hashFillerMessage = (message) => hashTypedData({ domain: FILLER_PROTOCOL_DOMAIN, types: FILLER_MESSAGE_TYPES, primaryType: "FillerMessage", message: { bodyHash: fillerMessageBodyHash(message) } });
347
+ var hashFillerKeyRegistration = (registration) => hashTypedData({ domain: FILLER_PROTOCOL_DOMAIN, types: FILLER_KEY_REGISTRATION_TYPES, primaryType: "FillerKeyRegistration", message: { ...registration } });
348
+
349
+ // src/protocol/envelope.ts
350
+ function fillerEnvelopeError(message, ctx) {
351
+ const { msgSig, fillerId, sentAt, id } = message;
352
+ if (!isEoaSignature(msgSig)) return "BAD_SIGNATURE";
353
+ if (fillerId !== ctx.fillerId) return "UNAUTHENTICATED";
354
+ if (typeof sentAt !== "number" || !Number.isSafeInteger(sentAt) || sentAt < 1e12) return "BAD_REQUEST";
355
+ if (Math.abs(ctx.receivedAt - sentAt) > ctx.maxMessageAgeMs) return "STALE_MESSAGE";
356
+ if (typeof id !== "string" || id.length < 1 || id.length > 64) return "BAD_REQUEST";
357
+ return null;
281
358
  }
282
- function requestIdHash(requestId) {
283
- if (!/^[\x21-\x7e]{1,64}$/.test(requestId)) throw new TypeError(`requestId must be 1..64 printable ASCII characters: ${JSON.stringify(requestId)}`);
284
- return toHex(keccak(utf8ToBytes(requestId)));
359
+ function messageIdRetainUntil(sentAt, receivedAt, maxMessageAgeMs) {
360
+ return Math.max(receivedAt, sentAt) + maxMessageAgeMs;
285
361
  }
286
362
  var DRAND_QUICKNET = {
287
363
  chainHash: "52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971",
@@ -349,12 +425,16 @@ var ERROR_CODES = [
349
425
  "UNSUPPORTED_VERSION",
350
426
  "UNSUPPORTED_TYPE",
351
427
  "BAD_SIGNATURE",
428
+ "STALE_MESSAGE",
429
+ "REPLAYED_MESSAGE",
430
+ "TICKET_REFUSED",
352
431
  "UNKNOWN_REQUEST",
353
432
  "UNKNOWN_TICKET",
354
433
  "TICKET_CLOSED",
355
434
  "NOT_ELIGIBLE",
356
435
  "RATE_LIMITED",
357
- "INTERNAL"
436
+ "INTERNAL",
437
+ "ATTESTATIONS_NOT_READY"
358
438
  ];
359
439
  var ERROR_HTTP_STATUS = {
360
440
  BAD_REQUEST: 400,
@@ -362,13 +442,29 @@ var ERROR_HTTP_STATUS = {
362
442
  UNSUPPORTED_VERSION: 400,
363
443
  UNSUPPORTED_TYPE: 400,
364
444
  BAD_SIGNATURE: 422,
445
+ STALE_MESSAGE: 400,
446
+ REPLAYED_MESSAGE: 409,
447
+ TICKET_REFUSED: 409,
365
448
  UNKNOWN_REQUEST: 404,
366
449
  UNKNOWN_TICKET: 404,
367
450
  TICKET_CLOSED: 409,
368
451
  NOT_ELIGIBLE: 403,
369
452
  RATE_LIMITED: 429,
370
- INTERNAL: 500
453
+ INTERNAL: 500,
454
+ ATTESTATIONS_NOT_READY: 404
371
455
  };
456
+ var TICKET_REFUSED_REASONS = [
457
+ "REPAY_TO_INVALID",
458
+ "REPAY_TO_BLOCKLISTED",
459
+ "DELIVERY_KEY_INVALID",
460
+ "PAYOUT_NOT_READY",
461
+ "RECIPIENT_NOT_READY",
462
+ "OPEN_TICKET_LIMIT",
463
+ "PROOF_WINDOW_TOO_SHORT",
464
+ "ATTESTOR_REVOCATION_PENDING",
465
+ "SERVICE_DEGRADED",
466
+ "OTHER"
467
+ ];
372
468
  var EXPIRED_RESULTS = ["FILLED", "NO_SHOW", "NO_SHOW_UNCONFIRMED", "EXEMPT"];
373
469
  var EXEMPT_REASONS = ["DESTINATION_HALTED", "GATEWAY_FAULT", "REORGED_AFTER_INCLUSION", "RECIPIENT_NOT_READY", "OTHER"];
374
470
  var QUOTE_ACK_STATUSES = ["COUNTED", "LATE", "SHORT_TTL"];
@@ -383,23 +479,13 @@ var asyncapi_default = {
383
479
  info: {
384
480
  title: "Cancore filler protocol",
385
481
  version: "1.0.0-rc.1",
386
- description: "The WebSocket protocol between a taker (filler) and the Cancore filler gateway, v1 (release candidate, @cancore/contracts 0.2.0-rc.1). Operations are the gateway's: it sends S\u2192F frames and receives F\u2192S frames. Every S\u2192F frame carries fillerId, sentAt and sig = the gateway key over GatewayMessage{bodyHash} in the CancoreFillerProtocol v1 domain. Payload schemas: messages.schema.json. Generated by scripts/gen-protocol-docs.mjs.",
482
+ description: "The WebSocket protocol between a filler and the Cancore filler gateway, v1 (release candidate). Operations are the gateway's: it sends S\u2192F frames and receives F\u2192S frames. Every frame carries id, fillerId and sentAt and is signed in the CancoreFillerProtocol v1 domain: S\u2192F with sig = the gateway key over GatewayMessage{bodyHash}, F\u2192S with msgSig = the filler's message key over FillerMessage{bodyHash}, bodyHash = keccak256(JCS(frame without that field)). Payload schemas: messages.schema.json. Generated by scripts/gen-protocol-docs.mjs.",
387
483
  license: {
388
484
  name: "Apache-2.0"
389
485
  }
390
486
  },
391
487
  defaultContentType: "application/json",
392
488
  servers: {
393
- mock: {
394
- host: "localhost:{port}",
395
- protocol: "ws",
396
- description: "@cancore/test-kit mock-gateway",
397
- variables: {
398
- port: {
399
- default: "8787"
400
- }
401
- }
402
- },
403
489
  devnet: {
404
490
  host: "{gatewayHost}",
405
491
  protocol: "wss",
@@ -437,8 +523,11 @@ var asyncapi_default = {
437
523
  pongF2S: {
438
524
  $ref: "#/components/messages/pongF2S"
439
525
  },
440
- error: {
441
- $ref: "#/components/messages/error"
526
+ errorS2F: {
527
+ $ref: "#/components/messages/errorS2F"
528
+ },
529
+ errorF2S: {
530
+ $ref: "#/components/messages/errorF2S"
442
531
  },
443
532
  "epoch.weights": {
444
533
  $ref: "#/components/messages/epoch.weights"
@@ -487,6 +576,9 @@ var asyncapi_default = {
487
576
  },
488
577
  "penalty.applied": {
489
578
  $ref: "#/components/messages/penalty.applied"
579
+ },
580
+ "settle.attestations": {
581
+ $ref: "#/components/messages/settle.attestations"
490
582
  }
491
583
  }
492
584
  }
@@ -576,7 +668,18 @@ var asyncapi_default = {
576
668
  },
577
669
  messages: [
578
670
  {
579
- $ref: "#/channels/filler/messages/error"
671
+ $ref: "#/channels/filler/messages/errorS2F"
672
+ }
673
+ ]
674
+ },
675
+ receiveError: {
676
+ action: "receive",
677
+ channel: {
678
+ $ref: "#/channels/filler"
679
+ },
680
+ messages: [
681
+ {
682
+ $ref: "#/channels/filler/messages/errorF2S"
580
683
  }
581
684
  ]
582
685
  },
@@ -755,6 +858,17 @@ var asyncapi_default = {
755
858
  $ref: "#/channels/filler/messages/penalty.applied"
756
859
  }
757
860
  ]
861
+ },
862
+ sendSettleAttestations: {
863
+ action: "send",
864
+ channel: {
865
+ $ref: "#/channels/filler"
866
+ },
867
+ messages: [
868
+ {
869
+ $ref: "#/channels/filler/messages/settle.attestations"
870
+ }
871
+ ]
758
872
  }
759
873
  },
760
874
  components: {
@@ -773,6 +887,7 @@ var asyncapi_default = {
773
887
  name: "auth-challenge-1",
774
888
  payload: {
775
889
  type: "auth.challenge",
890
+ id: "g-1",
776
891
  sentAt: 178999998e4,
777
892
  nonce: "0x63ed6389bd2a1d23bb678583c227172bda874e82b97b1c170bfeeb4373b4b0d5",
778
893
  expiresAt: "1790000030",
@@ -797,8 +912,24 @@ var asyncapi_default = {
797
912
  type: "auth.response",
798
913
  id: "a-1",
799
914
  fillerId: "acme-markets",
915
+ sentAt: 1789999980100,
916
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
917
+ keyAddress: "0x90f79bf6eb2c4f870365e785982e1f101e93b906",
918
+ protocolVersion: "1",
919
+ sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
920
+ }
921
+ },
922
+ {
923
+ name: "auth-response-2",
924
+ payload: {
925
+ type: "auth.response",
926
+ id: "a-2",
927
+ fillerId: "acme-markets",
928
+ sentAt: 1789999980100,
929
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
800
930
  keyAddress: "0x90f79bf6eb2c4f870365e785982e1f101e93b906",
801
931
  protocolVersion: "1",
932
+ nonce: "0x63ed6389bd2a1d23bb678583c227172bda874e82b97b1c170bfeeb4373b4b0d5",
802
933
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
803
934
  }
804
935
  }
@@ -818,6 +949,7 @@ var asyncapi_default = {
818
949
  name: "auth-ok-1",
819
950
  payload: {
820
951
  type: "auth.ok",
952
+ id: "g-2",
821
953
  fillerId: "acme-markets",
822
954
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
823
955
  sentAt: 1789999980200,
@@ -863,7 +995,10 @@ var asyncapi_default = {
863
995
  name: "pingF2S-1",
864
996
  payload: {
865
997
  type: "ping",
866
- id: "p-1"
998
+ id: "p-1",
999
+ fillerId: "acme-markets",
1000
+ sentAt: 1789999994e3,
1001
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
867
1002
  }
868
1003
  }
869
1004
  ]
@@ -882,9 +1017,10 @@ var asyncapi_default = {
882
1017
  name: "pongS2F-1",
883
1018
  payload: {
884
1019
  type: "pong",
1020
+ id: "g-3",
885
1021
  fillerId: "acme-markets",
886
1022
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
887
- sentAt: 1789999995100,
1023
+ sentAt: 1789999994100,
888
1024
  re: "p-1"
889
1025
  }
890
1026
  }
@@ -904,25 +1040,30 @@ var asyncapi_default = {
904
1040
  name: "pongF2S-1",
905
1041
  payload: {
906
1042
  type: "pong",
1043
+ id: "po-1",
1044
+ fillerId: "acme-markets",
1045
+ sentAt: 1789999995100,
1046
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
907
1047
  re: "gp-1"
908
1048
  }
909
1049
  }
910
1050
  ]
911
1051
  },
912
- error: {
1052
+ errorS2F: {
913
1053
  name: "error",
914
1054
  title: "error (S2F)",
915
1055
  payload: {
916
1056
  schemaFormat: "application/schema+json;version=draft-2020-12",
917
1057
  schema: {
918
- $ref: "messages.schema.json#/$defs/error"
1058
+ $ref: "messages.schema.json#/$defs/errorS2F"
919
1059
  }
920
1060
  },
921
1061
  examples: [
922
1062
  {
923
- name: "error-1",
1063
+ name: "errorS2F-1",
924
1064
  payload: {
925
1065
  type: "error",
1066
+ id: "g-4",
926
1067
  fillerId: "acme-markets",
927
1068
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
928
1069
  sentAt: 1790000023500,
@@ -932,15 +1073,55 @@ var asyncapi_default = {
932
1073
  }
933
1074
  },
934
1075
  {
935
- name: "error-2",
1076
+ name: "errorS2F-2",
936
1077
  payload: {
937
1078
  type: "error",
1079
+ id: "g-5",
938
1080
  sentAt: 1789999980100,
939
1081
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
940
1082
  re: "q-0",
941
1083
  code: "UNAUTHENTICATED",
942
1084
  message: "quote before auth.ok"
943
1085
  }
1086
+ },
1087
+ {
1088
+ name: "errorS2F-3",
1089
+ payload: {
1090
+ type: "error",
1091
+ id: "g-6",
1092
+ fillerId: "acme-markets",
1093
+ sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1094
+ sentAt: 1790000021500,
1095
+ re: "i-3",
1096
+ code: "TICKET_REFUSED",
1097
+ reason: "REPAY_TO_BLOCKLISTED",
1098
+ message: "repayTo is blocklisted by the input token"
1099
+ }
1100
+ }
1101
+ ]
1102
+ },
1103
+ errorF2S: {
1104
+ name: "error",
1105
+ title: "error (F2S)",
1106
+ payload: {
1107
+ schemaFormat: "application/schema+json;version=draft-2020-12",
1108
+ schema: {
1109
+ $ref: "messages.schema.json#/$defs/errorF2S"
1110
+ }
1111
+ },
1112
+ examples: [
1113
+ {
1114
+ name: "errorF2S-1",
1115
+ payload: {
1116
+ type: "error",
1117
+ id: "e-1",
1118
+ fillerId: "acme-markets",
1119
+ sentAt: 179000003e4,
1120
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1121
+ re: "g-77",
1122
+ code: "UNKNOWN_TICKET",
1123
+ message: "no ticket for this orderHash"
1124
+ }
944
1125
  }
945
1126
  ]
946
1127
  },
@@ -958,6 +1139,7 @@ var asyncapi_default = {
958
1139
  name: "epoch-weights-1",
959
1140
  payload: {
960
1141
  type: "epoch.weights",
1142
+ id: "g-7",
961
1143
  fillerId: "acme-markets",
962
1144
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
963
1145
  sentAt: 1789999980300,
@@ -983,6 +1165,7 @@ var asyncapi_default = {
983
1165
  name: "quote-request-1",
984
1166
  payload: {
985
1167
  type: "quote.request",
1168
+ id: "g-8",
986
1169
  fillerId: "acme-markets",
987
1170
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
988
1171
  sentAt: 178999999e4,
@@ -1021,8 +1204,10 @@ var asyncapi_default = {
1021
1204
  payload: {
1022
1205
  type: "quote",
1023
1206
  id: "q-1",
1207
+ fillerId: "acme-markets",
1208
+ sentAt: 1789999991e3,
1209
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1024
1210
  requestId: "req-7f3a9c21-4d88-4e5b-9a1e-0c2f6b8d4e31",
1025
- filler: "0x742d35cc6634c0532925a3b844bc454e4438f44e",
1026
1211
  amountOut: "999000000",
1027
1212
  validUntil: "1790000060",
1028
1213
  nonce: "1",
@@ -1045,12 +1230,13 @@ var asyncapi_default = {
1045
1230
  name: "quote-ack-1",
1046
1231
  payload: {
1047
1232
  type: "quote.ack",
1233
+ id: "g-9",
1048
1234
  fillerId: "acme-markets",
1049
1235
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1050
1236
  sentAt: 1789999991001,
1051
1237
  re: "q-1",
1052
1238
  requestId: "req-7f3a9c21-4d88-4e5b-9a1e-0c2f6b8d4e31",
1053
- quoteHash: "0xdfbd4a1d732d8a105714d38ed6c46b8ee6e299e8bf90990ac502ebaea19fbe70",
1239
+ quoteHash: "0xe3b63a6ae2730532fb841002059d6e8c92124d95e98c09857d7e0f5ba3512e3b",
1054
1240
  receivedAt: 1789999991e3,
1055
1241
  status: "COUNTED"
1056
1242
  }
@@ -1071,6 +1257,7 @@ var asyncapi_default = {
1071
1257
  name: "quote-reconfirm-1",
1072
1258
  payload: {
1073
1259
  type: "quote.reconfirm",
1260
+ id: "g-10",
1074
1261
  fillerId: "acme-markets",
1075
1262
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1076
1263
  sentAt: 1790000013e3,
@@ -1111,6 +1298,9 @@ var asyncapi_default = {
1111
1298
  payload: {
1112
1299
  type: "quote.reconfirm.reply",
1113
1300
  id: "r-1",
1301
+ fillerId: "acme-markets",
1302
+ sentAt: 1790000014e3,
1303
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1114
1304
  orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1115
1305
  accept: true,
1116
1306
  validUntil: "1790000400",
@@ -1123,6 +1313,9 @@ var asyncapi_default = {
1123
1313
  payload: {
1124
1314
  type: "quote.reconfirm.reply",
1125
1315
  id: "r-2",
1316
+ fillerId: "acme-markets",
1317
+ sentAt: 1790000014e3,
1318
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1126
1319
  orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1127
1320
  accept: false
1128
1321
  }
@@ -1143,6 +1336,7 @@ var asyncapi_default = {
1143
1336
  name: "ticket-offer-1",
1144
1337
  payload: {
1145
1338
  type: "ticket.offer",
1339
+ id: "g-20",
1146
1340
  fillerId: "acme-markets",
1147
1341
  sentAt: 179000002e4,
1148
1342
  orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
@@ -1184,10 +1378,32 @@ var asyncapi_default = {
1184
1378
  payload: {
1185
1379
  type: "ticket.intent",
1186
1380
  id: "i-1",
1381
+ fillerId: "acme-markets",
1382
+ sentAt: 1790000021e3,
1383
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1187
1384
  orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1188
1385
  attempt: 0,
1189
1386
  validFrom: "1790000040",
1190
1387
  validUntil: "1790000400",
1388
+ deliveryKey: "0x742d35cc6634c0532925a3b844bc454e4438f44e",
1389
+ repayTo: "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc",
1390
+ sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
1391
+ }
1392
+ },
1393
+ {
1394
+ name: "ticket-intent-2",
1395
+ payload: {
1396
+ type: "ticket.intent",
1397
+ id: "i-4",
1398
+ fillerId: "acme-markets",
1399
+ sentAt: 1790000021e3,
1400
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1401
+ orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1402
+ attempt: 2,
1403
+ validFrom: "1790000040",
1404
+ validUntil: "1790000400",
1405
+ deliveryKey: "0x0000000000000000000000000000000000000000",
1406
+ repayTo: "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc",
1191
1407
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
1192
1408
  }
1193
1409
  }
@@ -1208,6 +1424,9 @@ var asyncapi_default = {
1208
1424
  payload: {
1209
1425
  type: "ticket.decline",
1210
1426
  id: "d-1",
1427
+ fillerId: "acme-markets",
1428
+ sentAt: 1790000027001,
1429
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1211
1430
  orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1212
1431
  attempt: 0,
1213
1432
  reason: "TICKET_ISSUED_LATE",
@@ -1230,13 +1449,14 @@ var asyncapi_default = {
1230
1449
  name: "ticket-intent-ack-1",
1231
1450
  payload: {
1232
1451
  type: "ticket.intent.ack",
1452
+ id: "g-11",
1233
1453
  fillerId: "acme-markets",
1234
1454
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1235
1455
  sentAt: 1790000021001,
1236
1456
  re: "i-1",
1237
1457
  orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1238
1458
  attempt: 0,
1239
- intentHash: "0xf3a07f98be564fb062f1574d933fc33f40e5c9e36c0fec83d3b3c4c15e9199c2",
1459
+ intentHash: "0xd56c4d45d5405c70c5220da1c3e49d6051b0370a3040d1709ae097b37f3ba041",
1240
1460
  receivedAt: 1790000021e3
1241
1461
  }
1242
1462
  }
@@ -1256,6 +1476,7 @@ var asyncapi_default = {
1256
1476
  name: "ticket-issued-1",
1257
1477
  payload: {
1258
1478
  type: "ticket.issued",
1479
+ id: "g-12",
1259
1480
  fillerId: "acme-markets",
1260
1481
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1261
1482
  sentAt: 1790000024e3,
@@ -1264,7 +1485,9 @@ var asyncapi_default = {
1264
1485
  attempt: 0,
1265
1486
  ticket: {
1266
1487
  orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1267
- filler: "0x742d35cc6634c0532925a3b844bc454e4438f44e",
1488
+ fillerId: "0x112e2693409c427698100f54d0439fc3593fedb25221fe3a54c4823c0a0ee2d5",
1489
+ deliveryKey: "0x742d35cc6634c0532925a3b844bc454e4438f44e",
1490
+ repayTo: "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc",
1268
1491
  attempt: 0,
1269
1492
  validFrom: "1790000040",
1270
1493
  validUntil: "1790000400"
@@ -1276,14 +1499,16 @@ var asyncapi_default = {
1276
1499
  name: "ticket-issued-2",
1277
1500
  payload: {
1278
1501
  type: "ticket.issued",
1502
+ id: "g-13",
1279
1503
  fillerId: "acme-markets",
1280
1504
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1281
1505
  sentAt: 1790000024e3,
1282
1506
  form: "canton",
1283
1507
  orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1284
- attempt: 0,
1508
+ attempt: 2,
1285
1509
  deliveryOrderCid: "00a1b2c3d4e5f6#fixture-delivery-order",
1286
- validUntil: "1790000400"
1510
+ validUntil: "1790000400",
1511
+ repayTo: "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc"
1287
1512
  }
1288
1513
  }
1289
1514
  ]
@@ -1303,9 +1528,12 @@ var asyncapi_default = {
1303
1528
  payload: {
1304
1529
  type: "ticket.receipt",
1305
1530
  id: "rc-1",
1531
+ fillerId: "acme-markets",
1532
+ sentAt: 1790000025e3,
1533
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1306
1534
  orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1307
1535
  attempt: 0,
1308
- ticketHash: "0x466bc75e5efad07ad975aeea9ec731902bc804461686a6c8f76ef4fd50297819",
1536
+ ticketHash: "0x8eaef6b8d59e72288487b0def58e0eb9200fa7600170351af985111eaec5a0a9",
1309
1537
  ticketSigHash: "0x9d30145c6e97cad96cf7cee181ac9d5b879dea7fed0730d7197e84e28487292b",
1310
1538
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b"
1311
1539
  }
@@ -1327,6 +1555,9 @@ var asyncapi_default = {
1327
1555
  payload: {
1328
1556
  type: "fill.reported",
1329
1557
  id: "f-1",
1558
+ fillerId: "acme-markets",
1559
+ sentAt: 179000006e4,
1560
+ msgSig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1330
1561
  orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1331
1562
  attempt: 0,
1332
1563
  txRef: "0xfc4cba975d6b96ed2be00adae2d970f61413b963279089dcfc6402ddccc42740"
@@ -1348,6 +1579,7 @@ var asyncapi_default = {
1348
1579
  name: "ticket-expired-1",
1349
1580
  payload: {
1350
1581
  type: "ticket.expired",
1582
+ id: "g-14",
1351
1583
  fillerId: "acme-markets",
1352
1584
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1353
1585
  sentAt: 179000046e4,
@@ -1360,6 +1592,7 @@ var asyncapi_default = {
1360
1592
  name: "ticket-expired-2",
1361
1593
  payload: {
1362
1594
  type: "ticket.expired",
1595
+ id: "g-15",
1363
1596
  fillerId: "acme-markets",
1364
1597
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1365
1598
  sentAt: 179000046e4,
@@ -1385,6 +1618,7 @@ var asyncapi_default = {
1385
1618
  name: "order-settled-1",
1386
1619
  payload: {
1387
1620
  type: "order.settled",
1621
+ id: "g-16",
1388
1622
  fillerId: "acme-markets",
1389
1623
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1390
1624
  sentAt: 17900009e5,
@@ -1411,6 +1645,7 @@ var asyncapi_default = {
1411
1645
  name: "penalty-applied-1",
1412
1646
  payload: {
1413
1647
  type: "penalty.applied",
1648
+ id: "g-17",
1414
1649
  fillerId: "acme-markets",
1415
1650
  sig: "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1416
1651
  sentAt: 1790001e6,
@@ -1424,6 +1659,105 @@ var asyncapi_default = {
1424
1659
  }
1425
1660
  }
1426
1661
  ]
1662
+ },
1663
+ "settle.attestations": {
1664
+ name: "settle.attestations",
1665
+ title: "settle.attestations (S2F)",
1666
+ payload: {
1667
+ schemaFormat: "application/schema+json;version=draft-2020-12",
1668
+ schema: {
1669
+ $ref: "messages.schema.json#/$defs/settle.attestations"
1670
+ }
1671
+ },
1672
+ examples: [
1673
+ {
1674
+ name: "settle-attestations-1",
1675
+ payload: {
1676
+ type: "settle.attestations",
1677
+ id: "g-sa-1",
1678
+ fillerId: "acme-markets",
1679
+ sentAt: 179000016e4,
1680
+ orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1681
+ attempt: 0,
1682
+ sourceChainId: "eip155:11155111",
1683
+ proof: {
1684
+ kind: 1,
1685
+ orderHash: "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1686
+ destination: "0x0000000000000000000000000000000000000000000000000000000000066eee",
1687
+ fillRef: "0xfc4cba975d6b96ed2be00adae2d970f61413b963279089dcfc6402ddccc42740",
1688
+ recipient: "0x000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e",
1689
+ outputAsset: "0x00000000000000000000000075faf114eafb1bdbe2f0316df893fd58ce46aa4d",
1690
+ amountDelivered: "999000000",
1691
+ filledAt: "1790000100",
1692
+ fillerId: "0x112e2693409c427698100f54d0439fc3593fedb25221fe3a54c4823c0a0ee2d5",
1693
+ repayTo: "0x000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e",
1694
+ attempt: 0,
1695
+ setId: 1
1696
+ },
1697
+ signatures: [
1698
+ {
1699
+ signer: "0x5e877d05b3bfef8b53a59dde76b911fb521415cd",
1700
+ signature: "0x4efcf401d43002b059a1bf5f12a1a6c868a1917a533cb2df79022845bd8704da1d5a6a67e206d057e29bd06efc19fef0afcc0ece462e732268da4cedb57e4c321c"
1701
+ },
1702
+ {
1703
+ signer: "0x6805cf7ce01e1c392d47806813503e367c932544",
1704
+ signature: "0x29a0148c3a5cdcadf63a4aaef763784751a3fa6064dc276330227729ddbc69015ea1efdab546cf1552ca726de9ccf4480e8d5ff3c3ed9b718c4964b5bc03ddcf1c"
1705
+ }
1706
+ ],
1707
+ setId: 1,
1708
+ threshold: 2,
1709
+ refundAfter: "1790002400",
1710
+ sig: "0x1d81fa8e56999d9bf8365f2aa18025291198a51b769dcddd7ebaaa3b61eca32f262f218caf2618bc8b351c65eca89417defeb5f3905f7327a68e9cdd1d29f99d1b"
1711
+ }
1712
+ },
1713
+ {
1714
+ name: "settle-attestations-2",
1715
+ payload: {
1716
+ type: "settle.attestations",
1717
+ id: "g-sa-3",
1718
+ fillerId: "cancore-reserve",
1719
+ sentAt: 178999976e4,
1720
+ orderHash: "0x770f1ebba8ab5b96e3efbed39c0f630d56f934f9f232771abaccdb0cf17ca204",
1721
+ attempt: 1,
1722
+ sourceChainId: "canton:mainnet",
1723
+ proof: {
1724
+ kind: 1,
1725
+ orderHash: "0x770f1ebba8ab5b96e3efbed39c0f630d56f934f9f232771abaccdb0cf17ca204",
1726
+ destination: "0x0000000000000000000000000000000000000000000000000000000000000001",
1727
+ fillRef: "0xfba8fd8a079872a9efe9646fcf34cfbbe8711ebd63665e8f2e0924949264c471",
1728
+ recipient: "0x000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e",
1729
+ outputAsset: "0x000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
1730
+ amountDelivered: "1200250000",
1731
+ filledAt: "1789999700",
1732
+ fillerId: "0xe3a8297b35498225c7903ca1a305ef64fcd783cf42c6c687b7b332c83d4dd837",
1733
+ repayTo: "0x4fa94ace29856f88ebea07ce6d18e21f52c60b4f66d147134c03c82b62957f9d",
1734
+ attempt: 1,
1735
+ setId: 3
1736
+ },
1737
+ signatures: [
1738
+ {
1739
+ signer: "0x5e877d05b3bfef8b53a59dde76b911fb521415cd",
1740
+ pubKey: "0x3056301006072a8648ce3d020106052b8104000a034200046e4ce4835ad9bacce317724d5a85bfb72f73c0e0e0d9bb0ece443a23c405994056f031b0c83296033a1fd06fc21cbfdab8a821b09c0172ed64ef1b1ee3469be3",
1741
+ signature: "0x3045022100a7554c31e432a90ae7384910ae3f9128b41034769dd072319fcf8131bb8062b1022006ac576ed5858c881238334835d35f5aacb765b16842a3f926a540355997883e"
1742
+ },
1743
+ {
1744
+ signer: "0x6805cf7ce01e1c392d47806813503e367c932544",
1745
+ pubKey: "0x3056301006072a8648ce3d020106052b8104000a034200044f15010d9f9457006502d7cbe0cfc5ed67076c2d6f2d4d034b8412e1c07561c370356c5da930ec7a271c3c8d11d00a14e36a3cd3a2a4fad8c05b367357f15b7e",
1746
+ signature: "0x3044022035cdea625125d6b555d9ab2405afb085c1d9a65d780048e607ace4f78740f5fc02207d4236924fd1e29bdc1576077c56da025ebfe63ed0c13bb720baa9ed4a444a93"
1747
+ },
1748
+ {
1749
+ signer: "0x695ba7eb3c2a35bfc8d16562560a01ba1f9931d0",
1750
+ pubKey: "0x3056301006072a8648ce3d020106052b8104000a0342000479d89465d2de95e32eb728c63c58f4554dbecd39dacf7b680a326672cbc601af2abda0dd84f5b8a4bf8efebcb5eb0d24643dc0cc32af3f76a6ef877b71e19e2b",
1751
+ signature: "0x3045022100b4523bba8213ce348a7334680f4b3c54bfa3b815c907993415a43dc54452cb0e02201fc0f93a9199dfe16f3aff06684146bf6f28ff1df5efea5d874b3d877051678b"
1752
+ }
1753
+ ],
1754
+ setId: 3,
1755
+ threshold: 2,
1756
+ refundAfter: "1790001800",
1757
+ sig: "0x31ef2d7b9fb10cc97215e965e9cc866e6e595ba92d9f630a00fbaedc3241399f0d65b0e75c81504ba0989eb4264e55e46b571bd7252f45699ab4792d40e5ca931b"
1758
+ }
1759
+ }
1760
+ ]
1427
1761
  }
1428
1762
  }
1429
1763
  }
@@ -1434,7 +1768,7 @@ var messages_schema_default = {
1434
1768
  $schema: "https://json-schema.org/draft/2020-12/schema",
1435
1769
  $id: "https://cancore.io/schemas/filler-protocol/v1/messages.schema.json",
1436
1770
  title: "Cancore filler protocol v1 \u2014 WebSocket frames",
1437
- $comment: "One $def per frame type, validated by name ($defs/<type>). The schemas encode the SENDER rule (protocol \xA73.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\u2192F types, and treat an unknown reason/result/code as OTHER/generic. Every enum is open: anyOf [known values, futureEnumValue]. x-direction: S2F = gateway to taker (signed, addressed, timed), F2S = taker to gateway, both = either way (ping/pong; <type>S2F is the signed gateway copy, <type>F2S the taker's).",
1771
+ $comment: "One $def per frame type, validated by name ($defs/<type>). The schemas encode the SENDER rule (protocol \xA73.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\u2192F 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 \xA73.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.",
1438
1772
  $defs: {
1439
1773
  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" },
1440
1774
  uintDec256: { type: "string", pattern: "^(0|[1-9][0-9]*)$", maxLength: 78, description: "uint256 as a decimal string" },
@@ -1444,7 +1778,10 @@ var messages_schema_default = {
1444
1778
  uint32: { type: "integer", minimum: 0, maximum: 4294967295 },
1445
1779
  address: { type: "string", pattern: "^0x[0-9a-f]{40}$", description: "EVM address, lowercase hex" },
1446
1780
  bytes32: { type: "string", pattern: "^0x[0-9a-f]{64}$" },
1447
- sig65: { type: "string", pattern: "^0x[0-9a-f]{128}(1b|1c)$", description: "65-byte r \u2016 s \u2016 v, low-s, v \u2208 {27, 28}" },
1781
+ repayTo: { $ref: "#/$defs/bytes32", description: "where settle pays the filler, encoded for the SOURCE chain (protocol \xA73.15): EVM \u2014 the address left-padded to 32 bytes (repayToEvm); Canton \u2014 keccak256(utf8(partyId)) of the filler's registered party" },
1782
+ 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" },
1783
+ deliveryKey: { $ref: "#/$defs/address", description: "the address that sends fill on the destination (FillTicket.deliveryKey); the zero address for a Canton destination" },
1784
+ sig65: { type: "string", pattern: "^0x[0-9a-f]{64}[0-7][0-9a-f]{63}(1b|1c)$", description: "65-byte r \u2016 s \u2016 v of an EOA, low-s, v \u2208 {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 \u2264 n/2" },
1448
1785
  timeMs: { type: "integer", minimum: 1e12, maximum: 9007199254740991, description: "unix milliseconds, gateway clock; the minimum rejects seconds" },
1449
1786
  durationMs: { type: "integer", minimum: 0, maximum: 9007199254740991 },
1450
1787
  timeS: { $ref: "#/$defs/uintDec64", description: "unix seconds as a decimal string (on-chain and signed times)" },
@@ -1457,7 +1794,7 @@ var messages_schema_default = {
1457
1794
  asset: { oneOf: [{ $ref: "#/$defs/address" }, { $ref: "#/$defs/cantonAsset" }] },
1458
1795
  requestId: { type: "string", pattern: "^[!-~]{1,64}$", description: "1..64 printable ASCII (Canonical.daml:90-93)" },
1459
1796
  fillerId: { type: "string", pattern: "^[a-z0-9][a-z0-9-]{0,62}$" },
1460
- messageId: { type: "string", minLength: 1, maxLength: 64 },
1797
+ 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" },
1461
1798
  protocolVersion: { const: "1" },
1462
1799
  order: {
1463
1800
  type: "object",
@@ -1479,10 +1816,13 @@ var messages_schema_default = {
1479
1816
  },
1480
1817
  ticket: {
1481
1818
  type: "object",
1482
- required: ["orderHash", "filler", "attempt", "validFrom", "validUntil"],
1819
+ 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)",
1820
+ required: ["orderHash", "fillerId", "deliveryKey", "repayTo", "attempt", "validFrom", "validUntil"],
1483
1821
  properties: {
1484
1822
  orderHash: { $ref: "#/$defs/bytes32" },
1485
- filler: { $ref: "#/$defs/address" },
1823
+ fillerId: { $ref: "#/$defs/bytes32" },
1824
+ deliveryKey: { $ref: "#/$defs/address" },
1825
+ repayTo: { $ref: "#/$defs/repayTo" },
1486
1826
  attempt: { $ref: "#/$defs/uint32" },
1487
1827
  validFrom: { $ref: "#/$defs/timeS" },
1488
1828
  validUntil: { $ref: "#/$defs/timeS" }
@@ -1497,19 +1837,27 @@ var messages_schema_default = {
1497
1837
  },
1498
1838
  errorCode: {
1499
1839
  anyOf: [
1500
- { enum: ["BAD_REQUEST", "UNAUTHENTICATED", "UNSUPPORTED_VERSION", "UNSUPPORTED_TYPE", "BAD_SIGNATURE", "UNKNOWN_REQUEST", "UNKNOWN_TICKET", "TICKET_CLOSED", "NOT_ELIGIBLE", "RATE_LIMITED", "INTERNAL"] },
1840
+ { 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"] },
1501
1841
  { $ref: "#/$defs/futureEnumValue" }
1502
1842
  ]
1503
1843
  },
1844
+ ticketRefusedReason: {
1845
+ anyOf: [
1846
+ { 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"] },
1847
+ { $ref: "#/$defs/futureEnumValue" }
1848
+ ],
1849
+ 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"
1850
+ },
1504
1851
  expiredResult: { anyOf: [{ enum: ["FILLED", "NO_SHOW", "NO_SHOW_UNCONFIRMED", "EXEMPT"] }, { $ref: "#/$defs/futureEnumValue" }] },
1505
1852
  exemptReason: { anyOf: [{ enum: ["DESTINATION_HALTED", "GATEWAY_FAULT", "REORGED_AFTER_INCLUSION", "RECIPIENT_NOT_READY", "OTHER"] }, { $ref: "#/$defs/futureEnumValue" }] },
1506
1853
  quoteAckStatus: { anyOf: [{ enum: ["COUNTED", "LATE", "SHORT_TTL"] }, { $ref: "#/$defs/futureEnumValue" }], description: "verdict at receipt time; the final status is on GET /v1/filler/quotes" },
1507
1854
  penaltyStep: { anyOf: [{ enum: ["L1", "L2", "L3", "L4"] }, { $ref: "#/$defs/futureEnumValue" }] },
1508
1855
  s2fEnvelope: {
1509
1856
  type: "object",
1510
- required: ["type", "sentAt", "sig"],
1857
+ required: ["type", "id", "sentAt", "sig"],
1511
1858
  properties: {
1512
1859
  type: { type: "string" },
1860
+ id: { $ref: "#/$defs/messageId" },
1513
1861
  fillerId: { $ref: "#/$defs/fillerId", description: "the addressee" },
1514
1862
  sentAt: { $ref: "#/$defs/timeMs" },
1515
1863
  sig: { $ref: "#/$defs/sig65", description: "gateway key over GatewayMessage{bodyHash = keccak256(JCS(frame without sig))}" },
@@ -1517,10 +1865,29 @@ var messages_schema_default = {
1517
1865
  }
1518
1866
  },
1519
1867
  s2fBase: { allOf: [{ $ref: "#/$defs/s2fEnvelope" }, { type: "object", required: ["fillerId"], properties: { fillerId: { $ref: "#/$defs/fillerId" } } }] },
1520
- f2sBase: {
1868
+ f2sEnvelope: {
1521
1869
  type: "object",
1522
- required: ["type", "id"],
1523
- properties: { type: { type: "string" }, id: { $ref: "#/$defs/messageId" } }
1870
+ description: "What every filler \u2192 filler-gateway message and REST request body carries (protocol \xA73.4, S-19): the gateway refuses one without it, with another fillerId than the session's, with a stale sentAt or a reused id",
1871
+ required: ["id", "fillerId", "sentAt", "msgSig"],
1872
+ properties: {
1873
+ id: { $ref: "#/$defs/messageId" },
1874
+ fillerId: { $ref: "#/$defs/fillerId", description: "the sender; must be the fillerId the session is authenticated for" },
1875
+ sentAt: { $ref: "#/$defs/timeMs" },
1876
+ 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" },
1877
+ re: { $ref: "#/$defs/messageId" }
1878
+ }
1879
+ },
1880
+ f2sBase: { allOf: [{ $ref: "#/$defs/f2sEnvelope" }, { type: "object", required: ["type"], properties: { type: { type: "string" } } }] },
1881
+ fillerKeyRegistration: {
1882
+ type: "object",
1883
+ description: "Proof of possession of a message key (protocol \xA73.16): FillerKeyRegistration{fillerId, messageKey, issuedAt} signed by that key \u2014 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 \u2208 {27, 28}) that recovers to messageKey; an EIP-1271 signature is refused",
1884
+ required: ["fillerId", "messageKey", "issuedAt", "sig"],
1885
+ properties: {
1886
+ fillerId: { $ref: "#/$defs/fillerId" },
1887
+ messageKey: { $ref: "#/$defs/address" },
1888
+ issuedAt: { $ref: "#/$defs/timeS" },
1889
+ sig: { $ref: "#/$defs/sig65" }
1890
+ }
1524
1891
  },
1525
1892
  "auth.challenge": {
1526
1893
  "x-direction": "S2F",
@@ -1533,7 +1900,7 @@ var messages_schema_default = {
1533
1900
  "auth.response": {
1534
1901
  "x-direction": "F2S",
1535
1902
  type: "object",
1536
- description: "sig = FillerAuth{fillerId, nonce, expiresAt} by a registered quote key",
1903
+ description: "sig = FillerAuth{fillerId, nonce, expiresAt} by the registered message key of fillerId (keyAddress = its address); msgSig by the same key",
1537
1904
  allOf: [{ $ref: "#/$defs/f2sBase" }],
1538
1905
  required: ["type", "fillerId", "keyAddress", "protocolVersion", "sig"],
1539
1906
  properties: {
@@ -1541,6 +1908,7 @@ var messages_schema_default = {
1541
1908
  fillerId: { $ref: "#/$defs/fillerId" },
1542
1909
  keyAddress: { $ref: "#/$defs/address" },
1543
1910
  protocolVersion: { type: "string", description: 'the gateway answers UNSUPPORTED_VERSION to anything it does not serve; v1 senders send "1"' },
1911
+ 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" },
1544
1912
  sig: { $ref: "#/$defs/sig65" }
1545
1913
  }
1546
1914
  },
@@ -1553,11 +1921,12 @@ var messages_schema_default = {
1553
1921
  },
1554
1922
  ping: {
1555
1923
  "x-direction": "both",
1556
- description: "Heartbeat, either way. A receiver checks the copy of its direction: pingS2F (gateway to taker: signed, addressed, timed) or pingF2S (unsigned)",
1924
+ description: "Heartbeat, either way. A receiver checks the copy of its direction: pingS2F (gateway sig) or pingF2S (filler msgSig)",
1557
1925
  anyOf: [{ $ref: "#/$defs/pingF2S" }, { $ref: "#/$defs/pingS2F" }]
1558
1926
  },
1559
1927
  pingF2S: {
1560
1928
  type: "object",
1929
+ allOf: [{ $ref: "#/$defs/f2sBase" }],
1561
1930
  required: ["type", "id"],
1562
1931
  properties: { type: { const: "ping" }, id: { $ref: "#/$defs/messageId" } }
1563
1932
  },
@@ -1569,11 +1938,12 @@ var messages_schema_default = {
1569
1938
  },
1570
1939
  pong: {
1571
1940
  "x-direction": "both",
1572
- description: "Answer to a ping, re = ping.id. A receiver checks the copy of its direction: pongS2F (signed, addressed, timed) or pongF2S (unsigned)",
1941
+ description: "Answer to a ping, re = ping.id. A receiver checks the copy of its direction: pongS2F (gateway sig) or pongF2S (filler msgSig)",
1573
1942
  anyOf: [{ $ref: "#/$defs/pongF2S" }, { $ref: "#/$defs/pongS2F" }]
1574
1943
  },
1575
1944
  pongF2S: {
1576
1945
  type: "object",
1946
+ allOf: [{ $ref: "#/$defs/f2sBase" }],
1577
1947
  required: ["type", "re"],
1578
1948
  properties: { type: { const: "pong" }, re: { $ref: "#/$defs/messageId" } }
1579
1949
  },
@@ -1584,12 +1954,25 @@ var messages_schema_default = {
1584
1954
  properties: { type: { const: "pong" }, re: { $ref: "#/$defs/messageId" } }
1585
1955
  },
1586
1956
  error: {
1587
- "x-direction": "S2F",
1957
+ "x-direction": "both",
1958
+ 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)",
1959
+ anyOf: [{ $ref: "#/$defs/errorF2S" }, { $ref: "#/$defs/errorS2F" }]
1960
+ },
1961
+ errorS2F: {
1588
1962
  type: "object",
1589
- description: "Reply to the F\u2192S frame `re`; also the REST error body. fillerId is absent before authentication",
1963
+ description: "Reply to the F\u2192S frame `re`; also the REST error body. fillerId is absent before authentication. reason names the failed pre-ticket check with TICKET_REFUSED",
1590
1964
  allOf: [{ $ref: "#/$defs/s2fEnvelope" }],
1591
1965
  required: ["type", "code", "message"],
1592
- properties: { type: { const: "error" }, code: { $ref: "#/$defs/errorCode" }, message: { type: "string" } }
1966
+ properties: { type: { const: "error" }, code: { $ref: "#/$defs/errorCode" }, message: { type: "string" }, reason: { $ref: "#/$defs/ticketRefusedReason" } },
1967
+ if: { type: "object", properties: { code: { const: "TICKET_REFUSED" } }, required: ["code"] },
1968
+ then: { type: "object", required: ["reason"], properties: { reason: true } }
1969
+ },
1970
+ errorF2S: {
1971
+ type: "object",
1972
+ description: "The filler's reply to the S\u2192F frame `re` it cannot handle (malformed, unknown orderHash); informational, it changes no state in filler-gateway. Signed like every filler message",
1973
+ allOf: [{ $ref: "#/$defs/f2sBase" }],
1974
+ required: ["type", "re", "code", "message"],
1975
+ properties: { type: { const: "error" }, re: { $ref: "#/$defs/messageId" }, code: { $ref: "#/$defs/errorCode" }, message: { type: "string" } }
1593
1976
  },
1594
1977
  "epoch.weights": {
1595
1978
  "x-direction": "S2F",
@@ -1634,13 +2017,12 @@ var messages_schema_default = {
1634
2017
  quote: {
1635
2018
  "x-direction": "F2S",
1636
2019
  type: "object",
1637
- description: "sig = FillerQuote{keccak256(utf8(requestId)), filler, amountOut, validUntil, nonce} by the quote key; counts only if validUntil \xD7 1000 \u2265 windowCloseAt + quoteTtlMs",
2020
+ description: "sig = FillerQuote{keccak256(utf8(requestId)), fillerId, amountOut, validUntil, nonce} by the message key, fillerId the envelope's; counts only if validUntil \xD7 1000 \u2265 windowCloseAt + quoteTtlMs",
1638
2021
  allOf: [{ $ref: "#/$defs/f2sBase" }],
1639
- required: ["type", "requestId", "filler", "amountOut", "validUntil", "nonce", "sig"],
2022
+ required: ["type", "requestId", "amountOut", "validUntil", "nonce", "sig"],
1640
2023
  properties: {
1641
2024
  type: { const: "quote" },
1642
2025
  requestId: { $ref: "#/$defs/requestId" },
1643
- filler: { $ref: "#/$defs/address" },
1644
2026
  amountOut: { $ref: "#/$defs/uintDec256" },
1645
2027
  validUntil: { $ref: "#/$defs/timeS" },
1646
2028
  nonce: { $ref: "#/$defs/uintDec64" },
@@ -1679,6 +2061,7 @@ var messages_schema_default = {
1679
2061
  "quote.reconfirm.reply": {
1680
2062
  "x-direction": "F2S",
1681
2063
  type: "object",
2064
+ description: "An accept carries sig = FillerQuote{keccak256(utf8(requestId)), fillerId, amountOut, validUntil, nonce} by the message key; a decline carries only the envelope msgSig",
1682
2065
  allOf: [{ $ref: "#/$defs/f2sBase" }],
1683
2066
  required: ["type", "orderHash", "accept"],
1684
2067
  properties: {
@@ -1711,15 +2094,17 @@ var messages_schema_default = {
1711
2094
  "ticket.intent": {
1712
2095
  "x-direction": "F2S",
1713
2096
  type: "object",
1714
- description: "sig = TicketIntent{orderHash, attempt, validFrom, validUntil} by the filler address; values equal the offer",
2097
+ 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)",
1715
2098
  allOf: [{ $ref: "#/$defs/f2sBase" }],
1716
- required: ["type", "orderHash", "attempt", "validFrom", "validUntil", "sig"],
2099
+ required: ["type", "orderHash", "attempt", "validFrom", "validUntil", "deliveryKey", "repayTo", "sig"],
1717
2100
  properties: {
1718
2101
  type: { const: "ticket.intent" },
1719
2102
  orderHash: { $ref: "#/$defs/bytes32" },
1720
2103
  attempt: { $ref: "#/$defs/uint32" },
1721
2104
  validFrom: { $ref: "#/$defs/timeS" },
1722
2105
  validUntil: { $ref: "#/$defs/timeS" },
2106
+ deliveryKey: { $ref: "#/$defs/deliveryKey" },
2107
+ repayTo: { $ref: "#/$defs/repayTo" },
1723
2108
  sig: { $ref: "#/$defs/sig65" }
1724
2109
  }
1725
2110
  },
@@ -1753,7 +2138,7 @@ var messages_schema_default = {
1753
2138
  "ticket.issued": {
1754
2139
  "x-direction": "S2F",
1755
2140
  type: "object",
1756
- 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",
2141
+ 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)",
1757
2142
  required: ["type", "form", "orderHash", "attempt"],
1758
2143
  properties: {
1759
2144
  type: { const: "ticket.issued" },
@@ -1769,14 +2154,14 @@ var messages_schema_default = {
1769
2154
  },
1770
2155
  {
1771
2156
  if: { type: "object", properties: { form: { const: "canton" } }, required: ["form"] },
1772
- then: { type: "object", required: ["deliveryOrderCid", "validUntil"], properties: { deliveryOrderCid: { type: "string", minLength: 1 }, validUntil: { $ref: "#/$defs/timeS" } } }
2157
+ 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" } } }
1773
2158
  }
1774
2159
  ]
1775
2160
  },
1776
2161
  "ticket.receipt": {
1777
2162
  "x-direction": "F2S",
1778
2163
  type: "object",
1779
- description: "sig = TicketReceipt{ticketHash, ticketSigHash} by the filler address",
2164
+ description: "sig = TicketReceipt{ticketHash, ticketSigHash} by the message key",
1780
2165
  allOf: [{ $ref: "#/$defs/f2sBase" }],
1781
2166
  required: ["type", "orderHash", "attempt", "ticketHash", "ticketSigHash", "sig"],
1782
2167
  properties: {
@@ -1841,6 +2226,66 @@ var messages_schema_default = {
1841
2226
  step: { $ref: "#/$defs/penaltyStep" },
1842
2227
  details: { type: "object" }
1843
2228
  }
2229
+ },
2230
+ fillProof: {
2231
+ type: "object",
2232
+ description: "FillProof as the source router hashes it (FILL_PROOF_TYPES, the twelve variant A fields, protocol \xA73.3), encoded per protocol \xA73.1: kind, attempt, setId JSON integers; amountDelivered, filledAt decimal strings; fillerId the on-chain form keccak256(utf8(fillerId))",
2233
+ required: ["kind", "orderHash", "destination", "fillRef", "recipient", "outputAsset", "amountDelivered", "filledAt", "fillerId", "repayTo", "attempt", "setId"],
2234
+ properties: {
2235
+ kind: { $ref: "#/$defs/uint8" },
2236
+ orderHash: { $ref: "#/$defs/bytes32" },
2237
+ destination: { $ref: "#/$defs/bytes32" },
2238
+ fillRef: { $ref: "#/$defs/bytes32" },
2239
+ recipient: { $ref: "#/$defs/bytes32" },
2240
+ outputAsset: { $ref: "#/$defs/bytes32" },
2241
+ amountDelivered: { $ref: "#/$defs/uintDec256" },
2242
+ filledAt: { $ref: "#/$defs/timeS" },
2243
+ fillerId: { $ref: "#/$defs/bytes32", description: "keccak256(utf8(fillerId)) of the filler that delivered: this filler's" },
2244
+ repayTo: { $ref: "#/$defs/repayTo", description: "the payee of settle, encoded for the source chain: the repayTo of this filler's ticket" },
2245
+ attempt: { $ref: "#/$defs/uint32" },
2246
+ setId: { $ref: "#/$defs/uint32" }
2247
+ }
2248
+ },
2249
+ attestationEvm: {
2250
+ type: "object",
2251
+ 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",
2252
+ required: ["signer", "signature"],
2253
+ properties: { signer: { $ref: "#/$defs/address" }, signature: { $ref: "#/$defs/sig65" } }
2254
+ },
2255
+ attestationCanton: {
2256
+ type: "object",
2257
+ 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",
2258
+ required: ["signer", "pubKey", "signature"],
2259
+ properties: {
2260
+ signer: { $ref: "#/$defs/address" },
2261
+ pubKey: { type: "string", pattern: "^0x3056301006072a8648ce3d020106052b8104000a03420004[0-9a-f]{128}$", description: "DER SubjectPublicKeyInfo of the uncompressed secp256k1 key (88 bytes), as KMS GetPublicKey returns it" },
2262
+ signature: { type: "string", pattern: "^0x30([0-9a-f]{2}){7,71}$", description: "minimal DER ECDSA signature, low-s, no recovery byte" }
2263
+ }
2264
+ },
2265
+ "settle.attestations": {
2266
+ "x-direction": "S2F",
2267
+ type: "object",
2268
+ description: "\u2265 threshold attestor signatures over the filler's FillProof (\xA710 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 \u2192 attestationEvm, canton \u2192 attestationCanton",
2269
+ allOf: [
2270
+ { $ref: "#/$defs/s2fBase" },
2271
+ {
2272
+ if: { type: "object", properties: { sourceChainId: { type: "string", pattern: "^canton:" } }, required: ["sourceChainId"] },
2273
+ then: { type: "object", properties: { signatures: { type: "array", items: { $ref: "#/$defs/attestationCanton" } } } },
2274
+ else: { type: "object", properties: { signatures: { type: "array", items: { $ref: "#/$defs/attestationEvm" } } } }
2275
+ }
2276
+ ],
2277
+ required: ["type", "orderHash", "attempt", "sourceChainId", "proof", "signatures", "setId", "threshold", "refundAfter"],
2278
+ properties: {
2279
+ type: { const: "settle.attestations" },
2280
+ orderHash: { $ref: "#/$defs/bytes32" },
2281
+ attempt: { $ref: "#/$defs/uint32", description: "equals proof.attempt" },
2282
+ sourceChainId: { $ref: "#/$defs/caip2", description: "where settle is submitted" },
2283
+ proof: { $ref: "#/$defs/fillProof" },
2284
+ signatures: { type: "array", minItems: 1 },
2285
+ setId: { $ref: "#/$defs/uint32", description: "equals proof.setId; EVM: attestationSetFor(orderHash)" },
2286
+ threshold: { type: "integer", minimum: 1, maximum: 4294967295, description: "k of that set" },
2287
+ refundAfter: { $ref: "#/$defs/timeS", description: "from this time settle reverts; the node gets its settle included before it" }
2288
+ }
1844
2289
  }
1845
2290
  }
1846
2291
  };
@@ -1929,12 +2374,13 @@ var records_schema_default = {
1929
2374
  gatewayInfo: {
1930
2375
  type: "object",
1931
2376
  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",
1932
- required: ["env", "gateway", "ticketSigners", "protocolVersion"],
2377
+ required: ["env", "gateway", "ticketSigners", "protocolVersion", "maxMessageAgeMs"],
1933
2378
  properties: {
1934
2379
  env: { type: "string", minLength: 1 },
1935
2380
  gateway: { $ref: "messages.schema.json#/$defs/address" },
1936
2381
  ticketSigners: { type: "array", items: { $ref: "messages.schema.json#/$defs/address" } },
1937
- protocolVersion: { $ref: "messages.schema.json#/$defs/protocolVersion" }
2382
+ protocolVersion: { $ref: "messages.schema.json#/$defs/protocolVersion" },
2383
+ maxMessageAgeMs: { $ref: "messages.schema.json#/$defs/durationMs", description: "freshness bound of \xA73.4 in both directions: |receivedAt \u2212 sentAt| \u2264 maxMessageAgeMs, and a message id is not reused within it" }
1938
2384
  }
1939
2385
  }
1940
2386
  }
@@ -1945,7 +2391,7 @@ var rest_schema_default = {
1945
2391
  $schema: "https://json-schema.org/draft/2020-12/schema",
1946
2392
  $id: "https://cancore.io/schemas/filler-protocol/v1/rest.schema.json",
1947
2393
  title: "Cancore filler protocol v1 \u2014 REST fallback",
1948
- $comment: "protocol \xA73.6. Bodies are the WebSocket frames (S\u2192F responses carry the gateway sig). /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. /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.",
2394
+ $comment: "protocol \xA73.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\u2192F 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 \u2265 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.",
1949
2395
  "x-endpoints": [
1950
2396
  { method: "GET", path: "/v1/filler/auth/challenge", auth: "none", response: "messages.schema.json#/$defs/auth.challenge" },
1951
2397
  { method: "POST", path: "/v1/filler/auth", auth: "none", request: "messages.schema.json#/$defs/auth.response", response: "#/$defs/authToken" },
@@ -1957,6 +2403,7 @@ var rest_schema_default = {
1957
2403
  { method: "GET", path: "/v1/filler/quotes", auth: "bearer", query: "#/$defs/quoteListQuery", response: "#/$defs/quoteList" },
1958
2404
  { method: "GET", path: "/v1/filler/stats", auth: "bearer", response: "#/$defs/fillerStats" },
1959
2405
  { method: "GET", path: "/v1/filler/penalties", auth: "bearer", query: "#/$defs/pageQuery", response: "#/$defs/penaltyList" },
2406
+ { method: "GET", path: "/v1/filler/attestations/{orderHash}", auth: "bearer", response: "messages.schema.json#/$defs/settle.attestations" },
1960
2407
  { method: "GET", path: "/v1/draws/{orderHash}", auth: "none", response: "records.schema.json#/$defs/drawRecord" },
1961
2408
  { method: "GET", path: "/v1/draws/epochs/{id}", auth: "none", response: "records.schema.json#/$defs/epochRecord" },
1962
2409
  { method: "GET", path: "/v1/gateway", auth: "none", response: "records.schema.json#/$defs/gatewayInfo" }
@@ -1967,15 +2414,19 @@ var rest_schema_default = {
1967
2414
  UNSUPPORTED_VERSION: 400,
1968
2415
  UNSUPPORTED_TYPE: 400,
1969
2416
  BAD_SIGNATURE: 422,
2417
+ STALE_MESSAGE: 400,
2418
+ REPLAYED_MESSAGE: 409,
2419
+ TICKET_REFUSED: 409,
1970
2420
  UNKNOWN_REQUEST: 404,
1971
2421
  UNKNOWN_TICKET: 404,
1972
2422
  TICKET_CLOSED: 409,
1973
2423
  NOT_ELIGIBLE: 403,
1974
2424
  RATE_LIMITED: 429,
1975
- INTERNAL: 500
2425
+ INTERNAL: 500,
2426
+ ATTESTATIONS_NOT_READY: 404
1976
2427
  },
1977
2428
  $defs: {
1978
- errorBody: { $ref: "messages.schema.json#/$defs/error" },
2429
+ errorBody: { $ref: "messages.schema.json#/$defs/errorS2F" },
1979
2430
  empty: { type: "object", description: "no fields in v1; receivers ignore unknown ones (V-2)" },
1980
2431
  authToken: {
1981
2432
  type: "object",
@@ -2009,7 +2460,8 @@ var rest_schema_default = {
2009
2460
  },
2010
2461
  stakeBindingRequest: {
2011
2462
  type: "object",
2012
- description: "sig = StakeBinding{partnerId, stakingAddress, chainId, nonce} by the staking address",
2463
+ description: "sig = StakeBinding{partnerId, stakingAddress, chainId, nonce} by the staking address; the body carries the filler envelope and msgSig like every request body",
2464
+ allOf: [{ $ref: "messages.schema.json#/$defs/f2sEnvelope" }],
2013
2465
  required: ["partnerId", "stakingAddress", "chainId", "nonce", "sig"],
2014
2466
  properties: {
2015
2467
  partnerId: { $ref: "messages.schema.json#/$defs/fillerId" },
@@ -2078,12 +2530,94 @@ function messageSchemaRef(type, direction) {
2078
2530
  const def = direction && MESSAGE_DIRECTIONS[type] === "both" ? `${type}${direction}` : type;
2079
2531
  return `${messages_schema_default.$id}#/$defs/${def}`;
2080
2532
  }
2533
+ var ENVELOPE = /* @__PURE__ */ new Set(["type", "id", "fillerId", "sentAt", "sig", "re"]);
2534
+ function settleAttestationsPayload(frame) {
2535
+ return Object.fromEntries(Object.entries(frame).filter(([k]) => !ENVELOPE.has(k)));
2536
+ }
2537
+ function settleAttestationsPayloadHash(frame) {
2538
+ return toHex(keccak(utf8ToBytes(jcs(settleAttestationsPayload(frame)))));
2539
+ }
2540
+ var isCantonSource = (sourceChainId) => sourceChainId.startsWith("canton:");
2541
+ function settleAttestationsErrors(payload) {
2542
+ const errors = [];
2543
+ if (payload.attempt !== payload.proof.attempt) errors.push(`attempt ${payload.attempt} differs from proof.attempt ${payload.proof.attempt}`);
2544
+ if (payload.setId !== payload.proof.setId) errors.push(`setId ${payload.setId} differs from proof.setId ${payload.proof.setId}`);
2545
+ if (payload.orderHash.toLowerCase() !== payload.proof.orderHash.toLowerCase()) errors.push("orderHash differs from proof.orderHash");
2546
+ if (payload.signatures.length < payload.threshold) errors.push(`${payload.signatures.length} signatures, fewer than threshold ${payload.threshold}`);
2547
+ const signers = payload.signatures.map((s) => s.signer.toLowerCase());
2548
+ for (let i = 1; i < signers.length; i++) {
2549
+ if (signers[i] <= signers[i - 1]) {
2550
+ errors.push(`signers not strictly ascending at index ${i}`);
2551
+ break;
2552
+ }
2553
+ }
2554
+ return errors;
2555
+ }
2556
+ function settleSigs(payload) {
2557
+ if (isCantonSource(payload.sourceChainId)) throw new TypeError(`${payload.sourceChainId} is a Canton source: use cantonSigEntries`);
2558
+ return payload.signatures.map((s) => s.signature);
2559
+ }
2560
+ function cantonSigEntries(payload) {
2561
+ if (!isCantonSource(payload.sourceChainId)) throw new TypeError(`${payload.sourceChainId} is not a Canton source: use settleSigs`);
2562
+ return payload.signatures.map((s) => ({ pubKey: s.pubKey.slice(2).toLowerCase(), sig: s.signature.slice(2).toLowerCase() }));
2563
+ }
2081
2564
 
2082
2565
  // src/generated/meta.ts
2083
2566
  var CONTRACTS_RELEASE = {
2084
2567
  "version": "1.4.0-dev",
2085
2568
  "releaseChannel": "dev",
2086
- "updatedAt": "2026-07-24T19:55:00Z"
2569
+ "updatedAt": "2026-07-24T19:55:00Z",
2570
+ "commit": "8c7d36f6a4f1cb76e6d5098c4f4b18367d46e350"
2571
+ };
2572
+ var BUILD_HASHES = {
2573
+ "HTLC": {
2574
+ "creationHexSha256": "93a991d3a6451f7c3f02dfb70b365a48d29bebccc7f16d8dbe3d56d3dfee0af1",
2575
+ "runtimeHexSha256": "40ab52456c3b5a04365fc1fad837eb79bbe4b85c8dbd990f549468ae48f97e3a",
2576
+ "creationHexLength": 14976,
2577
+ "runtimeHexLength": 14686
2578
+ },
2579
+ "FeeVault": {
2580
+ "creationHexSha256": "1c97d27c8d3e584f879bb57549d75ef10394a56a298eaf4a772516b9316e2248",
2581
+ "runtimeHexSha256": "0631177a64cde0829c2cec8426c08a507564f7d8b084e0237d724ed63faea0e9",
2582
+ "creationHexLength": 13176,
2583
+ "runtimeHexLength": 10968
2584
+ },
2585
+ "MultiBalanceChecker": {
2586
+ "creationHexSha256": "c0a0326694f2a1594e332ba06120692cc98bc06c57d6d8981cb3768e01fad423",
2587
+ "runtimeHexSha256": "93a1f0aa251715cc6a1b6a472f10762463b5c24668886630cbc6da5632e5739b",
2588
+ "creationHexLength": 2456,
2589
+ "runtimeHexLength": 2394
2590
+ },
2591
+ "CancoreRouter": {
2592
+ "creationHexSha256": "615b6fb47a4255df9f7fdec963811cdfbefb53166645cd19466fa268df7fb39d",
2593
+ "runtimeHexSha256": "dec1f5d541c6b383b95b6c53e278123cc3844bdeff3f977a166fb6e9cbf86343",
2594
+ "creationHexLength": 43102,
2595
+ "runtimeHexLength": 36984
2596
+ },
2597
+ "CNRXStaking": {
2598
+ "creationHexSha256": "dfda056ee22b593e2f2e1fc4e679fbb9dc34b04964f389b46914402c422b40fb",
2599
+ "runtimeHexSha256": "d11534242f166e52f4ad063b5b6b59146e31634d3932f7ad63db05d83a1485f6",
2600
+ "creationHexLength": 7412,
2601
+ "runtimeHexLength": 6240
2602
+ },
2603
+ "PointsClaim": {
2604
+ "creationHexSha256": "0f29890b609f7e15ef4dbcda17a7f2cd7482d016a0057a5f6c4270d7780ff38d",
2605
+ "runtimeHexSha256": "f2b10c4ec8458c0d6ab0f465481e645524f618f7a3327822e8ae5d3fd42fa46c",
2606
+ "creationHexLength": 14300,
2607
+ "runtimeHexLength": 11504
2608
+ },
2609
+ "BurnMintTokenPool": {
2610
+ "creationHexSha256": "b5b19721149d9dd63e0650d0a1f95ac82affa4b9c650fdffd375db6ea361e416",
2611
+ "runtimeHexSha256": "c9aaa6a40ef4f0caadeb66f0a9adc68b1191949e9e0bdb420f331132bf651c3a",
2612
+ "creationHexLength": 41756,
2613
+ "runtimeHexLength": 39936
2614
+ },
2615
+ "CNRX": {
2616
+ "creationHexSha256": "61b4e114722e99f93aac4bd4ef3cfb7973dd050b66e6ffb326efad29d4cc8c95",
2617
+ "runtimeHexSha256": "2b23774e41fb25f820227a50de4f48d7ad79b0bd131c1956aab07c100e0c3948",
2618
+ "creationHexLength": 21266,
2619
+ "runtimeHexLength": 17374
2620
+ }
2087
2621
  };
2088
2622
  var BYTECODE_HASHES = {
2089
2623
  "HTLC": {
@@ -2146,6 +2680,6 @@ function describeRevert(selectorOrData, tables) {
2146
2680
  return void 0;
2147
2681
  }
2148
2682
 
2149
- export { ASYNCAPI, BYTECODE_HASHES, CONTRACTS_RELEASE, DECLINE_REASONS, DEPLOYMENTS, DRAND_QUICKNET, DRAW_CLOSED_BY, ERROR_CODES, ERROR_HTTP_STATUS, EXEMPT_REASONS, EXPIRED_RESULTS, FEE_CLAIM_DOMAIN_NAME, FEE_CLAIM_DOMAIN_VERSION, FEE_CLAIM_TYPES, FILLER_AUTH_TYPES, FILLER_GATEWAYS, FILLER_PROTOCOL_DOMAIN, FILLER_QUOTE_TYPES, FILL_PROOF_DOMAIN, FILL_PROOF_TYPES, FILL_PROOF_TYPE_STRING, FILL_TICKET_DOMAIN, FILL_TICKET_TYPES, GATEWAY_MESSAGE_TYPES, MESSAGE_DIRECTIONS, ORDER_TYPES, PENALTY_STEPS, PERMIT2_ADDRESS, PROOF_KIND_ATTESTATION, PROTOCOL_SCHEMAS, PROTOCOL_VERSION, QUOTE_ACK_STATUSES, QUOTE_FINAL_STATUSES, QUOTE_TYPES, REST_ENDPOINTS, SCHEMA_VOCABULARY, STAKE_BINDING_TYPES, TICKET_INTENT_TYPES, TICKET_LIST_STATUSES, TICKET_RECEIPT_TYPES, deploymentOf, describeRevert, drawValue, drawWinner, encodeType, feeClaimDomain, fillProofDomain, firstRoundAtOrAfter, gatewayBodyHash, hashDomain, hashStruct, hashTypedData, jcs, messageSchemaRef, requestIdHash, routerDomain, typeHash };
2683
+ export { ASYNCAPI, BUILD_HASHES, BYTECODE_HASHES, CONTRACTS_RELEASE, DECLINE_REASONS, DEPLOYMENTS, DRAND_QUICKNET, DRAW_CLOSED_BY, ERROR_CODES, ERROR_HTTP_STATUS, EXEMPT_REASONS, EXPIRED_RESULTS, FEE_CLAIM_DOMAIN_NAME, FEE_CLAIM_DOMAIN_VERSION, FEE_CLAIM_TYPES, FILLER_AUTH_TYPES, FILLER_GATEWAYS, FILLER_ID_PATTERN, FILLER_KEY_REGISTRATION_TYPES, FILLER_MESSAGE_TYPES, FILLER_PROTOCOL_DOMAIN, FILLER_QUOTE_TYPES, FILL_PROOF_DOMAIN, FILL_PROOF_TYPES, FILL_PROOF_TYPE_STRING, FILL_TICKET_DOMAIN, FILL_TICKET_TYPES, GATEWAY_MESSAGE_TYPES, MESSAGE_DIRECTIONS, ORDER_TYPES, PENALTY_STEPS, PERMIT2_ADDRESS, PROOF_KIND_ATTESTATION, PROTOCOL_SCHEMAS, PROTOCOL_VERSION, QUOTE_ACK_STATUSES, QUOTE_FINAL_STATUSES, QUOTE_TYPES, REST_ENDPOINTS, SCHEMA_VOCABULARY, STAKE_BINDING_TYPES, TICKET_INTENT_TYPES, TICKET_LIST_STATUSES, TICKET_RECEIPT_TYPES, TICKET_REFUSED_REASONS, cantonSigEntries, deploymentOf, describeRevert, drawValue, drawWinner, encodeType, evmAddressFromRepayTo, feeClaimDomain, fillProofDomain, fillerEnvelopeError, fillerIdHash, fillerMessageBodyHash, firstRoundAtOrAfter, gatewayBodyHash, hashDomain, hashFillProof, hashFillTicket, hashFillerKeyRegistration, hashFillerMessage, hashFillerQuote, hashStruct, hashTicketIntent, hashTypedData, isCantonSource, isEoaSignature, isEvmRepayTo, jcs, messageIdRetainUntil, messageSchemaRef, repayToFromEvm, repayToFromParty, requestIdHash, routerDomain, settleAttestationsErrors, settleAttestationsPayload, settleAttestationsPayloadHash, settleSigs, typeHash };
2150
2684
  //# sourceMappingURL=index.js.map
2151
2685
  //# sourceMappingURL=index.js.map