@engramx/idl 0.16.0-rc.21 → 0.16.0-rc.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/engram.did +669 -194
- package/dist/engram.idl.d.ts +673 -194
- package/dist/engram.idl.js +289 -194
- package/dist/market.did +119 -107
- package/dist/market.idl.d.ts +123 -110
- package/dist/market.idl.js +52 -49
- package/dist/registry.did +317 -96
- package/dist/registry.idl.d.ts +308 -98
- package/dist/registry.idl.js +107 -48
- package/package.json +1 -1
package/dist/market.idl.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ export interface Page {
|
|
|
149
149
|
export interface Page_1 {
|
|
150
150
|
total: bigint;
|
|
151
151
|
withheld: bigint;
|
|
152
|
-
items: Array<
|
|
152
|
+
items: Array<PendingPayout>;
|
|
153
153
|
}
|
|
154
154
|
export interface Page_2 {
|
|
155
155
|
total: bigint;
|
|
@@ -215,13 +215,16 @@ export interface PaymentSignature {
|
|
|
215
215
|
nonce: Uint8Array | number[];
|
|
216
216
|
authorization: [] | [Eip3009Authorization];
|
|
217
217
|
}
|
|
218
|
-
export interface
|
|
218
|
+
export interface PendingPayout {
|
|
219
219
|
id: bigint;
|
|
220
220
|
parkedAtNs: bigint;
|
|
221
221
|
createdAtTimeNs: bigint;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
memo: Uint8Array | number[];
|
|
223
|
+
amountE6: bigint;
|
|
224
|
+
engramId: Principal;
|
|
225
|
+
receiptId: string;
|
|
226
|
+
lastError: string;
|
|
227
|
+
feeE6: bigint;
|
|
225
228
|
}
|
|
226
229
|
export type PricingScheme = { Exact: bigint } | { Upto: bigint } | { Session: null };
|
|
227
230
|
export interface PurchaseRecord {
|
|
@@ -251,8 +254,8 @@ export interface RecordPage {
|
|
|
251
254
|
items: Array<AuditEntry>;
|
|
252
255
|
hashFirstFrom: bigint;
|
|
253
256
|
}
|
|
254
|
-
export type Result = { Ok:
|
|
255
|
-
export type Result_1 = { Ok:
|
|
257
|
+
export type Result = { Ok: null } | { Err: Error };
|
|
258
|
+
export type Result_1 = { Ok: bigint } | { Err: Error };
|
|
256
259
|
export type Result_10 = { Ok: Page_7 } | { Err: Error };
|
|
257
260
|
export type Result_11 = { Ok: RecordPage } | { Err: Error };
|
|
258
261
|
export type Result_12 = { Ok: SellerStatus } | { Err: Error };
|
|
@@ -260,11 +263,10 @@ export type Result_13 = { Ok: RevenueSummary } | { Err: Error };
|
|
|
260
263
|
export type Result_14 = { Ok: JobStatus } | { Err: Error };
|
|
261
264
|
export type Result_15 = { Ok: Uint8Array | number[] } | { Err: Error };
|
|
262
265
|
export type Result_16 = { Ok: Job } | { Err: Error };
|
|
263
|
-
export type Result_17 = { Ok:
|
|
264
|
-
export type Result_18 = { Ok:
|
|
265
|
-
export type Result_19 = { Ok:
|
|
266
|
+
export type Result_17 = { Ok: ContentResponse } | { Err: Error };
|
|
267
|
+
export type Result_18 = { Ok: ServiceRequestResponse } | { Err: Error };
|
|
268
|
+
export type Result_19 = { Ok: X402Endpoint } | { Err: Error };
|
|
266
269
|
export type Result_2 = { Ok: string } | { Err: Error };
|
|
267
|
-
export type Result_20 = { Ok: X402Endpoint } | { Err: Error };
|
|
268
270
|
export type Result_3 = { Ok: EscrowRecovery } | { Err: Error };
|
|
269
271
|
export type Result_4 = { Ok: PaymentQuote } | { Err: Error };
|
|
270
272
|
export type Result_5 = { Ok: SessionState } | { Err: Error };
|
|
@@ -274,17 +276,16 @@ export type Result_8 = { Ok: Page_4 } | { Err: Error };
|
|
|
274
276
|
export type Result_9 = { Ok: Page_5 } | { Err: Error };
|
|
275
277
|
export interface RevenueSummary {
|
|
276
278
|
serviceJobsSettled: bigint;
|
|
277
|
-
owedToYou: bigint;
|
|
278
279
|
endpointBreakdown: Array<{
|
|
279
280
|
revenue: bigint;
|
|
280
281
|
endpointId: string;
|
|
281
282
|
name: string;
|
|
282
283
|
purchases: bigint;
|
|
283
284
|
}>;
|
|
285
|
+
parkedPayouts: bigint;
|
|
284
286
|
contentRevenue: bigint;
|
|
285
287
|
serviceRevenue: bigint;
|
|
286
288
|
contentPurchases: bigint;
|
|
287
|
-
unresolvedWithdrawals: bigint;
|
|
288
289
|
}
|
|
289
290
|
export type Role =
|
|
290
291
|
| { Anonymous: null }
|
|
@@ -312,8 +313,12 @@ export interface SellerStatus {
|
|
|
312
313
|
expiresAtNs: bigint;
|
|
313
314
|
verifiedAtNs: bigint;
|
|
314
315
|
bytesStored: bigint;
|
|
316
|
+
evmPayout: [] | [string];
|
|
317
|
+
parkedPayouts: bigint;
|
|
315
318
|
engramId: Principal;
|
|
316
319
|
byteQuota: bigint;
|
|
320
|
+
parkedSaleNotices: bigint;
|
|
321
|
+
evmPayoutError: [] | [string];
|
|
317
322
|
}
|
|
318
323
|
export interface ServiceDefinition {
|
|
319
324
|
id: string;
|
|
@@ -409,7 +414,7 @@ export interface X402Endpoint {
|
|
|
409
414
|
enabledAtNs: [] | [bigint];
|
|
410
415
|
}
|
|
411
416
|
export interface _SERVICE {
|
|
412
|
-
addAuditViewer: ActorMethod<[Principal],
|
|
417
|
+
addAuditViewer: ActorMethod<[Principal], Result>;
|
|
413
418
|
/**
|
|
414
419
|
* / Push this canister's chain head into the registry's anchor ring — the same thing every engram
|
|
415
420
|
* / does with its memory head, and the cashier with its treasury head.
|
|
@@ -426,7 +431,7 @@ export interface _SERVICE {
|
|
|
426
431
|
* / caller is the market's admin, a person, so it does not belong to the canister-to-canister
|
|
427
432
|
* / tier the `sys` prefix names.⟩
|
|
428
433
|
*/
|
|
429
|
-
anchorNow: ActorMethod<[],
|
|
434
|
+
anchorNow: ActorMethod<[], Result>;
|
|
430
435
|
/**
|
|
431
436
|
* / A seller takes on a pending job. The CALLER must be the seller of the service the job was
|
|
432
437
|
* / created against — claiming is not open, and there is no assignment step: whoever registered
|
|
@@ -465,7 +470,7 @@ export interface _SERVICE {
|
|
|
465
470
|
* / so explicitly ("Not a permission problem and not a missing job"), and `isTradeFrozen()` is the
|
|
466
471
|
* / ungated read that confirms it.
|
|
467
472
|
*/
|
|
468
|
-
claimJob: ActorMethod<[string],
|
|
473
|
+
claimJob: ActorMethod<[string], Result>;
|
|
469
474
|
/**
|
|
470
475
|
* / ⟨0.16.0, L2.6⟩ `confirmJob` ABSORBS `confirmJobEvm`. One buyer action, two ways to prove you
|
|
471
476
|
* / are the buyer.
|
|
@@ -490,14 +495,14 @@ export interface _SERVICE {
|
|
|
490
495
|
* / who reads `#Conflict` as "retry later" will retry a release that can never happen for them.
|
|
491
496
|
* / Same seam as `claimJob`; three costed fixes in the project's backlog ⟨2026-08-21⟩.
|
|
492
497
|
*/
|
|
493
|
-
confirmJob: ActorMethod<[string, [] | [Uint8Array | number[]]],
|
|
498
|
+
confirmJob: ActorMethod<[string, [] | [Uint8Array | number[]]], Result>;
|
|
494
499
|
/**
|
|
495
500
|
* / Create a content endpoint — a shelf in the storefront. Born DISABLED.
|
|
496
501
|
* /
|
|
497
502
|
* / Born disabled deliberately: a listing that went live at creation would be sellable before its
|
|
498
503
|
* / price was set, and `price` starts at 0 with `suggestedPrice` as the fallback.
|
|
499
504
|
*/
|
|
500
|
-
createEndpoint: ActorMethod<[string, string, string, bigint],
|
|
505
|
+
createEndpoint: ActorMethod<[string, string, string, bigint], Result_19>;
|
|
501
506
|
/**
|
|
502
507
|
* / Submit a paid service request. Returns a job id, or the price.
|
|
503
508
|
* /
|
|
@@ -513,7 +518,7 @@ export interface _SERVICE {
|
|
|
513
518
|
* /
|
|
514
519
|
* / What DOES gate here is the market's freeze, and the service's own existence and pricing mode.
|
|
515
520
|
*/
|
|
516
|
-
createJob: ActorMethod<[string, Uint8Array | number[], [] | [PaymentSignature]],
|
|
521
|
+
createJob: ActorMethod<[string, Uint8Array | number[], [] | [PaymentSignature]], Result_18>;
|
|
517
522
|
/**
|
|
518
523
|
* / Delete content.
|
|
519
524
|
* /
|
|
@@ -523,12 +528,12 @@ export interface _SERVICE {
|
|
|
523
528
|
* / forever against a ceiling that only ever rose in reality. The quota tracks bytes CLAIMED, not
|
|
524
529
|
* / bytes currently held, because claimed is the number that costs money.
|
|
525
530
|
*/
|
|
526
|
-
deleteContent: ActorMethod<[string],
|
|
531
|
+
deleteContent: ActorMethod<[string], Result>;
|
|
527
532
|
/**
|
|
528
533
|
* / Delete an endpoint. Terminal — the record stays as #Deleted so purchase history keeps
|
|
529
534
|
* / resolving, and the id is never reused.
|
|
530
535
|
*/
|
|
531
|
-
deleteEndpoint: ActorMethod<[string],
|
|
536
|
+
deleteEndpoint: ActorMethod<[string], Result>;
|
|
532
537
|
/**
|
|
533
538
|
* / ⟨0.16.0, L2.6⟩ `disputeJob` ABSORBS `disputeJobEvm`, exactly as confirmJob does, and for the
|
|
534
539
|
* / same reason: one act, two proofs of buyership.
|
|
@@ -547,13 +552,13 @@ export interface _SERVICE {
|
|
|
547
552
|
* / — the party being disputed. This market has no admin arbitration and no appeal, deliberately
|
|
548
553
|
* / and on the record. Filing a dispute is not an escalation to a neutral party.
|
|
549
554
|
*/
|
|
550
|
-
disputeJob: ActorMethod<[string, string, [] | [Uint8Array | number[]]],
|
|
555
|
+
disputeJob: ActorMethod<[string, string, [] | [Uint8Array | number[]]], Result>;
|
|
551
556
|
/**
|
|
552
557
|
* / Closing refunds the unconsumed deposit to the payer, so it is NOT freeze-gated — the same
|
|
553
558
|
* / reasoning as disputeJob and forceCloseSession. A halt stops money moving toward sellers; it
|
|
554
559
|
* / must not strand a buyer's own escrow.
|
|
555
560
|
*/
|
|
556
|
-
endSession: ActorMethod<[string],
|
|
561
|
+
endSession: ActorMethod<[string], Result>;
|
|
557
562
|
/**
|
|
558
563
|
* / Admin recovery: force a stuck session closed and return the unconsumed deposit to its payer.
|
|
559
564
|
* /
|
|
@@ -561,7 +566,7 @@ export interface _SERVICE {
|
|
|
561
566
|
* / authority is the market admin, because the session's own parties are precisely who cannot
|
|
562
567
|
* / unstick it. No discretion: the refund destination is the payer recorded on the session.
|
|
563
568
|
*/
|
|
564
|
-
forceCloseSession: ActorMethod<[string],
|
|
569
|
+
forceCloseSession: ActorMethod<[string], Result>;
|
|
565
570
|
/**
|
|
566
571
|
* / Admin recovery: mark a stuck session resolved. STATE ONLY — no funds move.
|
|
567
572
|
* /
|
|
@@ -579,8 +584,13 @@ export interface _SERVICE {
|
|
|
579
584
|
* / arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
|
|
580
585
|
* / contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
|
|
581
586
|
* / dependency work.
|
|
587
|
+
* /
|
|
588
|
+
* / ⟨2026-11-05, ic402 2.20.0⟩ NOT FOR AN ICP SESSION LEFT `#closing` BY AN UNKNOWN SETTLE (a close that
|
|
589
|
+
* / answered "outcome unknown"): `reconcileSession` resolves that one from the escrow balance. Forcing it
|
|
590
|
+
* / would mark it closed whether or not the settle landed, stranding the recipient's share if it did
|
|
591
|
+
* / not. This method stays for a close that trapped after an await.
|
|
582
592
|
*/
|
|
583
|
-
forceResolveSession: ActorMethod<[string],
|
|
593
|
+
forceResolveSession: ActorMethod<[string], Result>;
|
|
584
594
|
/**
|
|
585
595
|
* / PUBLIC: accountability requires knowing who holds power. This is the shape every canister
|
|
586
596
|
* / in the system serves, so one reader covers all of them.
|
|
@@ -622,7 +632,7 @@ export interface _SERVICE {
|
|
|
622
632
|
* / before the nonce lock or any ledger call, and the refusal reaches the buyer as #Refused with
|
|
623
633
|
* / ic402's text naming both principals. Pay as the principal that approved the allowance.
|
|
624
634
|
*/
|
|
625
|
-
getContent: ActorMethod<[string, [] | [PaymentSignature]],
|
|
635
|
+
getContent: ActorMethod<[string, [] | [PaymentSignature]], Result_17>;
|
|
626
636
|
/**
|
|
627
637
|
* / ⟨0.16.0⟩ THE `getChunk` FIX, and it is the sharpest single case in the corpus.
|
|
628
638
|
* /
|
|
@@ -650,14 +660,6 @@ export interface _SERVICE {
|
|
|
650
660
|
* / list; this method is why.
|
|
651
661
|
*/
|
|
652
662
|
getContentChunk: ActorMethod<[AccessGrant, bigint], Result_15>;
|
|
653
|
-
/**
|
|
654
|
-
* / A seller's payout address — THEIRS, or the admin's to read.
|
|
655
|
-
* /
|
|
656
|
-
* / The engram made this owner-only and TRAPPED at everyone else. Here the answer is a refusal a
|
|
657
|
-
* / caller can read, and `#Ok(null)` genuinely means "this seller has set no payout address" —
|
|
658
|
-
* / distinguishable from "you may not ask", which is the whole point of the envelope.
|
|
659
|
-
*/
|
|
660
|
-
getEvmSellerPayout: ActorMethod<[Principal], Result_17>;
|
|
661
663
|
/**
|
|
662
664
|
* / PUBLIC: what this canister's chains continue, or that they continue nothing. A fresh chain
|
|
663
665
|
* / beside a published predecessor head is auditable; a fresh chain with no statement is
|
|
@@ -724,6 +726,11 @@ export interface _SERVICE {
|
|
|
724
726
|
*/
|
|
725
727
|
getPaymentPolicy: ActorMethod<[], SpendingPolicy>;
|
|
726
728
|
/**
|
|
729
|
+
* / A seller's own revenue on this market.
|
|
730
|
+
* /
|
|
731
|
+
* / ⟨0.16.0⟩ SELLER-SCOPED. The engram's version was owner-only and TRAPPED at everyone else,
|
|
732
|
+
* / which was coherent when the owner was the only seller. Here every caller has a different
|
|
733
|
+
* / answer, and no caller is entitled to another's: the numbers cover the caller's own listings
|
|
727
734
|
* / and nothing is aggregated across sellers.
|
|
728
735
|
* /
|
|
729
736
|
* / THE FIGURES ARE COMPUTED, NOT READ FROM THE CANISTER-WIDE COUNTERS. `payments`' scalars are
|
|
@@ -747,6 +754,10 @@ export interface _SERVICE {
|
|
|
747
754
|
* /
|
|
748
755
|
* / `verified` is about ownership at a moment in time and nothing else. It is not an endorsement,
|
|
749
756
|
* / and the field name is the strongest claim it makes.
|
|
757
|
+
* /
|
|
758
|
+
* / ⟨2026-11-04, the owner's ruling "1 A"⟩ It also says where this seller's sales land
|
|
759
|
+
* / (`evmPayout`, `evmPayoutError`) and how many are still in flight (`parkedPayouts`,
|
|
760
|
+
* / `parkedSaleNotices`) — counts, never amounts (`Types.SellerStatus`).
|
|
750
761
|
*/
|
|
751
762
|
getSellerStatus: ActorMethod<[Principal], Result_12>;
|
|
752
763
|
/**
|
|
@@ -905,22 +916,18 @@ export interface _SERVICE {
|
|
|
905
916
|
*/
|
|
906
917
|
listJobs: ActorMethod<[string, [] | [JobStatus], bigint, bigint], Result_7>;
|
|
907
918
|
/**
|
|
908
|
-
* / The parked
|
|
909
|
-
* /
|
|
910
|
-
* /
|
|
911
|
-
* /
|
|
912
|
-
* /
|
|
913
|
-
* /
|
|
914
|
-
* /
|
|
915
|
-
* /
|
|
916
|
-
* /
|
|
917
|
-
* /
|
|
918
|
-
* / `withheld` is always 0 here. The filter is by owner and a caller cannot own a row they may
|
|
919
|
-
* / not see, so nothing is ever hidden from them — unlike `listEndpointPurchases`, where a
|
|
920
|
-
* / non-owner's view withholds other buyers' rows. Stated because a reader comparing the two
|
|
921
|
-
* / should know the zero is a fact about this surface, not an unimplemented field.
|
|
919
|
+
* / ⟨2026-11-04, the owner's ruling "1 A"⟩ The parked payouts to the caller's engram — a content sale
|
|
920
|
+
* / whose push the ledger has not confirmed, each settled by `retrySalePayout` — so an unresolved
|
|
921
|
+
* / payout is discoverable rather than something a seller must already know the id of.
|
|
922
|
+
* /
|
|
923
|
+
* / Behind the seller's CURRENT registration (`requireSellerRead`, the query twin of `requireSeller`),
|
|
924
|
+
* / and scoped to that registration's engram by `Payments.parkedFor` — not an inline filter, for the
|
|
925
|
+
* / reason that helper gives. `withheld` is 0 truthfully: the rows it drops belong to OTHER engrams
|
|
926
|
+
* / and were never this caller's to see; a global count would tell a seller how many other sellers
|
|
927
|
+
* / have a parked payout. PAGED, not a bounded exemption: a run of ledger outages across a run of
|
|
928
|
+
* / sales accumulates rows with nothing to stop it.
|
|
922
929
|
*/
|
|
923
|
-
|
|
930
|
+
listMyParkedPayouts: ActorMethod<[bigint, bigint], Result_6>;
|
|
924
931
|
/**
|
|
925
932
|
* / ⟨0.16.0⟩ `listAllServices` FOLDS in as `includeDisabled`.
|
|
926
933
|
* /
|
|
@@ -1071,25 +1078,18 @@ export interface _SERVICE {
|
|
|
1071
1078
|
* / arrives as `#Conflict` rather than `#NotFound`. Read the MESSAGE for which. This is the 0.16.0
|
|
1072
1079
|
* / contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
|
|
1073
1080
|
* / dependency work.
|
|
1074
|
-
*/
|
|
1075
|
-
reconcileSession: ActorMethod<[string], Result_2>;
|
|
1076
|
-
/**
|
|
1077
|
-
* / Settle a parked withdrawal by asking the ledger what happened, rather than assuming.
|
|
1078
|
-
* /
|
|
1079
|
-
* / Re-sends the IDENTICAL transfer — same amount, same fee, same `created_at_time`. Within
|
|
1080
|
-
* / ICRC-1's 24h deduplication window there are exactly two outcomes and both are conclusive:
|
|
1081
|
-
* / · `#Err(#Duplicate)` — the original DID execute. The seller has been paid; discard the
|
|
1082
|
-
* / parked record.
|
|
1083
|
-
* / · `#Ok` — the original did NOT execute, and this call has now paid it. Discard.
|
|
1084
|
-
* / Anything else leaves the record parked and retryable; it is never guessed at.
|
|
1085
1081
|
* /
|
|
1086
|
-
* /
|
|
1087
|
-
* /
|
|
1088
|
-
* /
|
|
1089
|
-
* /
|
|
1090
|
-
* /
|
|
1082
|
+
* / ⟨2026-11-05, ic402 2.20.0 — beside the list of refusals above⟩ It now also resolves an ICP session
|
|
1083
|
+
* / left `#closing` by a close whose settle the ledger rejected after it may have run (that close
|
|
1084
|
+
* / answers "outcome unknown"). It moves no money itself: it reads the session's escrow balance, and
|
|
1085
|
+
* / the full deposit still there means the settle did not land, so the session reopens for a close to
|
|
1086
|
+
* / settle it once; less than the deposit means it did, so the session ends `#closed` with the
|
|
1087
|
+
* / remainder recoverable by its payer (`recoverEscrow`). Refused while a close of that session is
|
|
1088
|
+
* / still running ("call again once it returns"), and a failed balance or fee query leaves the session
|
|
1089
|
+
* / `#closing` to be reconciled again. THIS, NOT `forceResolveSession`, IS THE WAY OUT for such a
|
|
1090
|
+
* / session: forcing one whose settle never landed strands the recipient's share.
|
|
1091
1091
|
*/
|
|
1092
|
-
|
|
1092
|
+
reconcileSession: ActorMethod<[string], Result_2>;
|
|
1093
1093
|
/**
|
|
1094
1094
|
* / Admin recovery: return unconsumed escrow from a stuck or terminal session's own subaccount.
|
|
1095
1095
|
* / THE ONE RECOVERY METHOD THAT MOVES REAL MONEY.
|
|
@@ -1146,8 +1146,20 @@ export interface _SERVICE {
|
|
|
1146
1146
|
* / Re-registering is how a seller refreshes an expiring binding, and it is idempotent apart from
|
|
1147
1147
|
* / the timestamp. The byte count SURVIVES re-registration — otherwise the quota would reset every
|
|
1148
1148
|
* / thirty days, which is a quota in name only.
|
|
1149
|
+
* /
|
|
1150
|
+
* / ⟨2026-11-04, the owner's ruling "1 A": a sale is paid into the selling engram's own wallet⟩
|
|
1151
|
+
* / ON THIS MARKET'S BOOKS THE SELLER IS THE ENGRAM; the caller is the hand that lists for it. Every
|
|
1152
|
+
* / identity this market hands the payment library — a service's operator, the claimant, the
|
|
1153
|
+
* / submitter, the EVM payout key — is `engramId`, so the library pays the engram's own account on
|
|
1154
|
+
* / the ckUSDC rail with no money code of ours, and content sales are pushed there by `payEngram`.
|
|
1155
|
+
* / Three steps more than before, in order: the one-engram check (`oneEngramConflict`) before the
|
|
1156
|
+
* / first await; after the registry, the engram is asked for its own EVM address
|
|
1157
|
+
* / (`askEngramPayAddress`) and that address is registered with the library under the engram; the
|
|
1158
|
+
* / one-engram check again, and the binding written from the LIVE map (the byte count may have moved
|
|
1159
|
+
* / across the awaits). Last, this engram's parked sale notices are delivered (at most 16): a
|
|
1160
|
+
* / seller's own message, and the engram just answered.
|
|
1149
1161
|
*/
|
|
1150
|
-
registerSeller: ActorMethod<[Principal],
|
|
1162
|
+
registerSeller: ActorMethod<[Principal], Result>;
|
|
1151
1163
|
/**
|
|
1152
1164
|
* / Register a paid service. Born DISABLED, like an endpoint and for the same reason: a listing
|
|
1153
1165
|
* / that went live at creation would be sellable before its seller had checked it.
|
|
@@ -1180,7 +1192,7 @@ export interface _SERVICE {
|
|
|
1180
1192
|
],
|
|
1181
1193
|
Result_2
|
|
1182
1194
|
>;
|
|
1183
|
-
removeAuditViewer: ActorMethod<[Principal],
|
|
1195
|
+
removeAuditViewer: ActorMethod<[Principal], Result>;
|
|
1184
1196
|
/**
|
|
1185
1197
|
* / Remove a per-payer override so that payer reverts to — and keeps TRACKING — the global policy.
|
|
1186
1198
|
* /
|
|
@@ -1188,7 +1200,7 @@ export interface _SERVICE {
|
|
|
1188
1200
|
* / policy, which then stops following later global changes. That is why the two never travel
|
|
1189
1201
|
* / apart: without this one, every override is permanent in effect.
|
|
1190
1202
|
*/
|
|
1191
|
-
removeCallerPolicy: ActorMethod<[Principal],
|
|
1203
|
+
removeCallerPolicy: ActorMethod<[Principal], Result>;
|
|
1192
1204
|
/**
|
|
1193
1205
|
* / ⟨0.16.0⟩ RULED 2026-08-17: THE SELLER RESOLVES. Not the market admin.
|
|
1194
1206
|
* /
|
|
@@ -1219,7 +1231,7 @@ export interface _SERVICE {
|
|
|
1219
1231
|
* / contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
|
|
1220
1232
|
* / dependency work.
|
|
1221
1233
|
*/
|
|
1222
|
-
resolveDispute: ActorMethod<[string, boolean],
|
|
1234
|
+
resolveDispute: ActorMethod<[string, boolean], Result>;
|
|
1223
1235
|
/**
|
|
1224
1236
|
* / Admin LAST RESORT: force a job to a terminal status when reconcileJob cannot determine one —
|
|
1225
1237
|
* / a reverted or dead transaction that the chain will never resolve either way.
|
|
@@ -1242,7 +1254,34 @@ export interface _SERVICE {
|
|
|
1242
1254
|
* / contract as ratified on 2026-10-02; giving the library one arm per kind of refusal is post-cut
|
|
1243
1255
|
* / dependency work.
|
|
1244
1256
|
*/
|
|
1245
|
-
resolveJob: ActorMethod<[string, JobStatus],
|
|
1257
|
+
resolveJob: ActorMethod<[string, JobStatus], Result>;
|
|
1258
|
+
/**
|
|
1259
|
+
* / ⟨2026-11-04, the owner's ruling "1 A"⟩ Deliver one engram's parked sale notices to its record —
|
|
1260
|
+
* / at most 16 a call, oldest first — and answer how many landed. CALLABLE BY ANYONE, anonymous
|
|
1261
|
+
* / included: the engram dedups on the receipt id and accepts only this market, so nothing can be
|
|
1262
|
+
* / misdirected or written twice; the same accepted residual as `retrySalePayout`. `#NotFound` when
|
|
1263
|
+
* / nothing is parked for that engram (every sale it made here reached its record, or none was made).
|
|
1264
|
+
*/
|
|
1265
|
+
retrySaleNotices: ActorMethod<[Principal], Result_1>;
|
|
1266
|
+
/**
|
|
1267
|
+
* / ⟨2026-11-04, the owner's ruling "1 A"⟩ Settle a parked sale payout by asking the ledger what
|
|
1268
|
+
* / happened, rather than assuming — the retired withdrawal recovery's saga, kept whole for the payout
|
|
1269
|
+
* / that replaced the withdrawal.
|
|
1270
|
+
* /
|
|
1271
|
+
* / Re-sends the IDENTICAL transfer: same engram, amount, fee, memo and `created_at_time`. Within
|
|
1272
|
+
* / ICRC-1's 24-hour window there are exactly two conclusive outcomes: `#Duplicate` — the first push
|
|
1273
|
+
* / DID land, the engram has been paid, clear the row; `#Ok` — it had not, and this call has now
|
|
1274
|
+
* / paid it. `#TooOld` leaves it parked (outside the window only a human reading the ledger can say);
|
|
1275
|
+
* / `#BadFee` leaves it parked (the fee is part of the tuple — see `Types.PendingPayout.feeE6`); any
|
|
1276
|
+
* / other answer leaves it parked and retryable. Never guessed at.
|
|
1277
|
+
* /
|
|
1278
|
+
* / CALLABLE BY ANYONE, anonymous included: the destination, amount, fee, memo and time are all
|
|
1279
|
+
* / recorded, so nothing about the call can be misdirected, and the chained row names whoever asked.
|
|
1280
|
+
* / The residual — a stranger can make the market spend one ledger call per press on its own debt —
|
|
1281
|
+
* / is accepted (a caller gate would buy nothing but a name). The sale's record line does not wait
|
|
1282
|
+
* / on this: the engram was told when the sale settled, whether the push paid or parked.
|
|
1283
|
+
*/
|
|
1284
|
+
retrySalePayout: ActorMethod<[bigint], Result_1>;
|
|
1246
1285
|
/**
|
|
1247
1286
|
* / Admin recovery: retry the payment to the seller of a job left `#Verified` by a failed payment.
|
|
1248
1287
|
* / NOTHING ELSE. It never refunds the buyer, and it refuses every job that does not read
|
|
@@ -1274,12 +1313,12 @@ export interface _SERVICE {
|
|
|
1274
1313
|
* / own (a job that moved on before the retry ran, or a payment that failed). `#NotFound` is a job id
|
|
1275
1314
|
* / this market does not have.
|
|
1276
1315
|
*/
|
|
1277
|
-
retrySellerPayment: ActorMethod<[string],
|
|
1278
|
-
setAdmin: ActorMethod<[Principal],
|
|
1316
|
+
retrySellerPayment: ActorMethod<[string], Result>;
|
|
1317
|
+
setAdmin: ActorMethod<[Principal], Result>;
|
|
1279
1318
|
/**
|
|
1280
1319
|
* / Override the policy for ONE payer — the market's per-buyer risk control.
|
|
1281
1320
|
*/
|
|
1282
|
-
setCallerPolicy: ActorMethod<[Principal, SpendingPolicy],
|
|
1321
|
+
setCallerPolicy: ActorMethod<[Principal, SpendingPolicy], Result>;
|
|
1283
1322
|
/**
|
|
1284
1323
|
* / ⟨0.16.0, L2.6⟩ `enableEndpoint` and `disableEndpoint` FOLD into one setter.
|
|
1285
1324
|
* /
|
|
@@ -1293,7 +1332,7 @@ export interface _SERVICE {
|
|
|
1293
1332
|
* / request is well-formed and permitted, the endpoint is simply in a terminal state — and calling
|
|
1294
1333
|
* / that `#Invalid` would tell a caller to fix their request when nothing about it is wrong.
|
|
1295
1334
|
*/
|
|
1296
|
-
setEndpointEnabled: ActorMethod<[string, boolean],
|
|
1335
|
+
setEndpointEnabled: ActorMethod<[string, boolean], Result>;
|
|
1297
1336
|
/**
|
|
1298
1337
|
* / Set an endpoint's price. THE SELLER'S, not the admin's.
|
|
1299
1338
|
* /
|
|
@@ -1301,19 +1340,7 @@ export interface _SERVICE {
|
|
|
1301
1340
|
* / admin cannot take down is a moderation problem. PRICE IS DIFFERENT: changing what a seller
|
|
1302
1341
|
* / charges is trading on their behalf, and no recovery story needs it.
|
|
1303
1342
|
*/
|
|
1304
|
-
setEndpointPrice: ActorMethod<[string, bigint],
|
|
1305
|
-
/**
|
|
1306
|
-
* / A seller registers the EVM address their EVM-paid settlements are sent to.
|
|
1307
|
-
* /
|
|
1308
|
-
* / SELF-SCOPED: the address is keyed by `msg.caller`, so the only account a caller can change is
|
|
1309
|
-
* / their own — there is no gate to get wrong, because there is nothing to gate. The engram's
|
|
1310
|
-
* / `requireAgentOrOwner` here was protecting a canister-level roster that a shared market does
|
|
1311
|
-
* / not have. Anonymous is refused: an anonymous payout address is an address nobody can be paid at.
|
|
1312
|
-
* /
|
|
1313
|
-
* / Without one, an EVM-paid job's settlement FAILS CLOSED and rolls back — the market does not
|
|
1314
|
-
* / cross rails and pay an EVM seller out of the ICP pool.
|
|
1315
|
-
*/
|
|
1316
|
-
setEvmSellerPayout: ActorMethod<[string], Result_1>;
|
|
1343
|
+
setEndpointPrice: ActorMethod<[string, bigint], Result>;
|
|
1317
1344
|
/**
|
|
1318
1345
|
* / Set the market's global spending policy.
|
|
1319
1346
|
* /
|
|
@@ -1321,7 +1348,7 @@ export interface _SERVICE {
|
|
|
1321
1348
|
* / distinguishable from a tightening after the fact. A policy raise is the quiet half of most
|
|
1322
1349
|
* / money incidents, and "policy changed" alone cannot tell an investigator which way.
|
|
1323
1350
|
*/
|
|
1324
|
-
setPaymentPolicy: ActorMethod<[SpendingPolicy],
|
|
1351
|
+
setPaymentPolicy: ActorMethod<[SpendingPolicy], Result>;
|
|
1325
1352
|
/**
|
|
1326
1353
|
* / Whom this canister anchors to. Set by the admin at deploy; `sys` because it is protocol
|
|
1327
1354
|
* / configuration, not a product surface.
|
|
@@ -1334,7 +1361,7 @@ export interface _SERVICE {
|
|
|
1334
1361
|
* / made "a `sys` method has no human caller" false, and so uncheckable. A plain admin setter
|
|
1335
1362
|
* / (`setAdmin`'s sibling) is what it always was.
|
|
1336
1363
|
*/
|
|
1337
|
-
setRegistryId: ActorMethod<[Principal],
|
|
1364
|
+
setRegistryId: ActorMethod<[Principal], Result>;
|
|
1338
1365
|
/**
|
|
1339
1366
|
* / ⟨0.16.0, L2.6⟩ enableService + disableService FOLD, same as the endpoint pair.
|
|
1340
1367
|
* /
|
|
@@ -1358,7 +1385,7 @@ export interface _SERVICE {
|
|
|
1358
1385
|
* / The seam is closed on this method by the gate, not by the library; the others keep their
|
|
1359
1386
|
* / caveats.
|
|
1360
1387
|
*/
|
|
1361
|
-
setServiceEnabled: ActorMethod<[string, boolean],
|
|
1388
|
+
setServiceEnabled: ActorMethod<[string, boolean], Result>;
|
|
1362
1389
|
/**
|
|
1363
1390
|
* / A seller submits a finished job's result.
|
|
1364
1391
|
* /
|
|
@@ -1382,17 +1409,17 @@ export interface _SERVICE {
|
|
|
1382
1409
|
*/
|
|
1383
1410
|
submitJobResult: ActorMethod<
|
|
1384
1411
|
[string, Uint8Array | number[], [] | [Uint8Array | number[]], [] | [bigint]],
|
|
1385
|
-
|
|
1412
|
+
Result
|
|
1386
1413
|
>;
|
|
1387
1414
|
/**
|
|
1388
1415
|
* / Upload a whole file in one call.
|
|
1389
1416
|
*/
|
|
1390
|
-
uploadContent: ActorMethod<[string, string, Uint8Array | number[]],
|
|
1417
|
+
uploadContent: ActorMethod<[string, string, Uint8Array | number[]], Result>;
|
|
1391
1418
|
/**
|
|
1392
1419
|
* / Push one chunk of a started upload. NOT charged — uploadContentInit already reserved the
|
|
1393
1420
|
* / declared total, so charging again here would bill the same bytes twice.
|
|
1394
1421
|
*/
|
|
1395
|
-
uploadContentChunk: ActorMethod<[string, bigint, Uint8Array | number[]],
|
|
1422
|
+
uploadContentChunk: ActorMethod<[string, bigint, Uint8Array | number[]], Result>;
|
|
1396
1423
|
/**
|
|
1397
1424
|
* / Begin a chunked upload. The WHOLE declared size is charged here, up front.
|
|
1398
1425
|
* /
|
|
@@ -1400,27 +1427,13 @@ export interface _SERVICE {
|
|
|
1400
1427
|
* / begin an upload that cannot finish, and discover it only after claiming most of the memory.
|
|
1401
1428
|
* / Reserving the declared total means an over-quota upload is refused before its first byte lands.
|
|
1402
1429
|
*/
|
|
1403
|
-
uploadContentInit: ActorMethod<[string, string, bigint, bigint],
|
|
1430
|
+
uploadContentInit: ActorMethod<[string, string, bigint, bigint], Result>;
|
|
1404
1431
|
/**
|
|
1405
1432
|
* / The buyer-facing half of the same check, kept because it answers a different question: "is my
|
|
1406
1433
|
* / grant still good", asked BEFORE spending a round trip on a chunk. Documented in ACCESS-CONTROL
|
|
1407
1434
|
* / as the buyer's pre-flight.
|
|
1408
1435
|
*/
|
|
1409
|
-
verifyGrant: ActorMethod<[AccessGrant],
|
|
1410
|
-
/**
|
|
1411
|
-
* / Withdraw everything this caller has earned from content sales, to their own principal.
|
|
1412
|
-
* /
|
|
1413
|
-
* / NO DESTINATION ARGUMENT, and that is the security property rather than a missing feature: the
|
|
1414
|
-
* / funds go to `msg.caller` and nowhere else, so a stolen or mis-signed call cannot redirect a
|
|
1415
|
-
* / seller's balance to an attacker's account. A seller who wants the money elsewhere moves it
|
|
1416
|
-
* / from their own account, where they are the only signer.
|
|
1417
|
-
* /
|
|
1418
|
-
* / NOT GATED ON `requireSeller`. A seller binding expires and can be revoked; earnings do not.
|
|
1419
|
-
* / Gating withdrawal on current seller status would strand the balance of anyone whose engram
|
|
1420
|
-
* / lapsed after they sold — money owed, permanently unreachable, for a reason unrelated to the
|
|
1421
|
-
* / debt. The gate is the debt itself: you may withdraw exactly what you are owed.
|
|
1422
|
-
*/
|
|
1423
|
-
withdrawContentRevenue: ActorMethod<[], Result>;
|
|
1436
|
+
verifyGrant: ActorMethod<[AccessGrant], Result>;
|
|
1424
1437
|
}
|
|
1425
1438
|
export declare const idlFactory: IDL.InterfaceFactory;
|
|
1426
1439
|
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|