@cancore/contracts 0.2.0-rc.15 → 0.2.0-rc.17

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.15",
3
+ "version": "0.2.0-rc.17",
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": {
@@ -1399,6 +1399,20 @@
1399
1399
  "toParty": "alice::1220f0e1d2c3b4a5968778695a4b3c2d1e0ff0e1d2c3b4a5968778695a4b3c2d1e0f"
1400
1400
  }
1401
1401
  }
1402
+ },
1403
+ {
1404
+ "name": "canton-prepare-6",
1405
+ "payload": {
1406
+ "type": "canton.prepare",
1407
+ "id": "cp-6",
1408
+ "fillerId": "acme-markets",
1409
+ "sentAt": 1789990200000,
1410
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1411
+ "op": "preapproval.create",
1412
+ "params": {
1413
+ "admin": "cancore-registry::1220aa"
1414
+ }
1415
+ }
1402
1416
  }
1403
1417
  ]
1404
1418
  },
@@ -1487,6 +1501,36 @@
1487
1501
  },
1488
1502
  "expiresAt": 1790000326300
1489
1503
  }
1504
+ },
1505
+ {
1506
+ "name": "canton-prepared-3",
1507
+ "payload": {
1508
+ "type": "canton.prepared",
1509
+ "id": "g-25",
1510
+ "fillerId": "acme-markets",
1511
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1512
+ "sentAt": 1789990200200,
1513
+ "re": "cp-6",
1514
+ "operationId": "op-6",
1515
+ "op": "preapproval.create",
1516
+ "legs": [
1517
+ {
1518
+ "legId": "preapproval-create-0",
1519
+ "kind": "transaction",
1520
+ "hash": "0x71bb89bb58a7348d8860b4a84b1e598fc03e1368f144ef24d1cc9e292a1be331",
1521
+ "preparedTransaction": "CgMyLjESBTAuMC4x",
1522
+ "hashingSchemeVersion": "HASHING_SCHEME_VERSION_V2"
1523
+ }
1524
+ ],
1525
+ "summary": {
1526
+ "party": "acme-markets::1220a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90",
1527
+ "admin": "cancore-registry::1220aa",
1528
+ "instrumentAllowances": [],
1529
+ "requestedAt": "1789990200",
1530
+ "executeBefore": "1821526200"
1531
+ },
1532
+ "expiresAt": 1789990500200
1533
+ }
1490
1534
  }
1491
1535
  ]
1492
1536
  },
@@ -1579,6 +1623,23 @@
1579
1623
  "transferInstructionCid": "00ti"
1580
1624
  }
1581
1625
  }
1626
+ },
1627
+ {
1628
+ "name": "canton-submitted-4",
1629
+ "payload": {
1630
+ "type": "canton.submitted",
1631
+ "id": "g-26",
1632
+ "fillerId": "acme-markets",
1633
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
1634
+ "sentAt": 1789990202000,
1635
+ "re": "cs-6",
1636
+ "operationId": "op-6",
1637
+ "op": "preapproval.create",
1638
+ "updateId": "1220ab0e",
1639
+ "result": {
1640
+ "preapprovalCid": "00pa"
1641
+ }
1642
+ }
1582
1643
  }
1583
1644
  ]
1584
1645
  }
@@ -72,7 +72,7 @@
72
72
  },
73
73
  "errorCode": {
74
74
  "anyOf": [
75
- { "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", "CANTON_NOT_READY", "CANTON_REFUSED", "CANTON_UNAVAILABLE", "OPERATION_EXPIRED"] },
75
+ { "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", "CANTON_NOT_READY", "CANTON_REFUSED", "CANTON_UNAVAILABLE", "OPERATION_EXPIRED", "ROUTE_NOT_APPROVED"] },
76
76
  { "$ref": "#/$defs/futureEnumValue" }
77
77
  ]
78
78
  },
@@ -540,9 +540,9 @@
540
540
  }
541
541
  },
