@engramx/idl 0.16.1-rc.1 → 0.17.0-rc.1

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.
@@ -420,17 +420,17 @@ export interface _SERVICE {
420
420
  * / does with its memory head, and the biller with its treasury head.
421
421
  * /
422
422
  * / The argument for anchoring the treasury's ledger head in the registry applies to escrow with full
423
- * / force: a self-attested commerce ledger sitting
424
- * / beside witnessed ones is the asymmetry an auditor finds first. Every chain in this system is
425
- * / witnessed by a party that does not control it, or the phrase means nothing.
423
+ * / force: a self-attested commerce ledger sitting beside witnessed ones is the asymmetry an auditor
424
+ * / finds first. Every chain in this system is witnessed by a party that does not control it, or the
425
+ * / phrase means nothing.
426
426
  * /
427
427
  * / Best-effort and isolated: a registry that is slow or down must never take the market with it.
428
428
  * / The FAILURE IS RECORDED rather than swallowed — an anchor push that silently stopped would
429
429
  * / leave the chain looking witnessed while it was not, which is worse than a visibly missing one.
430
430
  * /
431
- * / ⟨RENAMED 2026-10-02 from `sysAnchorNow`, with `setRegistryId` and for the same reason: its
432
- * / caller is the market's admin, a person, so it does not belong to the canister-to-canister
433
- * / tier the `sys` prefix names.⟩
431
+ * / Not `sys`-prefixed (it was `sysAnchorNow` until 2026-10-02), for the same reason as
432
+ * / `setRegistryId`: its caller is the market's admin, a person, so it does not belong to the
433
+ * / canister-to-canister tier the `sys` prefix names.
434
434
  */
435
435
  anchorNow: ActorMethod<[], Result>;
436
436
  /**
@@ -446,27 +446,21 @@ export interface _SERVICE {
446
446
  * / · the job is not pending ⟶ properly `#Conflict`
447
447
  * / · **you are not the seller** ⟶ properly `#Refused`
448
448
  * /
449
- * / **Read the MESSAGE, not the arm, on this method only.** That is the opposite of what the 0.16.0
450
- * / result rule (one Result shape, refusals as values) asks
451
- * / everywhere else, and it is stated here rather than left to be discovered: a caller branching
452
- * / on the arm will retry a call that can never succeed for it. Recovering the distinction needs
453
- * / the LIBRARY to carry arms — matching its prose here would reintroduce exactly the
454
- * / message-branching that rule abolished, and would break silently on an ic402 bump. ⟨Three costed
455
- * / options were recorded for it, 2026-08-21. This is the market's whole ic402
456
- * / seam, not one method: 6 call sites collapse a module error into `#Conflict`.⟩
457
- * / ⟨2026-10-02 — counted again, and ruled.⟩ ELEVEN sites on this market collapse an ic402 text
458
- * / into `#Conflict`, not 6: `setServiceEnabled`, `claimJob`, `submitJobResult`, `confirmJob`,
459
- * / `disputeJob`, `resolveDispute`, `reconcileSession`, `forceResolveSession`, `recoverEscrow`,
460
- * / `reconcileJob`, `resolveJob` — each now carries its own audited caveat. Four can carry a
461
- * / refusal of the caller's standing — `claimJob`, `confirmJob`, `disputeJob` and `submitJobResult`;
462
- * / `setServiceEnabled`, the fourth noted on 2026-08-21, is now gated by this canister before the
463
- * / library is called; the other six are state behind this canister's own gate. Read-the-message
464
- * / is RATIFIED as the 0.16.0 contract (the owner's ruling of 2026-10-02, as the review before the
465
- * / cut recommended); giving the library one arm per kind of refusal is post-cut dependency work,
466
- * / not a change made mid-cut.
467
- * / ⟨2026-10-07, beside the count above⟩ Twelve: the admin's `retrySellerPayment` (the owner's
468
- * / decision of that day) passes the library's settle refusal through as `#Conflict` too — state
469
- * / behind this canister's own gate, like the other six.
449
+ * / **Read the MESSAGE, not the arm, on this method.** That is the opposite of what the interface's
450
+ * / result rule (one Result shape, refusals as values) asks everywhere else, and it is stated here
451
+ * / rather than left to be discovered: a caller branching on the arm will retry a call that can
452
+ * / never succeed for it. Recovering the distinction needs the LIBRARY to carry arms — matching its
453
+ * / prose here would reintroduce exactly the message-branching that rule abolished, and would break
454
+ * / silently on an ic402 bump.
455
+ * /
456
+ * / This is the market's whole ic402 seam, not one method. Twelve sites on this market collapse an
457
+ * / ic402 text into `#Conflict`, and each carries its own caveat. Four can carry a refusal of the
458
+ * / caller's standing — `claimJob`, `confirmJob`, `disputeJob` and `submitJobResult`.
459
+ * / `setServiceEnabled` is gated by this canister before the library is called, so it no longer
460
+ * / can. Seven are state refusals behind this canister's own gate — `resolveDispute`,
461
+ * / `reconcileSession`, `forceResolveSession`, `recoverEscrow`, `reconcileJob`, `resolveJob` and the
462
+ * / admin's `retrySellerPayment`. Read-the-message is this interface version's contract; giving the
463
+ * / library one arm per kind of refusal is dependency work, not a change this method can make.
470
464
  * /
471
465
  * / It also refuses while TRADE IS FROZEN, and that one is a true `#Conflict` — the refusal says
472
466
  * / so explicitly ("Not a permission problem and not a missing job"), and `isTradeFrozen()` is the
@@ -474,9 +468,12 @@ export interface _SERVICE {
474
468
  */
475
469
  claimJob: ActorMethod<[string], Result>;
476
470
  /**
477
- * / ⟨0.16.0⟩ `confirmJob` ABSORBS `confirmJobEvm`. One buyer action, two ways to prove you
471
+ * / `confirmJob` absorbed `confirmJobEvm` in 0.16.0. One buyer action, two ways to prove you
478
472
  * / are the buyer.
479
473
  * /
474
+ * / Terminal money settlement — the seller gets paid. Honours the freeze exactly like every
475
+ * / other settle path; a settlement that ignored the freeze would make the freeze a suggestion.
476
+ * /
480
477
  * / The pair existed because authorization arrives differently on the two rails, not because the
481
478
  * / ACT differs: both release escrow to the seller. An ICP-rail buyer proves identity by calling
482
479
  * / as their principal; an EVM-rail buyer has no principal here at all, so they prove it with a
@@ -495,7 +492,7 @@ export interface _SERVICE {
495
492
  * / `#Conflict`) and **`Not the buyer`** (properly `#Refused`) all arrive as `#Conflict`. On THIS
496
493
  * / method read the MESSAGE rather than the arm — it is terminal money settlement, so a caller
497
494
  * / who reads `#Conflict` as "retry later" will retry a release that can never happen for them.
498
- * / Same seam as `claimJob`; three costed fixes were recorded ⟨2026-08-21⟩.
495
+ * / Same seam as `claimJob`.
499
496
  */
500
497
  confirmJob: ActorMethod<[string, [] | [Uint8Array | number[]]], Result>;
501
498
  /**
@@ -508,8 +505,8 @@ export interface _SERVICE {
508
505
  /**
509
506
  * / Submit a paid service request. Returns a job id, or the price.
510
507
  * /
511
- * / ⟨0.16.0⟩ TWO GATES FROM THE ENGRAM DO NOT TRAVEL, and both for the same reason: they were the
512
- * / engram protecting ITS OWNER'S money, which is custody, and custody stayed.
508
+ * / TWO GATES THE ENGRAM HAD BEFORE 0.16.0 DO NOT TRAVEL HERE, and both for the same reason: they
509
+ * / were the engram protecting ITS OWNER'S money, which is custody, and custody stayed.
513
510
  * /
514
511
  * / · `requireAgentOrOwner` — the engram only let its own agents spend its funds. Here the
515
512
  * / caller is a BUYER paying with their own signature; gating that to a roster would mean a
@@ -537,7 +534,7 @@ export interface _SERVICE {
537
534
  */
538
535
  deleteEndpoint: ActorMethod<[string], Result>;
539
536
  /**
540
- * / ⟨0.16.0⟩ `disputeJob` ABSORBS `disputeJobEvm`, exactly as confirmJob does, and for the
537
+ * / `disputeJob` absorbed `disputeJobEvm` in 0.16.0, exactly as confirmJob did, and for the
541
538
  * / same reason: one act, two proofs of buyership.
542
539
  * /
543
540
  * / NOT FREEZE-GATED, and that asymmetry with confirmJob is deliberate. Recording a dispute moves
@@ -548,7 +545,6 @@ export interface _SERVICE {
548
545
  * / ⚠ `#Conflict` HERE ALSO COVERS "NOT THE BUYER" — same ic402 seam as `confirmJob` and
549
546
  * / `claimJob`: `Job not found`, `Job not in submitted status` and **`Not the buyer`** all arrive
550
547
  * / as `#Conflict` because the library hands back strings. Read the MESSAGE, not the arm.
551
- * / ⟨2026-08-21; three fixes were recorded, with why none is a one-liner.⟩
552
548
  * /
553
549
  * / ⚠ AND NOTE WHERE THE DISPUTE GOES: `resolveDispute` is answered by the SERVICE'S OWN SELLER
554
550
  * / — the party being disputed. This market has no admin arbitration and no appeal, deliberately
@@ -579,18 +575,16 @@ export interface _SERVICE {
579
575
  * / NOT freeze-gated, and the asymmetry is the point: a freeze halts SETTLEMENT, and this settles
580
576
  * / nothing. An admin must be able to repair a record during the halt that made the record wrong.
581
577
  * /
582
- * / ⟨2026-10-02, the payment library's refusal channel — audited at this site⟩ `#Conflict` here
583
- * / carries ic402's text, and ic402 answers with one text channel for every refusal. AUDITED:
584
- * / this method's own gate (`requireAdmin`) decides authorization before the library is called, and every
585
- * / text the library returns here is a STATE refusal (session missing, or not stuck in #closing) — including "not found", which
586
- * / arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
587
- * / contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
588
- * / dependency work.
589
- * /
590
- * / ⟨2026-11-05, ic402 2.20.0⟩ NOT FOR AN ICP SESSION LEFT `#closing` BY AN UNKNOWN SETTLE (a close that
591
- * / answered "outcome unknown"): `reconcileSession` resolves that one from the escrow balance. Forcing it
592
- * / would mark it closed whether or not the settle landed, stranding the recipient's share if it did
593
- * / not. This method stays for a close that trapped after an await.
578
+ * / NOT FOR AN ICP SESSION LEFT `#closing` BY AN UNKNOWN SETTLE (a close that answered "outcome
579
+ * / unknown"): `reconcileSession` resolves that one from the escrow balance. Forcing it would mark it
580
+ * / closed whether or not the settle landed, stranding the recipient's share if it did not. This
581
+ * / method is for a close that trapped after an await.
582
+ * /
583
+ * / `#Conflict` here carries ic402's text, and ic402 answers with one text channel for every
584
+ * / refusal. This method's own gate (`requireAdmin`) decides authorization before the library is
585
+ * / called, so every text the library returns here is a STATE refusal (session missing, or not stuck
586
+ * / in #closing) — including "not found", which arrives as `#Conflict` rather than `#NotFound`. Read
587
+ * / the MESSAGE for which; the seam is described at `claimJob`.
594
588
  */
595
589
  forceResolveSession: ActorMethod<[string], Result>;
596
590
  /**
@@ -623,23 +617,21 @@ export interface _SERVICE {
623
617
  * / The `approvalId` parameter is gone, as it is on openSession: an approval is the BUYER's own
624
618
  * / custody policy, checked on their engram before they call here.
625
619
  * /
626
- * / ⟨update-for-read⟩ UPDATE, NOT QUERY: the paid path awaits `gate.settle(sig, ?amount)`, an inter-canister
627
- * / settlement. A query cannot await it, and splitting the free and paid halves into two methods
628
- * / would put the price and the content behind different names for one buyer act.
620
+ * / UPDATE, NOT QUERY: the paid path awaits `gate.settleFrom(msg.caller, sig, ?amount)`, an
621
+ * / inter-canister settlement. A query cannot await it, and splitting the free and paid halves into
622
+ * / two methods would put the price and the content behind different names for one buyer act.
629
623
  * /
630
- * / ⟨2026-09-30, ic402 2.17.0⟩ It now awaits `gate.settleFrom(msg.caller, sig, ?amount)`. On the
631
- * / ICP rail a signature's `sender` is only a claim — the payer's ICRC-2 allowance is the whole
632
- * / authentication — so `settle` would spend the allowance of whoever the signature named and
633
- * / deliver the content to the caller. `settleFrom` refuses unless the caller IS the named sender,
634
- * / before the nonce lock or any ledger call, and the refusal reaches the buyer as #Refused with
635
- * / ic402's text naming both principals. Pay as the principal that approved the allowance.
624
+ * / `settleFrom`, not the bare `settle` (ic402 2.17.0 and later): on the ICP rail a signature's
625
+ * / `sender` is only a claim — the payer's ICRC-2 allowance is the whole authentication — so `settle`
626
+ * / would spend the allowance of whoever the signature named and deliver the content to the caller.
627
+ * / `settleFrom` refuses unless the caller IS the named sender, before the nonce lock or any ledger
628
+ * / call, and the refusal reaches the buyer as #Refused with ic402's text naming both principals. Pay
629
+ * / as the principal that approved the allowance.
636
630
  */
637
631
  getContent: ActorMethod<[string, [] | [PaymentSignature]], Result_17>;
638
632
  /**
639
- * / ⟨0.16.0⟩ THE `getChunk` FIX, and it is the sharpest single case in the August 2026 audit of every
640
- * / wire method.
641
- * /
642
- * / The engram's version was:
633
+ * / Why the reply is a `Wire.Result` and not an option. Before 0.16.0 the engram served this as
634
+ * / `getChunk`, and that version was:
643
635
  * /
644
636
  * / switch (gate.verifyGrant(msg.caller, grant)) {
645
637
  * / case (#ok) { contentStore.getChunk(grant.contentRef.id, index) };
@@ -658,9 +650,9 @@ export interface _SERVICE {
658
650
  * / request and a support ticket generated by a type.
659
651
  * /
660
652
  * / The honesty gates could not see it. `gate.verifyGrant` is a PAYMENT gate, and the gate-call
661
- * / list they scan holds authorization helpers only — so a refusal fabricated behind a payment
662
- * / check was out of scope by construction rather than by ruling. The 0.16.0 honesty rule adds
663
- * / payment gates to that list; this method is why.
653
+ * / list they scanned held authorization helpers only — so a refusal fabricated behind a payment
654
+ * / check was out of scope by construction. Since 0.16.0 that list includes payment gates; this
655
+ * / method is why.
664
656
  */
665
657
  getContentChunk: ActorMethod<[AccessGrant, bigint], Result_15>;
666
658
  /**
@@ -670,15 +662,15 @@ export interface _SERVICE {
670
662
  */
671
663
  getGenesisNote: ActorMethod<[], GenesisNote>;
672
664
  /**
673
- * / ⟨0.16.0, refusals are values, never traps⟩
674
- * / The engram TRAPPED here. Trapping was the right fix at the time — it stopped the
675
- * / refusal masquerading as a not-found — but it hands the caller no structured reason and cannot
676
- * / be told from a genuine fault. Under the 0.16.0 result rule the refusal is a value.
665
+ * / A refusal here is a value, never a trap. The engram, which served jobs before 0.16.0, TRAPPED
666
+ * / here. Trapping was the right fix at the time — it stopped the refusal masquerading as a
667
+ * / not-found — but it hands the caller no structured reason and cannot be told from a genuine
668
+ * / fault.
677
669
  * /
678
670
  * / The comment the engram carried is worth keeping because it names what went wrong: `null`
679
- * / collapsed "unknown jobId" and "not authorized", and the product rendered the wrong conclusion
680
- * / from it — the marketplace UI printed "Job not found (or not yet visible)" at a caller who was
681
- * / merely unauthorized. Job existence is not the secret: `getJobCounts()` is ungated.
671
+ * / collapsed "unknown jobId" and "not authorized", and a client rendered the wrong conclusion from
672
+ * / it — "Job not found (or not yet visible)", printed at a caller who was merely unauthorized. Job
673
+ * / existence is not the secret: `getJobCounts()` is ungated.
682
674
  */
683
675
  getJob: ActorMethod<[string], Result_16>;
684
676
  /**
@@ -699,11 +691,9 @@ export interface _SERVICE {
699
691
  */
700
692
  getJobResult: ActorMethod<[string], Result_15>;
701
693
  /**
702
- * / Terminal money settlement — the seller gets paid. Honours the freeze exactly like every
703
- * / other settle path; a settlement that ignored the freeze would make the freeze a suggestion.
704
694
  * / PUBLIC: a job's state, and nothing else about it.
705
695
  * /
706
- * / ⟨0.16.0⟩ THE UNGATED TWIN OF `getJob`, AND IT MUST STAY UNGATED. `getJob` is allowed to refuse
696
+ * / THE UNGATED TWIN OF `getJob`, AND IT MUST STAY UNGATED. `getJob` is allowed to refuse
707
697
  * / precisely because this exists: an EVM-rail buyer has NO PRINCIPAL on this canister, so a
708
698
  * / principal-gated read can never authorize them, and without a public status read they would
709
699
  * / have no way to see the state of a job they paid for. `getJob`'s refusal names this method for
@@ -711,8 +701,9 @@ export interface _SERVICE {
711
701
  * /
712
702
  * / Job existence is not the secret being kept — the payload is. Status and nothing more.
713
703
  * /
714
- * / The engram returned `?EngramJobStatus`, conflating "no such job" with a null-ish answer. Here
715
- * / a missing job is `#NotFound`, which is a fact rather than an absence a caller has to interpret.
704
+ * / The engram, which served jobs before 0.16.0, returned `?EngramJobStatus`, conflating "no such
705
+ * / job" with a null-ish answer. Here a missing job is `#NotFound`, which is a fact rather than an
706
+ * / absence a caller has to interpret.
716
707
  */
717
708
  getJobStatus: ActorMethod<[string], Result_14>;
718
709
  /**
@@ -732,7 +723,7 @@ export interface _SERVICE {
732
723
  /**
733
724
  * / A seller's own revenue on this market.
734
725
  * /
735
- * / ⟨0.16.0⟩ SELLER-SCOPED. The engram's version was owner-only and TRAPPED at everyone else,
726
+ * / SELLER-SCOPED. The engram's version (before 0.16.0) was owner-only and TRAPPED at everyone else,
736
727
  * / which was coherent when the owner was the only seller. Here every caller has a different
737
728
  * / answer, and no caller is entitled to another's: the numbers cover the caller's own listings
738
729
  * / and nothing is aggregated across sellers.
@@ -751,16 +742,16 @@ export interface _SERVICE {
751
742
  * / PUBLIC: what a buyer can learn about a seller, and the whole of it.
752
743
  * /
753
744
  * / The ENGRAM ID is the point of this read. This market runs no reputation system and issues no
754
- * / badges, so the honest trust signal is not a verdict we invent — it is a pointer to the record
755
- * / the seller already keeps. A buyer who wants to know whether this seller is a verified human,
756
- * / what their audit chain says, or how long they have existed asks THAT engram directly, and gets
757
- * / an answer this market cannot shade.
745
+ * / badges, so the honest trust signal is not a verdict the market invents — it is a pointer to the
746
+ * / record the seller already keeps. A buyer who wants to know whether this seller is a verified
747
+ * / human, what their audit chain says, or how long they have existed asks THAT engram directly, and
748
+ * / gets an answer this market cannot shade.
758
749
  * /
759
750
  * / `verified` is about ownership at a moment in time and nothing else. It is not an endorsement,
760
751
  * / and the field name is the strongest claim it makes.
761
752
  * /
762
- * / ⟨2026-11-04, the owner's sale-payout ruling⟩ It also says where this seller's sales land
763
- * / (`evmPayout`, `evmPayoutError`) and how many are still in flight (`parkedPayouts`,
753
+ * / It also says where this seller's sales land (`evmPayout`, `evmPayoutError`; a sale is paid into
754
+ * / the selling engram's own wallet) and how many are still in flight (`parkedPayouts`,
764
755
  * / `parkedSaleNotices`) — counts, never amounts (`Types.SellerStatus`).
765
756
  */
766
757
  getSellerStatus: ActorMethod<[Principal], Result_12>;
@@ -771,23 +762,16 @@ export interface _SERVICE {
771
762
  getSessionCounts: ActorMethod<[], SessionCounts>;
772
763
  http_request: ActorMethod<[HttpRequest], HttpResponse>;
773
764
  /**
774
- * / ⟨2026-09-30, ic402 2.17.0⟩ THE TWO PAID ROUTES HERE STAY ON `gate.settle`, AND THAT IS WHY NO
775
- * / FLOW MAY LEAVE A STANDING ALLOWANCE TO THIS MARKET. An HTTP request arrives with no caller to
776
- * / check (the gateway calls anonymously), so `settleFrom` cannot apply and ic402 says to keep
777
- * / `settle` on HTTP paths. Such a settle is authenticated only by the payer's ICRC-2 allowance:
778
- * / anyone who names a principal holding an unspent allowance to this canister can spend it here.
779
- * / The defence is on the paying side — approve exactly the price plus one ledger fee, expiring
780
- * / within minutes, immediately before paying (the SDK's `MarketClient` does). WHAT WOULD MAKE
781
- * / THIS WRONG: an HTTP route that could authenticate its payer, or a flow of ours that approves
782
- * / more than one payment's worth or without an expiry.
783
- * /
784
- * / ⟨CORRECTED 2026-09-30 — the owner's web-route answer⟩ The paragraph above is history. No web route
785
- * / settles an ICP-rail payment any more, so none spends an allowance and none can be used against
786
- * / a standing one. The one `gate.settle` left is on /service/, reached only with an EVM (`eip155:`)
787
- * / payment carrying the buyer's own EIP-3009 authorization — a signature that names the payment and
788
- * / travels privately in the request. An ICP-rail (ckUSDC) payment offered there is refused before
789
- * / any settle and pointed at the Candid `createJob`; /content/ sells nothing over the web
790
- * / (`contentNotSoldOverHttp`). ckUSDC is taken only by the Candid calls, which check their caller.
765
+ * / NO WEB ROUTE SETTLES AN ICP-RAIL PAYMENT, so none spends an ICRC-2 allowance and none can be used
766
+ * / against a standing one. An HTTP request arrives with no caller to check (the gateway calls
767
+ * / anonymously), so ic402's caller-checked `settleFrom` cannot apply, and a bare `settle` on the ICP
768
+ * / rail is authenticated only by the payer's allowance: anyone who names a principal holding an
769
+ * / unspent allowance to this canister could spend it. So the one `gate.settle` left is on /service/,
770
+ * / reached only with an EVM (`eip155:`) payment carrying the buyer's own EIP-3009 authorization — a
771
+ * / signature that names the payment and travels privately in the request. An ICP-rail (ckUSDC)
772
+ * / payment offered there is refused before any settle and pointed at the Candid `createJob`;
773
+ * / /content/ sells nothing over the web (`contentNotSoldOverHttp`). ckUSDC is taken only by the
774
+ * / Candid calls, which check their caller.
791
775
  * / WHAT WOULD MAKE THIS WRONG: a web route that settles a payment whose network is not `eip155:`.
792
776
  */
793
777
  http_request_update: ActorMethod<[HttpRequest], HttpResponse>;
@@ -851,12 +835,10 @@ export interface _SERVICE {
851
835
  * / `total` is the head counter, not the row count: this is a bounded ring, so a page that
852
836
  * / reported only what it returned would make a trimmed log look complete.
853
837
  * /
854
- * / ⟨2026-10-15, the owner's ruling of 2026-10-14 on the chained record⟩ The reply is the shared
855
- * / `Wire.RecordPage`, so
856
- * / one checker reads every chain. A viewer sees every entry, so `sealed` is always empty here;
857
- * / `ringFloor` says where the ring starts and `hashFirstFrom` where this record switched to the
858
- * / hash-first rule. The gate is unchanged (hash-only rows for strangers were ruled for the
859
- * / engram's record).
838
+ * / The reply is the shared `Wire.RecordPage`, so one checker reads every chain. A viewer sees
839
+ * / every entry, so `sealed` is always empty here; `ringFloor` says where the ring starts and
840
+ * / `hashFirstFrom` where this record switched to the hash-first rule. The gate is unchanged:
841
+ * / hash-only rows for strangers are the engram's record's rule, not this one's.
860
842
  */
861
843
  listAuditEntries: ActorMethod<[bigint, bigint], Result_11>;
862
844
  /**
@@ -878,7 +860,7 @@ export interface _SERVICE {
878
860
  /**
879
861
  * / Purchase history for one endpoint: its creator sees every row, a buyer sees their own.
880
862
  * /
881
- * / ⟨0.16.0⟩ Two defects close here at once, and they are the same defect wearing two hats.
863
+ * / Two defects were closed here at once in 0.16.0, and they are the same defect wearing two hats.
882
864
  * /
883
865
  * / The engram matched a buyer with `buyer == Principal.toText(msg.caller)` — string equality
884
866
  * / against a field that holds a principal on one rail and a `0x` address on the other. So an
@@ -897,7 +879,8 @@ export interface _SERVICE {
897
879
  */
898
880
  listEndpoints: ActorMethod<[[] | [EndpointStatus], bigint, bigint], Page_3>;
899
881
  /**
900
- * / ⟨0.16.0⟩ THE `listJobs` FIX — the second of the two fabricated empties the 0.16.0 honesty rule names.
882
+ * / Why a refusal is `#Refused` here and not an empty list — the second of two fabricated empties
883
+ * / fixed in 0.16.0.
901
884
  * /
902
885
  * / The engram's version ended its authorization check with `if (not (isOwner or
903
886
  * / isServiceOperator)) { return [] }`, and its own `.did` comment declared the behaviour on the
@@ -914,16 +897,17 @@ export interface _SERVICE {
914
897
  * / scan for a known set of authorization helpers; this method's check is two LOCAL BOOLEANS
915
898
  * / (`isOwner`, `isServiceOperator`), so the analyzer matched nothing and reported no finding. Its
916
899
  * / siblings `getJob` and `getJobResult` had already been converted to traps for exactly this
917
- * / defect; this one survived because it was written differently, not because it was ruled safe.
900
+ * / defect; this one survived because it was written differently, not because anyone had judged it
901
+ * / safe.
918
902
  * /
919
903
  * / Now: `#Refused` when the caller may not ask, `#NotFound` when the service does not exist —
920
904
  * / two facts that were one empty list.
921
905
  */
922
906
  listJobs: ActorMethod<[string, [] | [JobStatus], bigint, bigint], Result_7>;
923
907
  /**
924
- * / ⟨2026-11-04, the owner's sale-payout ruling⟩ The parked payouts to the caller's engram — a content sale
925
- * / whose push the ledger has not confirmed, each settled by `retrySalePayout` — so an unresolved
926
- * / payout is discoverable rather than something a seller must already know the id of.
908
+ * / The parked payouts to the caller's engram — a content sale whose push the ledger has not
909
+ * / confirmed, each settled by `retrySalePayout` — so an unresolved payout is discoverable rather
910
+ * / than something a seller must already know the id of.
927
911
  * /
928
912
  * / Behind the seller's CURRENT registration (`requireSellerRead`, the query twin of `requireSeller`),
929
913
  * / and scoped to that registration's engram by `Payments.parkedFor` — not an inline filter, for the
@@ -934,19 +918,19 @@ export interface _SERVICE {
934
918
  */
935
919
  listMyParkedPayouts: ActorMethod<[bigint, bigint], Result_6>;
936
920
  /**
937
- * / ⟨0.16.0⟩ `listAllServices` FOLDS in as `includeDisabled`.
921
+ * / `listAllServices` was folded in as `includeDisabled` in 0.16.0.
938
922
  * /
939
- * / The engram had two methods because the visibility rule differed: everyone saw enabled
940
- * / services; the owner and active sellers also saw disabled drafts. On a shared market that
941
- * / rule becomes per-seller — you see every enabled service, plus YOUR OWN disabled drafts — which
942
- * / is one query with a flag rather than two methods with divergent gates.
923
+ * / The engram, which served these before then, had two methods because the visibility rule
924
+ * / differed: everyone saw enabled services; the owner and active sellers also saw disabled drafts.
925
+ * / On a shared market that rule becomes per-seller — you see every enabled service, plus YOUR OWN
926
+ * / disabled drafts — which is one query with a flag rather than two methods with divergent gates.
943
927
  * /
944
928
  * / `withheld` counts other sellers' drafts that the flag asked for and the caller may not see. A
945
929
  * / seller can tell "no drafts" from "not yours to see" without learning whose they are.
946
930
  */
947
931
  listServices: ActorMethod<[boolean, bigint, bigint], Page>;
948
932
  /**
949
- * / ⟨0.16.0⟩ THE APPROVAL PARAMETER IS GONE, and its absence is the split working.
933
+ * / THE APPROVAL PARAMETER IS GONE (since 0.16.0), and its absence is the split working.
950
934
  * /
951
935
  * / The engram's openSession took an `approvalId` and could answer `#approvalPending` — because
952
936
  * / there, opening a session was THE ENGRAM SPENDING ITS OWNER'S MONEY, so the owner's approval
@@ -962,60 +946,52 @@ export interface _SERVICE {
962
946
  * / the market got simpler because the responsibility went where it belonged, not because anything
963
947
  * / was dropped.
964
948
  * /
965
- * / ⚠ ⟨2026-09-02 — OWNER-RULED: MARKET SESSIONS ARE NOT REQUIRED FOR NOW. The interfaces stay;
966
- * / this note is what makes them honest.⟩ THE SESSION LIFECYCLE HERE IS INERT: a session can be
967
- * / opened, and it can be closed or refunded, but it can never be SPENT. `gate.consumeVoucher` has
968
- * / **zero call sites in this canister** — the only two in the estate are on the ENGRAM, which
969
- * / runs its own separate paid-memory rail with its own gateway, `sess-N` counter and escrow
949
+ * / ⚠ MARKET SESSIONS ARE NOT IN USE (decided 2026-09-02: not required for now). The interfaces
950
+ * / stay, and this note is what makes them honest. THE SESSION LIFECYCLE HERE IS INERT: a session
951
+ * / can be opened, and it can be closed or refunded, but it can never be SPENT. `gate.consumeVoucher`
952
+ * / has **zero call sites in this canister** — the only two in this repository are on the ENGRAM,
953
+ * / which runs its own separate paid-memory rail with its own gateway, `sess-N` counter and escrow
970
954
  * / subaccount. So a market session is deposit-in and full-refund-out, and a buyer who opens one
971
955
  * / gets their money back minus two ckUSDC ledger fees, having bought nothing.
972
956
  * /
973
957
  * / WHY THE METHODS ARE KEPT RATHER THAN DELETED: they are a complete, reviewable lifecycle
974
958
  * / (open / end / forceClose / forceResolve / recoverEscrow / getSessionCounts) against a real
975
- * / escrow, and the ruling is "not required for now", not "never". Deleting them would mean
976
- * / re-deriving the seam when session billing is wanted, and the market is WITHHELD at 0.16.0 —
977
- * / in neither environment — so nothing here is reachable by a customer today regardless.
959
+ * / escrow, and the decision is "not required for now", not "never". Deleting them would mean
960
+ * / re-deriving the seam when session billing is wanted, and the market is withheld from 0.16.0's
961
+ * / deployments, so nothing here is reachable by a buyer today regardless.
978
962
  * /
979
963
  * / WHAT WOULD MAKE THIS SAFE TO ENABLE: a voucher-spend path — something on this canister that
980
- * / calls `gate.consumeVoucher` and delivers what the voucher paid for. Until that exists, the
981
- * / two `#Session` billing refusals say session billing is UNAVAILABLE rather than pointing
982
- * / buyers at `openSession`, which is what they used to do.
983
- * /
984
- * / ⟨2026-09-30, ic402 2.17.0⟩ That future spend path calls `gate.consumeVoucherFrom(msg.caller, …)`,
985
- * / not the bare `consumeVoucher`: the signed fallback is off on this canister, so the bare call
986
- * / refuses every voucher, and only the session key calling as itself may spend a session.
964
+ * / calls `gate.consumeVoucherFrom(msg.caller, …)` and delivers what the voucher paid for. Not the
965
+ * / bare `consumeVoucher`: the signed fallback is off on this canister (ic402 2.17.0 and later), so
966
+ * / the bare call refuses every voucher, and only the session key calling as itself may spend a
967
+ * / session. Until that path exists, the two `#Session` billing refusals say session billing is
968
+ * / UNAVAILABLE rather than pointing buyers at `openSession`, which is what they used to do.
987
969
  */
988
970
  openSession: ActorMethod<[SessionConfig, PaymentSignature], Result_5>;
989
971
  /**
990
- * / RENAMED from `requestSession` in the 0.16.0 interface pass: it is a pure dry run — a quote for a session
991
- * / the caller has not opened and is not committed to. `request` read as an action with an effect.
992
- * /
993
- * / PUBLIC: a price list nobody can read is not a price list, and this is the market's. ⟨The
994
- * / sentence was already here as "Ungated:"; only the marker the disclosure gate greps for was missing,
995
- * / which is why this method read as undefended when it was not.⟩
996
- * / ⟨CORRECTED 2026-08-24 — this said "UPDATE, NOT QUERY" under the update-for-read marker and cited a
997
- * / market ruling that a later market ruling had already closed.⟩ QUERY, per the ruled quote
998
- * / convention: FAST READS. Both `quotePayment` and `previewOpenSession` become queries, and the
999
- * / update-for-read rule's open-ruling exception retires with them — so the argument written here
1000
- * / for keeping it an update was arguing the losing side of a decision already made, and was added
1001
- * / the same day by not reading forward to the ruling. `gate.offerSession` is pure — it validates
1002
- * / the intent and returns it — so nothing forced the update in the first place.
1003
- * /
1004
- * / ONE-REPLICA CAVEAT, stated here because the ruling requires it at both sites: a query is one
1005
- * / replica's word and is NOT a settleable challenge. Nothing quoted here can be redeemed. The
1006
- * / commitment happens in `openSession`, which IS a certified update call, and a buyer who needs
1007
- * / the price attested rather than quoted takes it from that reply.
1008
- * /
1009
- * / ⟨2026-10-02⟩ Answers the house `Types.SessionIntent` — ic402's intent with `expiry` spelled
1010
- * / `expiryNs`. `openSession` hands ic402 its own record, from `sessionIntent()` below.
972
+ * / RENAMED from `requestSession` in 0.16.0: it is a pure dry run — a quote for a session the
973
+ * / caller has not opened and is not committed to. `request` read as an action with an effect.
974
+ * /
975
+ * / PUBLIC: a price list nobody can read is not a price list, and this is the market's.
976
+ * /
977
+ * / QUERY, like `quotePayment`: quotes are fast reads. `gate.offerSession` is pure — it validates
978
+ * / the intent and returns it — so nothing forces an update.
979
+ * /
980
+ * / ONE-REPLICA CAVEAT, stated at both quote methods: a query is one replica's word and is NOT a
981
+ * / settleable challenge. Nothing quoted here can be redeemed. The commitment happens in
982
+ * / `openSession`, which IS a certified update call, and a buyer who needs the price attested rather
983
+ * / than quoted takes it from that reply.
984
+ * /
985
+ * / Answers the market's own `Types.SessionIntent` — ic402's intent with `expiry` spelled
986
+ * / `expiryNs`. `openSession` hands ic402 the library's own record.
1011
987
  */
1012
988
  previewOpenSession: ActorMethod<[], SessionIntent>;
1013
989
  /**
1014
990
  * / PUBLIC: what it costs to pay this market a given amount, on every rail it settles.
1015
991
  * /
1016
- * / ⟨0.16.0⟩ Reshaped from `getPaymentRequirements(amount) : [PaymentRequirement]`. A bare array
992
+ * / Reshaped in 0.16.0 from `getPaymentRequirements(amount) : [PaymentRequirement]`. A bare array
1017
993
  * / was a `get*` returning a list, which reads like a collection to page through; this is a QUOTE,
1018
- * / a single answer to a single question, and it now says so in its name and its type.
994
+ * / a single answer to a single question, and it says so in its name and its type.
1019
995
  * /
1020
996
  * / The quote ECHOES the amount it priced. A caller comparing this to a later 402 challenge is
1021
997
  * / then comparing two stated numbers instead of assuming the one they sent came back unchanged.
@@ -1024,32 +1000,25 @@ export interface _SERVICE {
1024
1000
  * / is not a question this canister can answer — better a legible refusal than a trap in the
1025
1001
  * / caller's own callback.
1026
1002
  * /
1027
- * / ⟨CORRECTED 2026-10-02 — the nonce is GONE from the quote; the two paragraphs below are kept as
1028
- * / the record of why.⟩ Each requirement is now a `QuotedRequirement`: ic402's requirement without
1029
- * / its `nonce` (and with `expiry` spelled `expiryNs`). The paragraphs below describe the throwaway
1030
- * / that was published until this date; the review before the 0.16.0 cut recommended dropping it
1031
- * / over ratifying it, and it was dropped. "Do not pay against it" is now enforced by there being
1032
- * / nothing to pay against.
1033
- * /
1034
- * / ⚠ THE NONCE IN EACH REQUIREMENT IS A THROWAWAY — DO NOT PAY AGAINST IT. `requireAll` mints a
1035
- * / server nonce with a HashMap put, and this is a QUERY, so the write is discarded on return.
1036
- * / The nonce is published and does not exist. Signing a payment against it settles as
1037
- * / `#expired("Server nonce expired, already used, or bound to a different network/token")`,
1038
- * / which is wrong on every clause and points a caller back here for another dead one.
1039
- * /
1040
- * / That is by design, not an oversight now excused: a quote is a PRICE LIST, not a settleable
1041
- * / challenge. The HTTP surface of this same canister already draws the line in the same place —
1042
- * / `/discovery/resources` is a catalog with a throwaway nonce, while `/content` and `/service`
1043
- * / return `httpUpgrade()` so the challenge is minted in an UPDATE and persists. This is the
1044
- * / Candid twin of `/discovery/resources`, and it was the only one of the pair not saying so.
1045
- * / ⟨CORRECTED 2026-09-30⟩ Only `/service` upgrades now; `/content` sells nothing over the web and
1046
- * / answers 410 from the query. And unlike this quote, the web catalog lists EVM requirements only.
1003
+ * / A QUOTE IS A PRICE LIST, NOT A SETTLEABLE CHALLENGE, so it carries no nonce. Each requirement is
1004
+ * / a `QuotedRequirement`: ic402's requirement without its `nonce` (and with `expiry` spelled
1005
+ * / `expiryNs`). The nonce was removed (2026-10-02) because a quote's nonce could never be real:
1006
+ * / `requireAll` mints a server nonce with a HashMap put, and this is a QUERY, so the write is
1007
+ * / discarded on return. The published nonce did not exist, and signing a payment against it settled
1008
+ * / as `#expired("Server nonce expired, already used, or bound to a different network/token")`, which
1009
+ * / was wrong on every clause and pointed a caller back here for another dead one. "Do not pay
1010
+ * / against it" is now enforced by there being nothing to pay against.
1011
+ * /
1012
+ * / The web catalog of this same canister, `/discovery/resources`, draws the line in the same place:
1013
+ * / it is a catalog (its nonce is a throwaway, for the same reason), and it lists services only, with
1014
+ * / EVM requirements only. Of the web routes only `/service` mints a payable challenge, in an UPDATE;
1015
+ * / `/content` sells nothing over the web and answers 410 from the query.
1047
1016
  * /
1048
1017
  * / TO GET A PAYABLE CHALLENGE, call the resource: `getContent(contentId, null)` or
1049
1018
  * / `createJob(serviceId, params, null)`. Both are updates, so the nonce they mint survives.
1050
- * / This matters most on the ckUSDC rail, which is where customer payments settle: ICP has no
1051
- * / on-chain nonce, so `settle` ALWAYS requires the server one. A conformant EVM x402 client
1052
- * / sends no server nonce at all and is unaffected.
1019
+ * / This matters most on the ckUSDC rail, which is where buyers pay: ICP has no on-chain nonce, so
1020
+ * / `settle` ALWAYS requires the server one. A conformant EVM x402 client sends no server nonce at
1021
+ * / all and is unaffected.
1053
1022
  */
1054
1023
  quotePayment: ActorMethod<[bigint], Result_4>;
1055
1024
  /**
@@ -1059,13 +1028,11 @@ export interface _SERVICE {
1059
1028
  * / Unstick, not decide: it does not choose an outcome, it discovers one. When it cannot, it says
1060
1029
  * / so and points at resolveJob, which is where a human decision belongs.
1061
1030
  * /
1062
- * / ⟨2026-10-02, the payment library's refusal channel — audited at this site⟩ `#Conflict` here
1063
- * / carries ic402's text, and ic402 answers with one text channel for every refusal. AUDITED:
1064
- * / this method's own gate (`requireAdmin`) decides authorization before the library is called, and every
1065
- * / text the library returns here is a STATE refusal (job missing, no parked tx, no confirm hook wired, the chain's answer) — including "not found", which
1066
- * / arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
1067
- * / contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
1068
- * / dependency work.
1031
+ * / `#Conflict` here carries ic402's text, and ic402 answers with one text channel for every
1032
+ * / refusal. This method's own gate (`requireAdmin`) decides authorization before the library is
1033
+ * / called, so every text the library returns here is a STATE refusal (job missing, no parked tx, no
1034
+ * / confirm hook wired, the chain's answer) — including "not found", which arrives as `#Conflict`
1035
+ * / rather than `#NotFound`. Read the MESSAGE for which; the seam is described at `claimJob`.
1069
1036
  */
1070
1037
  reconcileJob: ActorMethod<[string], Result_2>;
1071
1038
  /**
@@ -1076,27 +1043,26 @@ export interface _SERVICE {
1076
1043
  * / moving outward. Force-close only returns a buyer's own deposit, which a freeze must not trap
1077
1044
  * / (the same reasoning that leaves disputeJob un-gated).
1078
1045
  * /
1079
- * / ⟨2026-10-02, the payment library's refusal channel — audited at this site⟩ `#Conflict` here
1080
- * / carries ic402's text, and ic402 answers with one text channel for every refusal. AUDITED:
1081
- * / this method's own gate (`requireAdmin`) decides authorization before the library is called, and every
1082
- * / text the library returns here is a STATE refusal (session missing, not parked in #closing, no parked tx, no EVM deposit or sender configured, the chain's answer) — including "not found", which
1083
- * / arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
1084
- * / contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
1085
- * / dependency work.
1086
- * /
1087
- * / ⟨2026-11-05, ic402 2.20.0 — beside the list of refusals above⟩ It now also resolves an ICP session
1088
- * / left `#closing` by a close whose settle the ledger rejected after it may have run (that close
1089
- * / answers "outcome unknown"). It moves no money itself: it reads the session's escrow balance, and
1090
- * / the full deposit still there means the settle did not land, so the session reopens for a close to
1091
- * / settle it once; less than the deposit means it did, so the session ends `#closed` with the
1092
- * / remainder recoverable by its payer (`recoverEscrow`). Refused while a close of that session is
1093
- * / still running ("call again once it returns"), and a failed balance or fee query leaves the session
1094
- * / `#closing` to be reconciled again. THIS, NOT `forceResolveSession`, IS THE WAY OUT for such a
1095
- * / session: forcing one whose settle never landed strands the recipient's share.
1046
+ * / It also resolves an ICP session left `#closing` by a close whose settle the ledger rejected
1047
+ * / after it may have run (that close answers "outcome unknown"). It moves no money itself: it reads
1048
+ * / the session's escrow balance, and the full deposit still there means the settle did not land, so
1049
+ * / the session reopens for a close to settle it once; less than the deposit means it did, so the
1050
+ * / session ends `#closed` with the remainder recoverable by its payer (`recoverEscrow`). Refused
1051
+ * / while a close of that session is still running ("call again once it returns"), and a failed
1052
+ * / balance or fee query leaves the session `#closing` to be reconciled again. THIS, NOT
1053
+ * / `forceResolveSession`, IS THE WAY OUT for such a session: forcing one whose settle never landed
1054
+ * / strands the recipient's share.
1055
+ * /
1056
+ * / `#Conflict` here carries ic402's text, and ic402 answers with one text channel for every
1057
+ * / refusal. This method's own gate (`requireAdmin`) decides authorization before the library is
1058
+ * / called, so every text the library returns here is a STATE refusal (session missing, not parked
1059
+ * / in #closing, no parked tx, no EVM deposit or sender configured, the chain's answer) — including "not found", which
1060
+ * / arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which; the seam is
1061
+ * / described at `claimJob`.
1096
1062
  */
1097
1063
  reconcileSession: ActorMethod<[string], Result_2>;
1098
1064
  /**
1099
- * / Admin recovery: return unconsumed escrow from a stuck or terminal session's own subaccount.
1065
+ * / Admin recovery: return unconsumed escrow from a closed session's own subaccount.
1100
1066
  * / THE ONE RECOVERY METHOD THAT MOVES REAL MONEY.
1101
1067
  * /
1102
1068
  * / It is on the right side of "an admin may unstick, and may not decide" for one structural
@@ -1114,34 +1080,27 @@ export interface _SERVICE {
1114
1080
  * / Idempotent through the ledger: the first refund drains the subaccount, so a second call fails
1115
1081
  * / with insufficient funds rather than paying twice.
1116
1082
  * /
1117
- * / ⟨2026-10-02, the payment library's refusal channel — audited at this site⟩ `#Conflict` here
1118
- * / carries ic402's text, and ic402 answers with one text channel for every refusal. AUDITED:
1119
- * / this method's own gate (`requireAdmin`; the library's own only-the-payer check cannot fire, because the payer is read from the session and passed through) decides authorization before the library is called, and every
1120
- * / text the library returns here is a STATE refusal (an open session, nothing left to recover, the ledger's refusal) — including "not found", which
1121
- * / arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
1122
- * / contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
1123
- * / dependency work.
1124
- * /
1125
- * / ⟨2026-10-05, ic402 2.17.3 — beside the first line and the list above⟩ Escrow comes back only
1126
- * / from a session that reads `closed`. A session that reads `closing` or `expired` is refused, with
1127
- * / nothing moved — a fourth state refusal — so a "stuck" session here means one that
1128
- * / `forceResolveSession` has closed first; recover it within 24 hours of that force.
1129
- * / ⟨2026-10-05, later — ic402 2.17.4, beside the line above⟩ Or one whose refund the ledger
1130
- * / refused or rejected: that close already ends the session `closed`, with the remainder still in
1131
- * / its escrow, so it needs no force. Recover it within 24 hours of that close, asking at most the
1132
- * / escrow's ledger balance less one fee.
1133
- * /
1134
- * / ⟨2026-10-07, the owner's decision of that day⟩ WHAT IT ANSWERS: what came back. `amount` is what
1135
- * / was transferred to the session's payer, in the token named (the amount asked, capped at the
1136
- * / session's unconsumed deposit; the transfer's fee comes out of the escrow on top), and
1137
- * / `blockIndex` is that ledger's block of the transfer. Until this date it answered a bare `nat`
1138
- * / that was the block index alone, which read as the amount. If the session's record is removed
1139
- * / before the amount can be read back — a session closed in the same moment as the recovery and
1140
- * / cleaned up during its transfer — it answers `#Other` naming the block, never a guessed amount.
1141
- * /
1142
- * / ⟨2026-11-19, ic402 2.23.0, beside the paragraph above⟩ `amount` is now the library's own figure for what
1143
- * / it paid, from its receipt (since ic402 2.22.0 it is also capped at what the session's close recorded as
1144
- * / still owed, less one fee). The `#Other` answer for a record removed during the transfer no longer occurs.
1083
+ * / Escrow comes back only from a session that reads `closed`: one that `forceResolveSession` has
1084
+ * / closed (recover it within 24 hours of that force), or one whose refund the ledger refused or
1085
+ * / rejected — that close already ends the session `closed` with the remainder still in its escrow,
1086
+ * / so it needs no force (recover it within 24 hours of that close, asking at most the escrow's
1087
+ * / ledger balance less one fee). A session that reads `closing` or `expired` is refused, with
1088
+ * / nothing moved.
1089
+ * /
1090
+ * / `#Conflict` here carries ic402's text, and ic402 answers with one text channel for every
1091
+ * / refusal. This method's own gate (`requireAdmin`; the library's own only-the-payer check cannot
1092
+ * / fire, because the payer is read from the session and passed through) decides authorization
1093
+ * / before the library is called, so every text the library returns here is a STATE refusal (a
1094
+ * / session that is not `closed`, nothing left to recover, the ledger's refusal) — including "not
1095
+ * / found", which arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which; the
1096
+ * / seam is described at `claimJob`.
1097
+ * /
1098
+ * / WHAT IT ANSWERS: what came back. `amount` is what was transferred to the session's payer, in the
1099
+ * / token named — the library's own figure for what it paid, from its receipt: the amount asked,
1100
+ * / capped at the session's unconsumed deposit and at what the session's close recorded as still
1101
+ * / owed, less one fee; the transfer's fee comes out of the escrow on top. `blockIndex` is that
1102
+ * / ledger's block of the transfer. (A bare block index, which an earlier version answered, read as
1103
+ * / the amount.)
1145
1104
  */
1146
1105
  recoverEscrow: ActorMethod<[string, TokenAmount], Result_3>;
1147
1106
  /**
@@ -1156,17 +1115,17 @@ export interface _SERVICE {
1156
1115
  * / the timestamp. The byte count SURVIVES re-registration — otherwise the quota would reset every
1157
1116
  * / thirty days, which is a quota in name only.
1158
1117
  * /
1159
- * / ⟨2026-11-04, the owner's ruling: a sale is paid into the selling engram's own wallet⟩
1160
- * / ON THIS MARKET'S BOOKS THE SELLER IS THE ENGRAM; the caller is the hand that lists for it. Every
1161
- * / identity this market hands the payment library — a service's operator, the claimant, the
1162
- * / submitter, the EVM payout key — is `engramId`, so the library pays the engram's own account on
1163
- * / the ckUSDC rail with no money code of ours, and content sales are pushed there by `payEngram`.
1164
- * / Three steps more than before, in order: the one-engram check (`oneEngramConflict`) before the
1165
- * / first await; after the registry, the engram is asked for its own EVM address
1166
- * / (`askEngramPayAddress`) and that address is registered with the library under the engram; the
1167
- * / one-engram check again, and the binding written from the LIVE map (the byte count may have moved
1168
- * / across the awaits). Last, this engram's parked sale notices are delivered (at most 16): a
1169
- * / seller's own message, and the engram just answered.
1118
+ * / A sale is paid into the selling engram's own wallet (since 2026-11-04), so ON THIS MARKET'S
1119
+ * / BOOKS THE SELLER IS THE ENGRAM; the caller is the hand that lists for it. Every identity this
1120
+ * / market hands the payment library — a service's operator, the claimant, the submitter, the EVM
1121
+ * / payout key — is `engramId`, so the library pays the engram's own account on the ckUSDC rail with
1122
+ * / no money code in this market, and content sales are pushed there by `payEngram`. Beyond the
1123
+ * / registry check, in order: the one-engram check (`oneEngramConflict`) before the first await;
1124
+ * / after the registry, the engram is asked for its own EVM address (`askEngramPayAddress`) and that
1125
+ * / address is registered with the library under the engram; the one-engram check again, and the
1126
+ * / binding written from the LIVE map (the byte count may have moved across the awaits). Last, this
1127
+ * / engram's parked sale notices are delivered (at most 16): a seller's own message, and the engram
1128
+ * / just answered.
1170
1129
  */
1171
1130
  registerSeller: ActorMethod<[Principal], Result>;
1172
1131
  /**
@@ -1211,7 +1170,8 @@ export interface _SERVICE {
1211
1170
  */
1212
1171
  removeCallerPolicy: ActorMethod<[Principal], Result>;
1213
1172
  /**
1214
- * / ⟨0.16.0⟩ RULED 2026-08-17: THE SELLER RESOLVES. Not the market admin.
1173
+ * / THE SELLER RESOLVES, not the market admin (decided 2026-08-17, when the market moved out of
1174
+ * / the engram for 0.16.0).
1215
1175
  * /
1216
1176
  * / The engram's `requireOwner` was coherent there because the engram's owner IS the seller — a
1217
1177
  * / dispute was between that owner and their buyer. Transcribing it here would have made the
@@ -1219,7 +1179,8 @@ export interface _SERVICE {
1219
1179
  * / money: a business and probably a legal position, inherited by accident from a canister where
1220
1180
  * / "owner" meant something else.
1221
1181
  * /
1222
- * / The ruling keeps the power where it already was rather than quietly relocating it to us.
1182
+ * / So the power stays where it already was rather than being quietly relocated to whoever runs
1183
+ * / the market.
1223
1184
  * /
1224
1185
  * / ⚠ THE ASYMMETRY IS REAL AND IS STATED, HERE AND ON THE WIRE. The accused judges. A seller can
1225
1186
  * / refuse a refund to a buyer who has already paid, and nothing on this canister overrides that:
@@ -1232,13 +1193,12 @@ export interface _SERVICE {
1232
1193
  * / timeout arrives, this method is where the change lands and this comment is the argument it has
1233
1194
  * / to answer.
1234
1195
  * /
1235
- * / ⟨2026-10-02, the payment library's refusal channel — audited at this site⟩ `#Conflict` here
1236
- * / carries ic402's text, and ic402 answers with one text channel for every refusal. AUDITED:
1237
- * / this method's own gate (the service's seller, checked above the library call) decides authorization before the library is called, and every
1238
- * / text the library returns here is a STATE refusal (job missing, not in a resolvable state, a refund parked or failed) — including "not found", which
1239
- * / arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
1240
- * / contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
1241
- * / dependency work.
1196
+ * / `#Conflict` here carries ic402's text, and ic402 answers with one text channel for every
1197
+ * / refusal. This method's own gate (the service's seller, checked above the library call) decides
1198
+ * / authorization before the library is called, so every text the library returns here is a STATE
1199
+ * / refusal (job missing, not in a resolvable state, a refund parked or failed) — including "not
1200
+ * / found", which arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which; the
1201
+ * / seam is described at `claimJob`.
1242
1202
  */
1243
1203
  resolveDispute: ActorMethod<[string, boolean], Result>;
1244
1204
  /**
@@ -1253,29 +1213,27 @@ export interface _SERVICE {
1253
1213
  * / move it sideways. Every use is a chained audit row naming the admin and the status they chose.
1254
1214
  * /
1255
1215
  * / `#other` fails closed. It is a placeholder for a job state this canister cannot name, and
1256
- * / forcing a job into a state we cannot name is not a recovery.
1257
- * /
1258
- * / ⟨2026-10-02, the payment library's refusal channel — audited at this site⟩ `#Conflict` here
1259
- * / carries ic402's text, and ic402 answers with one text channel for every refusal. AUDITED:
1260
- * / this method's own gate (`requireAdmin`) decides authorization before the library is called, and every
1261
- * / text the library returns here is a STATE refusal (job missing, not stuck in #Settling, a target that is not terminal) — including "not found", which
1262
- * / arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
1263
- * / contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
1264
- * / dependency work.
1216
+ * / forcing a job into a state nobody can name is not a recovery.
1217
+ * /
1218
+ * / `#Conflict` here carries ic402's text, and ic402 answers with one text channel for every
1219
+ * / refusal. This method's own gate (`requireAdmin`) decides authorization before the library is
1220
+ * / called, so every text the library returns here is a STATE refusal (job missing, not stuck in
1221
+ * / #Settling, a target that is not terminal) — including "not found", which arrives as `#Conflict`
1222
+ * / rather than `#NotFound`. Read the MESSAGE for which; the seam is described at `claimJob`.
1265
1223
  */
1266
1224
  resolveJob: ActorMethod<[string, JobStatus], Result>;
1267
1225
  /**
1268
- * / ⟨2026-11-04, the owner's sale-payout ruling⟩ Deliver one engram's parked sale notices to its record —
1269
- * / at most 16 a call, oldest first — and answer how many landed. CALLABLE BY ANYONE, anonymous
1270
- * / included: the engram dedups on the receipt id and accepts only this market, so nothing can be
1271
- * / misdirected or written twice; the same accepted residual as `retrySalePayout`. `#NotFound` when
1272
- * / nothing is parked for that engram (every sale it made here reached its record, or none was made).
1226
+ * / Deliver one engram's parked sale notices to its record — at most 16 a call, oldest first — and
1227
+ * / answer how many landed. CALLABLE BY ANYONE, anonymous included: the engram dedups on the receipt
1228
+ * / id and accepts only this market, so nothing can be misdirected or written twice; the same
1229
+ * / accepted residual as `retrySalePayout`. `#NotFound` when nothing is parked for that engram
1230
+ * / (every sale it made here reached its record, or none was made).
1273
1231
  */
1274
1232
  retrySaleNotices: ActorMethod<[Principal], Result_1>;
1275
1233
  /**
1276
- * / ⟨2026-11-04, the owner's sale-payout ruling⟩ Settle a parked sale payout by asking the ledger what
1277
- * / happened, rather than assuming — the retired withdrawal recovery's saga, kept whole for the payout
1278
- * / that replaced the withdrawal.
1234
+ * / Settle a parked sale payout by asking the ledger what happened, rather than assuming. A sale is
1235
+ * / paid into the selling engram's own wallet (since 2026-11-04); this is the recovery the seller
1236
+ * / withdrawal it replaced used, kept whole.
1279
1237
  * /
1280
1238
  * / Re-sends the IDENTICAL transfer: same engram, amount, fee, memo and `created_at_time`. Within
1281
1239
  * / ICRC-1's 24-hour window there are exactly two conclusive outcomes: `#Duplicate` — the first push
@@ -1296,13 +1254,13 @@ export interface _SERVICE {
1296
1254
  * / NOTHING ELSE. It never refunds the buyer, and it refuses every job that does not read
1297
1255
  * / `#Verified`, with nothing moved.
1298
1256
  * /
1299
- * / ⟨2026-10-07, the owner's decision of that day⟩ A job whose work passed verification and whose
1300
- * / payment to the seller then failed rests in `#Verified`, and only `resolveDispute` moves it — the
1301
- * / service's SELLER's, by the ruling of 2026-08-17, which stands unchanged. A seller who never acts
1302
- * / left it there, with no way for anyone else to move it. This is the admin's way: unstick, not
1303
- * / decide. The job's outcome was decided by its verification; the payment goes where that sent it,
1304
- * / and the admin names neither a recipient nor an amount. Refunding the buyer, and anything about a
1305
- * / job not yet verified (`#Submitted`, `#Disputed`), stay the seller's.
1257
+ * / A job whose work passed verification and whose payment to the seller then failed rests in
1258
+ * / `#Verified`, and otherwise only `resolveDispute` moves it — which is the service's SELLER's to
1259
+ * / call (see `resolveDispute`). A seller who never acts would leave it there, with no way for anyone
1260
+ * / else to move it. This is the admin's way: unstick, not decide. The job's outcome was decided by
1261
+ * / its verification; the payment goes where that sent it, and the admin names neither a recipient
1262
+ * / nor an amount. Refunding the buyer, and anything about a job not yet verified (`#Submitted`,
1263
+ * / `#Disputed`), stay the seller's.
1306
1264
  * /
1307
1265
  * / It runs the library's own settle, the one a buyer's confirmation runs: the job reads `#Settling`
1308
1266
  * / while it pays (so two retries cannot both pay), ends `#Settled`, and a payment the ledger refuses
@@ -1329,14 +1287,13 @@ export interface _SERVICE {
1329
1287
  */
1330
1288
  setCallerPolicy: ActorMethod<[Principal, SpendingPolicy], Result>;
1331
1289
  /**
1332
- * / ⟨0.16.0, one boolean idiom⟩ `enableEndpoint` and `disableEndpoint` FOLD into one setter.
1290
+ * / `enableEndpoint` and `disableEndpoint` were folded into this one setter in 0.16.0.
1333
1291
  * /
1334
1292
  * / They were byte-identical apart from the status they wrote and the word in their name, which is
1335
- * / the definition of a boolean expressed as two methods. The 0.16.0 naming rules allow one idiom for
1336
- * / a boolean feature (a set…Enabled setter plus a readable flag), and the fold also removes a real
1337
- * / hazard: two methods meant two authorization checks
1338
- * / to keep in step, and a divergence between them would have been invisible to a reader looking at
1339
- * / either one alone.
1293
+ * / the definition of a boolean expressed as two methods. The interface's naming rules allow one
1294
+ * / idiom for a boolean feature (a set…Enabled setter plus a readable flag), and the fold also
1295
+ * / removes a real hazard: two methods meant two authorization checks to keep in step, and a
1296
+ * / divergence between them would have been invisible to a reader looking at either one alone.
1340
1297
  * /
1341
1298
  * / `#Deleted` stays a refusal in both directions and stays `#Conflict`, not `#Invalid`: the
1342
1299
  * / request is well-formed and permitted, the endpoint is simply in a terminal state — and calling
@@ -1360,20 +1317,17 @@ export interface _SERVICE {
1360
1317
  */
1361
1318
  setPaymentPolicy: ActorMethod<[SpendingPolicy], Result>;
1362
1319
  /**
1363
- * / Whom this canister anchors to. Set by the admin at deploy; `sys` because it is protocol
1364
- * / configuration, not a product surface.
1365
- * /
1366
- * / ⟨RENAMED 2026-10-02 from `sysSetRegistryId` — the sys-tier retier ruled 2026-08-24, executed
1367
- * / under the owner's 2026-10-02 ruling to carry out the interface decisions reviewed before the
1368
- * / 0.16.0 cut as recommended.⟩ The sentence above is why it was sys-named, and the retier is why it
1369
- * / no longer is: the `sys` prefix names the canister-to-canister tier, whose callers are other
1370
- * / canisters, and this method's only caller is a PERSON — the market's admin, at deploy. Keeping it
1371
- * / there made "a `sys` method has no human caller" false, and so uncheckable. A plain admin setter
1372
- * / (`setAdmin`'s sibling) is what it always was.
1320
+ * / Whom this canister anchors to. Set by the admin at deploy.
1321
+ * /
1322
+ * / Not `sys`-prefixed (it was `sysSetRegistryId` until 2026-10-02): the `sys` prefix names the
1323
+ * / canister-to-canister tier, whose callers are other canisters, and this method's only caller is
1324
+ * / a PERSON — the market's admin, at deploy. Keeping it there made "a `sys` method has no human
1325
+ * / caller" false, and so uncheckable. It is a plain admin setter, `setAdmin`'s sibling.
1373
1326
  */
1374
1327
  setRegistryId: ActorMethod<[Principal], Result>;
1375
1328
  /**
1376
- * / ⟨0.16.0, one boolean idiom⟩ enableService + disableService FOLD, same as the endpoint pair.
1329
+ * / `enableService` and `disableService` were folded into this one setter in 0.16.0, as the
1330
+ * / endpoint pair was.
1377
1331
  * /
1378
1332
  * / Deliberately NOT admin-overridable, unlike endpoints. Disabling a seller's service is a
1379
1333
  * / commercial act against that seller, and an admin who needs to remove a listing should do it
@@ -1381,19 +1335,14 @@ export interface _SERVICE {
1381
1335
  * / seller did it. Endpoints allow the admin override because a deleted endpoint is already
1382
1336
  * / terminal and visible; a disabled service looks like the seller's own choice.
1383
1337
  * /
1384
- * / ⚠ `#Conflict` HERE ALSO COVERS "NOT THE SELLER" — the same ic402 seam as `claimJob`,
1385
- * / `confirmJob` and `disputeJob`. `enableService`/`disableService` return `Service not found`
1386
- * / (properly `#NotFound`) and **`Not the seller`** (properly `#Refused`) as plain strings, so
1387
- * / the arm is gone before this method sees it. Read the MESSAGE, not the arm.
1388
- * / ⟨2026-08-21; three costed fixes were recorded, with why none is a
1389
- * / one-liner.⟩
1390
- * / ⟨CORRECTED 2026-10-02, audited at this site — the paragraph above no longer holds here.⟩
1391
- * / `requireServiceSeller` now runs BEFORE the library: a missing service is refused `#NotFound`
1392
- * / and another seller `#Refused`, by this canister, with its own sentences. The library is then
1393
- * / called with the caller already proven to be the seller, so its "Not the seller" and "Service
1394
- * / not found" texts cannot reach the `#Conflict` arm below except across a race with a deletion.
1395
- * / The seam is closed on this method by the gate, not by the library; the others keep their
1396
- * / caveats.
1338
+ * / The payment library's refusals do not reach the caller as `#Conflict` here. Its
1339
+ * / `enableService`/`disableService` return `Service not found` and `Not the seller` as plain
1340
+ * / strings, which would lose the arm, so `requireServiceSeller` runs BEFORE the library: a missing
1341
+ * / service is refused `#NotFound` and another seller `#Refused`, by this canister, with its own
1342
+ * / sentences. The library is then called with the caller already proven to be the seller, so its
1343
+ * / texts cannot reach the `#Conflict` arm below except across a race with a deletion. The seam is
1344
+ * / closed on this method by the gate, not by the library; the other library call sites (`claimJob`
1345
+ * / and its neighbours) keep their own caveats.
1397
1346
  */
1398
1347
  setServiceEnabled: ActorMethod<[string, boolean], Result>;
1399
1348
  /**
@@ -1410,12 +1359,11 @@ export interface _SERVICE {
1410
1359
  * / the four modes.
1411
1360
  * /
1412
1361
  * / ⚠ `#Conflict` HERE ALSO COVERS "NOT THE ASSIGNED OPERATOR" — a refusal of the caller's
1413
- * / STANDING, not of the job's state. ⟨2026-10-02, audited at this site⟩ ic402's `submitResult`
1414
- * / checks the caller against the job's operator itself and answers with one text channel, so
1415
- * / "Not the assigned operator" and "Job not assigned" arrive here exactly as "Cannot submit result
1416
- * / in status: …" does. A caller that branches on the arm retries a submission that can never be
1417
- * / theirs. Read the MESSAGE, not the arm. This is the 0.16.0 contract as ratified on 2026-10-02;
1418
- * / giving the library one arm per kind of refusal is post-cut dependency work.
1362
+ * / STANDING, not of the job's state. ic402's `submitResult` checks the caller against the job's
1363
+ * / operator itself and answers with one text channel, so "Not the assigned operator" and "Job not
1364
+ * / assigned" arrive here exactly as "Cannot submit result in status: …" does. A caller that
1365
+ * / branches on the arm retries a submission that can never be theirs. Read the MESSAGE, not the
1366
+ * / arm (the seam is described at `claimJob`).
1419
1367
  */
1420
1368
  submitJobResult: ActorMethod<
1421
1369
  [string, Uint8Array | number[], [] | [Uint8Array | number[]], [] | [bigint]],