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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -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-C6; 404 `UNKNOWN_TICKET` when none names it). Refusals: `CANTON_NOT_READY` (409), `CANTON_REFUSED` (422),
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
 
@@ -465,6 +465,21 @@ Full documentation: <https://docs.cancore.io/sdk/contracts>
465
465
 
466
466
  ## Changes
467
467
 
468
+ - `0.2.0-rc.23` — the recipient of a Canton delivery (CAN-1867): decline reason
469
+ `RECIPIENT_NOT_READY` — the recipient of the order no longer accepts its instrument, so the filler
470
+ refuses the Canton-form ticket before `ticket.receipt` (never a violation of the filler). REST read
471
+ `GET /v1/filler/canton/recipient-readiness/{orderHash}` (`CantonRecipientReadiness`;
472
+ `$defs/cantonRecipientReadiness`): Cancore's read of that recipient's transfer preapproval for the
473
+ party's live `DeliveryOrder`, which the party cannot read on its own participant (V-R1). Additive.
474
+ - `0.2.0-rc.22` — `CantonIntent.settlementFactory` (CAN-3408): the settlement factory the owner
475
+ approved into the `SwapIntent` (CAN-3340) and `live`, whether it is still the registry's current
476
+ one, as settle reads it (`CantonSettlementFactory`; `$defs/cantonIntent.settlementFactory`).
477
+ Optional on the wire, so a filler-gateway without it still validates; the filler node refuses
478
+ the ticket without it (V-C7). Additive.
479
+ - `0.2.0-rc.21` — Base (CAN-3260): `NETWORKS.base` (8453) and `NETWORKS.base_sepolia` (84532),
480
+ and the Base Sepolia HTLC and MultiBalanceChecker of the dev stand in `DEPLOYMENTS.devnet` and
481
+ of the stage stand in `DEPLOYMENTS.testnet` (two independent deploys), and the Base mainnet HTLC
482
+ and MultiBalanceChecker in `DEPLOYMENTS.mainnet`. Additive.
468
483
  - `0.2.0-rc.20` — Canton-form `ticket.issued` gains optional `validFrom` (CAN-3026): the order's
469
484
  `DeliveryOrder.validFrom`, before which `DeliveryOrder_Fill` is refused — the EVM source repays
470
485
  only `filledAt >= openedAt`. A gateway that predates it omits the field; the offered `validFrom`
@@ -73,6 +73,24 @@ var NETWORKS = {
73
73
  nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
74
74
  testnet: true
75
75
  },
76
+ base: {
77
+ id: "base",
78
+ kind: "evm",
79
+ name: "Base",
80
+ chainId: 8453,
81
+ explorerUrl: "https://basescan.org",
82
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
83
+ testnet: false
84
+ },
85
+ base_sepolia: {
86
+ id: "base_sepolia",
87
+ kind: "evm",
88
+ name: "Base Sepolia",
89
+ chainId: 84532,
90
+ explorerUrl: "https://sepolia.basescan.org",
91
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
92
+ testnet: true
93
+ },
76
94
  tron_nile: { id: "tron_nile", kind: "tron", name: "Tron Nile", explorerUrl: "https://nile.tronscan.org", testnet: true },
77
95
  tron_shasta: { id: "tron_shasta", kind: "tron", name: "Tron Shasta", explorerUrl: "https://shasta.tronscan.org", testnet: true }
78
96
  };
@@ -88,5 +106,5 @@ function networkByChainId(chainId) {
88
106
  }
89
107
 
90
108
  export { NETWORKS, NETWORK_ALIASES, networkByChainId, networkKindOf, networkOf };