542
542
  "cantonOp": {
543
- "description": "A Canton operation of the filler's own external party on the Cancore participant (protocol §3.19): the backend prepares and submits it, the node signs it with its party key and never talks to a Ledger API. party.allocate creates the party (topology); registry.accept accepts the FillerRegistryEntryProposal of the fillerId; delivery.fill exercises DeliveryOrder_Fill of a Canton ticket issued to the filler; intent.settle exercises SwapIntent_SettleWithProof of a Canton-source order the filler delivered; holdings.transfer moves the party's own holdings to a party it names (TransferFactory_Transfer)",
543
+ "description": "A Canton operation of the filler's own external party on the Cancore participant (protocol §3.19): the backend prepares and submits it, the node signs it with its party key and never talks to a Ledger API. party.allocate creates the party (topology); registry.accept accepts the FillerRegistryEntryProposal of the fillerId; delivery.fill exercises DeliveryOrder_Fill of a Canton ticket issued to the filler; intent.settle exercises SwapIntent_SettleWithProof of a Canton-source order the filler delivered; holdings.transfer moves the party's own holdings to a party it names (TransferFactory_Transfer); preapproval.create gives the party a transfer preapproval with the registry of an instrument admin, so transfers to it complete at once",
544
544
  "anyOf": [
545
- { "enum": ["party.allocate", "registry.accept", "delivery.fill", "intent.settle", "holdings.transfer"] },
545
+ { "enum": ["party.allocate", "registry.accept", "delivery.fill", "intent.settle", "holdings.transfer", "preapproval.create"] },
546
546
  { "type": "string", "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$" }
547
547
  ]
548
548
  },
@@ -598,7 +598,7 @@
598
598
  "canton.prepare": {
599
599
  "x-direction": "F2S",
600
600
  "type": "object",
601
- "description": "Prepare a Canton operation of the sender's own party (§3.19); answered by canton.prepared (re = this id) or error. params select the operation only: the backend picks every contract itself (holdings, delivery order, intent, registry entry, disclosed contracts, attestor signatures). Admission: party.allocate — the fillerId has no party yet, or this key's party; registry.accept — a proposal for the fillerId and its party is live; delivery.fill — an ISSUED Canton ticket of this filler for (orderHash, attempt), before validUntil; intent.settle — a Canton-source order this filler delivered, with attestations held; holdings.transfer — enough unlocked holdings of the asset beyond what the party's open delivery orders need, to a party other than its own. Each prepare prepares afresh and replaces the filler's open operation of the same op and target",
601
+ "description": "Prepare a Canton operation of the sender's own party (§3.19); answered by canton.prepared (re = this id) or error. params select the operation only: the backend picks every contract itself (holdings, delivery order, intent, registry entry, disclosed contracts, attestor signatures). Admission: party.allocate — the fillerId has no party yet, or this key's party; registry.accept — a proposal for the fillerId and its party is live; delivery.fill — an ISSUED Canton ticket of this filler for (orderHash, attempt), before validUntil; intent.settle — a Canton-source order this filler delivered, with attestations held; holdings.transfer — enough unlocked holdings of the asset beyond what the party's open delivery orders need, to a party other than its own; preapproval.create — a registry admin Cancore serves and no live preapproval of the party with it. Each prepare prepares afresh and replaces the filler's open operation of the same op and target",
602
602
  "allOf": [
603
603
  { "$ref": "#/$defs/f2sBase" },
604
604
  {
@@ -652,6 +652,20 @@
652
652
  }
653
653
  }
654
654
  }
655
+ },
656
+ {
657
+ "if": { "type": "object", "properties": { "op": { "const": "preapproval.create" } }, "required": ["op"] },
658
+ "then": {
659
+ "type": "object",
660
+ "required": ["params"],
661
+ "properties": {
662
+ "params": {
663
+ "type": "object",
664
+ "required": ["admin"],
665
+ "properties": { "admin": { "type": "string", "minLength": 1, "maxLength": 255, "description": "the instrument admin whose registry the preapproval is with" } }
666
+ }
667
+ }
668
+ }
655
669
  }
656
670
  ],
657
671
  "required": ["type", "op", "params"],
