@cancore/contracts 0.2.0-rc.10 → 0.2.0-rc.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cancore/contracts",
3
- "version": "0.2.0-rc.10",
3
+ "version": "0.2.0-rc.14",
4
4
  "type": "module",
5
5
  "description": "The Cancore EVM contracts as data: the ABIs of the Cancore EVM contracts and their custom-error selectors, the EIP-712 FeeClaim voucher and FillProof, the network registry; and the filler protocol v1: EIP-712 types and domains, hashing helpers, JSON Schemas, AsyncAPI, golden vectors.",
6
6
  "exports": {
@@ -43,7 +43,7 @@
43
43
  "prepack": "tsup --silent",
44
44
  "prepublishOnly": "npm run build",
45
45
  "sync": "node scripts/sync.mjs && node scripts/sync-typed-data.mjs",
46
- "vectors": "node scripts/gen-protocol-vectors.mjs && node scripts/gen-protocol-docs.mjs && node scripts/gen-router-vectors.mjs"
46
+ "vectors": "node scripts/gen-protocol-vectors.mjs && node scripts/gen-settle-attestations.mjs && node scripts/gen-protocol-docs.mjs && node scripts/gen-router-vectors.mjs"
47
47
  },
48
48
  "dependencies": {
49
49
  "@noble/hashes": "^1.8.0"
@@ -132,6 +132,18 @@
132
132
  },
133
133
  "settle.attestations": {
134
134
  "$ref": "#/components/messages/settle.attestations"
135
+ },
136
+ "canton.prepare": {
137
+ "$ref": "#/components/messages/canton.prepare"
138
+ },
139
+ "canton.prepared": {
140
+ "$ref": "#/components/messages/canton.prepared"
141
+ },
142
+ "canton.submit": {
143
+ "$ref": "#/components/messages/canton.submit"
144
+ },
145
+ "canton.submitted": {
146
+ "$ref": "#/components/messages/canton.submitted"
135
147
  }
136
148
  }
137
149
  }
@@ -400,6 +412,50 @@
400
412
  "$ref": "#/channels/filler/messages/settle.attestations"
401
413
  }
402
414
  ]
415
+ },
416
+ "receiveCantonPrepare": {
417
+ "action": "receive",
418
+ "channel": {
419
+ "$ref": "#/channels/filler"
420
+ },
421
+ "messages": [
422
+ {
423
+ "$ref": "#/channels/filler/messages/canton.prepare"
424
+ }
425
+ ]
426
+ },
427
+ "sendCantonPrepared": {
428
+ "action": "send",
429
+ "channel": {
430
+ "$ref": "#/channels/filler"
431
+ },
432
+ "messages": [
433
+ {
434
+ "$ref": "#/channels/filler/messages/canton.prepared"
435
+ }
436
+ ]
437
+ },
438
+ "receiveCantonSubmit": {
439
+ "action": "receive",
440
+ "channel": {
441
+ "$ref": "#/channels/filler"
442
+ },
443
+ "messages": [
444
+ {
445
+ "$ref": "#/channels/filler/messages/canton.submit"
446
+ }
447
+ ]
448
+ },
449
+ "sendCantonSubmitted": {
450
+ "action": "send",
451
+ "channel": {
452
+ "$ref": "#/channels/filler"
453
+ },
454
+ "messages": [
455
+ {
456
+ "$ref": "#/channels/filler/messages/canton.submitted"
457
+ }
458
+ ]
403
459
  }
404
460
  },