91
- //# sourceMappingURL=chunk-IAPV7XWJ.js.map
92
- //# sour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jE,SAAS,UAAU,EAAA,EAAiC;AACzD,EAAA,OAAO,QAAA,CAAS,eAAA,CAAgB,EAAE,CAAA,IAAK,EAAE,CAAA;AAC3C;AAEO,SAAS,cAAc,EAAA,EAAqC;AACjE,EAAA,OAAO,SAAA,CAAU,EAAE,CAAA,EAAG,IAAA;AACxB;AAGO,SAAS,iBAAiB,OAAA,EAAsC;AACrE,EAAA,OAAO,MAAA,CAAO,OAAO,QAAQ,CAAA,CAAE,KAAK,CAAC,CAAA,KAAM,CAAA,CAAE,OAAA,KAAY,OAAO,CAAA;AAClE","file":"chunk-ZCQZ34HG.js","sourcesContent":["/**\n * `@cancore/contracts/networks` — the chains Cancore settles on, by the ids the\n * API uses (`sourceNetwork`, `targetNetwork` in an order are these keys).\n *\n * Three kinds, because three address formats and three signing models:\n * `evm` (0x…, EIP-155 chain id), `tron` (base58, same Solidity, no chain id in\n * the EVM sense), `canton` (party ids, no addresses at all). A caller that\n * branches on `kind` instead of on the id keeps working when a chain is added.\n *\n * Contract addresses live next door in `DEPLOYMENTS`, keyed by environment —\n * dev, testnet and mainnet each have their own HTLC. `BUILD_HASHES` (from `.`)\n * pins the build of a release, not what an address runs (see `DEPLOYMENTS`).\n */\n\nexport type NetworkKind = 'evm' | 'tron' | 'canton';\n\nexport interface Network {\n /** The id the Cancore API uses for this chain. */\n id: string;\n kind: NetworkKind;\n name: string;\n /** EIP-155 chain id; absent for Tron and Canton. */\n chainId?: number;\n /** Where a transaction or address of this chain can be looked at. */\n explorerUrl?: string;\n nativeCurrency?: { name: string; symbol: string; decimals: number };\n testnet: boolean;\n}\n\nexport const NETWORKS: Readonly<Record<string, Network>> = {\n canton: { id: 'canton', kind: 'canton', name: 'Canton', testnet: false },\n ethereum: {\n id: 'ethereum', kind: 'evm', name: 'Ethereum', chainId: 1, explorerUrl: 'https://etherscan.io',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, testnet: false,\n },\n sepolia: {\n id: 'sepolia', kind: 'evm', name: 'Sepolia', chainId: 11155111, explorerUrl: 'https://sepolia.etherscan.io',\n nativeCurrency: { name: 'Sepolia ETH', symbol: 'ETH', decimals: 18 }, testnet: true,\n },\n bnb: {\n id: 'bnb', kind: 'evm', name: 'BNB Chain', chainId: 56, explorerUrl: 'https://bscscan.com',\n nativeCurrency: { name: 'BNB', symbol: 'BNB', decimals: 18 }, testnet: false,\n },\n bnb_testnet: {\n id: 'bnb_testnet', kind: 'evm', name: 'BNB Testnet', chainId: 97, explorerUrl: 'https://testnet.bscscan.com',\n nativeCurrency: { name: 'Test BNB', symbol: 'tBNB', decimals: 18 }, testnet: true,\n },\n arbitrum: {\n id: 'arbitrum', kind: 'evm', name: 'Arbitrum One', chainId: 42161, explorerUrl: 'https://arbiscan.io',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, testnet: false,\n },\n arbitrum_sepolia: {\n id: 'arbitrum_sepolia', kind: 'evm', name: 'Arbitrum Sepolia', chainId: 421614, explorerUrl: 'https://sepolia.arbiscan.io',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, testnet: true,\n },\n robinhood: {\n id: 'robinhood', kind: 'evm', name: 'Robinhood Chain', chainId: 4663, explorerUrl: 'https://robinhoodchain.blockscout.com',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, testnet: false,\n },\n robinhood_testnet: {\n id: 'robinhood_testnet', kind: 'evm', name: 'Robinhood Testnet', chainId: 46630, explorerUrl: 'https://explorer.testnet.chain.robinhood.com',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, testnet: true,\n },\n base: {\n id: 'base', kind: 'evm', name: 'Base', chainId: 8453, explorerUrl: 'https://basescan.org',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, testnet: false,\n },\n base_sepolia: {\n id: 'base_sepolia', kind: 'evm', name: 'Base Sepolia', chainId: 84532, explorerUrl: 'https://sepolia.basescan.org',\n nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 }, testnet: true,\n },\n tron_nile: { id: 'tron_nile', kind: 'tron', name: 'Tron Nile', explorerUrl: 'https://nile.tronscan.org', testnet: true },\n tron_shasta: { id: 'tron_shasta', kind: 'tron', name: 'Tron Shasta', explorerUrl: 'https://shasta.tronscan.org', testnet: true },\n};\n\n/** `eth` is an older alias of `ethereum` still seen in order payloads. */\nexport const NETWORK_ALIASES: Readonly<Record<string, string>> = { eth: 'ethereum' };\n\nexport function networkOf(id: string): Network | undefined {\n return NETWORKS[NETWORK_ALIASES[id] ?? id];\n}\n\nexport function networkKindOf(id: string): NetworkKind | undefined {\n return networkOf(id)?.kind;\n}\n\n/** The network for an EIP-155 chain id, e.g. from a wallet's `eth_chainId`. */\nexport function networkByChainId(chainId: number): Network | undefined {\n return Object.values(NETWORKS).find((n) => n.chainId === chainId);\n}\n"]}
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-C6) and recomputes `orderHash` from these fields itself.
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
@@ -1,5 +1,5 @@
1
1
  export { ATTESTOR_SET_ABI, ATTESTOR_SET_ERRORS, CANCORE_ROUTER_ABI, CANCORE_ROUTER_ERRORS, CNRX_ABI, CNRX_ERRORS, CNRX_STAKING_ABI, CNRX_STAKING_ERRORS, FEE_VAULT_ABI, FEE_VAULT_ERRORS, HTLC_ABI, HTLC_ERRORS, IATTRIBUTE_ABI, IBURN_MINT_ERC20_ABI, ICANCORE_ROUTER_ABI, ICANCORE_ROUTER_ERRORS, IFORMULA_ABI, IHTLC_ABI, IPAYMENT_ABI, IPERMIT2_ABI, IRESOLVER_ABI, ISTEP_ABI, IVARIABLE_ROLE_ABI, MULTI_BALANCE_CHECKER_ABI, POINTS_CLAIM_ABI, POINTS_CLAIM_ERRORS } from './chunk-2ELHDMZ7.js';