@@ -812,6 +826,26 @@
812
826
  }
813
827
  }
814
828
  }
829
+ },
830
+ {
831
+ "if": { "type": "object", "properties": { "op": { "const": "preapproval.create" } }, "required": ["op"] },
832
+ "then": {
833
+ "type": "object",
834
+ "required": ["summary"],
835
+ "properties": {
836
+ "summary": {
837
+ "type": "object",
838
+ "required": ["party", "admin", "instrumentAllowances", "requestedAt", "executeBefore"],
839
+ "properties": {
840
+ "party": { "type": "string", "minLength": 1, "description": "the receiver: the filler's own party" },
841
+ "admin": { "type": "string", "minLength": 1, "description": "the registry's instrument admin, as asked" },
842
+ "instrumentAllowances": { "type": "array", "maxItems": 10, "items": { "type": "string", "minLength": 1 }, "description": "instrument ids it is limited to; empty: every instrument of the admin" },
843
+ "requestedAt": { "$ref": "#/$defs/timeS", "description": "unix s: the Daml Time (microseconds) cut to whole seconds" },
844
+ "executeBefore": { "$ref": "#/$defs/timeS", "description": "unix s, cut likewise: the preapproval expires then" }
845
+ }
846
+ }
847
+ }
848
+ }
815
849
  }
816
850
  ],
817
851
  "required": ["type", "re", "operationId", "op", "legs", "summary", "expiresAt"],
@@ -890,6 +924,14 @@
890
924
  }
891
925
  }
892
926
  }
927
+ },
928
+ {
929
+ "if": { "type": "object", "properties": { "op": { "const": "preapproval.create" } }, "required": ["op"] },
930
+ "then": {
931
+ "type": "object",
932
+ "required": ["result"],
933
+ "properties": { "result": { "type": "object", "required": ["preapprovalCid"], "properties": { "preapprovalCid": { "type": "string", "minLength": 1 } } } }
934
+ }
893
935
  }
894
936
  ],
895
937
  "required": ["type", "re", "operationId", "op", "result"],
@@ -901,6 +943,44 @@
901
943
  "updateId": { "type": "string", "minLength": 1 },
902
944
  "result": { "type": "object" }
903
945
  }
946
+ },
947
+ "routeRef": {
948
+ "type": "object",
949
+ "description": "A route of the catalogue (GET /v1/intents/routes): CAIP-2 source and destination",
950
+ "required": ["src", "dst"],
951
+ "properties": { "src": { "$ref": "#/$defs/caip2" }, "dst": { "$ref": "#/$defs/caip2" } }
952
+ },
953
+ "routes.set": {
954
+ "x-direction": "F2S",
955
+ "x-rest-only": true,
956
+ "type": "object",
957
+ "description": "The routes the filler serves from now on (protocol §3.20): the body of POST /v1/filler/routes. The full list: a route Cancore approved for the filler and not listed here is switched off, a listed one switched on. Every listed route must be approved for the filler (filler_routes enabled by staff), else the whole request is refused ROUTE_NOT_APPROVED and nothing changes. An empty list switches every route off",
958
+ "allOf": [{ "$ref": "#/$defs/f2sBase" }],
959
+ "required": ["type", "routes"],
960
+ "properties": {
961
+ "type": { "const": "routes.set" },
962
+ "routes": { "type": "array", "maxItems": 50, "uniqueItems": true, "items": { "$ref": "#/$defs/routeRef" } }
963
+ }
964
+ },
965
+ "routes.state": {
966
+ "x-direction": "S2F",
967
+ "x-rest-only": true,
968
+ "type": "object",
969
+ "description": "Every route Cancore approved for the filler and whether the filler serves it now (active): the 200 body of GET and POST /v1/filler/routes. The filler is asked for quotes on a route only while it is approved and active",
970
+ "allOf": [{ "$ref": "#/$defs/s2fBase" }],
971
+ "required": ["type", "routes"],
972
+ "properties": {
973
+ "type": { "const": "routes.state" },
974
+ "routes": {
975
+ "type": "array",
976
+ "items": {
977
+ "allOf": [{ "$ref": "#/$defs/routeRef" }],
978
+ "type": "object",
979
+ "required": ["active"],
980
+ "properties": { "active": { "type": "boolean" } }
981
+ }
982
+ }
983
+ }
904
984
  }
