@engramx/idl 0.16.0-rc.9 → 0.16.1-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.
package/dist/market.did CHANGED
@@ -125,9 +125,19 @@ type SellerStatus =
125
125
  byteQuota: nat;
126
126
  bytesStored: nat;
127
127
  engramId: principal;
128
+ evmPayout: opt text;
129
+ evmPayoutError: opt text;
128
130
  expiresAtNs: int;
131
+ parkedPayouts: nat;
132
+ parkedSaleNotices: nat;
129
133
  verifiedAtNs: int;
130
134
  };
135
+ type SealedEntry =
136
+ record {
137
+ digest: blob;
138
+ entryHash: blob;
139
+ id: nat;
140
+ };
131
141
  type RoleGrant =
132
142
  record {
133
143
  holder: principal;
@@ -164,10 +174,9 @@ type RevenueSummary =
164
174
  purchases: nat;
165
175
  revenue: nat;
166
176
  };
167
- owedToYou: nat;
177
+ parkedPayouts: nat;
168
178
  serviceJobsSettled: nat;
169
179
  serviceRevenue: nat;
170
- unresolvedWithdrawals: nat;
171
180
  };
172
181
  type Result_9 =
173
182
  variant {
@@ -227,32 +236,32 @@ type Result_17 =
227
236
  type Result_16 =
228
237
  variant {
229
238
  Err: Error;
230
- Ok: opt text;
239
+ Ok: Job;
231
240
  };
232
241
  type Result_15 =
233
242
  variant {
234
243
  Err: Error;
235
- Ok: Job;
244
+ Ok: blob;
236
245
  };
237
246
  type Result_14 =
238
247
  variant {
239
248
  Err: Error;
240
- Ok: blob;
249
+ Ok: JobStatus;
241
250
  };
242
251
  type Result_13 =
243
252
  variant {
244
253
  Err: Error;
245
- Ok: JobStatus;
254
+ Ok: RevenueSummary;
246
255
  };
247
256
  type Result_12 =
248
257
  variant {
249
258
  Err: Error;
250
- Ok: RevenueSummary;
259
+ Ok: SellerStatus;
251
260
  };
252
261
  type Result_11 =
253
262
  variant {
254
263
  Err: Error;
255
- Ok: SellerStatus;
264
+ Ok: RecordPage;
256
265
  };
257
266
  type Result_10 =
258
267
  variant {
@@ -262,12 +271,20 @@ type Result_10 =
262
271
  type Result_1 =
263
272
  variant {
264
273
  Err: Error;
265
- Ok;
274
+ Ok: nat;
266
275
  };
267
276
  type Result =
268
277
  variant {
269
278
  Err: Error;
270
- Ok: nat;
279
+ Ok;
280
+ };
281
+ type RecordPage =
282
+ record {
283
+ hashFirstFrom: nat;
284
+ items: vec AuditEntry;
285
+ ringFloor: nat;
286
+ sealed: vec SealedEntry;
287
+ total: nat;
271
288
  };
272
289
  type QuotedRequirement =
273
290
  record {
@@ -297,14 +314,17 @@ type PricingScheme =
297
314
  Session;
298
315
  Upto: nat;
299
316
  };
300
- type PendingWithdrawal =
317
+ type PendingPayout =
301
318
  record {
302
- amountE6s: nat;
319
+ amountE6: nat;
303
320
  createdAtTimeNs: nat64;
321
+ engramId: principal;
322
+ feeE6: nat;
304
323
  id: nat;
324
+ lastError: text;
325
+ memo: blob;
305
326
  parkedAtNs: int;
306
- reason: text;
307
- seller: principal;
327
+ receiptId: text;
308
328
  };
309
329
  type PaymentSignature =
310
330
  record {
@@ -391,7 +411,7 @@ type Page_2 =
391
411
  };
392
412
  type Page_1 =
393
413
  record {
394
- items: vec PendingWithdrawal;
414
+ items: vec PendingPayout;
395
415
  total: nat;
396
416
  withheld: nat;
397
417
  };
@@ -582,11 +602,12 @@ type AccessGrant =
582
602
  receiptId: text;
583
603
  };
584
604
  service : {
585
- addAuditViewer: (viewer: principal) -> (Result_1);
605
+ addAuditViewer: (viewer: principal) -> (Result);
586
606
  /// Push this canister's chain head into the registry's anchor ring — the same thing every engram
587
- /// does with its memory head, and the cashier with its treasury head.
607
+ /// does with its memory head, and the biller with its treasury head.
588
608
  ///
589
- /// L12's argument applies to escrow with full force: a self-attested commerce ledger sitting
609
+ /// The argument for anchoring the treasury's ledger head in the registry applies to escrow with full
610
+ /// force: a self-attested commerce ledger sitting
590
611
  /// beside witnessed ones is the asymmetry an auditor finds first. Every chain in this system is
591
612
  /// witnessed by a party that does not control it, or the phrase means nothing.
592
613
  ///
@@ -597,7 +618,7 @@ service : {
597
618
  /// ⟨RENAMED 2026-10-02 from `sysAnchorNow`, with `setRegistryId` and for the same reason: its
598
619
  /// caller is the market's admin, a person, so it does not belong to the canister-to-canister
599
620
  /// tier the `sys` prefix names.⟩
600
- anchorNow: () -> (Result_1);
621
+ anchorNow: () -> (Result);
601
622
  /// A seller takes on a pending job. The CALLER must be the seller of the service the job was
602
623
  /// created against — claiming is not open, and there is no assignment step: whoever registered
603
624
  /// the service claims its work.
@@ -610,12 +631,13 @@ service : {
610
631
  /// · the job is not pending ⟶ properly `#Conflict`
611
632
  /// · **you are not the seller** ⟶ properly `#Refused`
612
633
  ///
613
- /// **Read the MESSAGE, not the arm, on this method only.** That is the opposite of what L1 asks
634
+ /// **Read the MESSAGE, not the arm, on this method only.** That is the opposite of what the 0.16.0
635
+ /// result rule (one Result shape, refusals as values) asks
614
636
  /// everywhere else, and it is stated here rather than left to be discovered: a caller branching
615
637
  /// on the arm will retry a call that can never succeed for it. Recovering the distinction needs
616
638
  /// the LIBRARY to carry arms — matching its prose here would reintroduce exactly the
617
- /// message-branching L1 abolished, and would break silently on an ic402 bump. ⟨Recorded with
618
- /// three costed options in the project's backlog, 2026-08-21. This is the market's whole ic402
639
+ /// message-branching that rule abolished, and would break silently on an ic402 bump. ⟨Three costed
640
+ /// options were recorded for it, 2026-08-21. This is the market's whole ic402
619
641
  /// seam, not one method: 6 call sites collapse a module error into `#Conflict`.⟩
620
642
  /// ⟨2026-10-02 — counted again, and ruled.⟩ ELEVEN sites on this market collapse an ic402 text
621
643
  /// into `#Conflict`, not 6: `setServiceEnabled`, `claimJob`, `submitJobResult`, `confirmJob`,
@@ -624,8 +646,8 @@ service : {
624
646
  /// refusal of the caller's standing — `claimJob`, `confirmJob`, `disputeJob` and `submitJobResult`;
625
647
  /// `setServiceEnabled`, the fourth noted on 2026-08-21, is now gated by this canister before the
626
648
  /// library is called; the other six are state behind this canister's own gate. Read-the-message
627
- /// is RATIFIED as the 0.16.0 contract (the owner's ruling of 2026-10-02, the pre-cut
628
- /// recommendation); giving the library one arm per kind of refusal is post-cut dependency work,
649
+ /// is RATIFIED as the 0.16.0 contract (the owner's ruling of 2026-10-02, as the review before the
650
+ /// cut recommended); giving the library one arm per kind of refusal is post-cut dependency work,
629
651
  /// not a change made mid-cut.
630
652
  /// ⟨2026-10-07, beside the count above⟩ Twelve: the admin's `retrySellerPayment` (the owner's
631
653
  /// decision of that day) passes the library's settle refusal through as `#Conflict` too — state
@@ -634,8 +656,8 @@ service : {
634
656
  /// It also refuses while TRADE IS FROZEN, and that one is a true `#Conflict` — the refusal says
635
657
  /// so explicitly ("Not a permission problem and not a missing job"), and `isTradeFrozen()` is the
636
658
  /// ungated read that confirms it.
637
- claimJob: (jobId: text) -> (Result_1);
638
- /// ⟨0.16.0, L2.6⟩ `confirmJob` ABSORBS `confirmJobEvm`. One buyer action, two ways to prove you
659
+ claimJob: (jobId: text) -> (Result);
660
+ /// ⟨0.16.0⟩ `confirmJob` ABSORBS `confirmJobEvm`. One buyer action, two ways to prove you
639
661
  /// are the buyer.
640
662
  ///
641
663
  /// The pair existed because authorization arrives differently on the two rails, not because the
@@ -656,8 +678,8 @@ service : {
656
678
  /// `#Conflict`) and **`Not the buyer`** (properly `#Refused`) all arrive as `#Conflict`. On THIS
657
679
  /// method read the MESSAGE rather than the arm — it is terminal money settlement, so a caller
658
680
  /// who reads `#Conflict` as "retry later" will retry a release that can never happen for them.
659
- /// Same seam as `claimJob`; three costed fixes in the project's backlog ⟨2026-08-21⟩.
660
- confirmJob: (jobId: text, evmProof: opt vec nat8) -> (Result_1);
681
+ /// Same seam as `claimJob`; three costed fixes were recorded ⟨2026-08-21⟩.
682
+ confirmJob: (jobId: text, evmProof: opt vec nat8) -> (Result);
661
683
  /// Create a content endpoint — a shelf in the storefront. Born DISABLED.
662
684
  ///
663
685
  /// Born disabled deliberately: a listing that went live at creation would be sellable before its
@@ -686,11 +708,11 @@ service : {
686
708
  /// persistence never shrinks — so crediting the bytes back would let one seller cycle uploads
687
709
  /// forever against a ceiling that only ever rose in reality. The quota tracks bytes CLAIMED, not
688
710
  /// bytes currently held, because claimed is the number that costs money.
689
- deleteContent: (id: text) -> (Result_1);
711
+ deleteContent: (id: text) -> (Result);
690
712
  /// Delete an endpoint. Terminal — the record stays as #Deleted so purchase history keeps
691
713
  /// resolving, and the id is never reused.
692
- deleteEndpoint: (endpointId: text) -> (Result_1);
693
- /// ⟨0.16.0, L2.6⟩ `disputeJob` ABSORBS `disputeJobEvm`, exactly as confirmJob does, and for the
714
+ deleteEndpoint: (endpointId: text) -> (Result);
715
+ /// ⟨0.16.0⟩ `disputeJob` ABSORBS `disputeJobEvm`, exactly as confirmJob does, and for the
694
716
  /// same reason: one act, two proofs of buyership.
695
717
  ///
696
718
  /// NOT FREEZE-GATED, and that asymmetry with confirmJob is deliberate. Recording a dispute moves
@@ -701,23 +723,22 @@ service : {
701
723
  /// ⚠ `#Conflict` HERE ALSO COVERS "NOT THE BUYER" — same ic402 seam as `confirmJob` and
702
724
  /// `claimJob`: `Job not found`, `Job not in submitted status` and **`Not the buyer`** all arrive
703
725
  /// as `#Conflict` because the library hands back strings. Read the MESSAGE, not the arm.
704
- /// ⟨2026-08-21; the project's backlog carries the three fixes and why none is a one-liner.⟩
726
+ /// ⟨2026-08-21; three fixes were recorded, with why none is a one-liner.⟩
705
727
  ///
706
728
  /// ⚠ AND NOTE WHERE THE DISPUTE GOES: `resolveDispute` is answered by the SERVICE'S OWN SELLER
707
729
  /// — the party being disputed. This market has no admin arbitration and no appeal, deliberately
708
730
  /// and on the record. Filing a dispute is not an escalation to a neutral party.
709
- disputeJob: (jobId: text, reason: text, evmProof: opt vec nat8) ->
710
- (Result_1);
731
+ disputeJob: (jobId: text, reason: text, evmProof: opt vec nat8) -> (Result);
711
732
  /// Closing refunds the unconsumed deposit to the payer, so it is NOT freeze-gated — the same
712
733
  /// reasoning as disputeJob and forceCloseSession. A halt stops money moving toward sellers; it
713
734
  /// must not strand a buyer's own escrow.
714
- endSession: (sessionId: text) -> (Result_1);
735
+ endSession: (sessionId: text) -> (Result);
715
736
  /// Admin recovery: force a stuck session closed and return the unconsumed deposit to its payer.
716
737
  ///
717
738
  /// Documented in RECOVERY-RUNBOOK as an owner procedure; on a shared canister the equivalent
718
739
  /// authority is the market admin, because the session's own parties are precisely who cannot
719
740
  /// unstick it. No discretion: the refund destination is the payer recorded on the session.
720
- forceCloseSession: (sessionId: text) -> (Result_1);
741
+ forceCloseSession: (sessionId: text) -> (Result);
721
742
  /// Admin recovery: mark a stuck session resolved. STATE ONLY — no funds move.
722
743
  ///
723
744
  /// Kept distinct from forceCloseSession, which refunds, because the two are different admissions.
@@ -734,7 +755,12 @@ service : {
734
755
  /// arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
735
756
  /// contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
736
757
  /// dependency work.
737
- forceResolveSession: (sessionId: text) -> (Result_1);
758
+ ///
759
+ /// ⟨2026-11-05, ic402 2.20.0⟩ NOT FOR AN ICP SESSION LEFT `#closing` BY AN UNKNOWN SETTLE (a close that
760
+ /// answered "outcome unknown"): `reconcileSession` resolves that one from the escrow balance. Forcing it
761
+ /// would mark it closed whether or not the settle landed, stranding the recipient's share if it did
762
+ /// not. This method stays for a close that trapped after an await.
763
+ forceResolveSession: (sessionId: text) -> (Result);
738
764
  /// PUBLIC: accountability requires knowing who holds power. This is the shape every canister
739
765
  /// in the system serves, so one reader covers all of them.
740
766
  getAdminRoles: () -> (AdminRoles) query;
@@ -756,7 +782,7 @@ service : {
756
782
  /// The `approvalId` parameter is gone, as it is on openSession: an approval is the BUYER's own
757
783
  /// custody policy, checked on their engram before they call here.
758
784
  ///
759
- /// ⟨L7⟩ UPDATE, NOT QUERY: the paid path awaits `gate.settle(sig, ?amount)`, an inter-canister
785
+ /// ⟨update-for-read⟩ UPDATE, NOT QUERY: the paid path awaits `gate.settle(sig, ?amount)`, an inter-canister
760
786
  /// settlement. A query cannot await it, and splitting the free and paid halves into two methods
761
787
  /// would put the price and the content behind different names for one buyer act.
762
788
  ///
@@ -768,7 +794,8 @@ service : {
768
794
  /// ic402's text naming both principals. Pay as the principal that approved the allowance.
769
795
  getContent: (contentId: text, paymentSig: opt PaymentSignature) ->
770
796
  (Result_17);
771
- /// ⟨0.16.0⟩ THE `getChunk` FIX, and it is the sharpest single case in the corpus.
797
+ /// ⟨0.16.0⟩ THE `getChunk` FIX, and it is the sharpest single case in the August 2026 audit of every
798
+ /// wire method.
772
799
  ///
773
800
  /// The engram's version was:
774
801
  ///
@@ -790,28 +817,23 @@ service : {
790
817
  ///
791
818
  /// The honesty gates could not see it. `gate.verifyGrant` is a PAYMENT gate, and the gate-call
792
819
  /// list they scan holds authorization helpers only — so a refusal fabricated behind a payment
793
- /// check was out of scope by construction rather than by ruling. L11 adds payment gates to that
794
- /// list; this method is why.
795
- getContentChunk: (grant: AccessGrant, index: nat) -> (Result_14) query;
796
- /// A seller's payout address — THEIRS, or the admin's to read.
797
- ///
798
- /// The engram made this owner-only and TRAPPED at everyone else. Here the answer is a refusal a
799
- /// caller can read, and `#Ok(null)` genuinely means "this seller has set no payout address" —
800
- /// distinguishable from "you may not ask", which is the whole point of the envelope.
801
- getEvmSellerPayout: (seller: principal) -> (Result_16) query;
820
+ /// check was out of scope by construction rather than by ruling. The 0.16.0 honesty rule adds
821
+ /// payment gates to that list; this method is why.
822
+ getContentChunk: (grant: AccessGrant, index: nat) -> (Result_15) query;
802
823
  /// PUBLIC: what this canister's chains continue, or that they continue nothing. A fresh chain
803
824
  /// beside a published predecessor head is auditable; a fresh chain with no statement is
804
825
  /// indistinguishable from a wipe.
805
826
  getGenesisNote: () -> (GenesisNote) query;
806
- /// ⟨0.16.0, L1⟩ The engram TRAPPED here. Trapping was the right fix at the time — it stopped the
827
+ /// ⟨0.16.0, refusals are values, never traps⟩
828
+ /// The engram TRAPPED here. Trapping was the right fix at the time — it stopped the
807
829
  /// refusal masquerading as a not-found — but it hands the caller no structured reason and cannot
808
- /// be told from a genuine fault. Under L1 the refusal is a value.
830
+ /// be told from a genuine fault. Under the 0.16.0 result rule the refusal is a value.
809
831
  ///
810
832
  /// The comment the engram carried is worth keeping because it names what went wrong: `null`
811
833
  /// collapsed "unknown jobId" and "not authorized", and the product rendered the wrong conclusion
812
834
  /// from it — the marketplace UI printed "Job not found (or not yet visible)" at a caller who was
813
835
  /// merely unauthorized. Job existence is not the secret: `getJobCounts()` is ungated.
814
- getJob: (jobId: text) -> (Result_15) query;
836
+ getJob: (jobId: text) -> (Result_16) query;
815
837
  /// PUBLIC: aggregate counts that identify nobody — and already public on the engram, which is
816
838
  /// what made `listJobs`' existence-leak justification false.
817
839
  getJobCounts: () -> (JobCounts) query;
@@ -824,7 +846,7 @@ service : {
824
846
  ///
825
847
  /// Three outcomes, three answers now. And `Payer` (above) removes the root cause rather than
826
848
  /// only labelling it.
827
- getJobResult: (jobId: text) -> (Result_14) query;
849
+ getJobResult: (jobId: text) -> (Result_15) query;
828
850
  /// Terminal money settlement — the seller gets paid. Honours the freeze exactly like every
829
851
  /// other settle path; a settlement that ignored the freeze would make the freeze a suggestion.
830
852
  /// PUBLIC: a job's state, and nothing else about it.
@@ -839,7 +861,7 @@ service : {
839
861
  ///
840
862
  /// The engram returned `?EngramJobStatus`, conflating "no such job" with a null-ish answer. Here
841
863
  /// a missing job is `#NotFound`, which is a fact rather than an absence a caller has to interpret.
842
- getJobStatus: (jobId: text) -> (Result_13) query;
864
+ getJobStatus: (jobId: text) -> (Result_14) query;
843
865
  /// PUBLIC: the market's spend limits, with the caller rosters REDACTED.
844
866
  ///
845
867
  /// The limits themselves are already public — they are advertised inside every 402 challenge, so
@@ -852,6 +874,11 @@ service : {
852
874
  /// the canister acting as its own payer — which silently returns a self-override if one exists,
853
875
  /// so the published limits could differ from the ones actually applied to buyers.
854
876
  getPaymentPolicy: () -> (SpendingPolicy) query;
877
+ /// A seller's own revenue on this market.
878
+ ///
879
+ /// ⟨0.16.0⟩ SELLER-SCOPED. The engram's version was owner-only and TRAPPED at everyone else,
880
+ /// which was coherent when the owner was the only seller. Here every caller has a different
881
+ /// answer, and no caller is entitled to another's: the numbers cover the caller's own listings
855
882
  /// and nothing is aggregated across sellers.
856
883
  ///
857
884
  /// THE FIGURES ARE COMPUTED, NOT READ FROM THE CANISTER-WIDE COUNTERS. `payments`' scalars are
@@ -862,7 +889,7 @@ service : {
862
889
  /// Anonymous is refused rather than answered with zeroes. A zero here is a real business fact —
863
890
  /// "you have sold nothing" — and returning it to a caller who simply has no identity is the
864
891
  /// fabricated-empty defect wearing a number instead of a list.
865
- getRevenueSummary: () -> (Result_12) query;
892
+ getRevenueSummary: () -> (Result_13) query;
866
893
  /// PUBLIC: what a buyer can learn about a seller, and the whole of it.
867
894
  ///
868
895
  /// The ENGRAM ID is the point of this read. This market runs no reputation system and issues no
@@ -873,7 +900,11 @@ service : {
873
900
  ///
874
901
  /// `verified` is about ownership at a moment in time and nothing else. It is not an endorsement,
875
902
  /// and the field name is the strongest claim it makes.
876
- getSellerStatus: (seller: principal) -> (Result_11) query;
903
+ ///
904
+ /// ⟨2026-11-04, the owner's sale-payout ruling⟩ It also says where this seller's sales land
905
+ /// (`evmPayout`, `evmPayoutError`) and how many are still in flight (`parkedPayouts`,
906
+ /// `parkedSaleNotices`) — counts, never amounts (`Types.SellerStatus`).
907
+ getSellerStatus: (seller: principal) -> (Result_12) query;
877
908
  /// PUBLIC: aggregate session counts. Identifies nobody, and the same reasoning as getJobCounts —
878
909
  /// which is also what made `listJobs`' old "no existence leak" defence false.
879
910
  getSessionCounts: () -> (SessionCounts) query;
@@ -888,7 +919,7 @@ service : {
888
919
  /// THIS WRONG: an HTTP route that could authenticate its payer, or a flow of ours that approves
889
920
  /// more than one payment's worth or without an expiry.
890
921
  ///
891
- /// ⟨CORRECTED 2026-09-30 — the owner's answer "1 B"⟩ The paragraph above is history. No web route
922
+ /// ⟨CORRECTED 2026-09-30 — the owner's web-route answer⟩ The paragraph above is history. No web route
892
923
  /// settles an ICP-rail payment any more, so none spends an allowance and none can be used against
893
924
  /// a standing one. The one `gate.settle` left is on /service/, reached only with an EVM (`eip155:`)
894
925
  /// payment carrying the buyer's own EIP-3009 authorization — a signature that names the payment and
@@ -952,14 +983,21 @@ service : {
952
983
  isTradeFrozen: () -> (bool) query;
953
984
  /// `total` is the head counter, not the row count: this is a bounded ring, so a page that
954
985
  /// reported only what it returned would make a trimmed log look complete.
955
- listAuditEntries: (start: nat, limit: nat) -> (Result_9) query;
956
- /// Admin AND the enrolled viewers themselves — L8's roster rule. A viewer who cannot see the
986
+ ///
987
+ /// ⟨2026-10-15, the owner's ruling of 2026-10-14 on the chained record⟩ The reply is the shared
988
+ /// `Wire.RecordPage`, so
989
+ /// one checker reads every chain. A viewer sees every entry, so `sealed` is always empty here;
990
+ /// `ringFloor` says where the ring starts and `hashFirstFrom` where this record switched to the
991
+ /// hash-first rule. The gate is unchanged (hash-only rows for strangers were ruled for the
992
+ /// engram's record).
993
+ listAuditEntries: (start: nat, limit: nat) -> (Result_11) query;
994
+ /// Admin AND the enrolled viewers themselves — the roster rule of who may read what. A viewer who cannot see the
957
995
  /// roster cannot tell whether their own enrolment survived a rotation.
958
996
  listAuditViewers: () -> (Result_10) query;
959
997
  /// PUBLIC: the catalogue is the storefront. A shop that refuses to say what it sells to
960
998
  /// anyone who has not already bought is not a shop.
961
999
  listContent: (start: nat, limit: nat) -> (Page_6) query;
962
- /// L11 names this canister's reason for having a denial log at all: the commerce surface is where
1000
+ /// The 0.16.0 honesty rule names this canister's reason for having a denial log at all: the commerce surface is where
963
1001
  /// the fabricated-empty class was born, and a refusal that leaves no trace cannot be counted,
964
1002
  /// alerted on, or disproved.
965
1003
  listDenialEntries: (start: nat, limit: nat) -> (Result_9) query;
@@ -982,7 +1020,7 @@ service : {
982
1020
  /// none look different, which is the honest answer, without publishing what was withdrawn.
983
1021
  listEndpoints: (statusFilter: opt EndpointStatus, start: nat, limit:
984
1022
  nat) -> (Page_3) query;
985
- /// ⟨0.16.0⟩ THE `listJobs` FIX — the second of the two fabricated empties L11 names.
1023
+ /// ⟨0.16.0⟩ THE `listJobs` FIX — the second of the two fabricated empties the 0.16.0 honesty rule names.
986
1024
  ///
987
1025
  /// The engram's version ended its authorization check with `if (not (isOwner or
988
1026
  /// isServiceOperator)) { return [] }`, and its own `.did` comment declared the behaviour on the
@@ -1005,21 +1043,17 @@ service : {
1005
1043
  /// two facts that were one empty list.
1006
1044
  listJobs: (serviceId: text, statusFilter: opt JobStatus, start: nat, limit:
1007
1045
  nat) -> (Result_7) query;
1008
- /// The parked withdrawals belonging to this caller, so an unresolved payout is discoverable
1009
- /// rather than something a seller has to already know the id of.
1010
- ///
1011
- /// PAGED, and NOT taken as a bounded exemption, though the temptation was real: a seller parks a
1012
- /// withdrawal only when a ledger call rejects, and each withdrawal zeroes their balance — so the
1013
- /// list is 0 or 1 in every ordinary history. It is not STRUCTURALLY bounded, which is the test
1014
- /// the page-shape rule actually applies: a run of ledger outages across a run of sales
1015
- /// accumulates rows with nothing to stop it. A bare array that silently truncated would be
1016
- /// indistinguishable from "you have no other unresolved payouts", and this is money.
1017
- ///
1018
- /// `withheld` is always 0 here. The filter is by owner and a caller cannot own a row they may
1019
- /// not see, so nothing is ever hidden from them — unlike `listEndpointPurchases`, where a
1020
- /// non-owner's view withholds other buyers' rows. Stated because a reader comparing the two
1021
- /// should know the zero is a fact about this surface, not an unimplemented field.
1022
- listMyPendingWithdrawals: (start: nat, limit: nat) -> (Result_6) query;
1046
+ /// ⟨2026-11-04, the owner's sale-payout ruling⟩ The parked payouts to the caller's engram — a content sale
1047
+ /// whose push the ledger has not confirmed, each settled by `retrySalePayout` — so an unresolved
1048
+ /// payout is discoverable rather than something a seller must already know the id of.
1049
+ ///
1050
+ /// Behind the seller's CURRENT registration (`requireSellerRead`, the query twin of `requireSeller`),
1051
+ /// and scoped to that registration's engram by `Payments.parkedFor` — not an inline filter, for the
1052
+ /// reason that helper gives. `withheld` is 0 truthfully: the rows it drops belong to OTHER engrams
1053
+ /// and were never this caller's to see; a global count would tell a seller how many other sellers
1054
+ /// have a parked payout. PAGED, not a bounded exemption: a run of ledger outages across a run of
1055
+ /// sales accumulates rows with nothing to stop it.
1056
+ listMyParkedPayouts: (start: nat, limit: nat) -> (Result_6) query;
1023
1057
  /// ⟨0.16.0⟩ `listAllServices` FOLDS in as `includeDisabled`.
1024
1058
  ///
1025
1059
  /// The engram had two methods because the visibility rule differed: everyone saw enabled
@@ -1070,19 +1104,19 @@ service : {
1070
1104
  /// not the bare `consumeVoucher`: the signed fallback is off on this canister, so the bare call
1071
1105
  /// refuses every voucher, and only the session key calling as itself may spend a session.
1072
1106
  openSession: (config: SessionConfig, sig: PaymentSignature) -> (Result_5);
1073
- /// RENAMED from `requestSession` (census tier-3 #21): it is a pure dry run — a quote for a session
1107
+ /// RENAMED from `requestSession` in the 0.16.0 interface pass: it is a pure dry run — a quote for a session
1074
1108
  /// the caller has not opened and is not committed to. `request` read as an action with an effect.
1075
1109
  ///
1076
1110
  /// PUBLIC: a price list nobody can read is not a price list, and this is the market's. ⟨The
1077
- /// sentence was already here as "Ungated:"; only the marker the L8 gate greps for was missing,
1111
+ /// sentence was already here as "Ungated:"; only the marker the disclosure gate greps for was missing,
1078
1112
  /// which is why this method read as undefended when it was not.⟩
1079
- /// ⟨CORRECTED 2026-08-24 — this said "⟨L7⟩ UPDATE, NOT QUERY" and cited a market ruling that
1080
- /// DEC-107 had already closed.⟩ QUERY, per the ruled quote convention: FAST READS. Both
1081
- /// `quotePayment` and `previewOpenSession` become queries, and L7's open-ruling exception
1082
- /// retires with them — so the argument written here for keeping it an update was arguing the
1083
- /// losing side of a decision already made, and was added the same day by not reading forward
1084
- /// to the ruling. `gate.offerSession` is pure — it validates the intent and returns it — so
1085
- /// nothing forced the update in the first place.
1113
+ /// ⟨CORRECTED 2026-08-24 — this said "UPDATE, NOT QUERY" under the update-for-read marker and cited a
1114
+ /// market ruling that a later market ruling had already closed.⟩ QUERY, per the ruled quote
1115
+ /// convention: FAST READS. Both `quotePayment` and `previewOpenSession` become queries, and the
1116
+ /// update-for-read rule's open-ruling exception retires with them — so the argument written here
1117
+ /// for keeping it an update was arguing the losing side of a decision already made, and was added
1118
+ /// the same day by not reading forward to the ruling. `gate.offerSession` is pure — it validates
1119
+ /// the intent and returns it — so nothing forced the update in the first place.
1086
1120
  ///
1087
1121
  /// ONE-REPLICA CAVEAT, stated here because the ruling requires it at both sites: a query is one
1088
1122
  /// replica's word and is NOT a settleable challenge. Nothing quoted here can be redeemed. The
@@ -1108,9 +1142,9 @@ service : {
1108
1142
  /// ⟨CORRECTED 2026-10-02 — the nonce is GONE from the quote; the two paragraphs below are kept as
1109
1143
  /// the record of why.⟩ Each requirement is now a `QuotedRequirement`: ic402's requirement without
1110
1144
  /// its `nonce` (and with `expiry` spelled `expiryNs`). The paragraphs below describe the throwaway
1111
- /// that was published until this date; the pre-cut review recommended dropping it over ratifying
1112
- /// it, and it was dropped. "Do not pay against it" is now enforced by there being nothing to pay
1113
- /// against.
1145
+ /// that was published until this date; the review before the 0.16.0 cut recommended dropping it
1146
+ /// over ratifying it, and it was dropped. "Do not pay against it" is now enforced by there being
1147
+ /// nothing to pay against.
1114
1148
  ///
1115
1149
  /// ⚠ THE NONCE IN EACH REQUIREMENT IS A THROWAWAY — DO NOT PAY AGAINST IT. `requireAll` mints a
1116
1150
  /// server nonce with a HashMap put, and this is a QUERY, so the write is discarded on return.
@@ -1160,22 +1194,17 @@ service : {
1160
1194
  /// arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
1161
1195
  /// contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
1162
1196
  /// dependency work.
1163
- reconcileSession: (sessionId: text) -> (Result_2);
1164
- /// Settle a parked withdrawal by asking the ledger what happened, rather than assuming.
1165
- ///
1166
- /// Re-sends the IDENTICAL transfer — same amount, same fee, same `created_at_time`. Within
1167
- /// ICRC-1's 24h deduplication window there are exactly two outcomes and both are conclusive:
1168
- /// · `#Err(#Duplicate)` — the original DID execute. The seller has been paid; discard the
1169
- /// parked record.
1170
- /// · `#Ok` — the original did NOT execute, and this call has now paid it. Discard.
1171
- /// Anything else leaves the record parked and retryable; it is never guessed at.
1172
1197
  ///
1173
- /// Callable by the SELLER it belongs to. This pays only ever to the recorded seller, so a
1174
- /// stranger calling it could not misdirect funds — but it is still scoped, because a parked
1175
- /// withdrawal is the seller's business and its existence is a fact about their balance.
1176
- ///
1177
- /// The precedent is the cashier's `recoverPendingClaim`: same saga, same rail, same reason.
1178
- recoverContentWithdrawal: (withdrawalId: nat) -> (Result);
1198
+ /// ⟨2026-11-05, ic402 2.20.0 — beside the list of refusals above⟩ It now also resolves an ICP session
1199
+ /// left `#closing` by a close whose settle the ledger rejected after it may have run (that close
1200
+ /// answers "outcome unknown"). It moves no money itself: it reads the session's escrow balance, and
1201
+ /// the full deposit still there means the settle did not land, so the session reopens for a close to
1202
+ /// settle it once; less than the deposit means it did, so the session ends `#closed` with the
1203
+ /// remainder recoverable by its payer (`recoverEscrow`). Refused while a close of that session is
1204
+ /// still running ("call again once it returns"), and a failed balance or fee query leaves the session
1205
+ /// `#closing` to be reconciled again. THIS, NOT `forceResolveSession`, IS THE WAY OUT for such a
1206
+ /// session: forcing one whose settle never landed strands the recipient's share.
1207
+ reconcileSession: (sessionId: text) -> (Result_2);
1179
1208
  /// Admin recovery: return unconsumed escrow from a stuck or terminal session's own subaccount.
1180
1209
  /// THE ONE RECOVERY METHOD THAT MOVES REAL MONEY.
1181
1210
  ///
@@ -1218,6 +1247,10 @@ service : {
1218
1247
  /// that was the block index alone, which read as the amount. If the session's record is removed
1219
1248
  /// before the amount can be read back — a session closed in the same moment as the recovery and
1220
1249
  /// cleaned up during its transfer — it answers `#Other` naming the block, never a guessed amount.
1250
+ ///
1251
+ /// ⟨2026-11-19, ic402 2.23.0, beside the paragraph above⟩ `amount` is now the library's own figure for what
1252
+ /// it paid, from its receipt (since ic402 2.22.0 it is also capped at what the session's close recorded as
1253
+ /// still owed, less one fee). The `#Other` answer for a record removed during the transfer no longer occurs.
1221
1254
  recoverEscrow: (sessionId: text, amount: TokenAmount) -> (Result_3);
1222
1255
  /// Register as a seller by naming the engram you own.
1223
1256
  ///
@@ -1229,7 +1262,19 @@ service : {
1229
1262
  /// Re-registering is how a seller refreshes an expiring binding, and it is idempotent apart from
1230
1263
  /// the timestamp. The byte count SURVIVES re-registration — otherwise the quota would reset every
1231
1264
  /// thirty days, which is a quota in name only.
1232
- registerSeller: (engramId: principal) -> (Result_1);
1265
+ ///
1266
+ /// ⟨2026-11-04, the owner's ruling: a sale is paid into the selling engram's own wallet⟩
1267
+ /// ON THIS MARKET'S BOOKS THE SELLER IS THE ENGRAM; the caller is the hand that lists for it. Every
1268
+ /// identity this market hands the payment library — a service's operator, the claimant, the
1269
+ /// submitter, the EVM payout key — is `engramId`, so the library pays the engram's own account on
1270
+ /// the ckUSDC rail with no money code of ours, and content sales are pushed there by `payEngram`.
1271
+ /// Three steps more than before, in order: the one-engram check (`oneEngramConflict`) before the
1272
+ /// first await; after the registry, the engram is asked for its own EVM address
1273
+ /// (`askEngramPayAddress`) and that address is registered with the library under the engram; the
1274
+ /// one-engram check again, and the binding written from the LIVE map (the byte count may have moved
1275
+ /// across the awaits). Last, this engram's parked sale notices are delivered (at most 16): a
1276
+ /// seller's own message, and the engram just answered.
1277
+ registerSeller: (engramId: principal) -> (Result);
1233
1278
  /// Register a paid service. Born DISABLED, like an endpoint and for the same reason: a listing
1234
1279
  /// that went live at creation would be sellable before its seller had checked it.
1235
1280
  ///
@@ -1249,13 +1294,13 @@ service : {
1249
1294
  pricing: PricingScheme, verificationMethod: text, verifierCanisterId:
1250
1295
  opt text, verificationKey: opt blob, delivery: ServiceDeliveryMethod,
1251
1296
  timeout: nat, bindResult: opt bool) -> (Result_2);
1252
- removeAuditViewer: (viewer: principal) -> (Result_1);
1297
+ removeAuditViewer: (viewer: principal) -> (Result);
1253
1298
  /// Remove a per-payer override so that payer reverts to — and keeps TRACKING — the global policy.
1254
1299
  ///
1255
1300
  /// Its pair's only other "undo" was overwriting the override with a frozen copy of the global
1256
1301
  /// policy, which then stops following later global changes. That is why the two never travel
1257
1302
  /// apart: without this one, every override is permanent in effect.
1258
- removeCallerPolicy: (caller: principal) -> (Result_1);
1303
+ removeCallerPolicy: (caller: principal) -> (Result);
1259
1304
  /// ⟨0.16.0⟩ RULED 2026-08-17: THE SELLER RESOLVES. Not the market admin.
1260
1305
  ///
1261
1306
  /// The engram's `requireOwner` was coherent there because the engram's owner IS the seller — a
@@ -1284,7 +1329,7 @@ service : {
1284
1329
  /// arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
1285
1330
  /// contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
1286
1331
  /// dependency work.
1287
- resolveDispute: (jobId: text, refundBuyer: bool) -> (Result_1);
1332
+ resolveDispute: (jobId: text, refundBuyer: bool) -> (Result);
1288
1333
  /// Admin LAST RESORT: force a job to a terminal status when reconcileJob cannot determine one —
1289
1334
  /// a reverted or dead transaction that the chain will never resolve either way.
1290
1335
  ///
@@ -1305,7 +1350,30 @@ service : {
1305
1350
  /// arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
1306
1351
  /// contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
1307
1352
  /// dependency work.
1308
- resolveJob: (jobId: text, terminal: JobStatus) -> (Result_1);
1353
+ resolveJob: (jobId: text, terminal: JobStatus) -> (Result);
1354
+ /// ⟨2026-11-04, the owner's sale-payout ruling⟩ Deliver one engram's parked sale notices to its record —
1355
+ /// at most 16 a call, oldest first — and answer how many landed. CALLABLE BY ANYONE, anonymous
1356
+ /// included: the engram dedups on the receipt id and accepts only this market, so nothing can be
1357
+ /// misdirected or written twice; the same accepted residual as `retrySalePayout`. `#NotFound` when
1358
+ /// nothing is parked for that engram (every sale it made here reached its record, or none was made).
1359
+ retrySaleNotices: (engramId: principal) -> (Result_1);
1360
+ /// ⟨2026-11-04, the owner's sale-payout ruling⟩ Settle a parked sale payout by asking the ledger what
1361
+ /// happened, rather than assuming — the retired withdrawal recovery's saga, kept whole for the payout
1362
+ /// that replaced the withdrawal.
1363
+ ///
1364
+ /// Re-sends the IDENTICAL transfer: same engram, amount, fee, memo and `created_at_time`. Within
1365
+ /// ICRC-1's 24-hour window there are exactly two conclusive outcomes: `#Duplicate` — the first push
1366
+ /// DID land, the engram has been paid, clear the row; `#Ok` — it had not, and this call has now
1367
+ /// paid it. `#TooOld` leaves it parked (outside the window only a human reading the ledger can say);
1368
+ /// `#BadFee` leaves it parked (the fee is part of the tuple — see `Types.PendingPayout.feeE6`); any
1369
+ /// other answer leaves it parked and retryable. Never guessed at.
1370
+ ///
1371
+ /// PUBLIC: callable by anyone, anonymous included: the destination, amount, fee, memo and time are all
1372
+ /// recorded, so nothing about the call can be misdirected, and the chained row names whoever asked.
1373
+ /// The residual — a stranger can make the market spend one ledger call per press on its own debt —
1374
+ /// is accepted (a caller gate would buy nothing but a name). The sale's record line does not wait
1375
+ /// on this: the engram was told when the sale settled, whether the push paid or parked.
1376
+ retrySalePayout: (payoutId: nat) -> (Result_1);
1309
1377
  /// Admin recovery: retry the payment to the seller of a job left `#Verified` by a failed payment.
1310
1378
  /// NOTHING ELSE. It never refunds the buyer, and it refuses every job that does not read
1311
1379
  /// `#Verified`, with nothing moved.
@@ -1335,56 +1403,47 @@ service : {
1335
1403
  /// `#Conflict` covers the state refusals: a job that does not read `#Verified`, and the library's
1336
1404
  /// own (a job that moved on before the retry ran, or a payment that failed). `#NotFound` is a job id
1337
1405
  /// this market does not have.
1338
- retrySellerPayment: (jobId: text) -> (Result_1);
1339
- setAdmin: (newAdmin: principal) -> (Result_1);
1406
+ retrySellerPayment: (jobId: text) -> (Result);
1407
+ setAdmin: (newAdmin: principal) -> (Result);
1340
1408
  /// Override the policy for ONE payer — the market's per-buyer risk control.
1341
- setCallerPolicy: (caller: principal, policy: SpendingPolicy) -> (Result_1);
1342
- /// ⟨0.16.0, L2.6⟩ `enableEndpoint` and `disableEndpoint` FOLD into one setter.
1409
+ setCallerPolicy: (caller: principal, policy: SpendingPolicy) -> (Result);
1410
+ /// ⟨0.16.0, one boolean idiom⟩ `enableEndpoint` and `disableEndpoint` FOLD into one setter.
1343
1411
  ///
1344
1412
  /// They were byte-identical apart from the status they wrote and the word in their name, which is
1345
- /// the definition of a boolean expressed as two methods. L2.6 rules one idiom for a boolean
1346
- /// feature, and the fold also removes a real hazard: two methods meant two authorization checks
1413
+ /// the definition of a boolean expressed as two methods. The 0.16.0 naming rules allow one idiom for
1414
+ /// a boolean feature (a set…Enabled setter plus a readable flag), and the fold also removes a real
1415
+ /// hazard: two methods meant two authorization checks
1347
1416
  /// to keep in step, and a divergence between them would have been invisible to a reader looking at
1348
1417
  /// either one alone.
1349
1418
  ///
1350
1419
  /// `#Deleted` stays a refusal in both directions and stays `#Conflict`, not `#Invalid`: the
1351
1420
  /// request is well-formed and permitted, the endpoint is simply in a terminal state — and calling
1352
1421
  /// that `#Invalid` would tell a caller to fix their request when nothing about it is wrong.
1353
- setEndpointEnabled: (endpointId: text, enabled: bool) -> (Result_1);
1422
+ setEndpointEnabled: (endpointId: text, enabled: bool) -> (Result);
1354
1423
  /// Set an endpoint's price. THE SELLER'S, not the admin's.
1355
1424
  ///
1356
1425
  /// requireEndpointOwner admits the market admin for the enable/disable pair, because a listing an
1357
1426
  /// admin cannot take down is a moderation problem. PRICE IS DIFFERENT: changing what a seller
1358
1427
  /// charges is trading on their behalf, and no recovery story needs it.
1359
- setEndpointPrice: (endpointId: text, priceE6: nat) -> (Result_1);
1360
- /// A seller registers the EVM address their EVM-paid settlements are sent to.
1361
- ///
1362
- /// SELF-SCOPED: the address is keyed by `msg.caller`, so the only account a caller can change is
1363
- /// their own — there is no gate to get wrong, because there is nothing to gate. The engram's
1364
- /// `requireAgentOrOwner` here was protecting a canister-level roster that a shared market does
1365
- /// not have. Anonymous is refused: an anonymous payout address is an address nobody can be paid at.
1366
- ///
1367
- /// Without one, an EVM-paid job's settlement FAILS CLOSED and rolls back — the market does not
1368
- /// cross rails and pay an EVM seller out of the ICP pool.
1369
- setEvmSellerPayout: (address: text) -> (Result_1);
1428
+ setEndpointPrice: (endpointId: text, priceE6: nat) -> (Result);
1370
1429
  /// Set the market's global spending policy.
1371
1430
  ///
1372
1431
  /// The audit row records the LIMITS, not just the fact of a change, so a WIDENING is
1373
1432
  /// distinguishable from a tightening after the fact. A policy raise is the quiet half of most
1374
1433
  /// money incidents, and "policy changed" alone cannot tell an investigator which way.
1375
- setPaymentPolicy: (policy: SpendingPolicy) -> (Result_1);
1434
+ setPaymentPolicy: (policy: SpendingPolicy) -> (Result);
1376
1435
  /// Whom this canister anchors to. Set by the admin at deploy; `sys` because it is protocol
1377
1436
  /// configuration, not a product surface.
1378
1437
  ///
1379
1438
  /// ⟨RENAMED 2026-10-02 from `sysSetRegistryId` — the sys-tier retier ruled 2026-08-24, executed
1380
- /// under the owner's 2026-10-02 ruling to carry out the pre-cut interface decisions as
1381
- /// recommended.⟩ The sentence above is why it was sys-named, and the retier is why it no longer
1382
- /// is: the `sys` prefix names the canister-to-canister tier, whose callers are other canisters,
1383
- /// and this method's only caller is a PERSON — the market's admin, at deploy. Keeping it there
1384
- /// made "a `sys` method has no human caller" false, and so uncheckable. A plain admin setter
1439
+ /// under the owner's 2026-10-02 ruling to carry out the interface decisions reviewed before the
1440
+ /// 0.16.0 cut as recommended.⟩ The sentence above is why it was sys-named, and the retier is why it
1441
+ /// no longer is: the `sys` prefix names the canister-to-canister tier, whose callers are other
1442
+ /// canisters, and this method's only caller is a PERSON — the market's admin, at deploy. Keeping it
1443
+ /// there made "a `sys` method has no human caller" false, and so uncheckable. A plain admin setter
1385
1444
  /// (`setAdmin`'s sibling) is what it always was.
1386
- setRegistryId: (id: principal) -> (Result_1);
1387
- /// ⟨0.16.0, L2.6⟩ enableService + disableService FOLD, same as the endpoint pair.
1445
+ setRegistryId: (id: principal) -> (Result);
1446
+ /// ⟨0.16.0, one boolean idiom⟩ enableService + disableService FOLD, same as the endpoint pair.
1388
1447
  ///
1389
1448
  /// Deliberately NOT admin-overridable, unlike endpoints. Disabling a seller's service is a
1390
1449
  /// commercial act against that seller, and an admin who needs to remove a listing should do it
@@ -1396,7 +1455,7 @@ service : {
1396
1455
  /// `confirmJob` and `disputeJob`. `enableService`/`disableService` return `Service not found`
1397
1456
  /// (properly `#NotFound`) and **`Not the seller`** (properly `#Refused`) as plain strings, so
1398
1457
  /// the arm is gone before this method sees it. Read the MESSAGE, not the arm.
1399
- /// ⟨2026-08-21; the project's backlog carries the three costed fixes and why none is a
1458
+ /// ⟨2026-08-21; three costed fixes were recorded, with why none is a
1400
1459
  /// one-liner.⟩
1401
1460
  /// ⟨CORRECTED 2026-10-02, audited at this site — the paragraph above no longer holds here.⟩
1402
1461
  /// `requireServiceSeller` now runs BEFORE the library: a missing service is refused `#NotFound`
@@ -1405,7 +1464,7 @@ service : {
1405
1464
  /// not found" texts cannot reach the `#Conflict` arm below except across a race with a deletion.
1406
1465
  /// The seam is closed on this method by the gate, not by the library; the others keep their
1407
1466
  /// caveats.
1408
- setServiceEnabled: (id: text, enabled: bool) -> (Result_1);
1467
+ setServiceEnabled: (id: text, enabled: bool) -> (Result);
1409
1468
  /// A seller submits a finished job's result.
1410
1469
  ///
1411
1470
  /// AUTHORITY IS THE JOB'S SELLER, checked by ic402 against the claim — not "a seller of this
@@ -1426,33 +1485,21 @@ service : {
1426
1485
  /// theirs. Read the MESSAGE, not the arm. This is the 0.16.0 contract as ratified on 2026-10-02;
1427
1486
  /// giving the library one arm per kind of refusal is post-cut dependency work.
1428
1487
  submitJobResult: (jobId: text, result: blob, proof: opt blob, actualCost:
1429
- opt nat) -> (Result_1);
1488
+ opt nat) -> (Result);
1430
1489
  /// Upload a whole file in one call.
1431
- uploadContent: (id: text, mimeType: text, data: blob) -> (Result_1);
1490
+ uploadContent: (id: text, mimeType: text, data: blob) -> (Result);
1432
1491
  /// Push one chunk of a started upload. NOT charged — uploadContentInit already reserved the
1433
1492
  /// declared total, so charging again here would bill the same bytes twice.
1434
- uploadContentChunk: (id: text, index: nat, data: blob) -> (Result_1);
1493
+ uploadContentChunk: (id: text, index: nat, data: blob) -> (Result);
1435
1494
  /// Begin a chunked upload. The WHOLE declared size is charged here, up front.
1436
1495
  ///
1437
1496
  /// Charging at init rather than per chunk is the point: a per-chunk charge would let a seller
1438
1497
  /// begin an upload that cannot finish, and discover it only after claiming most of the memory.
1439
1498
  /// Reserving the declared total means an over-quota upload is refused before its first byte lands.
1440
1499
  uploadContentInit: (id: text, mimeType: text, totalSize: nat, chunkCount:
1441
- nat) -> (Result_1);
1500
+ nat) -> (Result);
1442
1501
  /// The buyer-facing half of the same check, kept because it answers a different question: "is my
1443
1502
  /// grant still good", asked BEFORE spending a round trip on a chunk. Documented in ACCESS-CONTROL
1444
1503
  /// as the buyer's pre-flight.
1445
- verifyGrant: (grant: AccessGrant) -> (Result_1) query;
1446
- /// Withdraw everything this caller has earned from content sales, to their own principal.
1447
- ///
1448
- /// NO DESTINATION ARGUMENT, and that is the security property rather than a missing feature: the
1449
- /// funds go to `msg.caller` and nowhere else, so a stolen or mis-signed call cannot redirect a
1450
- /// seller's balance to an attacker's account. A seller who wants the money elsewhere moves it
1451
- /// from their own account, where they are the only signer.
1452
- ///
1453
- /// NOT GATED ON `requireSeller`. A seller binding expires and can be revoked; earnings do not.
1454
- /// Gating withdrawal on current seller status would strand the balance of anyone whose engram
1455
- /// lapsed after they sold — money owed, permanently unreachable, for a reason unrelated to the
1456
- /// debt. The gate is the debt itself: you may withdraw exactly what you are owed.
1457
- withdrawContentRevenue: () -> (Result);
1504
+ verifyGrant: (grant: AccessGrant) -> (Result) query;
1458
1505
  }