2
- export { NETWORKS, NETWORK_ALIASES, networkByChainId, networkKindOf, networkOf } from './chunk-IAPV7XWJ.js';
2
+ export { NETWORKS, NETWORK_ALIASES, networkByChainId, networkKindOf, networkOf } from './chunk-ZCQZ34HG.js';
3
3
  import { utf8ToBytes, concatBytes, bytesToHex, hexToBytes } from '@noble/hashes/utils';
4
4
  import { keccak_256 } from '@noble/hashes/sha3';
5
5
 
@@ -9,20 +9,26 @@ var DEPLOYMENTS = {
9
9
  { network: "ethereum", chainId: 1, htlc: "0xB3f8BD762fa2a895Ba8Cd35142b7b82b8b413F76", htlcBlock: 24699416, multiBalanceChecker: "0xe025CcCDf82F4165633C6033B7F13690B16c8a84" },
10
10
  { network: "bnb", chainId: 56, htlc: "0xB3f8BD762fa2a895Ba8Cd35142b7b82b8b413F76", htlcBlock: 87710517, multiBalanceChecker: "0xe025CcCDf82F4165633C6033B7F13690B16c8a84" },
11
11
  { network: "arbitrum", chainId: 42161, htlc: "0x1794fe17eB780619FAD46BAf80F7628F7495378b", htlcBlock: 443810007, multiBalanceChecker: "0x9ed2e0220e8d069C515972AE369C3FCE3bB29239" },
12
- { network: "robinhood", chainId: 4663, htlc: "0xB3f8BD762fa2a895Ba8Cd35142b7b82b8b413F76", htlcBlock: 26837336, multiBalanceChecker: "0x1794fe17eB780619FAD46BAf80F7628F7495378b" }
12
+ { network: "robinhood", chainId: 4663, htlc: "0xB3f8BD762fa2a895Ba8Cd35142b7b82b8b413F76", htlcBlock: 26837336, multiBalanceChecker: "0x1794fe17eB780619FAD46BAf80F7628F7495378b" },
13
+ // Base (CAN-3264), deployed 2026-11-05 — same nonce-derived addresses as Ethereum/BNB/Arbitrum, different contracts.
14
+ { network: "base", chainId: 8453, htlc: "0xB3f8BD762fa2a895Ba8Cd35142b7b82b8b413F76", htlcBlock: 53546156, multiBalanceChecker: "0xe025CcCDf82F4165633C6033B7F13690B16c8a84" }
13
15
  ],