905
985
  }
906
986
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://cancore.io/schemas/filler-protocol/v1/rest.schema.json",
4
4
  "title": "Cancore filler protocol v1 — REST fallback",
5
- "$comment": "protocol §3.6. Bodies are the WebSocket frames: every request body is a filler message with its envelope (id, fillerId, sentAt) and msgSig, verified before processing as on the WebSocket (S-19); every response is a freshly signed S→F message. Login: GET /v1/filler/auth/challenge?fillerId= returns a signed auth.challenge addressed to that fillerId; POST /v1/filler/auth with the auth.response (FillerAuth over it) returns {token, expiresAt}. The challenge route is anonymous and its refusals are UNSIGNED (unsignedErrorBody, no sig, nothing journalled): 400 BAD_REQUEST — fillerId missing or not a fillerId; 404 UNKNOWN_REQUEST — fillerId unknown or not ACTIVE; the anonymous login steps are charged to no fillerId's rate limits (knowing a fillerId cannot lock its filler out); a 429 here comes only from the per-IP limit in front of filler-gateway. POST /v1/filler/auth refuses UNSIGNED too as long as it has checked no signature: 400 BAD_REQUEST — no or a malformed fillerId; 404 UNKNOWN_REQUEST — fillerId unknown or not ACTIVE; 401 UNAUTHENTICATED — the fillerId holds no live challenge (evicted, expired or used: ask for a new one). Its refusals after the signature checks (BAD_SIGNATURE, STALE_MESSAGE, REPLAYED_MESSAGE, UNSUPPORTED_VERSION, NOT_ELIGIBLE, UNAUTHENTICATED) are the signed error. The other /v1/filler/* routes need `Authorization: Bearer <token>`; the token is bound to (fillerId, message key) and stops working when it expires, when the message key is changed, or when the filler is no longer ACTIVE. The same token opens the WebSocket (asyncapi.json: offered as the subprotocol bearer.<token>). A ticket of another filler is 404 UNKNOWN_TICKET. Rate limits are per fillerId and rate class (quote, ticket, service, read for every bearer GET, login, cantonPrepare for canton.prepare of §3.19 — an hourly budget per filler, 60 by default — and canton for canton.submit, so a spent prepare budget never holds back the submit of an operation already prepared), shared by REST and every WebSocket session of it: over the limit a bearer route answers 429 with an UNSIGNED unsignedErrorBody {type: error, code: RATE_LIMITED, message, retryAfterMs} and a Retry-After header (seconds, rounded up), journals nothing one by one, and the request changes nothing; during the cooldown after sustained excess every bearer route answers so. Every 429 is unsigned, on every route; a filler decides by the status and takes retryAfterMs (else Retry-After) as a hint. Every other non-2xx of a bearer route is the signed error. GET /v1/filler/attestations/{orderHash} answers 404 ATTESTATIONS_NOT_READY until the gateway holds ≥ threshold verified signatures for this filler's fill, and 404 UNKNOWN_TICKET when this filler holds no ticket on the order. /v1/filler/canton/* (§3.19) serve only the caller's own party: POST prepare and submit take the canton.prepare and canton.submit messages and answer canton.prepared and canton.submitted (the same frames as on the WebSocket); GET party, holdings, delivery-orders and intents/{orderHash} read the party registered for the fillerId, and answer 409 CANTON_NOT_READY while it has none; intents/{orderHash} answers 404 UNKNOWN_TICKET when no live SwapIntent with that orderHash names the party. /v1/draws/* and /v1/gateway are public. Every non-2xx body is the signed `error` frame, with the HTTP status of x-error-status — except a 429 (always unsignedErrorBody) and the unsigned refusals of an endpoint that names an errorBody. x-endpoints: request/query/response/errorBody name a $def here or in messages.schema.json.",
5
+ "$comment": "protocol §3.6. Bodies are the WebSocket frames: every request body is a filler message with its envelope (id, fillerId, sentAt) and msgSig, verified before processing as on the WebSocket (S-19); every response is a freshly signed S→F message. Login: GET /v1/filler/auth/challenge?fillerId= returns a signed auth.challenge addressed to that fillerId; POST /v1/filler/auth with the auth.response (FillerAuth over it) returns {token, expiresAt}. The challenge route is anonymous and its refusals are UNSIGNED (unsignedErrorBody, no sig, nothing journalled): 400 BAD_REQUEST — fillerId missing or not a fillerId; 404 UNKNOWN_REQUEST — fillerId unknown or not ACTIVE; the anonymous login steps are charged to no fillerId's rate limits (knowing a fillerId cannot lock its filler out); a 429 here comes only from the per-IP limit in front of filler-gateway. POST /v1/filler/auth refuses UNSIGNED too as long as it has checked no signature: 400 BAD_REQUEST — no or a malformed fillerId; 404 UNKNOWN_REQUEST — fillerId unknown or not ACTIVE; 401 UNAUTHENTICATED — the fillerId holds no live challenge (evicted, expired or used: ask for a new one). Its refusals after the signature checks (BAD_SIGNATURE, STALE_MESSAGE, REPLAYED_MESSAGE, UNSUPPORTED_VERSION, NOT_ELIGIBLE, UNAUTHENTICATED) are the signed error. The other /v1/filler/* routes need `Authorization: Bearer <token>`; the token is bound to (fillerId, message key) and stops working when it expires, when the message key is changed, or when the filler is no longer ACTIVE. The same token opens the WebSocket (asyncapi.json: offered as the subprotocol bearer.<token>). A ticket of another filler is 404 UNKNOWN_TICKET. Rate limits are per fillerId and rate class (quote, ticket, service, read for every bearer GET, login, cantonPrepare for canton.prepare of §3.19 — an hourly budget per filler, 60 by default — and canton for canton.submit, so a spent prepare budget never holds back the submit of an operation already prepared), shared by REST and every WebSocket session of it: over the limit a bearer route answers 429 with an UNSIGNED unsignedErrorBody {type: error, code: RATE_LIMITED, message, retryAfterMs} and a Retry-After header (seconds, rounded up), journals nothing one by one, and the request changes nothing; during the cooldown after sustained excess every bearer route answers so. Every 429 is unsigned, on every route; a filler decides by the status and takes retryAfterMs (else Retry-After) as a hint. Every other non-2xx of a bearer route is the signed error. GET /v1/filler/attestations/{orderHash} answers 404 ATTESTATIONS_NOT_READY until the gateway holds ≥ threshold verified signatures for this filler's fill, and 404 UNKNOWN_TICKET when this filler holds no ticket on the order. /v1/filler/canton/* (§3.19) serve only the caller's own party: POST prepare and submit take the canton.prepare and canton.submit messages and answer canton.prepared and canton.submitted (the same frames as on the WebSocket); GET party, holdings, delivery-orders and intents/{orderHash} read the party registered for the fillerId, and answer 409 CANTON_NOT_READY while it has none; intents/{orderHash} answers 404 UNKNOWN_TICKET when no live SwapIntent with that orderHash names the party. /v1/filler/routes (§3.20): GET answers routes.state, every route Cancore approved for the filler and whether the filler serves it; POST takes routes.set, the full list of routes the filler serves from now on, applied at once and audited, and answers the new routes.state; a listed route that is not approved for the filler refuses the whole request 403 ROUTE_NOT_APPROVED (its message names the routes) and changes nothing; rate class service. /v1/draws/* and /v1/gateway are public. Every non-2xx body is the signed `error` frame, with the HTTP status of x-error-status — except a 429 (always unsignedErrorBody) and the unsigned refusals of an endpoint that names an errorBody. x-endpoints: request/query/response/errorBody name a $def here or in messages.schema.json.",
6
6
  "x-endpoints": [
7
7
  { "method": "GET", "path": "/v1/filler/auth/challenge", "auth": "none", "query": "#/$defs/challengeQuery", "response": "messages.schema.json#/$defs/auth.challenge", "errorBody": "#/$defs/unsignedErrorBody" },
8
8
  { "method": "POST", "path": "/v1/filler/auth", "auth": "none", "request": "messages.schema.json#/$defs/auth.response", "response": "#/$defs/authToken", "errorBody": "#/$defs/unsignedErrorBody" },
@@ -23,12 +23,14 @@
23
23
  { "method": "GET", "path": "/v1/filler/canton/party", "auth": "bearer", "response": "#/$defs/cantonParty" },
24
24
  { "method": "GET", "path": "/v1/filler/canton/holdings", "auth": "bearer", "query": "#/$defs/pageQuery", "response": "#/$defs/cantonHoldingList" },
25
25
  { "method": "GET", "path": "/v1/filler/canton/delivery-orders", "auth": "bearer", "query": "#/$defs/pageQuery", "response": "#/$defs/cantonDeliveryOrderList" },
26
- { "method": "GET", "path": "/v1/filler/canton/intents/{orderHash}", "auth": "bearer", "response": "#/$defs/cantonIntent" }
26
+ { "method": "GET", "path": "/v1/filler/canton/intents/{orderHash}", "auth": "bearer", "response": "#/$defs/cantonIntent" },
27
+ { "method": "GET", "path": "/v1/filler/routes", "auth": "bearer", "response": "messages.schema.json#/$defs/routes.state" },
28
+ { "method": "POST", "path": "/v1/filler/routes", "auth": "bearer", "request": "messages.schema.json#/$defs/routes.set", "response": "messages.schema.json#/$defs/routes.state" }
27
29
  ],
