@cancore/contracts 0.2.0-rc.21 → 0.2.0-rc.23

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.21",
3
+ "version": "0.2.0-rc.23",
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": {
@@ -66,7 +66,7 @@
66
66
  "futureEnumValue": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]*$", "description": "a value added to an open enum within v1 (V-2); the receiver treats it as OTHER/generic. Every protocol enum is `anyOf: [{enum: known values}, futureEnumValue]`" },
67
67
  "declineReason": {
68
68
  "anyOf": [
69
- { "enum": ["NO_INVENTORY", "RISK_LIMIT", "PRICE_MOVED", "PAUSED", "OTHER", "TICKET_SIGNER_UNKNOWN", "TICKET_MISMATCH", "TICKET_TTL_TOO_SHORT", "TICKET_ISSUED_LATE", "TICKET_BEYOND_DEADLINE", "ESCROW_NOT_OPEN", "ESCROW_MISMATCH", "PROOF_WINDOW_TOO_SHORT", "SKEW_MARGIN_TOO_SHORT", "DRAW_MISMATCH"] },
69
+ { "enum": ["NO_INVENTORY", "RISK_LIMIT", "PRICE_MOVED", "PAUSED", "OTHER", "TICKET_SIGNER_UNKNOWN", "TICKET_MISMATCH", "TICKET_TTL_TOO_SHORT", "TICKET_ISSUED_LATE", "TICKET_BEYOND_DEADLINE", "ESCROW_NOT_OPEN", "ESCROW_MISMATCH", "PROOF_WINDOW_TOO_SHORT", "SKEW_MARGIN_TOO_SHORT", "DRAW_MISMATCH", "RECIPIENT_NOT_READY"] },
70
70
  { "$ref": "#/$defs/futureEnumValue" }
71
71
  ]
72
72
  },
@@ -24,6 +24,7 @@
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
26
  { "method": "GET", "path": "/v1/filler/canton/intents/{orderHash}", "auth": "bearer", "response": "#/$defs/cantonIntent" },
27
+ { "method": "GET", "path": "/v1/filler/canton/recipient-readiness/{orderHash}", "auth": "bearer", "response": "#/$defs/cantonRecipientReadiness" },
27
28
  { "method": "GET", "path": "/v1/filler/routes", "auth": "bearer", "response": "messages.schema.json#/$defs/routes.state" },
28
29
  { "method": "POST", "path": "/v1/filler/routes", "auth": "bearer", "request": "messages.schema.json#/$defs/routes.set", "response": "messages.schema.json#/$defs/routes.state" }
29
30
  ],
@@ -209,9 +210,22 @@
209
210
  "required": ["items", "nextCursor"],
210
211
  "properties": { "items": { "type": "array", "items": { "$ref": "#/$defs/cantonDeliveryOrder" } }, "nextCursor": { "type": ["string", "null"] } }
211
212
  },
213
+ "cantonRecipientReadiness": {
214
+ "type": "object",
215
+ "description": "Whether the recipient of the caller party's live DeliveryOrder for orderHash accepts its instrument through the order's validUntil: Cancore's read of the recipient's transfer preapproval, the read trading's pre-ticket checks use. The node refuses a Canton-form ticket with RECIPIENT_NOT_READY when ready is false (fillers.md V-R1). 404 UNKNOWN_TICKET when no live DeliveryOrder with this orderHash names the party; 409 CANTON_NOT_READY when the fillerId has no party; 503 CANTON_UNAVAILABLE when the ledger cannot be read",
216
+ "required": ["orderHash", "deliveryOrderCid", "recipient", "asset", "ready", "reason"],
217
+ "properties": {
218
+ "orderHash": { "$ref": "messages.schema.json#/$defs/bytes32" },
219
+ "deliveryOrderCid": { "type": "string", "minLength": 1 },
220
+ "recipient": { "type": "string", "minLength": 1, "description": "DeliveryOrder.recipient" },
221
+ "asset": { "$ref": "messages.schema.json#/$defs/cantonAsset", "description": "DeliveryOrder.instrumentId" },
222
+ "ready": { "type": "boolean" },
223
+ "reason": { "anyOf": [{ "enum": ["RECIPIENT_NOT_READY", "INSTRUMENT_NOT_SUPPORTED", null] }, { "$ref": "messages.schema.json#/$defs/futureEnumValue" }], "description": "why not; null when ready" }
224
+ }
225
+ },
212
226
  "cantonIntent": {
213
227
  "type": "object",
214
- "description": "A live SwapIntent of a Canton source that names the caller's party as its filler, as that party sees it (an observer), with its committed allocation as the operator reads it (an executor). What the node checks before ticket.receipt (fillers.md V-C1…V-C6); the node recomputes orderHash from these fields itself. 404 UNKNOWN_TICKET when no live SwapIntent with this orderHash names the party; 409 CANTON_NOT_READY when the fillerId has no party",
228
+ "description": "A live SwapIntent of a Canton source that names the caller's party as its filler, as that party sees it (an observer), with its committed allocation as the operator reads it (an executor). What the node checks before ticket.receipt (fillers.md V-C1…V-C7); the node recomputes orderHash from these fields itself. 404 UNKNOWN_TICKET when no live SwapIntent with this orderHash names the party; 409 CANTON_NOT_READY when the fillerId has no party",
215
229
  "required": ["intentCid", "templateId", "orderHash", "owner", "operator", "filler", "fillerId", "requestId", "asset", "amount", "destination", "minReceived", "feeRate", "fillDeadline", "refundAfter", "orderCreatedAt", "allocationCid", "allocation"],
216
230
  "properties": {
217
231
  "intentCid": { "type": "string", "minLength": 1 },
@@ -247,6 +261,17 @@
247
261
  "allocation": {
248
262
  "anyOf": [{ "$ref": "#/$defs/cantonAllocation" }, { "type": "null" }],
249
263
  "description": "the contract allocationCid names, by its AllocationV2 view; null when it is not live"
264
+ },
265
+ "settlementFactory": {
266
+ "anyOf": [
267
+ {
268
+ "type": "object",
269
+ "required": ["contractId", "live"],
270
+ "properties": { "contractId": { "type": "string", "minLength": 1 }, "live": { "type": "boolean" } }
271
+ },
272
+ { "type": "null" }
273
+ ],
274
+ "description": "SwapIntent.settlementFactoryCid, the factory settle runs (CAN-3340), and whether it is the registry's current settlement factory, read as settle reads it (CAN-3408). The node refuses the ticket (V-C7) when it is not live, null or absent"
250
275
  }
251
276
  }
252
277
  },