14
16
  testnet: [
15
17
  { network: "sepolia", chainId: 11155111, htlc: "0xc705C735278AEeF773acb6d1028D8A241D8a9556", htlcBlock: 10334457, multiBalanceChecker: "0x99182E3F18555CFB08e6443e68a11982eF686522" },
16
18
  { network: "bnb_testnet", chainId: 97, htlc: "0x36D7BEBDB5f93b7b926D621E412132dF89628810", htlcBlock: 92435953, multiBalanceChecker: "0x079bDc94B34EC0e905DcfDB516bdE2f292Efcef2" },
17
19
  { network: "arbitrum_sepolia", chainId: 421614, htlc: "0x07a6ccF1f0113e2329Bb2460b28eC0d169f5080E", htlcBlock: 245190705, multiBalanceChecker: "0x555Bef5d2f89Fc81c77b930AB6c0D6734bDE569e" },
18
- { network: "robinhood_testnet", chainId: 46630, htlc: "0x5eBf3faAf3a86c37dDf6a46075b8366Ed4D8021A", htlcBlock: 96742769, multiBalanceChecker: "0x9548fd6fA8A3869b215E9D86F6a2628Bf2BEFB74" }
20
+ { network: "robinhood_testnet", chainId: 46630, htlc: "0x5eBf3faAf3a86c37dDf6a46075b8366Ed4D8021A", htlcBlock: 96742769, multiBalanceChecker: "0x9548fd6fA8A3869b215E9D86F6a2628Bf2BEFB74" },
21
+ // 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" }
19
23
  ],
20
24
  devnet: [
21
25
  // Routers: evm-contracts deployments/router/dev/*.json (#120, CAN-2327), verified on chain 2026-10-14.
22
26
  { network: "sepolia", chainId: 11155111, htlc: "0xc74469B26206A7b3Aee2781EC21F9F47a1552DD6", htlcBlock: 10469876, router: "0xfd227a0de77807206f4eEF9eE6eDd5795a45EF95", routerBlock: 11913649 },
23
27
  { network: "bnb_testnet", chainId: 97, htlc: "0xC649d578FD0122E2Ce3Bcf6b89E3ef2564d1a30D", htlcBlock: 96439032, router: "0x57A8ad8392C5fF21aF52Fc3Cf246C1a464aCc6B1", routerBlock: 136752813 },
24
28
  { network: "arbitrum_sepolia", chainId: 421614, htlc: "0xE23A046Df3542C4C548162adab4397956b136031", htlcBlock: 251260393, router: "0x7e27831316F7Ee8E44B96056F4354A6D1a22953a", routerBlock: 319105856 },
25
- { network: "robinhood_testnet", chainId: 46630, htlc: "0x58D154441Fd7efEd22E49Eda369909DdbE54cC0a", htlcBlock: 96651438, multiBalanceChecker: "0x1b2A32A976F904a1fca87D427239635Ccd97FaFb", router: "0xF833A980ae858fe3cD14a79a9f610525AbB95BF9", routerBlock: 135089078 }
29
+ { network: "robinhood_testnet", chainId: 46630, htlc: "0x58D154441Fd7efEd22E49Eda369909DdbE54cC0a", htlcBlock: 96651438, multiBalanceChecker: "0x1b2A32A976F904a1fca87D427239635Ccd97FaFb", router: "0xF833A980ae858fe3cD14a79a9f610525AbB95BF9", routerBlock: 135089078 },
30
+ // Base Sepolia dev stand (CAN-3262), deployed 2026-11-04; no intent router on Base yet.
31
+ { network: "base_sepolia", chainId: 84532, htlc: "0xdA2bbf80d1F3e5689eDbF56488201bB05bCCBc5E", htlcBlock: 54546199, multiBalanceChecker: "0x5eBf3faAf3a86c37dDf6a46075b8366Ed4D8021A" }
26
32
  ]
27
33
  };
28
34
  var PERMIT2_ADDRESS = "0x000000000022D473030F116dDEE9F6B43aC78BA3";
@@ -739,7 +745,8 @@ var DECLINE_REASONS = [
739
745
  "ESCROW_MISMATCH",
740
746
  "PROOF_WINDOW_TOO_SHORT",
741
747
  "SKEW_MARGIN_TOO_SHORT",
742
- "DRAW_MISMATCH"
748
+ "DRAW_MISMATCH",
749
+ "RECIPIENT_NOT_READY"
743
750
  ];