28
30
  "x-error-status": {
29
31
  "BAD_REQUEST": 400, "UNAUTHENTICATED": 401, "UNSUPPORTED_VERSION": 400, "UNSUPPORTED_TYPE": 400, "BAD_SIGNATURE": 422,
30
32
  "STALE_MESSAGE": 400, "REPLAYED_MESSAGE": 409, "TICKET_REFUSED": 409, "UNKNOWN_REQUEST": 404, "UNKNOWN_TICKET": 404, "TICKET_CLOSED": 409, "NOT_ELIGIBLE": 403, "RATE_LIMITED": 429, "INTERNAL": 500,
31
- "ATTESTATIONS_NOT_READY": 404, "CANTON_NOT_READY": 409, "CANTON_REFUSED": 422, "CANTON_UNAVAILABLE": 503, "OPERATION_EXPIRED": 410
33
+ "ATTESTATIONS_NOT_READY": 404, "CANTON_NOT_READY": 409, "CANTON_REFUSED": 422, "CANTON_UNAVAILABLE": 503, "OPERATION_EXPIRED": 410, "ROUTE_NOT_APPROVED": 403
32
34
  },
33
35
  "$defs": {
34
36
  "errorBody": { "$ref": "messages.schema.json#/$defs/errorS2F" },
@@ -151,6 +153,20 @@
151
153
  "proposalCid": { "type": ["string", "null"] },
152
154
  "entryCid": { "type": ["string", "null"] }
153
155
  }