405
461
  "components": {
@@ -1178,12 +1234,12 @@
1178
1234
  "id": "g-sa-1",
1179
1235
  "fillerId": "acme-markets",
1180
1236
  "sentAt": 1790000160000,
1181
- "orderHash": "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1237
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
1182
1238
  "attempt": 0,
1183
1239
  "sourceChainId": "eip155:11155111",
1184
1240
  "proof": {
1185
1241
  "kind": 1,
1186
- "orderHash": "0x585ec61a0813109803da9d47aea37a165f7df1371553f1e4ea8c139cf74058a6",
1242
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
1187
1243
  "destination": "0x0000000000000000000000000000000000000000000000000000000000066eee",
1188
1244
  "fillRef": "0xfc4cba975d6b96ed2be00adae2d970f61413b963279089dcfc6402ddccc42740",
1189
1245
  "recipient": "0x000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e",
@@ -1198,17 +1254,17 @@
1198
1254
  "signatures": [
1199
1255
  {
1200
1256
  "signer": "0x5e877d05b3bfef8b53a59dde76b911fb521415cd",
1201
- "signature": "0x4efcf401d43002b059a1bf5f12a1a6c868a1917a533cb2df79022845bd8704da1d5a6a67e206d057e29bd06efc19fef0afcc0ece462e732268da4cedb57e4c321c"
1257
+ "signature": "0x280a1c67572079434e423c51ee29272a0afb87bc485b3292192fb08242aeef687bcd1417aff35025ab16da3f43a73972585877b131a2b4dfe83d1ae4f5ef0fad1b"
1202
1258
  },
1203
1259
  {
1204
1260
  "signer": "0x6805cf7ce01e1c392d47806813503e367c932544",
1205
- "signature": "0x29a0148c3a5cdcadf63a4aaef763784751a3fa6064dc276330227729ddbc69015ea1efdab546cf1552ca726de9ccf4480e8d5ff3c3ed9b718c4964b5bc03ddcf1c"
1261
+ "signature": "0x77cba7cedee87b88ac9d90ce0440bb55fa510930318e1a7cb9e2567f198208fb3784a5ca3343c3df2d7dfc29b0a2eae3b87b475893b4d134fa6ce9d8df2a88521b"
1206
1262
  }
1207
1263
  ],
1208
1264
  "setId": 1,
1209
1265
  "threshold": 2,
1210
1266
  "refundAfter": "1790002400",
1211
- "sig": "0x1d81fa8e56999d9bf8365f2aa18025291198a51b769dcddd7ebaaa3b61eca32f262f218caf2618bc8b351c65eca89417defeb5f3905f7327a68e9cdd1d29f99d1b"
1267
+ "sig": "0x703468572b0f0d056f7c8547a2a70dbb76469888d23059926e906d23cc0468ac54cd96efe6a0f298750a225cd4a7e6acb511f144631076ed2825de0bf0e40b1e1b"
1212
1268
  }
1213
1269
  },
