@cancore/contracts 0.2.0-rc.21 → 0.2.0-rc.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -3
- package/dist/index.d.ts +26 -3
- package/dist/index.js +37 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/spec/protocol/messages.schema.json +1 -1
- package/spec/protocol/rest.schema.json +26 -1
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ helpers, the events); `ATTESTOR_SET_ABI` is the set on its own (`getAttestorSet`
|
|
|
61
61
|
`currentSetId`, `isMember`, `revokedAttestors`), which `CancoreRouter` inherits. A test pins what
|
|
62
62
|
the taker client relies on: those views and calls, the events `IntentOpened`, `Filled`,
|
|
63
63
|
`Settled` and `Refunded`, and the 12-field `Order` tuple in the order of `ORDER_TYPES`, whose
|
|
64
|
-
type hash is the router's `ORDER_TYPEHASH`. Router addresses are
|
|
64
|
+
type hash is the router's `ORDER_TYPEHASH`. Router addresses per environment are in `DEPLOYMENTS` (`router`, `routerBlock`).
|
|
65
65
|
|
|
66
66
|
### Orders, the Permit2 witness, the fee
|
|
67
67
|
|
|
@@ -352,7 +352,7 @@ On any difference it does not sign. The kind of a leg is closed: an unknown kind
|
|
|
352
352
|
`preapprovals`, the party's live transfer preapprovals),
|
|
353
353
|
`/holdings`, `/delivery-orders`, and `/intents/{orderHash}` — the live Canton-source `SwapIntent`
|
|
354
354
|
naming the party as its filler, with its committed allocation, which the node checks before
|
|
355
|
-
`ticket.receipt` (V-C1…V-
|
|
355
|
+
`ticket.receipt` (V-C1…V-C7; 404 `UNKNOWN_TICKET` when none names it). Refusals: `CANTON_NOT_READY` (409), `CANTON_REFUSED` (422),
|
|
356
356
|
`CANTON_UNAVAILABLE` (503, retry), `OPERATION_EXPIRED` (410, prepare again), plus
|
|
357
357
|
`UNKNOWN_TICKET`, `TICKET_CLOSED` and `NOT_ELIGIBLE` for an operation on someone else's ticket or party.
|
|
358
358
|
|
|
@@ -364,7 +364,8 @@ answers the new `routes.state`. A listed route that is not approved refuses the
|
|
|
364
364
|
`ROUTE_NOT_APPROVED` (403) and nothing changes. Both are REST only, rate class `service`.
|
|
365
365
|
|
|
366
366
|
`FILLER_GATEWAYS` is where the gateway key and the ticket signers of each environment are
|
|
367
|
-
published.
|
|
367
|
+
published. No gateway key exists yet; the ticket signers of devnet and testnet are the ones their
|
|
368
|
+
routers register.
|
|
368
369
|
|
|
369
370
|
## Reverts
|
|
370
371
|
|
|
@@ -465,6 +466,20 @@ Full documentation: <https://docs.cancore.io/sdk/contracts>
|
|
|
465
466
|
|
|
466
467
|
## Changes
|
|
467
468
|
|
|
469
|
+
- `0.2.0-rc.24` — the testnet intent routers (CAN-2529): `router` and `routerBlock` on every
|
|
470
|
+
`DEPLOYMENTS.testnet` row (Sepolia, BNB testnet, Arbitrum Sepolia, Robinhood testnet, Base Sepolia), and the
|
|
471
|
+
ticket signer they register in `FILLER_GATEWAYS.testnet.ticketSigners`. Additive.
|
|
472
|
+
- `0.2.0-rc.23` — the recipient of a Canton delivery (CAN-1867): decline reason
|
|
473
|
+
`RECIPIENT_NOT_READY` — the recipient of the order no longer accepts its instrument, so the filler
|
|
474
|
+
refuses the Canton-form ticket before `ticket.receipt` (never a violation of the filler). REST read
|
|
475
|
+
`GET /v1/filler/canton/recipient-readiness/{orderHash}` (`CantonRecipientReadiness`;
|
|
476
|
+
`$defs/cantonRecipientReadiness`): Cancore's read of that recipient's transfer preapproval for the
|
|
477
|
+
party's live `DeliveryOrder`, which the party cannot read on its own participant (V-R1). Additive.
|
|
478
|
+
- `0.2.0-rc.22` — `CantonIntent.settlementFactory` (CAN-3408): the settlement factory the owner
|
|
479
|
+
approved into the `SwapIntent` (CAN-3340) and `live`, whether it is still the registry's current
|
|
480
|
+
one, as settle reads it (`CantonSettlementFactory`; `$defs/cantonIntent.settlementFactory`).
|
|
481
|
+
Optional on the wire, so a filler-gateway without it still validates; the filler node refuses
|
|
482
|
+
the ticket without it (V-C7). Additive.
|
|
468
483
|
- `0.2.0-rc.21` — Base (CAN-3260): `NETWORKS.base` (8453) and `NETWORKS.base_sepolia` (84532),
|
|
469
484
|
and the Base Sepolia HTLC and MultiBalanceChecker of the dev stand in `DEPLOYMENTS.devnet` and
|
|
470
485
|
of the stage stand in `DEPLOYMENTS.testnet` (two independent deploys), and the Base mainnet HTLC
|
package/dist/index.d.ts
CHANGED
|
@@ -914,7 +914,7 @@ type WireAsset = Hex | {
|
|
|
914
914
|
admin: string;
|
|
915
915
|
id: string;
|
|
916
916
|
};
|
|
917
|
-
declare const DECLINE_REASONS: readonly ["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"];
|
|
917
|
+
declare const DECLINE_REASONS: readonly ["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"];
|
|
918
918
|
declare const ERROR_CODES: readonly ["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"];
|
|
919
919
|
/** HTTP status of each error code on the REST fallback. */
|
|
920
920
|
declare const ERROR_HTTP_STATUS: Readonly<Record<ErrorCode, number>>;
|
|
@@ -1563,10 +1563,16 @@ interface CantonAllocation {
|
|
|
1563
1563
|
settlementDeadline: DecString | null;
|
|
1564
1564
|
legs: CantonAllocationLeg[];
|
|
1565
1565
|
}
|
|
1566
|
+
/** The settlement factory the owner approved into the `SwapIntent` (CAN-3340), and whether it is still the registry's. */
|
|
1567
|
+
interface CantonSettlementFactory {
|
|
1568
|
+
contractId: string;
|
|
1569
|
+
/** The cid is the registry's current settlement factory, read as settle reads it (CAN-3408). */
|
|
1570
|
+
live: boolean;
|
|
1571
|
+
}
|
|
1566
1572
|
/**
|
|
1567
1573
|
* `GET /v1/filler/canton/intents/{orderHash}`: the live Canton-source `SwapIntent` naming the party as its
|
|
1568
1574
|
* filler, as that party sees it, and its committed allocation (null when not live). The node checks it
|
|
1569
|
-
* before `ticket.receipt` (fillers.md V-C1…V-
|
|
1575
|
+
* before `ticket.receipt` (fillers.md V-C1…V-C7) and recomputes `orderHash` from these fields itself.
|
|
1570
1576
|
*/
|
|
1571
1577
|
interface CantonIntent {
|
|
1572
1578
|
intentCid: string;
|
|
@@ -1597,6 +1603,23 @@ interface CantonIntent {
|
|
|
1597
1603
|
orderCreatedAt: DecString;
|
|
1598
1604
|
allocationCid: string;
|
|
1599
1605
|
allocation: CantonAllocation | null;
|
|
1606
|
+
/** Absent from a filler-gateway before CAN-3408: V-C7 refuses then, as for a factory that is not live. */
|
|
1607
|
+
settlementFactory?: CantonSettlementFactory | null;
|
|
1608
|
+
}
|
|
1609
|
+
/**
|
|
1610
|
+
* `GET /v1/filler/canton/recipient-readiness/{orderHash}`: whether the recipient of the party's live `DeliveryOrder`
|
|
1611
|
+
* for `orderHash` accepts its instrument through the order's `validUntil` — Cancore's read of the recipient's transfer
|
|
1612
|
+
* preapproval, the one trading's pre-ticket checks use. The party cannot read it on its own participant. The node
|
|
1613
|
+
* refuses a Canton-form ticket with `RECIPIENT_NOT_READY` when `ready` is false (fillers.md V-R1).
|
|
1614
|
+
*/
|
|
1615
|
+
interface CantonRecipientReadiness {
|
|
1616
|
+
orderHash: Hex;
|
|
1617
|
+
deliveryOrderCid: string;
|
|
1618
|
+
recipient: string;
|
|
1619
|
+
asset: CantonAsset;
|
|
1620
|
+
ready: boolean;
|
|
1621
|
+
/** Why not; null when ready. Open (V-2): an unknown value reads as not ready. */
|
|
1622
|
+
reason: 'RECIPIENT_NOT_READY' | 'INSTRUMENT_NOT_SUPPORTED' | (string & {}) | null;
|
|
1600
1623
|
}
|
|
1601
1624
|
interface DrawAttempt {
|
|
1602
1625
|
attempt: number;
|
|
@@ -1995,4 +2018,4 @@ declare const BYTECODE_HASHES: {
|
|
|
1995
2018
|
declare function describeRevert(selectorOrData: string, tables: ReadonlyArray<Readonly<Record<string, string>>>): string | undefined;
|
|
1996
2019
|
|
|
1997
2020
|
export { ASYNCAPI, BPS, BUILD_HASHES, BYTECODE_HASHES, CANTON_LEG_KINDS, CANTON_OPS, CANTON_ORIGIN_ID, CANTON_PARTICIPANTS, CANTON_REGISTRY_STATES, CANTON_SOURCE_ANCHOR, CANTON_TICKET_RECEIPT_TYPES, CANTON_TRANSFER_OUTCOMES, CONTRACTS_RELEASE, DAML_NUMERIC_SCALE, DECLINE_REASONS, DEPLOYMENTS, DRAND_QUICKNET, DRAW_CLOSED_BY, EIP2294_MAX_CHAIN_ID, ERROR_CODES, ERROR_HTTP_STATUS, EXEMPT_REASONS, EXPIRED_RESULTS, FEE_CLAIM_DOMAIN_NAME, FEE_CLAIM_DOMAIN_VERSION, FEE_CLAIM_TYPES, FILLER_AUTH_TYPES, FILLER_CLOSE_CODES, FILLER_GATEWAYS, FILLER_ID_PATTERN, FILLER_KEY_REGISTRATION_TYPES, FILLER_MESSAGE_TYPES, FILLER_PROTOCOL_DOMAIN, FILLER_QUOTE_TYPES, FILLER_UPGRADE_REFUSALS, FILLER_WS_BEARER_PREFIX, FILLER_WS_SUBPROTOCOL, FILL_PROOF_DOMAIN, FILL_PROOF_TYPES, FILL_PROOF_TYPE_STRING, FILL_TICKET_DOMAIN, FILL_TICKET_TYPES, GATEWAY_MESSAGE_TYPES, GRACE, INSTRUMENT_LABEL_TAG, MAX_FEE_BPS, MAX_FILL_TTL, MAX_PROOF_WINDOW, MAX_SIG_TTL, MESSAGE_DIRECTIONS, MIN_FILL_TTL, ORDER_TYPES, OWNER_LABEL_TAG, PENALTY_STEPS, PERMIT2_ADDRESS, PERMIT2_WITNESS_TYPE_STRING, PERMIT_WITNESS_TYPES, PROOF_KIND_ATTESTATION, PROTOCOL_SCHEMAS, PROTOCOL_VERSION, QUOTE_ACK_STATUSES, QUOTE_FINAL_STATUSES, QUOTE_TYPES, REST_ENDPOINTS, REST_ONLY_TYPES, SCHEMA_VOCABULARY, SET_DELAY, STAKE_BINDING_TYPES, TICKET_INTENT_TYPES, TICKET_LIST_STATUSES, TICKET_RECEIPT_TYPES, TICKET_REFUSED_REASONS, buildCantonSourceOrder, cantonInclusiveFeeSplit, cantonNetworkOfDestination, cantonSigEntries, cantonTicketReceipt, deliveryOrderCidHash, deploymentOf, describeRevert, drawValue, drawWinner, encodeCantonAmount, encodeCantonDestination, encodeCantonOutputAsset, encodeCantonRecipient, encodeType, evmAddressFromRepayTo, feeClaimDomain, fillProofDomain, fillerEnvelopeError, fillerIdHash, fillerMessageBodyHash, fillerWsProtocols, firstRoundAtOrAfter, gatewayBodyHash, hashCantonTicketReceipt, hashDomain, hashFillProof, hashFillTicket, hashFillerKeyRegistration, hashFillerMessage, hashFillerQuote, hashOrder, hashPermitWitness, hashStruct, hashTicketIntent, hashTypedData, inclusiveFeeSplit, isCantonOriginId, isCantonSource, isEoaSignature, isEvmRepayTo, jcs, messageIdRetainUntil, messageSchemaRef, permit2Domain, repayToFromEvm, repayToFromParty, requestIdHash, routerDomain, settleAttestationsErrors, settleAttestationsPayload, settleAttestationsPayloadHash, settleSigs, sourceOrderHash, typeHash };
|
|
1998
|
-
export type { AttestationCanton, AttestationEvm, AttestationsResponse, AuthChallenge, AuthOk, AuthResponse, AuthToken, CantonAllocation, CantonAllocationLeg, CantonAsset, CantonDeliveryOrder, CantonDeliveryOrderList, CantonHolding, CantonHoldingList, CantonIntent, CantonLeg, CantonLegKind, CantonLegTopology, CantonLegTransaction, CantonNetwork, CantonOp, CantonOpParams, CantonOpResult, CantonOpSummary, CantonParty, CantonPreapproval, CantonPrepare, CantonPrepared, CantonRegistryState, CantonSignature, CantonSourceIntent, CantonSourceOrder, CantonSubmit, CantonSubmitted, CantonTicketReceipt, ChallengeQuery, DecString, DeclineReason, DeploymentEnv, DrawAttempt, DrawCandidate, DrawClosedBy, DrawOutcome, DrawRecord, EpochLeaf, EpochRecord, EpochWeights, ErrorCode, ErrorF2S, ErrorMessage, EvmDeployment, ExemptReason, ExpiredResult, F2SBase, F2SEnvelope, F2SMessage, FeeClaim, FeeSplit, FillProof, FillProofJson, FillReported, FillTicket, FillerAuth, FillerCloseCode, FillerEnvelopeContext, FillerGateway, FillerKeyRegistration, FillerMessage, FillerQuote, FillerStats, GatewayInfo, GatewayMessage, Hex, JsonSchema, JsonValue, MessageDirection, Order, OrderDomain, OrderJson, OrderSettled, Page, PenaltyApplied, PenaltyList, PenaltyRecord, PenaltyStep, PermitWitness, Ping, PingF2S, PingS2F, Pong, PongF2S, PongS2F, Quote, QuoteAck, QuoteAckStatus, QuoteFinalStatus, QuoteList, QuoteMessage, QuoteReconfirm, QuoteReconfirmReply, QuoteRecord, QuoteRequest, RestEndpoint, RouteRef, RoutesSet, RoutesState, S2FBase, S2FMessage, SettleAttestations, SettleAttestationsPayload, SignedFillerKeyRegistration, StakeBinding, StakeBindingRequest, TicketDecline, TicketExpired, TicketIntent, TicketIntentAck, TicketIntentMessage, TicketIssued, TicketIssuedCanton, TicketIssuedEvm, TicketJson, TicketList, TicketOffer, TicketReceipt, TicketReceiptCanton, TicketReceiptEvm, TicketReceiptMessage, TicketRefusedReason, TimeMs, TypedDataDomain, TypedDataInput, TypedDataTypes, TypedField, TypedValue, UintLike, UnsignedErrorBody, WireAsset };
|
|
2021
|
+
export type { AttestationCanton, AttestationEvm, AttestationsResponse, AuthChallenge, AuthOk, AuthResponse, AuthToken, CantonAllocation, CantonAllocationLeg, CantonAsset, CantonDeliveryOrder, CantonDeliveryOrderList, CantonHolding, CantonHoldingList, CantonIntent, CantonLeg, CantonLegKind, CantonLegTopology, CantonLegTransaction, CantonNetwork, CantonOp, CantonOpParams, CantonOpResult, CantonOpSummary, CantonParty, CantonPreapproval, CantonPrepare, CantonPrepared, CantonRecipientReadiness, CantonRegistryState, CantonSettlementFactory, CantonSignature, CantonSourceIntent, CantonSourceOrder, CantonSubmit, CantonSubmitted, CantonTicketReceipt, ChallengeQuery, DecString, DeclineReason, DeploymentEnv, DrawAttempt, DrawCandidate, DrawClosedBy, DrawOutcome, DrawRecord, EpochLeaf, EpochRecord, EpochWeights, ErrorCode, ErrorF2S, ErrorMessage, EvmDeployment, ExemptReason, ExpiredResult, F2SBase, F2SEnvelope, F2SMessage, FeeClaim, FeeSplit, FillProof, FillProofJson, FillReported, FillTicket, FillerAuth, FillerCloseCode, FillerEnvelopeContext, FillerGateway, FillerKeyRegistration, FillerMessage, FillerQuote, FillerStats, GatewayInfo, GatewayMessage, Hex, JsonSchema, JsonValue, MessageDirection, Order, OrderDomain, OrderJson, OrderSettled, Page, PenaltyApplied, PenaltyList, PenaltyRecord, PenaltyStep, PermitWitness, Ping, PingF2S, PingS2F, Pong, PongF2S, PongS2F, Quote, QuoteAck, QuoteAckStatus, QuoteFinalStatus, QuoteList, QuoteMessage, QuoteReconfirm, QuoteReconfirmReply, QuoteRecord, QuoteRequest, RestEndpoint, RouteRef, RoutesSet, RoutesState, S2FBase, S2FMessage, SettleAttestations, SettleAttestationsPayload, SignedFillerKeyRegistration, StakeBinding, StakeBindingRequest, TicketDecline, TicketExpired, TicketIntent, TicketIntentAck, TicketIntentMessage, TicketIssued, TicketIssuedCanton, TicketIssuedEvm, TicketJson, TicketList, TicketOffer, TicketReceipt, TicketReceiptCanton, TicketReceiptEvm, TicketReceiptMessage, TicketRefusedReason, TimeMs, TypedDataDomain, TypedDataInput, TypedDataTypes, TypedField, TypedValue, UintLike, UnsignedErrorBody, WireAsset };
|
package/dist/index.js
CHANGED
|
@@ -14,12 +14,13 @@ var DEPLOYMENTS = {
|
|
|
14
14
|
{ network: "base", chainId: 8453, htlc: "0xB3f8BD762fa2a895Ba8Cd35142b7b82b8b413F76", htlcBlock: 53546156, multiBalanceChecker: "0xe025CcCDf82F4165633C6033B7F13690B16c8a84" }
|
|
15
15
|
],
|
|
16
16
|
testnet: [
|
|
17
|
-
|
|
18
|
-
{ network: "
|
|
19
|
-
{ network: "
|
|
20
|
-
{ network: "
|
|
17
|
+
// Routers: evm-contracts deployments/router/testnet/*.json (CAN-2529), verified on chain 2026-11-16.
|
|
18
|
+
{ network: "sepolia", chainId: 11155111, htlc: "0xc705C735278AEeF773acb6d1028D8A241D8a9556", htlcBlock: 10334457, multiBalanceChecker: "0x99182E3F18555CFB08e6443e68a11982eF686522", router: "0x47aB91BdE6fd3f64569F564bC16683Ca5F4e95E2", routerBlock: 12146929 },
|
|
19
|
+
{ network: "bnb_testnet", chainId: 97, htlc: "0x36D7BEBDB5f93b7b926D621E412132dF89628810", htlcBlock: 92435953, multiBalanceChecker: "0x079bDc94B34EC0e905DcfDB516bdE2f292Efcef2", router: "0x5738179f689072738637100f66a8aba8C0285106", routerBlock: 143053812 },
|
|
20
|
+
{ network: "arbitrum_sepolia", chainId: 421614, htlc: "0x07a6ccF1f0113e2329Bb2460b28eC0d169f5080E", htlcBlock: 245190705, multiBalanceChecker: "0x555Bef5d2f89Fc81c77b930AB6c0D6734bDE569e", router: "0xE730cAC55E115e578dF2057242ee30f70bCe27e5", routerBlock: 329760799 },
|
|
21
|
+
{ network: "robinhood_testnet", chainId: 46630, htlc: "0x5eBf3faAf3a86c37dDf6a46075b8366Ed4D8021A", htlcBlock: 96742769, multiBalanceChecker: "0x9548fd6fA8A3869b215E9D86F6a2628Bf2BEFB74", router: "0xEd5ee3476202510F62D8b1dec1e833834033fe3F", routerBlock: 154049182 },
|
|
21
22
|
// Base Sepolia stage stand (CAN-3263), deployed 2026-11-05 — its own set, not the dev stand's.
|
|
22
|
-
{ network: "base_sepolia", chainId: 84532, htlc: "0xfE77AE800F14c0D5cEF242960b3a720035E7aF12", htlcBlock: 54786694, multiBalanceChecker: "0xC649d578FD0122E2Ce3Bcf6b89E3ef2564d1a30D" }
|
|
23
|
+
{ network: "base_sepolia", chainId: 84532, htlc: "0xfE77AE800F14c0D5cEF242960b3a720035E7aF12", htlcBlock: 54786694, multiBalanceChecker: "0xC649d578FD0122E2Ce3Bcf6b89E3ef2564d1a30D", router: "0xBb6429843614fE4F81641B0404b7591Eae4275E8", routerBlock: 59527026 }
|
|
23
24
|
],
|
|
24
25
|
devnet: [
|
|
25
26
|
// Routers: evm-contracts deployments/router/dev/*.json (#120, CAN-2327), verified on chain 2026-10-14.
|
|
@@ -717,7 +718,8 @@ var FILLER_UPGRADE_REFUSALS = {
|
|
|
717
718
|
};
|
|
718
719
|
var FILLER_GATEWAYS = {
|
|
719
720
|
mainnet: { gateway: null, ticketSigners: [] },
|
|
720
|
-
|
|
721
|
+
// The ticket signer every testnet router registers (evm-contracts deployments/router/testnet/*.input.json, CAN-2529).
|
|
722
|
+
testnet: { gateway: null, ticketSigners: ["0xf00280bda2ec272d5a650e759a658d06f457d7e5"] },
|
|
721
723
|
// The ticket signer every dev router registers (evm-contracts deployments/router/dev/*.input.json, CAN-2331).
|
|
722
724
|
// The gateway key is published with the gateway release.
|
|
723
725
|
devnet: { gateway: null, ticketSigners: ["0x9a3fc3f44cddbdfb036a8c8a528a903d0c835c1c"] }
|
|
@@ -745,7 +747,8 @@ var DECLINE_REASONS = [
|
|
|
745
747
|
"ESCROW_MISMATCH",
|
|
746
748
|
"PROOF_WINDOW_TOO_SHORT",
|
|
747
749
|
"SKEW_MARGIN_TOO_SHORT",
|
|
748
|
-
"DRAW_MISMATCH"
|
|
750
|
+
"DRAW_MISMATCH",
|
|
751
|
+
"RECIPIENT_NOT_READY"
|
|
749
752
|
];
|
|
750
753
|
var ERROR_CODES = [
|
|
751
754
|
"BAD_REQUEST",
|
|
@@ -2535,7 +2538,7 @@ var messages_schema_default = {
|
|
|
2535
2538
|
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]`" },
|
|
2536
2539
|
declineReason: {
|
|
2537
2540
|
anyOf: [
|
|
2538
|
-
{ 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"] },
|
|
2541
|
+
{ 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"] },
|
|
2539
2542
|
{ $ref: "#/$defs/futureEnumValue" }
|
|
2540
2543
|
]
|
|
2541
2544
|
},
|
|
@@ -3579,6 +3582,7 @@ var rest_schema_default = {
|
|
|
3579
3582
|
{ method: "GET", path: "/v1/filler/canton/holdings", auth: "bearer", query: "#/$defs/pageQuery", response: "#/$defs/cantonHoldingList" },
|
|
3580
3583
|
{ method: "GET", path: "/v1/filler/canton/delivery-orders", auth: "bearer", query: "#/$defs/pageQuery", response: "#/$defs/cantonDeliveryOrderList" },
|
|
3581
3584
|
{ method: "GET", path: "/v1/filler/canton/intents/{orderHash}", auth: "bearer", response: "#/$defs/cantonIntent" },
|
|
3585
|
+
{ method: "GET", path: "/v1/filler/canton/recipient-readiness/{orderHash}", auth: "bearer", response: "#/$defs/cantonRecipientReadiness" },
|
|
3582
3586
|
{ method: "GET", path: "/v1/filler/routes", auth: "bearer", response: "messages.schema.json#/$defs/routes.state" },
|
|
3583
3587
|
{ method: "POST", path: "/v1/filler/routes", auth: "bearer", request: "messages.schema.json#/$defs/routes.set", response: "messages.schema.json#/$defs/routes.state" }
|
|
3584
3588
|
],
|
|
@@ -3781,9 +3785,22 @@ var rest_schema_default = {
|
|
|
3781
3785
|
required: ["items", "nextCursor"],
|
|
3782
3786
|
properties: { items: { type: "array", items: { $ref: "#/$defs/cantonDeliveryOrder" } }, nextCursor: { type: ["string", "null"] } }
|
|
3783
3787
|
},
|
|
3788
|
+
cantonRecipientReadiness: {
|
|
3789
|
+
type: "object",
|
|
3790
|
+
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",
|
|
3791
|
+
required: ["orderHash", "deliveryOrderCid", "recipient", "asset", "ready", "reason"],
|
|
3792
|
+
properties: {
|
|
3793
|
+
orderHash: { $ref: "messages.schema.json#/$defs/bytes32" },
|
|
3794
|
+
deliveryOrderCid: { type: "string", minLength: 1 },
|
|
3795
|
+
recipient: { type: "string", minLength: 1, description: "DeliveryOrder.recipient" },
|
|
3796
|
+
asset: { $ref: "messages.schema.json#/$defs/cantonAsset", description: "DeliveryOrder.instrumentId" },
|
|
3797
|
+
ready: { type: "boolean" },
|
|
3798
|
+
reason: { anyOf: [{ enum: ["RECIPIENT_NOT_READY", "INSTRUMENT_NOT_SUPPORTED", null] }, { $ref: "messages.schema.json#/$defs/futureEnumValue" }], description: "why not; null when ready" }
|
|
3799
|
+
}
|
|
3800
|
+
},
|
|
3784
3801
|
cantonIntent: {
|
|
3785
3802
|
type: "object",
|
|
3786
|
-
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\u2026V-
|
|
3803
|
+
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\u2026V-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",
|
|
3787
3804
|
required: ["intentCid", "templateId", "orderHash", "owner", "operator", "filler", "fillerId", "requestId", "asset", "amount", "destination", "minReceived", "feeRate", "fillDeadline", "refundAfter", "orderCreatedAt", "allocationCid", "allocation"],
|
|
3788
3805
|
properties: {
|
|
3789
3806
|
intentCid: { type: "string", minLength: 1 },
|
|
@@ -3819,6 +3836,17 @@ var rest_schema_default = {
|
|
|
3819
3836
|
allocation: {
|
|
3820
3837
|
anyOf: [{ $ref: "#/$defs/cantonAllocation" }, { type: "null" }],
|
|
3821
3838
|
description: "the contract allocationCid names, by its AllocationV2 view; null when it is not live"
|
|
3839
|
+
},
|
|
3840
|
+
settlementFactory: {
|
|
3841
|
+
anyOf: [
|
|
3842
|
+
{
|
|
3843
|
+
type: "object",
|
|
3844
|
+
required: ["contractId", "live"],
|
|
3845
|
+
properties: { contractId: { type: "string", minLength: 1 }, live: { type: "boolean" } }
|
|
3846
|
+
},
|
|
3847
|
+
{ type: "null" }
|
|
3848
|
+
],
|
|
3849
|
+
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"
|
|
3822
3850
|
}
|
|
3823
3851
|
}
|
|
3824
3852
|
},
|