156
+ },
157
+ "preapprovals": {
158
+ "type": "array",
159
+ "description": "the party's live transfer preapprovals (preapproval.create), at most one per registry admin; absent from a gateway that predates them",
160
+ "items": {
161
+ "type": "object",
162
+ "required": ["admin", "contractId", "instrumentAllowances", "executeBefore"],
163
+ "properties": {
164
+ "admin": { "type": "string", "minLength": 1 },
165
+ "contractId": { "type": "string", "minLength": 1 },
166
+ "instrumentAllowances": { "type": "array", "maxItems": 10, "items": { "type": "string", "minLength": 1 } },
167
+ "executeBefore": { "$ref": "messages.schema.json#/$defs/timeS", "description": "unix s: the Daml Time (microseconds) cut to whole seconds; the preapproval expires then" }
168
+ }
169
+ }
154
170
  }
155
171
  }
156
172
  },
@@ -522,6 +522,17 @@
522
522
  "amount": "250.5",
523
523
  "toParty": "alice::1220f0e1d2c3b4a5968778695a4b3c2d1e0ff0e1d2c3b4a5968778695a4b3c2d1e0f"
524
524
  }
525
+ },
526
+ {
527
+ "type": "canton.prepare",
528
+ "id": "cp-6",
529
+ "fillerId": "acme-markets",
530
+ "sentAt": 1789990200000,
531
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
532
+ "op": "preapproval.create",
533
+ "params": {
534
+ "admin": "cancore-registry::1220aa"
535
+ }
525
536
  }