744
751
  var ERROR_CODES = [
745
752
  "BAD_REQUEST",
@@ -2529,7 +2536,7 @@ var messages_schema_default = {
2529
2536
  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]`" },
2530
2537
  declineReason: {
2531
2538
  anyOf: [
2532
- { 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"] },
2539
+ { 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"] },
2533
2540
  { $ref: "#/$defs/futureEnumValue" }
2534
2541
  ]
2535
2542
  },
@@ -3573,6 +3580,7 @@ var rest_schema_default = {
3573
3580
  { method: "GET", path: "/v1/filler/canton/holdings", auth: "bearer", query: "#/$defs/pageQuery", response: "#/$defs/cantonHoldingList" },
3574
3581
  { method: "GET", path: "/v1/filler/canton/delivery-orders", auth: "bearer", query: "#/$defs/pageQuery", response: "#/$defs/cantonDeliveryOrderList" },
3575
3582
  { method: "GET", path: "/v1/filler/canton/intents/{orderHash}", auth: "bearer", response: "#/$defs/cantonIntent" },
3583
+ { method: "GET", path: "/v1/filler/canton/recipient-readiness/{orderHash}", auth: "bearer", response: "#/$defs/cantonRecipientReadiness" },
3576
3584
  { method: "GET", path: "/v1/filler/routes", auth: "bearer", response: "messages.schema.json#/$defs/routes.state" },
3577
3585
  { method: "POST", path: "/v1/filler/routes", auth: "bearer", request: "messages.schema.json#/$defs/routes.set", response: "messages.schema.json#/$defs/routes.state" }
3578
3586
  ],
@@ -3775,9 +3783,22 @@ var rest_schema_default = {
3775
3783
  required: ["items", "nextCursor"],
3776
3784
  properties: { items: { type: "array", items: { $ref: "#/$defs/cantonDeliveryOrder" } }, nextCursor: { type: ["string", "null"] } }
3777
3785
  },
3786
+ cantonRecipientReadiness: {
3787
+ type: "object",
3788
+ 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",
3789
+ required: ["orderHash", "deliveryOrderCid", "recipient", "asset", "ready", "reason"],
3790
+ properties: {
3791
+ orderHash: { $ref: "messages.schema.json#/$defs/bytes32" },
3792
+ deliveryOrderCid: { type: "string", minLength: 1 },
3793
+ recipient: { type: "string", minLength: 1, description: "DeliveryOrder.recipient" },
3794
+ asset: { $ref: "messages.schema.json#/$defs/cantonAsset", description: "DeliveryOrder.instrumentId" },
3795
+ ready: { type: "boolean" },
3796
+ reason: { anyOf: [{ enum: ["RECIPIENT_NOT_READY", "INSTRUMENT_NOT_SUPPORTED", null] }, { $ref: "messages.schema.json#/$defs/futureEnumValue" }], description: "why not; null when ready" }
3797
+ }
3798
+ },
3778
3799
  cantonIntent: {
3779
3800
  type: "object",
3780
- 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",
3801
+ 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",
3781
3802
  required: ["intentCid", "templateId", "orderHash", "owner", "operator", "filler", "fillerId", "requestId", "asset", "amount", "destination", "minReceived", "feeRate", "fillDeadline", "refundAfter", "orderCreatedAt", "allocationCid", "allocation"],
3782
3803
  properties: {
3783
3804
  intentCid: { type: "string", minLength: 1 },
@@ -3813,6 +3834,17 @@ var rest_schema_default = {
3813
3834
  allocation: {
3814
3835
  anyOf: [{ $ref: "#/$defs/cantonAllocation" }, { type: "null" }],
3815
3836
  description: "the contract allocationCid names, by its AllocationV2 view; null when it is not live"
3837
+ },
3838
+ settlementFactory: {
3839
+ anyOf: [
3840
+ {
3841
+ type: "object",
3842
+ required: ["contractId", "live"],
3843
+ properties: { contractId: { type: "string", minLength: 1 }, live: { type: "boolean" } }
3844
+ },
3845
+ { type: "null" }
3846
+ ],
3847
+ 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"
3816
3848
  }
3817
3849
  }
3818
3850
  },