1214
1270
  {
@@ -1216,21 +1272,21 @@
1216
1272
  "payload": {
1217
1273
  "type": "settle.attestations",
1218
1274
  "id": "g-sa-3",
1219
- "fillerId": "cancore-reserve",
1275
+ "fillerId": "acme",
1220
1276
  "sentAt": 1789999760000,
1221
- "orderHash": "0x770f1ebba8ab5b96e3efbed39c0f630d56f934f9f232771abaccdb0cf17ca204",
1277
+ "orderHash": "0x22e3a53ab72c6990b1971fd50b9ec6c527a003d987cd58d26058b380dd7ae79a",
1222
1278
  "attempt": 1,
1223
1279
  "sourceChainId": "canton:mainnet",
1224
1280
  "proof": {
1225
1281
  "kind": 1,
1226
- "orderHash": "0x770f1ebba8ab5b96e3efbed39c0f630d56f934f9f232771abaccdb0cf17ca204",
1282
+ "orderHash": "0x22e3a53ab72c6990b1971fd50b9ec6c527a003d987cd58d26058b380dd7ae79a",
1227
1283
  "destination": "0x0000000000000000000000000000000000000000000000000000000000000001",
1228
1284
  "fillRef": "0xfba8fd8a079872a9efe9646fcf34cfbbe8711ebd63665e8f2e0924949264c471",
1229
1285
  "recipient": "0x000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e",
1230
1286
  "outputAsset": "0x000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
1231
1287
  "amountDelivered": "1200250000",
1232
1288
  "filledAt": "1789999700",
1233
- "fillerId": "0xe3a8297b35498225c7903ca1a305ef64fcd783cf42c6c687b7b332c83d4dd837",
1289
+ "fillerId": "0xe29dae06ef4c3e336b7538b6d4f52ca1ecec009b1df6fb501320e11b223aeeaf",
1234
1290
  "repayTo": "0x4fa94ace29856f88ebea07ce6d18e21f52c60b4f66d147134c03c82b62957f9d",
1235
1291
  "attempt": 1,
1236
1292
  "setId": 3
@@ -1239,23 +1295,289 @@
1239
1295
  {
1240
1296
  "signer": "0x5e877d05b3bfef8b53a59dde76b911fb521415cd",
1241
1297
  "pubKey": "0x3056301006072a8648ce3d020106052b8104000a034200046e4ce4835ad9bacce317724d5a85bfb72f73c0e0e0d9bb0ece443a23c405994056f031b0c83296033a1fd06fc21cbfdab8a821b09c0172ed64ef1b1ee3469be3",
1242
- "signature": "0x3045022100a7554c31e432a90ae7384910ae3f9128b41034769dd072319fcf8131bb8062b1022006ac576ed5858c881238334835d35f5aacb765b16842a3f926a540355997883e"
1298
+ "signature": "0x3044022048f14c61c1f52f541ab136ef92bbbcfca14dd0560db802feb510f7fce19477b20220230a636d4d10c7e5c16b997394a8261185a899f0e8d8e5ffad14db4d4123dd16"
1243
1299
  },
1244
1300
  {
1245
1301
  "signer": "0x6805cf7ce01e1c392d47806813503e367c932544",
1246
1302
  "pubKey": "0x3056301006072a8648ce3d020106052b8104000a034200044f15010d9f9457006502d7cbe0cfc5ed67076c2d6f2d4d034b8412e1c07561c370356c5da930ec7a271c3c8d11d00a14e36a3cd3a2a4fad8c05b367357f15b7e",
1247
- "signature": "0x3044022035cdea625125d6b555d9ab2405afb085c1d9a65d780048e607ace4f78740f5fc02207d4236924fd1e29bdc1576077c56da025ebfe63ed0c13bb720baa9ed4a444a93"
1303
+ "signature": "0x3045022100d4cb2f8a3084bf5749871a06fa543a9ba80889471eb2799ab4c4c08b31ee7e2902203e2b4af4e08f263168a046a4b6a6370398c7b03de7797f1a011910c0d784f4bc"
1248
1304
  },
1249
1305
  {
1250
1306
  "signer": "0x695ba7eb3c2a35bfc8d16562560a01ba1f9931d0",
1251
1307
  "pubKey": "0x3056301006072a8648ce3d020106052b8104000a0342000479d89465d2de95e32eb728c63c58f4554dbecd39dacf7b680a326672cbc601af2abda0dd84f5b8a4bf8efebcb5eb0d24643dc0cc32af3f76a6ef877b71e19e2b",
1252
- "signature": "0x3045022100b4523bba8213ce348a7334680f4b3c54bfa3b815c907993415a43dc54452cb0e02201fc0f93a9199dfe16f3aff06684146bf6f28ff1df5efea5d874b3d877051678b"
1308
+ "signature": "0x304402200a300c658594fe20fb429c4f32e23e0b3e444a017f320622cb636792d6f13ca802200cbd9bcb4ea5719f63f8a510e7e9f3d730a47691a7b6eb8e78ec787218997e02"
1253
1309
  }
1254
1310
  ],
1255
1311
  "setId": 3,
1256
1312
  "threshold": 2,
1257
1313
  "refundAfter": "1790001800",
1258
- "sig": "0x31ef2d7b9fb10cc97215e965e9cc866e6e595ba92d9f630a00fbaedc3241399f0d65b0e75c81504ba0989eb4264e55e46b571bd7252f45699ab4792d40e5ca931b"
1314
+ "sig": "0x481041cd0c07174f6db63b7acdc96a0bcc399de0be60df07faea3be6f0f09c83553a59f5e5443a6d7d1763789404d732a4b5cdc57758b729adf50245b8f96c2d1b"
1315
+ }
1316
+ }
1317
+ ]
1318
+ },
1319
+ "canton.prepare": {
1320
+ "name": "canton.prepare",
1321
+ "title": "canton.prepare (F2S)",
1322
+ "payload": {
1323
+ "schemaFormat": "application/schema+json;version=draft-2020-12",
1324
+ "schema": {
1325
+ "$ref": "messages.schema.json#/$defs/canton.prepare"
1326
+ }
1327
+ },
1328
+ "examples": [
1329
+ {
1330
+ "name": "canton-prepare-1",
1331
+ "payload": {
1332
+ "type": "canton.prepare",
1333
+ "id": "cp-1",
1334
+ "fillerId": "acme-markets",
1335
+ "sentAt": 1789990000000,
1336
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1337
+ "op": "party.allocate",
1338
+ "params": {
1339
+ "publicKey": "0x1111111111111111111111111111111111111111111111111111111111111111"
1340
+ }
1341
+ }
1342
+ },
1343
+ {
1344
+ "name": "canton-prepare-2",
1345
+ "payload": {
1346
+ "type": "canton.prepare",
1347
+ "id": "cp-2",
1348
+ "fillerId": "acme-markets",
1349
+ "sentAt": 1789990100000,
1350
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1351
+ "op": "registry.accept",
1352
+ "params": {}
1353
+ }
1354
+ },
1355
+ {
1356
+ "name": "canton-prepare-3",
1357
+ "payload": {
1358
+ "type": "canton.prepare",
1359
+ "id": "cp-3",
1360
+ "fillerId": "acme-markets",
1361
+ "sentAt": 1790000026000,
1362
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1363
+ "op": "delivery.fill",
1364
+ "params": {
1365
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
1366
+ "attempt": 2
1367
+ }
1368
+ }
1369
+ },
1370
+ {
1371
+ "name": "canton-prepare-4",
1372
+ "payload": {
1373
+ "type": "canton.prepare",
1374
+ "id": "cp-4",
1375
+ "fillerId": "acme-markets",
1376
+ "sentAt": 1790000700000,
1377
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1378
+ "op": "intent.settle",
1379
+ "params": {
1380
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b"
1381
+ }
1382
+ }
1383
+ },
1384
+ {
1385
+ "name": "canton-prepare-5",
1386
+ "payload": {
1387
+ "type": "canton.prepare",
1388
+ "id": "cp-5",
1389
+ "fillerId": "acme-markets",
1390
+ "sentAt": 1790001000000,
1391
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1392
+ "op": "holdings.transfer",
1393
+ "params": {
1394
+ "asset": {
1395
+ "admin": "cancore-registry::1220aa",
1396
+ "id": "CNRX"
1397
+ },
1398
+ "amount": "250.5",
1399
+ "toParty": "alice::1220f0e1d2c3b4a5968778695a4b3c2d1e0ff0e1d2c3b4a5968778695a4b3c2d1e0f"
1400
+ }
1401
+ }
1402
+ }
1403
+ ]
1404
+ },
1405
+ "canton.prepared": {
1406
+ "name": "canton.prepared",
1407
+ "title": "canton.prepared (S2F)",
1408
+ "payload": {
1409
+ "schemaFormat": "application/schema+json;version=draft-2020-12",
1410
+ "schema": {
1411
+ "$ref": "messages.schema.json#/$defs/canton.prepared"
1412
+ }
1413
+ },
1414
+ "examples": [
1415
+ {
1416
+ "name": "canton-prepared-1",
1417
+ "payload": {
1418
+ "type": "canton.prepared",
1419
+ "id": "g-19",
1420
+ "fillerId": "acme-markets",
1421
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1422
+ "sentAt": 1789990000200,
1423
+ "re": "cp-1",
1424
+ "operationId": "op-1",
1425
+ "op": "party.allocate",
1426
+ "legs": [
1427
+ {
1428
+ "legId": "topology-0",
1429
+ "kind": "topology",
1430
+ "hash": "0x12203d71f7c09428bb0f75651436e3a1c92b3a12490049882ff50711337cf5c9de0a",
1431
+ "topologyTransactions": [
1432
+ "CgMyLjESBTAuMC4x",
1433
+ "CgMyLjESBTAuMC4y"
1434
+ ]
1435
+ }
1436
+ ],
1437
+ "summary": {
1438
+ "partyId": "acme-markets::1220a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90",
1439
+ "publicKey": "0x1111111111111111111111111111111111111111111111111111111111111111",
1440
+ "hosting": {
1441
+ "participantUid": "PAR::cancore::1220c0ffee",
1442
+ "permission": "CONFIRMATION",
1443
+ "threshold": 1
1444
+ }
1445
+ },
1446
+ "expiresAt": 1789990300200
1447
+ }
1448
+ },
1449
+ {
1450
+ "name": "canton-prepared-2",
1451
+ "payload": {
1452
+ "type": "canton.prepared",
1453
+ "id": "g-20",
1454
+ "fillerId": "acme-markets",
1455
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1456
+ "sentAt": 1790000026300,
1457
+ "re": "cp-3",
1458
+ "operationId": "op-3",
1459
+ "op": "delivery.fill",
1460
+ "legs": [
1461
+ {
1462
+ "legId": "delivery-fill-0",
1463
+ "kind": "transaction",
1464
+ "hash": "0xf85381267321fc9b5122e45db048de3313dbc0dce8b36202673245d6c6d92840",
1465
+ "preparedTransaction": "CgMyLjESBTAuMC4x",
1466
+ "hashingSchemeVersion": "HASHING_SCHEME_VERSION_V2"
1467
+ }
1468
+ ],
1469
+ "summary": {
1470
+ "orderHash": "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
1471
+ "attempt": 2,
1472
+ "deliveryOrderCid": "00a1b2c3d4e5f6#fixture-delivery-order",
1473
+ "recipient": "alice::1220f0e1d2c3b4a5968778695a4b3c2d1e0ff0e1d2c3b4a5968778695a4b3c2d1e0f",
1474
+ "asset": {
1475
+ "admin": "cancore-registry::1220aa",
1476
+ "id": "CNRX"
1477
+ },
1478
+ "amount": "999.0",
1479
+ "repayTo": "0x0000000000000000000000003c44cdddb6a900fa2b585dd299e03d12fa4293bc",
1480
+ "validUntil": "1790000400",
1481
+ "inputHoldingCids": [
1482
+ "00h1",
1483
+ "00h2"
1484
+ ],
1485
+ "executeBefore": "1790000400",
1486
+ "transferFactoryCid": "00tf"
1487
+ },
1488
+ "expiresAt": 1790000326300
1489
+ }
1490
+ }
1491
+ ]
1492
+ },
1493
+ "canton.submit": {
1494
+ "name": "canton.submit",
1495
+ "title": "canton.submit (F2S)",
1496
+ "payload": {
1497
+ "schemaFormat": "application/schema+json;version=draft-2020-12",
1498
+ "schema": {
1499
+ "$ref": "messages.schema.json#/$defs/canton.submit"
1500
+ }
1501
+ },
1502
+ "examples": [
1503
+ {
1504
+ "name": "canton-submit-1",
1505
+ "payload": {
1506
+ "type": "canton.submit",
1507
+ "id": "cs-3",
1508
+ "fillerId": "acme-markets",
1509
+ "sentAt": 1790000027000,
1510
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1511
+ "operationId": "op-3",
1512
+ "signatures": [
1513
+ {
1514
+ "legId": "delivery-fill-0",
1515
+ "signature": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
1516
+ }
1517
+ ]
1518
+ }
1519
+ }
1520
+ ]
1521
+ },
1522
+ "canton.submitted": {
1523
+ "name": "canton.submitted",
1524
+ "title": "canton.submitted (S2F)",
1525
+ "payload": {
1526
+ "schemaFormat": "application/schema+json;version=draft-2020-12",
1527
+ "schema": {
1528
+ "$ref": "messages.schema.json#/$defs/canton.submitted"
1529
+ }
1530
+ },
1531
+ "examples": [
1532
+ {
1533
+ "name": "canton-submitted-1",
1534
+ "payload": {
1535
+ "type": "canton.submitted",
1536
+ "id": "g-21",
1537
+ "fillerId": "acme-markets",
1538
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1539
+ "sentAt": 1790000029000,
1540
+ "re": "cs-3",
1541
+ "operationId": "op-3",
1542
+ "op": "delivery.fill",
1543
+ "updateId": "1220ab0c",
1544
+ "result": {
1545
+ "receiptCid": "00c1d2"
1546
+ }
1547
+ }
1548
+ },
1549
+ {
1550
+ "name": "canton-submitted-2",
1551
+ "payload": {
1552
+ "type": "canton.submitted",
1553
+ "id": "g-22",
1554
+ "fillerId": "acme-markets",
1555
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1556
+ "sentAt": 1789990002000,
1557
+ "re": "cs-1",
1558
+ "operationId": "op-1",
1559
+ "op": "party.allocate",
1560
+ "result": {
1561
+ "partyId": "acme-markets::1220a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90"
1562
+ }
1563
+ }
1564
+ },
1565
+ {
1566
+ "name": "canton-submitted-3",
1567
+ "payload": {
1568
+ "type": "canton.submitted",
1569
+ "id": "g-23",
1570
+ "fillerId": "acme-markets",
1571
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1572
+ "sentAt": 1790001002000,
1573
+ "re": "cs-5",
1574
+ "operationId": "op-5",
1575
+ "op": "holdings.transfer",
1576
+ "updateId": "1220ab0d",
1577
+ "result": {
1578
+ "outcome": "PENDING",
1579
+ "transferInstructionCid": "00ti"
1580
+ }
1259
1581
  }
1260
1582
  }
1261
1583
  ]