@cancore/contracts 0.2.0-rc.13 → 0.2.0-rc.15
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 +19 -9
- package/dist/index.d.ts +72 -3
- package/dist/index.js +83 -7
- package/dist/index.js.map +1 -1
- package/dist/networks.d.ts +2 -1
- package/package.json +1 -1
- package/spec/constants.json +1 -1
- package/spec/protocol/asyncapi.json +1 -1
- package/spec/protocol/messages.schema.json +1 -1
- package/spec/protocol/rest.schema.json +72 -2
- package/spec/protocol/vectors/messages.json +1 -1
package/README.md
CHANGED
|
@@ -346,7 +346,9 @@ other leg is the fee to the operator — against the intent it delivered for.
|
|
|
346
346
|
|
|
347
347
|
On any difference it does not sign. The kind of a leg is closed: an unknown kind is refused. Submit is idempotent per `operationId`. REST: `POST /v1/filler/canton/prepare`,
|
|
348
348
|
`POST /v1/filler/canton/submit`; reads of the own party: `GET /v1/filler/canton/party`,
|
|
349
|
-
`/holdings`, `/delivery-orders
|
|
349
|
+
`/holdings`, `/delivery-orders`, and `/intents/{orderHash}` — the live Canton-source `SwapIntent`
|
|
350
|
+
naming the party as its filler, with its committed allocation, which the node checks before
|
|
351
|
+
`ticket.receipt` (V-C1…V-C6; 404 `UNKNOWN_TICKET` when none names it). Refusals: `CANTON_NOT_READY` (409), `CANTON_REFUSED` (422),
|
|
350
352
|
`CANTON_UNAVAILABLE` (503, retry), `OPERATION_EXPIRED` (410, prepare again), plus
|
|
351
353
|
`UNKNOWN_TICKET`, `TICKET_CLOSED` and `NOT_ELIGIBLE` for an operation on someone else's ticket or party.
|
|
352
354
|
|
|
@@ -433,14 +435,11 @@ source provenance.
|
|
|
433
435
|
its `HEAD` as `CONTRACTS_RELEASE.commit` and refuses a directory that is not a checkout root or
|
|
434
436
|
has uncommitted changes, so the release cannot name a commit its data did not come from.
|
|
435
437
|
|
|
436
|
-
EVM
|
|
437
|
-
[
|
|
438
|
-
[#
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
as recorded by `CONTRACTS_RELEASE.commit` and `spec/constants.json`. Before publishing
|
|
442
|
-
rc.10, merge SDK [#91](https://github.com/Cancore-io/sdk/pull/91) and pass its checks.
|
|
443
|
-
For every subsequent upstream change, run the full sync from a clean checkout of the
|
|
438
|
+
This snapshot is fully synced from the clean, merged EVM `main` commit
|
|
439
|
+
[`2f681b9`](https://github.com/Cancore-io/evm-contracts/commit/2f681b9bb74db55c0fe9fec31282bca54b997985)
|
|
440
|
+
(EVM [#120](https://github.com/Cancore-io/evm-contracts/pull/120), the dev router records), as recorded
|
|
441
|
+
by `CONTRACTS_RELEASE.commit` and `spec/constants.json`. For every subsequent upstream change, run
|
|
442
|
+
the full sync from a clean checkout of the
|
|
444
443
|
actual merged `main` commit, commit the resulting pins, and rerun the checks before
|
|
445
444
|
publishing. This resync is mandatory for merge, squash and rebase alike.
|
|
446
445
|
|
|
@@ -455,6 +454,17 @@ Full documentation: <https://docs.cancore.io/sdk/contracts>
|
|
|
455
454
|
|
|
456
455
|
## Changes
|
|
457
456
|
|
|
457
|
+
- `0.2.0-rc.15` — REST read `GET /v1/filler/canton/intents/{orderHash}` (CAN-1863): the live
|
|
458
|
+
Canton-source `SwapIntent` naming the filler's party, with its committed allocation by its
|
|
459
|
+
AllocationV2 view (`CantonIntent`, `CantonAllocation`, `CantonAllocationLeg`; `$defs`
|
|
460
|
+
`cantonIntent`, `cantonAllocation`). What a filler node checks before `ticket.receipt` on a Canton
|
|
461
|
+
source (V-C1…V-C6). Additive.
|
|
462
|
+
|
|
463
|
+
- `0.2.0-rc.14` — `CANTON_PARTICIPANTS`: the Cancore participant per environment, next to
|
|
464
|
+
`FILLER_GATEWAYS` (decision Ын-1, CAN-2352). A filler node checks its party's hosting against it
|
|
465
|
+
when it signs `party.allocate`. Devnet `Cancore-devnet-1::1220…524b`; testnet and mainnet `null`.
|
|
466
|
+
Additive.
|
|
467
|
+
|
|
458
468
|
- `0.2.0-rc.13` — `spec/protocol/vectors/settle-attestations.json` rebuilt on the 12-field
|
|
459
469
|
`Order` (CAN-2643): in both cases `proof.orderHash` is the hash of `order`, `proof.fillerId` is
|
|
460
470
|
`order.fillerId` and the frame is addressed to that filler (the Canton case: `acme`, was
|
package/dist/index.d.ts
CHANGED
|
@@ -926,7 +926,8 @@ declare const EXEMPT_REASONS: readonly ["DESTINATION_HALTED", "GATEWAY_FAULT", "
|
|
|
926
926
|
declare const QUOTE_ACK_STATUSES: readonly ["COUNTED", "LATE", "SHORT_TTL"];
|
|
927
927
|
/** Final status of a quote, `GET /v1/filler/quotes`. */
|
|
928
928
|
declare const QUOTE_FINAL_STATUSES: readonly ["COUNTED", "LATE", "SHORT_TTL", "REPLACED", "BAD_SIG", "OUTLIER", "IN_BAND", "OUT_OF_BAND", "WON", "LOST"];
|
|
929
|
-
|
|
929
|
+
/** `penalty.applied.step`: a violation recorded, a ban, a ban lifted by Cancore staff (penalties.md §4.2). */
|
|
930
|
+
declare const PENALTY_STEPS: readonly ["RECORDED", "BANNED", "UNBANNED"];
|
|
930
931
|
declare const DRAW_CLOSED_BY: readonly ["OFFER_TIMEOUT", "OFFER_DECLINE", "TICKET_DECLINE", "TICKET_EXPIRED", "FILLED"];
|
|
931
932
|
declare const TICKET_LIST_STATUSES: readonly ["OFFERED", "ISSUED"];
|
|
932
933
|
/** The Canton operations of the filler's own party (§3.19): the backend prepares and submits, the node signs with its party key. */
|
|
@@ -1486,6 +1487,64 @@ interface CantonDeliveryOrder {
|
|
|
1486
1487
|
}
|
|
1487
1488
|
/** `GET /v1/filler/canton/delivery-orders`. */
|
|
1488
1489
|
type CantonDeliveryOrderList = Page<CantonDeliveryOrder>;
|
|
1490
|
+
/** One leg side of an AllocationV2 view; `otherside` is the owner of the other account. */
|
|
1491
|
+
interface CantonAllocationLeg {
|
|
1492
|
+
legId: string;
|
|
1493
|
+
side: 'SENDER' | 'RECEIVER';
|
|
1494
|
+
otherside: string | null;
|
|
1495
|
+
amount: string;
|
|
1496
|
+
instrumentId: string;
|
|
1497
|
+
}
|
|
1498
|
+
/** A Token Standard V2 allocation by its view, as the operator (an executor) reads it. */
|
|
1499
|
+
interface CantonAllocation {
|
|
1500
|
+
contractId: string;
|
|
1501
|
+
/** `<package id>:<module>:<entity>`. */
|
|
1502
|
+
templateId: string;
|
|
1503
|
+
admin: string;
|
|
1504
|
+
/** The owner of the authorizer account. */
|
|
1505
|
+
authorizer: string | null;
|
|
1506
|
+
committed: boolean;
|
|
1507
|
+
settlementId: string;
|
|
1508
|
+
executors: string[];
|
|
1509
|
+
/** Unix seconds; null when the allocation has none. */
|
|
1510
|
+
settlementDeadline: DecString | null;
|
|
1511
|
+
legs: CantonAllocationLeg[];
|
|
1512
|
+
}
|
|
1513
|
+
/**
|
|
1514
|
+
* `GET /v1/filler/canton/intents/{orderHash}`: the live Canton-source `SwapIntent` naming the party as its
|
|
1515
|
+
* filler, as that party sees it, and its committed allocation (null when not live). The node checks it
|
|
1516
|
+
* before `ticket.receipt` (fillers.md V-C1…V-C6) and recomputes `orderHash` from these fields itself.
|
|
1517
|
+
*/
|
|
1518
|
+
interface CantonIntent {
|
|
1519
|
+
intentCid: string;
|
|
1520
|
+
templateId: string;
|
|
1521
|
+
orderHash: Hex;
|
|
1522
|
+
owner: string;
|
|
1523
|
+
operator: string;
|
|
1524
|
+
filler: string;
|
|
1525
|
+
fillerId: string;
|
|
1526
|
+
requestId: string;
|
|
1527
|
+
asset: CantonAsset;
|
|
1528
|
+
/** The committed give, fee-inclusive, Daml Decimal. */
|
|
1529
|
+
amount: string;
|
|
1530
|
+
/** `Destination.Evm`. */
|
|
1531
|
+
destination: {
|
|
1532
|
+
chainId: DecString;
|
|
1533
|
+
token: Hex;
|
|
1534
|
+
recipient: Hex;
|
|
1535
|
+
};
|
|
1536
|
+
minReceived: {
|
|
1537
|
+
units: DecString;
|
|
1538
|
+
decimals: number;
|
|
1539
|
+
};
|
|
1540
|
+
feeRate: string;
|
|
1541
|
+
fillDeadline: DecString;
|
|
1542
|
+
refundAfter: DecString;
|
|
1543
|
+
/** The owner's signing time: the order's `createdAt`. */
|
|
1544
|
+
orderCreatedAt: DecString;
|
|
1545
|
+
allocationCid: string;
|
|
1546
|
+
allocation: CantonAllocation | null;
|
|
1547
|
+
}
|
|
1489
1548
|
interface DrawAttempt {
|
|
1490
1549
|
attempt: number;
|
|
1491
1550
|
tBase: DecString;
|
|
@@ -1698,6 +1757,15 @@ interface FillerGateway {
|
|
|
1698
1757
|
* absent (O-6); the gateway release fills it in. Test keys never appear here.
|
|
1699
1758
|
*/
|
|
1700
1759
|
declare const FILLER_GATEWAYS: Readonly<Record<DeploymentEnv, FillerGateway>>;
|
|
1760
|
+
/**
|
|
1761
|
+
* The Cancore participant per environment: the participant a filler's Canton
|
|
1762
|
+
* party is hosted on (protocol §3.19, decision Ын-1). The node checks the
|
|
1763
|
+
* hosting of its party against this release value when it signs
|
|
1764
|
+
* `party.allocate`, never against a value the backend sends. A participant id
|
|
1765
|
+
* as the JSON Ledger API prints it (`<name>::<fingerprint>`, no `PAR::`);
|
|
1766
|
+
* null where there is none yet.
|
|
1767
|
+
*/
|
|
1768
|
+
declare const CANTON_PARTICIPANTS: Readonly<Record<DeploymentEnv, string | null>>;
|
|
1701
1769
|
|
|
1702
1770
|
type JsonSchema = Readonly<Record<string, unknown>>;
|
|
1703
1771
|
type MessageDirection = 'S2F' | 'F2S' | 'both';
|
|
@@ -1740,7 +1808,7 @@ declare const CONTRACTS_RELEASE: {
|
|
|
1740
1808
|
readonly version: "1.4.0-dev";
|
|
1741
1809
|
readonly releaseChannel: "dev";
|
|
1742
1810
|
readonly updatedAt: "2026-07-24T19:55:00Z";
|
|
1743
|
-
readonly commit: "
|
|
1811
|
+
readonly commit: "2f681b9bb74db55c0fe9fec31282bca54b997985";
|
|
1744
1812
|
};
|
|
1745
1813
|
/**
|
|
1746
1814
|
* Per contract, the build of the release, as evm-contracts
|
|
@@ -1873,4 +1941,5 @@ declare const BYTECODE_HASHES: {
|
|
|
1873
1941
|
/** Decode a revert's 4-byte selector into the custom error it names, if it is one of ours. */
|
|
1874
1942
|
declare function describeRevert(selectorOrData: string, tables: ReadonlyArray<Readonly<Record<string, string>>>): string | undefined;
|
|
1875
1943
|
|
|
1876
|
-
export { ASYNCAPI,
|
|
1944
|
+
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 };
|
|
1945
|
+
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, 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, 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
|
@@ -716,6 +716,12 @@ var FILLER_GATEWAYS = {
|
|
|
716
716
|
// The gateway key is published with the gateway release.
|
|
717
717
|
devnet: { gateway: null, ticketSigners: ["0x9a3fc3f44cddbdfb036a8c8a528a903d0c835c1c"] }
|
|
718
718
|
};
|
|
719
|
+
var CANTON_PARTICIPANTS = {
|
|
720
|
+
mainnet: null,
|
|
721
|
+
testnet: null,
|
|
722
|
+
// GET /v2/parties/participant-id on the devnet Ledger API, 15.10.2026.
|
|
723
|
+
devnet: "Cancore-devnet-1::12204f383aca6af056f6d83c9b5758fbc53c27a743e2f9d591e61bc657202172524b"
|
|
724
|
+
};
|
|
719
725
|
|
|
720
726
|
// src/protocol/messages.ts
|
|
721
727
|
var DECLINE_REASONS = [
|
|
@@ -793,7 +799,7 @@ var EXPIRED_RESULTS = ["FILLED", "NO_SHOW", "NO_SHOW_UNCONFIRMED", "EXEMPT"];
|
|
|
793
799
|
var EXEMPT_REASONS = ["DESTINATION_HALTED", "GATEWAY_FAULT", "REORGED_AFTER_INCLUSION", "RECIPIENT_NOT_READY", "OTHER"];
|
|
794
800
|
var QUOTE_ACK_STATUSES = ["COUNTED", "LATE", "SHORT_TTL"];
|
|
795
801
|
var QUOTE_FINAL_STATUSES = [...QUOTE_ACK_STATUSES, "REPLACED", "BAD_SIG", "OUTLIER", "IN_BAND", "OUT_OF_BAND", "WON", "LOST"];
|
|
796
|
-
var PENALTY_STEPS = ["
|
|
802
|
+
var PENALTY_STEPS = ["RECORDED", "BANNED", "UNBANNED"];
|
|
797
803
|
var DRAW_CLOSED_BY = ["OFFER_TIMEOUT", "OFFER_DECLINE", "TICKET_DECLINE", "TICKET_EXPIRED", "FILLED"];
|
|
798
804
|
var TICKET_LIST_STATUSES = ["OFFERED", "ISSUED"];
|
|
799
805
|
var CANTON_OPS = ["party.allocate", "registry.accept", "delivery.fill", "intent.settle", "holdings.transfer"];
|
|
@@ -2012,7 +2018,7 @@ var asyncapi_default = {
|
|
|
2012
2018
|
sentAt: 1790001e6,
|
|
2013
2019
|
violationId: "v-1",
|
|
2014
2020
|
code: "NO_SHOW",
|
|
2015
|
-
step: "
|
|
2021
|
+
step: "RECORDED",
|
|
2016
2022
|
details: {
|
|
2017
2023
|
orderHash: "0x65f9010d612499d381eefba1a2385b76982c9bdaf9ed15bedbafd7b09fb3b73b",
|
|
2018
2024
|
attempt: 0
|
|
@@ -2479,7 +2485,7 @@ var messages_schema_default = {
|
|
|
2479
2485
|
expiredResult: { anyOf: [{ enum: ["FILLED", "NO_SHOW", "NO_SHOW_UNCONFIRMED", "EXEMPT"] }, { $ref: "#/$defs/futureEnumValue" }] },
|
|
2480
2486
|
exemptReason: { anyOf: [{ enum: ["DESTINATION_HALTED", "GATEWAY_FAULT", "REORGED_AFTER_INCLUSION", "RECIPIENT_NOT_READY", "OTHER"] }, { $ref: "#/$defs/futureEnumValue" }] },
|
|
2481
2487
|
quoteAckStatus: { anyOf: [{ enum: ["COUNTED", "LATE", "SHORT_TTL"] }, { $ref: "#/$defs/futureEnumValue" }], description: "verdict at receipt time; the final status is on GET /v1/filler/quotes" },
|
|
2482
|
-
penaltyStep: { anyOf: [{ enum: ["
|
|
2488
|
+
penaltyStep: { anyOf: [{ enum: ["RECORDED", "BANNED", "UNBANNED"] }, { $ref: "#/$defs/futureEnumValue" }] },
|
|
2483
2489
|
s2fEnvelope: {
|
|
2484
2490
|
type: "object",
|
|
2485
2491
|
required: ["type", "id", "sentAt", "sig"],
|
|
@@ -3399,7 +3405,7 @@ var rest_schema_default = {
|
|
|
3399
3405
|
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
3400
3406
|
$id: "https://cancore.io/schemas/filler-protocol/v1/rest.schema.json",
|
|
3401
3407
|
title: "Cancore filler protocol v1 \u2014 REST fallback",
|
|
3402
|
-
$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. 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 \u2014 fillerId missing or not a fillerId; 404 UNKNOWN_REQUEST \u2014 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 \u2014 no or a malformed fillerId; 404 UNKNOWN_REQUEST \u2014 fillerId unknown or not ACTIVE; 401 UNAUTHENTICATED \u2014 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 \xA73.19 \u2014 an hourly budget per filler, 60 by default \u2014 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 \u2265 threshold verified signatures for this filler's fill, and 404 UNKNOWN_TICKET when this filler holds no ticket on the order. /v1/filler/canton/* (\xA73.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
|
|
3408
|
+
$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. 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 \u2014 fillerId missing or not a fillerId; 404 UNKNOWN_REQUEST \u2014 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 \u2014 no or a malformed fillerId; 404 UNKNOWN_REQUEST \u2014 fillerId unknown or not ACTIVE; 401 UNAUTHENTICATED \u2014 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 \xA73.19 \u2014 an hourly budget per filler, 60 by default \u2014 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 \u2265 threshold verified signatures for this filler's fill, and 404 UNKNOWN_TICKET when this filler holds no ticket on the order. /v1/filler/canton/* (\xA73.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 \u2014 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.",
|
|
3403
3409
|
"x-endpoints": [
|
|
3404
3410
|
{ method: "GET", path: "/v1/filler/auth/challenge", auth: "none", query: "#/$defs/challengeQuery", response: "messages.schema.json#/$defs/auth.challenge", errorBody: "#/$defs/unsignedErrorBody" },
|
|
3405
3411
|
{ method: "POST", path: "/v1/filler/auth", auth: "none", request: "messages.schema.json#/$defs/auth.response", response: "#/$defs/authToken", errorBody: "#/$defs/unsignedErrorBody" },
|
|
@@ -3419,7 +3425,8 @@ var rest_schema_default = {
|
|
|
3419
3425
|
{ method: "POST", path: "/v1/filler/canton/submit", auth: "bearer", request: "messages.schema.json#/$defs/canton.submit", response: "messages.schema.json#/$defs/canton.submitted" },
|
|
3420
3426
|
{ method: "GET", path: "/v1/filler/canton/party", auth: "bearer", response: "#/$defs/cantonParty" },
|
|
3421
3427
|
{ method: "GET", path: "/v1/filler/canton/holdings", auth: "bearer", query: "#/$defs/pageQuery", response: "#/$defs/cantonHoldingList" },
|
|
3422
|
-
{ method: "GET", path: "/v1/filler/canton/delivery-orders", auth: "bearer", query: "#/$defs/pageQuery", response: "#/$defs/cantonDeliveryOrderList" }
|
|
3428
|
+
{ method: "GET", path: "/v1/filler/canton/delivery-orders", auth: "bearer", query: "#/$defs/pageQuery", response: "#/$defs/cantonDeliveryOrderList" },
|
|
3429
|
+
{ method: "GET", path: "/v1/filler/canton/intents/{orderHash}", auth: "bearer", response: "#/$defs/cantonIntent" }
|
|
3423
3430
|
],
|
|
3424
3431
|
"x-error-status": {
|
|
3425
3432
|
BAD_REQUEST: 400,
|
|
@@ -3601,6 +3608,75 @@ var rest_schema_default = {
|
|
|
3601
3608
|
description: "The live DeliveryOrders naming the party as filler, oldest first",
|
|
3602
3609
|
required: ["items", "nextCursor"],
|
|
3603
3610
|
properties: { items: { type: "array", items: { $ref: "#/$defs/cantonDeliveryOrder" } }, nextCursor: { type: ["string", "null"] } }
|
|
3611
|
+
},
|
|
3612
|
+
cantonIntent: {
|
|
3613
|
+
type: "object",
|
|
3614
|
+
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-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",
|
|
3615
|
+
required: ["intentCid", "templateId", "orderHash", "owner", "operator", "filler", "fillerId", "requestId", "asset", "amount", "destination", "minReceived", "feeRate", "fillDeadline", "refundAfter", "orderCreatedAt", "allocationCid", "allocation"],
|
|
3616
|
+
properties: {
|
|
3617
|
+
intentCid: { type: "string", minLength: 1 },
|
|
3618
|
+
templateId: { type: "string", pattern: "^[0-9a-f]{64}:[A-Za-z0-9_.]+:[A-Za-z0-9_]+$", description: "<package id>:Intent.SwapIntent:SwapIntent" },
|
|
3619
|
+
orderHash: { $ref: "messages.schema.json#/$defs/bytes32" },
|
|
3620
|
+
owner: { type: "string", minLength: 1 },
|
|
3621
|
+
operator: { type: "string", minLength: 1 },
|
|
3622
|
+
filler: { type: "string", minLength: 1 },
|
|
3623
|
+
fillerId: { type: "string", minLength: 1 },
|
|
3624
|
+
requestId: { type: "string", minLength: 1 },
|
|
3625
|
+
asset: { $ref: "messages.schema.json#/$defs/cantonAsset", description: "SwapIntent.instrumentId" },
|
|
3626
|
+
amount: { type: "string", pattern: "^(0|[1-9][0-9]*)(\\.[0-9]{1,10})?$", description: "Daml Decimal: the committed give, fee-inclusive" },
|
|
3627
|
+
destination: {
|
|
3628
|
+
type: "object",
|
|
3629
|
+
description: "an EVM destination (Destination.Evm); an intent to any other destination is not served",
|
|
3630
|
+
required: ["chainId", "token", "recipient"],
|
|
3631
|
+
properties: {
|
|
3632
|
+
chainId: { $ref: "messages.schema.json#/$defs/uintDec64" },
|
|
3633
|
+
token: { $ref: "messages.schema.json#/$defs/address" },
|
|
3634
|
+
recipient: { $ref: "messages.schema.json#/$defs/address" }
|
|
3635
|
+
}
|
|
3636
|
+
},
|
|
3637
|
+
minReceived: {
|
|
3638
|
+
type: "object",
|
|
3639
|
+
required: ["units", "decimals"],
|
|
3640
|
+
properties: { units: { $ref: "messages.schema.json#/$defs/uintDec256" }, decimals: { type: "integer", minimum: 0, maximum: 255 } }
|
|
3641
|
+
},
|
|
3642
|
+
feeRate: { type: "string", pattern: "^(0|[1-9][0-9]*)(\\.[0-9]{1,10})?$", description: "Daml Decimal" },
|
|
3643
|
+
fillDeadline: { $ref: "messages.schema.json#/$defs/timeS" },
|
|
3644
|
+
refundAfter: { $ref: "messages.schema.json#/$defs/timeS" },
|
|
3645
|
+
orderCreatedAt: { $ref: "messages.schema.json#/$defs/timeS", description: "the owner's signing time: the order's createdAt" },
|
|
3646
|
+
allocationCid: { type: "string", minLength: 1, description: "SwapIntent.allocationCid" },
|
|
3647
|
+
allocation: {
|
|
3648
|
+
anyOf: [{ $ref: "#/$defs/cantonAllocation" }, { type: "null" }],
|
|
3649
|
+
description: "the contract allocationCid names, by its AllocationV2 view; null when it is not live"
|
|
3650
|
+
}
|
|
3651
|
+
}
|
|
3652
|
+
},
|
|
3653
|
+
cantonAllocation: {
|
|
3654
|
+
type: "object",
|
|
3655
|
+
required: ["contractId", "templateId", "admin", "authorizer", "committed", "settlementId", "executors", "settlementDeadline", "legs"],
|
|
3656
|
+
properties: {
|
|
3657
|
+
contractId: { type: "string", minLength: 1 },
|
|
3658
|
+
templateId: { type: "string", pattern: "^[0-9a-f]{64}:[A-Za-z0-9_.]+:[A-Za-z0-9_]+$" },
|
|
3659
|
+
admin: { type: "string", minLength: 1 },
|
|
3660
|
+
authorizer: { type: ["string", "null"], minLength: 1, description: "the owner of the authorizer account; null for an account without one" },
|
|
3661
|
+
committed: { type: "boolean" },
|
|
3662
|
+
settlementId: { type: "string" },
|
|
3663
|
+
executors: { type: "array", items: { type: "string", minLength: 1 } },
|
|
3664
|
+
settlementDeadline: { anyOf: [{ $ref: "messages.schema.json#/$defs/timeS" }, { type: "null" }] },
|
|
3665
|
+
legs: {
|
|
3666
|
+
type: "array",
|
|
3667
|
+
items: {
|
|
3668
|
+
type: "object",
|
|
3669
|
+
required: ["legId", "side", "otherside", "amount", "instrumentId"],
|
|
3670
|
+
properties: {
|
|
3671
|
+
legId: { type: "string" },
|
|
3672
|
+
side: { anyOf: [{ enum: ["SENDER", "RECEIVER"] }, { $ref: "messages.schema.json#/$defs/futureEnumValue" }], description: "a side the node does not know is refused by it" },
|
|
3673
|
+
otherside: { type: ["string", "null"], minLength: 1, description: "the owner of the other side's account" },
|
|
3674
|
+
amount: { type: "string", pattern: "^(0|[1-9][0-9]*)(\\.[0-9]{1,10})?$", description: "Daml Decimal" },
|
|
3675
|
+
instrumentId: { type: "string", minLength: 1 }
|
|
3676
|
+
}
|
|
3677
|
+
}
|
|
3678
|
+
}
|
|
3679
|
+
}
|
|
3604
3680
|
}
|
|
3605
3681
|
}
|
|
3606
3682
|
};
|
|
@@ -3655,7 +3731,7 @@ var CONTRACTS_RELEASE = {
|
|
|
3655
3731
|
"version": "1.4.0-dev",
|
|
3656
3732
|
"releaseChannel": "dev",
|
|
3657
3733
|
"updatedAt": "2026-07-24T19:55:00Z",
|
|
3658
|
-
"commit": "
|
|
3734
|
+
"commit": "2f681b9bb74db55c0fe9fec31282bca54b997985"
|
|
3659
3735
|
};
|
|
3660
3736
|
var BUILD_HASHES = {
|
|
3661
3737
|
"HTLC": {
|
|
@@ -3768,6 +3844,6 @@ function describeRevert(selectorOrData, tables) {
|
|
|
3768
3844
|
return void 0;
|
|
3769
3845
|
}
|
|
3770
3846
|
|
|
3771
|
-
export { ASYNCAPI, BPS, BUILD_HASHES, BYTECODE_HASHES, CANTON_LEG_KINDS, CANTON_OPS, CANTON_ORIGIN_ID, 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 };
|
|
3847
|
+
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 };
|
|
3772
3848
|
//# sourceMappingURL=index.js.map
|
|
3773
3849
|
//# sourceMappingURL=index.js.map
|