526
537
  ],
527
538
  "canton.prepared": [
@@ -594,6 +605,33 @@
594
605
  "transferFactoryCid": "00tf"
595
606
  },
596
607
  "expiresAt": 1790000326300
608
+ },
609
+ {
610
+ "type": "canton.prepared",
611
+ "id": "g-25",
612
+ "fillerId": "acme-markets",
613
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
614
+ "sentAt": 1789990200200,
615
+ "re": "cp-6",
616
+ "operationId": "op-6",
617
+ "op": "preapproval.create",
618
+ "legs": [
619
+ {
620
+ "legId": "preapproval-create-0",
621
+ "kind": "transaction",
622
+ "hash": "0x71bb89bb58a7348d8860b4a84b1e598fc03e1368f144ef24d1cc9e292a1be331",
623
+ "preparedTransaction": "CgMyLjESBTAuMC4x",
624
+ "hashingSchemeVersion": "HASHING_SCHEME_VERSION_V2"
625
+ }
626
+ ],
627
+ "summary": {
628
+ "party": "acme-markets::1220a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90",
629
+ "admin": "cancore-registry::1220aa",
630
+ "instrumentAllowances": [],
631
+ "requestedAt": "1789990200",
632
+ "executeBefore": "1821526200"
633
+ },
634
+ "expiresAt": 1789990500200
597
635
  }
598
636
  ],
599
637
  "canton.submit": [
@@ -654,6 +692,66 @@
654
692
  "outcome": "PENDING",
655
693
  "transferInstructionCid": "00ti"
656
694
  }
695
+ },
696
+ {
697
+ "type": "canton.submitted",
698
+ "id": "g-26",
699
+ "fillerId": "acme-markets",
700
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
701
+ "sentAt": 1789990202000,
702
+ "re": "cs-6",
703
+ "operationId": "op-6",
704
+ "op": "preapproval.create",
705
+ "updateId": "1220ab0e",
706
+ "result": {
707
+ "preapprovalCid": "00pa"
708
+ }
709
+ }
710
+ ],
711
+ "routes.set": [
712
+ {
713
+ "type": "routes.set",
714
+ "id": "rs-1",
715
+ "fillerId": "acme-markets",
716
+ "sentAt": 1789995000000,
717
+ "msgSig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
718
+ "routes": [
719
+ {
720
+ "src": "eip155:56",
721
+ "dst": "eip155:1"
722
+ },
723
+ {
724
+ "src": "eip155:1",
725
+ "dst": "canton:devnet"
726
+ }
727
+ ]
728
+ }
729
+ ],
730
+ "routes.state": [
731
+ {
732
+ "type": "routes.state",
733
+ "id": "g-24",
734
+ "fillerId": "acme-markets",
735
+ "sig": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001b",
736
+ "sentAt": 1789995000200,
737
+ "re": "rs-1",
738
+ "routes": [
739
+ {
740
+ "src": "eip155:56",
741
+ "dst": "eip155:1",
742
+ "active": true
743
+ },
744
+ {
745
+ "src": "eip155:1",
746
+ "dst": "canton:devnet",
747
+ "active": true
748
+ },
749
+ {
750
+ "src": "canton:devnet",
751
+ "dst": "eip155:1",
752
+ "active": false
753
+ }
754
+ ]
657
755
  }
658
756
  ],
659
757
  "settle.attestations": [