@cancore/contracts 0.2.0-rc.10 → 0.2.0-rc.13
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 +75 -1
- package/dist/index.d.ts +221 -6
- package/dist/index.js +788 -25
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/spec/protocol/asyncapi.json +335 -13
- package/spec/protocol/messages.schema.json +364 -1
- package/spec/protocol/rest.schema.json +62 -3
- package/spec/protocol/vectors/messages.json +206 -13
- package/spec/protocol/vectors/settle-attestations.json +71 -69
package/README.md
CHANGED
|
@@ -277,7 +277,12 @@ A filler logs in over REST and only then opens the WebSocket:
|
|
|
277
277
|
The same token authenticates REST (`Authorization: Bearer`). `auth.challenge` and
|
|
278
278
|
`auth.response` never travel on the socket (`REST_ONLY_TYPES`). Over a per-fillerId rate limit
|
|
279
279
|
the gateway answers `error RATE_LIMITED` with `retryAfterMs` (on REST: 429, always unsigned, with
|
|
280
|
-
`retryAfterMs` and `Retry-After`); send nothing of that rate class before it has passed.
|
|
280
|
+
`retryAfterMs` and `Retry-After`); send nothing of that rate class before it has passed. The
|
|
281
|
+
classes: `quote`, `ticket` (ticket and fill messages), `service` (ping, pong, error), `read` (every
|
|
282
|
+
bearer GET), `login`, and two for §3.19, whose Canton traffic Cancore pays: `cantonPrepare` —
|
|
283
|
+
`canton.prepare`, an hourly budget per filler (60 by default, staff may change it per filler;
|
|
284
|
+
operator decision A2-1) — and `canton` — `canton.submit`. A spent prepare budget pauses new
|
|
285
|
+
prepares only: the submit of an operation already prepared keeps its own class.
|
|
281
286
|
|
|
282
287
|
### Attestation signatures for `settle`
|
|
283
288
|
|
|
@@ -303,6 +308,48 @@ settleSigs(payload); // EVM: the sigs of settle(order, proof, sigs); Canton: can
|
|
|
303
308
|
Recover every signer and check it against `attestationSetFor(orderHash)` with your own
|
|
304
309
|
secp256k1 library (T-7). `scripts/gen-settle-attestations.mjs` writes the vectors.
|
|
305
310
|
|
|
311
|
+
### Canton operations of the filler party
|
|
312
|
+
|
|
313
|
+
A filler's Canton party is an external party on the Cancore participant; its Ed25519 key stays
|
|
314
|
+
in the node, and the node never talks to a Ledger API (protocol §3.19). Cancore prepares each
|
|
315
|
+
transaction, the node signs the prepared hash with its party key, Cancore submits it and pays
|
|
316
|
+
the Canton traffic. Two messages, on the WebSocket or as REST bodies:
|
|
317
|
+
|
|
318
|
+
| Op (`CANTON_OPS`) | `params` | What it does |
|
|
319
|
+
|---|---|---|
|
|
320
|
+
| `party.allocate` | `publicKey` | creates the party (topology legs, `kind: 'topology'`) |
|
|
321
|
+
| `registry.accept` | — | accepts the `FillerRegistryEntryProposal` of the fillerId |
|
|
322
|
+
| `delivery.fill` | `orderHash`, `attempt` | `DeliveryOrder_Fill` of a Canton ticket issued to the filler |
|
|
323
|
+
| `intent.settle` | `orderHash` | `SwapIntent_SettleWithProof` of a Canton-source order the filler delivered |
|
|
324
|
+
| `holdings.transfer` | `asset`, `amount`, `toParty` | `TransferFactory_Transfer` of its own holdings to a party it names; what its open delivery orders need stays |
|
|
325
|
+
|
|
326
|
+
`canton.prepare` → `canton.prepared` (`operationId`, `legs`, `summary`, `expiresAt`);
|
|
327
|
+
`canton.submit` (one Ed25519 signature per leg) → `canton.submitted`.
|
|
328
|
+
|
|
329
|
+
**The node never signs blind.** What its party key signs is what Cancore assembled, and `summary`
|
|
330
|
+
is only what Cancore says about it, so before signing a leg the node MUST:
|
|
331
|
+
|
|
332
|
+
- `kind: 'transaction'` — recompute `hash` from `preparedTransaction` with the participant's
|
|
333
|
+
prepared-transaction hashing of `hashingSchemeVersion`, decode the transaction and check it
|
|
334
|
+
against `summary` for the op: template and choice, acting and receiving parties, instrument,
|
|
335
|
+
amount;
|
|
336
|
+
- `kind: 'topology'` (only in `party.allocate`; the schema refuses it in any other op) — recompute
|
|
337
|
+
the multihash over `topologyTransactions` and check that they create `summary.partyId` with
|
|
338
|
+
`summary.publicKey` as its only signing key, hosted on the Cancore participant.
|
|
339
|
+
|
|
340
|
+
Checking against `summary` means the economics too, decoded from the transaction's child nodes,
|
|
341
|
+
never taken from `summary` alone: for `delivery.fill` the `TransferFactory_Transfer` under
|
|
342
|
+
`DeliveryOrder_Fill` — sender (its party), receiver, instrument, amount, the `inputHoldingCids`,
|
|
343
|
+
`executeBefore`, the pinned factory — against the order the node itself accepted; for
|
|
344
|
+
`intent.settle` the settlement's legs — the payee is its party and receives `amount`, the only
|
|
345
|
+
other leg is the fee to the operator — against the intent it delivered for.
|
|
346
|
+
|
|
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
|
+
`POST /v1/filler/canton/submit`; reads of the own party: `GET /v1/filler/canton/party`,
|
|
349
|
+
`/holdings`, `/delivery-orders`. Refusals: `CANTON_NOT_READY` (409), `CANTON_REFUSED` (422),
|
|
350
|
+
`CANTON_UNAVAILABLE` (503, retry), `OPERATION_EXPIRED` (410, prepare again), plus
|
|
351
|
+
`UNKNOWN_TICKET`, `TICKET_CLOSED` and `NOT_ELIGIBLE` for an operation on someone else's ticket or party.
|
|
352
|
+
|
|
306
353
|
`FILLER_GATEWAYS` is where the gateway key and the ticket signers of each environment are
|
|
307
354
|
published. It is empty in the RC: no gateway key exists yet.
|
|
308
355
|
|
|
@@ -408,6 +455,33 @@ Full documentation: <https://docs.cancore.io/sdk/contracts>
|
|
|
408
455
|
|
|
409
456
|
## Changes
|
|
410
457
|
|
|
458
|
+
- `0.2.0-rc.13` — `spec/protocol/vectors/settle-attestations.json` rebuilt on the 12-field
|
|
459
|
+
`Order` (CAN-2643): in both cases `proof.orderHash` is the hash of `order`, `proof.fillerId` is
|
|
460
|
+
`order.fillerId` and the frame is addressed to that filler (the Canton case: `acme`, was
|
|
461
|
+
`cancore-reserve`). `npm run vectors` now runs `gen-settle-attestations.mjs`, so CI catches a
|
|
462
|
+
stale copy. The `settle.attestations` examples in `messages.json` and `asyncapi.json` follow.
|
|
463
|
+
No API change.
|
|
464
|
+
- `0.2.0-rc.12` — Canton operations of the filler party through Cancore (CAN-2649, operator
|
|
465
|
+
decision T-1). Additive.
|
|
466
|
+
- Frames `canton.prepare`, `canton.prepared`, `canton.submit`, `canton.submitted` (27 frame
|
|
467
|
+
types); REST `POST /v1/filler/canton/{prepare,submit}`, `GET /v1/filler/canton/{party,holdings,delivery-orders}`.
|
|
468
|
+
- Error codes `CANTON_NOT_READY`, `CANTON_REFUSED`, `CANTON_UNAVAILABLE`, `OPERATION_EXPIRED`.
|
|
469
|
+
- `CANTON_OPS`, `CANTON_LEG_KINDS`, `CANTON_REGISTRY_STATES` and their types.
|
|
470
|
+
- Legs carry what they are over and are verified before signing: `CantonLegTransaction`
|
|
471
|
+
(`preparedTransaction` and `hashingSchemeVersion` required), `CantonLegTopology`
|
|
472
|
+
(`topologyTransactions`, `party.allocate` only); the leg kind is closed.
|
|
473
|
+
- Fifth op `holdings.transfer` (operator decision Yu-1); `party.allocate` states its `hosting`
|
|
474
|
+
(Cancore participant, Confirmation, threshold 1); rate class `cantonPrepare`, the hourly budget
|
|
475
|
+
of `canton.prepare` (A2-1), apart from `canton` of `canton.submit`.
|
|
476
|
+
- Rate classes `canton` (`canton.submit`, operator decision Sh-2) and `cantonPrepare`; the trader
|
|
477
|
+
SDK pauses each on a 429 like the other classes.
|
|
478
|
+
- `0.2.0-rc.11` — dev intent routers (CAN-2331). Additive.
|
|
479
|
+
- `EvmDeployment` gains `router` and `routerBlock`; `DEPLOYMENTS.devnet` names the router of
|
|
480
|
+
Sepolia, BNB testnet, Arbitrum Sepolia and Robinhood testnet as recorded and verified in
|
|
481
|
+
`evm-contracts` `deployments/router/dev/` (#120, CAN-2327).
|
|
482
|
+
- `FILLER_GATEWAYS.devnet.ticketSigners` is the ticket signer those routers register; the
|
|
483
|
+
gateway key stays `null` until the gateway release publishes it.
|
|
484
|
+
|
|
411
485
|
- `0.2.0-rc.10` — the order names its filler (OD-1, OD-6; CAN-2496). **Breaking**: every order
|
|
412
486
|
hash changes.
|
|
413
487
|
- `Order` gains a twelfth and last field, `bytes32 fillerId` = `fillerIdHash(fillerId)` of the
|
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,10 @@ interface EvmDeployment {
|
|
|
24
24
|
/** Block the HTLC was deployed in — the floor for an event scan. */
|
|
25
25
|
htlcBlock?: number;
|
|
26
26
|
multiBalanceChecker?: `0x${string}`;
|
|
27
|
+
/** The intent router (`CancoreRouter`) of this environment on this chain; absent where none is deployed. */
|
|
28
|
+
router?: `0x${string}`;
|
|
29
|
+
/** Block the router was deployed in — the floor for an event scan. */
|
|
30
|
+
routerBlock?: number;
|
|
27
31
|
}
|
|
28
32
|
declare const DEPLOYMENTS: Readonly<Record<DeploymentEnv, readonly EvmDeployment[]>>;
|
|
29
33
|
/** Uniswap Permit2 — one canonical address across mainnets. */
|
|
@@ -911,7 +915,7 @@ type WireAsset = Hex | {
|
|
|
911
915
|
id: string;
|
|
912
916
|
};
|
|
913
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"];
|
|
914
|
-
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"];
|
|
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"];
|
|
915
919
|
/** HTTP status of each error code on the REST fallback. */
|
|
916
920
|
declare const ERROR_HTTP_STATUS: Readonly<Record<ErrorCode, number>>;
|
|
917
921
|
/** `error.reason` with `TICKET_REFUSED`: the pre-ticket check that failed (S-21). */
|
|
@@ -925,6 +929,12 @@ declare const QUOTE_FINAL_STATUSES: readonly ["COUNTED", "LATE", "SHORT_TTL", "R
|
|
|
925
929
|
declare const PENALTY_STEPS: readonly ["L1", "L2", "L3", "L4"];
|
|
926
930
|
declare const DRAW_CLOSED_BY: readonly ["OFFER_TIMEOUT", "OFFER_DECLINE", "TICKET_DECLINE", "TICKET_EXPIRED", "FILLED"];
|
|
927
931
|
declare const TICKET_LIST_STATUSES: readonly ["OFFERED", "ISSUED"];
|
|
932
|
+
/** The Canton operations of the filler's own party (§3.19): the backend prepares and submits, the node signs with its party key. */
|
|
933
|
+
declare const CANTON_OPS: readonly ["party.allocate", "registry.accept", "delivery.fill", "intent.settle", "holdings.transfer"];
|
|
934
|
+
/** `holdings.transfer` result: the receiver holds it, or a TransferInstruction waits for it to accept. */
|
|
935
|
+
declare const CANTON_TRANSFER_OUTCOMES: readonly ["COMPLETED", "PENDING"];
|
|
936
|
+
declare const CANTON_LEG_KINDS: readonly ["transaction", "topology"];
|
|
937
|
+
declare const CANTON_REGISTRY_STATES: readonly ["NONE", "PROPOSED", "ACTIVE", "REMOVED"];
|
|
928
938
|
type DeclineReason = (typeof DECLINE_REASONS)[number];
|
|
929
939
|
type ErrorCode = (typeof ERROR_CODES)[number];
|
|
930
940
|
type TicketRefusedReason = (typeof TICKET_REFUSED_REASONS)[number];
|
|
@@ -934,6 +944,9 @@ type QuoteAckStatus = (typeof QUOTE_ACK_STATUSES)[number];
|
|
|
934
944
|
type QuoteFinalStatus = (typeof QUOTE_FINAL_STATUSES)[number];
|
|
935
945
|
type PenaltyStep = (typeof PENALTY_STEPS)[number];
|
|
936
946
|
type DrawClosedBy = (typeof DRAW_CLOSED_BY)[number];
|
|
947
|
+
type CantonOp = (typeof CANTON_OPS)[number];
|
|
948
|
+
type CantonLegKind = (typeof CANTON_LEG_KINDS)[number];
|
|
949
|
+
type CantonRegistryState = (typeof CANTON_REGISTRY_STATES)[number];
|
|
937
950
|
/** `ICancoreRouter.Order` on the wire: every numeric field a decimal string, as `canton-order.json`. */
|
|
938
951
|
interface OrderJson {
|
|
939
952
|
user: Hex;
|
|
@@ -1222,8 +1235,180 @@ interface PenaltyApplied extends S2FBase {
|
|
|
1222
1235
|
step: PenaltyStep;
|
|
1223
1236
|
details: Record<string, unknown>;
|
|
1224
1237
|
}
|
|
1225
|
-
|
|
1226
|
-
|
|
1238
|
+
/** A Canton asset: the instrument admin party and its id. */
|
|
1239
|
+
interface CantonAsset {
|
|
1240
|
+
admin: string;
|
|
1241
|
+
id: string;
|
|
1242
|
+
}
|
|
1243
|
+
/** What each op takes: the backend picks every contract itself. */
|
|
1244
|
+
interface CantonOpParams {
|
|
1245
|
+
'party.allocate': {
|
|
1246
|
+
publicKey: Hex;
|
|
1247
|
+
};
|
|
1248
|
+
'registry.accept': Record<string, never>;
|
|
1249
|
+
'delivery.fill': {
|
|
1250
|
+
orderHash: Hex;
|
|
1251
|
+
attempt: number;
|
|
1252
|
+
};
|
|
1253
|
+
'intent.settle': {
|
|
1254
|
+
orderHash: Hex;
|
|
1255
|
+
};
|
|
1256
|
+
/** To a party other than the filler's own; never what the party's open delivery orders need. */
|
|
1257
|
+
'holdings.transfer': {
|
|
1258
|
+
asset: CantonAsset;
|
|
1259
|
+
amount: string;
|
|
1260
|
+
toParty: string;
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1263
|
+
/** What the prepared legs do, by op: the node checks it before it signs. */
|
|
1264
|
+
interface CantonOpSummary {
|
|
1265
|
+
'party.allocate': {
|
|
1266
|
+
partyId: string;
|
|
1267
|
+
publicKey: Hex;
|
|
1268
|
+
/** On the Cancore participant alone, Confirmation, threshold 1: the node checks the decoded topology against it. */
|
|
1269
|
+
hosting: {
|
|
1270
|
+
participantUid: string;
|
|
1271
|
+
permission: 'CONFIRMATION';
|
|
1272
|
+
threshold: 1;
|
|
1273
|
+
};
|
|
1274
|
+
};
|
|
1275
|
+
'registry.accept': {
|
|
1276
|
+
fillerId: string;
|
|
1277
|
+
party: string;
|
|
1278
|
+
operator: string;
|
|
1279
|
+
proposalCid: string;
|
|
1280
|
+
};
|
|
1281
|
+
'delivery.fill': {
|
|
1282
|
+
orderHash: Hex;
|
|
1283
|
+
attempt: number;
|
|
1284
|
+
deliveryOrderCid: string;
|
|
1285
|
+
recipient: string;
|
|
1286
|
+
asset: CantonAsset;
|
|
1287
|
+
amount: string;
|
|
1288
|
+
repayTo: Hex;
|
|
1289
|
+
validUntil: DecString;
|
|
1290
|
+
/** The party's holdings the transfer spends; what they hold beyond `amount` comes back as change. */
|
|
1291
|
+
inputHoldingCids: string[];
|
|
1292
|
+
/** The transfer's executeBefore: the order's fillDeadline. */
|
|
1293
|
+
executeBefore: DecString;
|
|
1294
|
+
/** The registry factory the order pins. */
|
|
1295
|
+
transferFactoryCid: string;
|
|
1296
|
+
};
|
|
1297
|
+
'intent.settle': {
|
|
1298
|
+
orderHash: Hex;
|
|
1299
|
+
intentCid: string;
|
|
1300
|
+
asset: CantonAsset;
|
|
1301
|
+
/** What the payee is paid: `giveAmount` less `fee.amount`. */
|
|
1302
|
+
amount: string;
|
|
1303
|
+
executeBefore: DecString;
|
|
1304
|
+
/** The filler's own party. */
|
|
1305
|
+
payee: string;
|
|
1306
|
+
/** The intent's committed give, fee-inclusive. */
|
|
1307
|
+
giveAmount: string;
|
|
1308
|
+
/** The fee leg to the operator; amount 0 when there is none. */
|
|
1309
|
+
fee: {
|
|
1310
|
+
receiver: string;
|
|
1311
|
+
amount: string;
|
|
1312
|
+
};
|
|
1313
|
+
};
|
|
1314
|
+
'holdings.transfer': {
|
|
1315
|
+
asset: CantonAsset;
|
|
1316
|
+
amount: string;
|
|
1317
|
+
receiver: string;
|
|
1318
|
+
inputHoldingCids: string[];
|
|
1319
|
+
executeBefore: DecString;
|
|
1320
|
+
};
|
|
1321
|
+
}
|
|
1322
|
+
/** What the committed operation created, by op. */
|
|
1323
|
+
interface CantonOpResult {
|
|
1324
|
+
'party.allocate': {
|
|
1325
|
+
partyId: string;
|
|
1326
|
+
};
|
|
1327
|
+
'registry.accept': {
|
|
1328
|
+
entryCid: string;
|
|
1329
|
+
};
|
|
1330
|
+
'delivery.fill': {
|
|
1331
|
+
receiptCid: string;
|
|
1332
|
+
};
|
|
1333
|
+
'intent.settle': Record<string, never>;
|
|
1334
|
+
'holdings.transfer': {
|
|
1335
|
+
outcome: (typeof CANTON_TRANSFER_OUTCOMES)[number];
|
|
1336
|
+
transferInstructionCid?: string;
|
|
1337
|
+
};
|
|
1338
|
+
}
|
|
1339
|
+
/**
|
|
1340
|
+
* A prepared transaction to sign. The node MUST, before signing (§3.19): recompute `hash` from
|
|
1341
|
+
* `preparedTransaction` with the hashing of `hashingSchemeVersion`, decode the transaction and check it against
|
|
1342
|
+
* the `summary` of the op (template and choice, parties, instrument, amount); on any difference, not sign.
|
|
1343
|
+
*/
|
|
1344
|
+
interface CantonLegTransaction {
|
|
1345
|
+
legId: string;
|
|
1346
|
+
kind: 'transaction';
|
|
1347
|
+
/** 32 bytes. */
|
|
1348
|
+
hash: Hex;
|
|
1349
|
+
/** Base64 protobuf. Never logged. */
|
|
1350
|
+
preparedTransaction: string;
|
|
1351
|
+
/** e.g. `HASHING_SCHEME_VERSION_V2`. */
|
|
1352
|
+
hashingSchemeVersion: string;
|
|
1353
|
+
}
|
|
1354
|
+
/**
|
|
1355
|
+
* The party's onboarding topology, in `party.allocate` only. The node MUST, before signing (§3.19): recompute
|
|
1356
|
+
* the multihash over `topologyTransactions` and check they create `summary.partyId` with `summary.publicKey` as
|
|
1357
|
+
* its only signing key, hosted on the Cancore participant; on any difference, not sign.
|
|
1358
|
+
*/
|
|
1359
|
+
interface CantonLegTopology {
|
|
1360
|
+
legId: string;
|
|
1361
|
+
kind: 'topology';
|
|
1362
|
+
/** `0x1220` ‖ sha256: 34 bytes. */
|
|
1363
|
+
hash: Hex;
|
|
1364
|
+
/** Base64 protobuf, in order. */
|
|
1365
|
+
topologyTransactions: string[];
|
|
1366
|
+
}
|
|
1367
|
+
/** One thing to sign. The kind is closed: a leg of any other kind is refused, never signed. */
|
|
1368
|
+
type CantonLeg = CantonLegTransaction | CantonLegTopology;
|
|
1369
|
+
interface CantonSignature {
|
|
1370
|
+
legId: string;
|
|
1371
|
+
signature: Hex;
|
|
1372
|
+
}
|
|
1373
|
+
type CantonPrepare = {
|
|
1374
|
+
[K in CantonOp]: F2SBase & {
|
|
1375
|
+
type: 'canton.prepare';
|
|
1376
|
+
op: K;
|
|
1377
|
+
params: CantonOpParams[K];
|
|
1378
|
+
};
|
|
1379
|
+
}[CantonOp];
|
|
1380
|
+
type CantonPrepared = {
|
|
1381
|
+
[K in CantonOp]: S2FBase & {
|
|
1382
|
+
type: 'canton.prepared';
|
|
1383
|
+
fillerId: string;
|
|
1384
|
+
re: string;
|
|
1385
|
+
operationId: string;
|
|
1386
|
+
op: K;
|
|
1387
|
+
/** Topology legs with `party.allocate` only. */
|
|
1388
|
+
legs: K extends 'party.allocate' ? CantonLegTopology[] : CantonLegTransaction[];
|
|
1389
|
+
summary: CantonOpSummary[K];
|
|
1390
|
+
expiresAt: TimeMs;
|
|
1391
|
+
};
|
|
1392
|
+
}[CantonOp];
|
|
1393
|
+
/** Idempotent per `operationId`: a repeat gets the same `canton.submitted`. */
|
|
1394
|
+
interface CantonSubmit extends F2SBase {
|
|
1395
|
+
type: 'canton.submit';
|
|
1396
|
+
operationId: string;
|
|
1397
|
+
signatures: CantonSignature[];
|
|
1398
|
+
}
|
|
1399
|
+
type CantonSubmitted = {
|
|
1400
|
+
[K in CantonOp]: S2FBase & {
|
|
1401
|
+
type: 'canton.submitted';
|
|
1402
|
+
fillerId: string;
|
|
1403
|
+
re: string;
|
|
1404
|
+
operationId: string;
|
|
1405
|
+
op: K;
|
|
1406
|
+
updateId?: string;
|
|
1407
|
+
result: CantonOpResult[K];
|
|
1408
|
+
};
|
|
1409
|
+
}[CantonOp];
|
|
1410
|
+
type S2FMessage = AuthChallenge | AuthOk | PingS2F | PongS2F | ErrorMessage | EpochWeights | QuoteRequest | QuoteAck | QuoteReconfirm | TicketOffer | TicketIntentAck | TicketIssued | TicketExpired | OrderSettled | PenaltyApplied | SettleAttestations | CantonPrepared | CantonSubmitted;
|
|
1411
|
+
type F2SMessage = AuthResponse | PingF2S | PongF2S | ErrorF2S | QuoteMessage | QuoteReconfirmReply | TicketIntentMessage | TicketDecline | TicketReceiptMessage | FillReported | CantonPrepare | CantonSubmit;
|
|
1227
1412
|
/** `POST /v1/filler/auth`: the bearer token of REST and of the WebSocket upgrade, bound to (fillerId, message key). */
|
|
1228
1413
|
interface AuthToken {
|
|
1229
1414
|
token: string;
|
|
@@ -1271,6 +1456,36 @@ interface PenaltyRecord {
|
|
|
1271
1456
|
details: Record<string, unknown>;
|
|
1272
1457
|
}
|
|
1273
1458
|
type PenaltyList = Page<PenaltyRecord>;
|
|
1459
|
+
/** `GET /v1/filler/canton/party`: the party registered for the fillerId and its `FillerRegistryEntry`. */
|
|
1460
|
+
interface CantonParty {
|
|
1461
|
+
party: string | null;
|
|
1462
|
+
publicKey: Hex | null;
|
|
1463
|
+
registry: {
|
|
1464
|
+
state: CantonRegistryState;
|
|
1465
|
+
proposalCid: string | null;
|
|
1466
|
+
entryCid: string | null;
|
|
1467
|
+
};
|
|
1468
|
+
}
|
|
1469
|
+
interface CantonHolding {
|
|
1470
|
+
contractId: string;
|
|
1471
|
+
asset: CantonAsset;
|
|
1472
|
+
amount: string;
|
|
1473
|
+
locked: boolean;
|
|
1474
|
+
}
|
|
1475
|
+
/** `GET /v1/filler/canton/holdings`. */
|
|
1476
|
+
type CantonHoldingList = Page<CantonHolding>;
|
|
1477
|
+
interface CantonDeliveryOrder {
|
|
1478
|
+
deliveryOrderCid: string;
|
|
1479
|
+
orderHash: Hex;
|
|
1480
|
+
attempt: number;
|
|
1481
|
+
asset: CantonAsset;
|
|
1482
|
+
amount: string;
|
|
1483
|
+
recipient: string;
|
|
1484
|
+
repayTo: Hex;
|
|
1485
|
+
validUntil: DecString;
|
|
1486
|
+
}
|
|
1487
|
+
/** `GET /v1/filler/canton/delivery-orders`. */
|
|
1488
|
+
type CantonDeliveryOrderList = Page<CantonDeliveryOrder>;
|
|
1274
1489
|
interface DrawAttempt {
|
|
1275
1490
|
attempt: number;
|
|
1276
1491
|
tBase: DecString;
|
|
@@ -1479,8 +1694,8 @@ interface FillerGateway {
|
|
|
1479
1694
|
/**
|
|
1480
1695
|
* The published gateway key and ticket signers per environment — the release
|
|
1481
1696
|
* data a taker checks every S→F signature and every ticket against, and never
|
|
1482
|
-
* takes from a gateway message.
|
|
1483
|
-
* (O-6); the gateway release fills
|
|
1697
|
+
* takes from a gateway message. A key that does not exist yet is null or
|
|
1698
|
+
* absent (O-6); the gateway release fills it in. Test keys never appear here.
|
|
1484
1699
|
*/
|
|
1485
1700
|
declare const FILLER_GATEWAYS: Readonly<Record<DeploymentEnv, FillerGateway>>;
|
|
1486
1701
|
|
|
@@ -1658,4 +1873,4 @@ declare const BYTECODE_HASHES: {
|
|
|
1658
1873
|
/** Decode a revert's 4-byte selector into the custom error it names, if it is one of ours. */
|
|
1659
1874
|
declare function describeRevert(selectorOrData: string, tables: ReadonlyArray<Readonly<Record<string, string>>>): string | undefined;
|
|
1660
1875
|
|
|
1661
|
-
export { ASYNCAPI, type AttestationCanton, type AttestationEvm, type AttestationsResponse, type AuthChallenge, type AuthOk, type AuthResponse, type AuthToken, BPS, BUILD_HASHES, BYTECODE_HASHES, CANTON_ORIGIN_ID, CANTON_SOURCE_ANCHOR, CANTON_TICKET_RECEIPT_TYPES, CONTRACTS_RELEASE, type CantonNetwork, type CantonSourceIntent, type CantonSourceOrder, type CantonTicketReceipt, type ChallengeQuery, DAML_NUMERIC_SCALE, DECLINE_REASONS, DEPLOYMENTS, DRAND_QUICKNET, DRAW_CLOSED_BY, type DecString, type DeclineReason, type DeploymentEnv, type DrawAttempt, type DrawCandidate, type DrawClosedBy, type DrawOutcome, type DrawRecord, EIP2294_MAX_CHAIN_ID, ERROR_CODES, ERROR_HTTP_STATUS, EXEMPT_REASONS, EXPIRED_RESULTS, type EpochLeaf, type EpochRecord, type EpochWeights, type ErrorCode, type ErrorF2S, type ErrorMessage, type EvmDeployment, type ExemptReason, type ExpiredResult, type F2SBase, type F2SEnvelope, type F2SMessage, 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, type FeeClaim, type FeeSplit, type FillProof, type FillProofJson, type FillReported, type FillTicket, type FillerAuth, type FillerCloseCode, type FillerEnvelopeContext, type FillerGateway, type FillerKeyRegistration, type FillerMessage, type FillerQuote, type FillerStats, GATEWAY_MESSAGE_TYPES, GRACE, type GatewayInfo, type GatewayMessage, type Hex, INSTRUMENT_LABEL_TAG, type JsonSchema, type JsonValue, MAX_FEE_BPS, MAX_FILL_TTL, MAX_PROOF_WINDOW, MAX_SIG_TTL, MESSAGE_DIRECTIONS, MIN_FILL_TTL, type MessageDirection, ORDER_TYPES, OWNER_LABEL_TAG, type Order, type OrderDomain, type OrderJson, type OrderSettled, PENALTY_STEPS, PERMIT2_ADDRESS, PERMIT2_WITNESS_TYPE_STRING, PERMIT_WITNESS_TYPES, PROOF_KIND_ATTESTATION, PROTOCOL_SCHEMAS, PROTOCOL_VERSION, type Page, type PenaltyApplied, type PenaltyList, type PenaltyRecord, type PenaltyStep, type PermitWitness, type Ping, type PingF2S, type PingS2F, type Pong, type PongF2S, type PongS2F, QUOTE_ACK_STATUSES, QUOTE_FINAL_STATUSES, QUOTE_TYPES, type Quote, type QuoteAck, type QuoteAckStatus, type QuoteFinalStatus, type QuoteList, type QuoteMessage, type QuoteReconfirm, type QuoteReconfirmReply, type QuoteRecord, type QuoteRequest, REST_ENDPOINTS, REST_ONLY_TYPES, type RestEndpoint, type S2FBase, type S2FMessage, SCHEMA_VOCABULARY, SET_DELAY, STAKE_BINDING_TYPES, type SettleAttestations, type SettleAttestationsPayload, type SignedFillerKeyRegistration, type StakeBinding, type StakeBindingRequest, TICKET_INTENT_TYPES, TICKET_LIST_STATUSES, TICKET_RECEIPT_TYPES, TICKET_REFUSED_REASONS, type TicketDecline, type TicketExpired, type TicketIntent, type TicketIntentAck, type TicketIntentMessage, type TicketIssued, type TicketIssuedCanton, type TicketIssuedEvm, type TicketJson, type TicketList, type TicketOffer, type TicketReceipt, type TicketReceiptCanton, type TicketReceiptEvm, type TicketReceiptMessage, type TicketRefusedReason, type TimeMs, type TypedDataDomain, type TypedDataInput, type TypedDataTypes, type TypedField, type TypedValue, type UintLike, type UnsignedErrorBody, type WireAsset, 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 };
|
|
1876
|
+
export { ASYNCAPI, type AttestationCanton, type AttestationEvm, type AttestationsResponse, type AuthChallenge, type AuthOk, type AuthResponse, type AuthToken, 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, type CantonAsset, type CantonDeliveryOrder, type CantonDeliveryOrderList, type CantonHolding, type CantonHoldingList, type CantonLeg, type CantonLegKind, type CantonLegTopology, type CantonLegTransaction, type CantonNetwork, type CantonOp, type CantonOpParams, type CantonOpResult, type CantonOpSummary, type CantonParty, type CantonPrepare, type CantonPrepared, type CantonRegistryState, type CantonSignature, type CantonSourceIntent, type CantonSourceOrder, type CantonSubmit, type CantonSubmitted, type CantonTicketReceipt, type ChallengeQuery, DAML_NUMERIC_SCALE, DECLINE_REASONS, DEPLOYMENTS, DRAND_QUICKNET, DRAW_CLOSED_BY, type DecString, type DeclineReason, type DeploymentEnv, type DrawAttempt, type DrawCandidate, type DrawClosedBy, type DrawOutcome, type DrawRecord, EIP2294_MAX_CHAIN_ID, ERROR_CODES, ERROR_HTTP_STATUS, EXEMPT_REASONS, EXPIRED_RESULTS, type EpochLeaf, type EpochRecord, type EpochWeights, type ErrorCode, type ErrorF2S, type ErrorMessage, type EvmDeployment, type ExemptReason, type ExpiredResult, type F2SBase, type F2SEnvelope, type F2SMessage, 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, type FeeClaim, type FeeSplit, type FillProof, type FillProofJson, type FillReported, type FillTicket, type FillerAuth, type FillerCloseCode, type FillerEnvelopeContext, type FillerGateway, type FillerKeyRegistration, type FillerMessage, type FillerQuote, type FillerStats, GATEWAY_MESSAGE_TYPES, GRACE, type GatewayInfo, type GatewayMessage, type Hex, INSTRUMENT_LABEL_TAG, type JsonSchema, type JsonValue, MAX_FEE_BPS, MAX_FILL_TTL, MAX_PROOF_WINDOW, MAX_SIG_TTL, MESSAGE_DIRECTIONS, MIN_FILL_TTL, type MessageDirection, ORDER_TYPES, OWNER_LABEL_TAG, type Order, type OrderDomain, type OrderJson, type OrderSettled, PENALTY_STEPS, PERMIT2_ADDRESS, PERMIT2_WITNESS_TYPE_STRING, PERMIT_WITNESS_TYPES, PROOF_KIND_ATTESTATION, PROTOCOL_SCHEMAS, PROTOCOL_VERSION, type Page, type PenaltyApplied, type PenaltyList, type PenaltyRecord, type PenaltyStep, type PermitWitness, type Ping, type PingF2S, type PingS2F, type Pong, type PongF2S, type PongS2F, QUOTE_ACK_STATUSES, QUOTE_FINAL_STATUSES, QUOTE_TYPES, type Quote, type QuoteAck, type QuoteAckStatus, type QuoteFinalStatus, type QuoteList, type QuoteMessage, type QuoteReconfirm, type QuoteReconfirmReply, type QuoteRecord, type QuoteRequest, REST_ENDPOINTS, REST_ONLY_TYPES, type RestEndpoint, type S2FBase, type S2FMessage, SCHEMA_VOCABULARY, SET_DELAY, STAKE_BINDING_TYPES, type SettleAttestations, type SettleAttestationsPayload, type SignedFillerKeyRegistration, type StakeBinding, type StakeBindingRequest, TICKET_INTENT_TYPES, TICKET_LIST_STATUSES, TICKET_RECEIPT_TYPES, TICKET_REFUSED_REASONS, type TicketDecline, type TicketExpired, type TicketIntent, type TicketIntentAck, type TicketIntentMessage, type TicketIssued, type TicketIssuedCanton, type TicketIssuedEvm, type TicketJson, type TicketList, type TicketOffer, type TicketReceipt, type TicketReceiptCanton, type TicketReceiptEvm, type TicketReceiptMessage, type TicketRefusedReason, type TimeMs, type TypedDataDomain, type TypedDataInput, type TypedDataTypes, type TypedField, type TypedValue, type UintLike, type UnsignedErrorBody, type WireAsset, 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 };
|