@engramx/idl 0.16.0-rc.29 → 0.16.0-rc.31

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 CHANGED
@@ -1,3 +1,14 @@
1
+ type X402SignRequest =
2
+ record {
3
+ amount: nat;
4
+ approvalId: opt text;
5
+ chainId: nat;
6
+ rationale: opt text;
7
+ recipient: text;
8
+ tokenAddress: text;
9
+ tokenName: text;
10
+ tokenVersion: text;
11
+ };
1
12
  type X402SignOutcome =
2
13
  variant {
3
14
  ApprovalPending: ApprovalRequest;
@@ -73,8 +84,6 @@ type TimerHealth =
73
84
  checkInsUnfinished: opt nat;
74
85
  ic402Maintenance: opt Ic402Maintenance;
75
86
  ic402MaintenanceTimerArmed: opt bool;
76
- jobExpiryArmed: bool;
77
- jobExpiryFastMode: bool;
78
87
  sessionExpiryArmed: bool;
79
88
  upkeepRejected: opt nat;
80
89
  };
@@ -288,30 +297,25 @@ type ResyncReport =
288
297
  };
289
298
  startsAcknowledged: nat;
290
299
  };
291
- type Result_96 =
300
+ type Result_95 =
292
301
  variant {
293
302
  Err: Error;
294
303
  Ok: AgentRecord;
295
304
  };
296
- type Result_95 =
305
+ type Result_94 =
297
306
  variant {
298
307
  Err: Error;
299
308
  Ok: Accepted;
300
309
  };
301
- type Result_93 =
310
+ type Result_92 =
302
311
  variant {
303
312
  Err: Error;
304
313
  Ok: Eip712Registration;
305
314
  };
306
- type Result_91 =
307
- variant {
308
- Err: Error;
309
- Ok: Conversion;
310
- };
311
315
  type Result_90 =
312
316
  variant {
313
317
  Err: Error;
314
- Ok: CondenseResult;
318
+ Ok: Conversion;
315
319
  };
316
320
  type Result_9 =
317
321
  variant {
@@ -321,47 +325,47 @@ type Result_9 =
321
325
  type Result_89 =
322
326
  variant {
323
327
  Err: Error;
324
- Ok: MemoryRangeExport;
328
+ Ok: CondenseResult;
325
329
  };
326
- type Result_87 =
330
+ type Result_88 =
327
331
  variant {
328
332
  Err: Error;
329
- Ok: Page_27;
333
+ Ok: MemoryRangeExport;
330
334
  };
331
335
  type Result_86 =
332
336
  variant {
333
337
  Err: Error;
334
- Ok: AgentWriteReview;
338
+ Ok: Page_27;
335
339
  };
336
340
  type Result_85 =
337
341
  variant {
338
342
  Err: Error;
339
- Ok: BackupMetadata;
343
+ Ok: AgentWriteReview;
340
344
  };
341
345
  type Result_84 =
342
346
  variant {
343
347
  Err: Error;
344
- Ok: BackupRetention;
348
+ Ok: BackupMetadata;
345
349
  };
346
350
  type Result_83 =
347
351
  variant {
348
352
  Err: Error;
349
- Ok: vec BirthRecord;
353
+ Ok: BackupRetention;
350
354
  };
351
355
  type Result_82 =
352
356
  variant {
353
357
  Err: Error;
354
- Ok: Brakes;
358
+ Ok: vec BirthRecord;
355
359
  };
356
360
  type Result_81 =
357
361
  variant {
358
362
  Err: Error;
359
- Ok: ChildAllowanceRow;
363
+ Ok: Brakes;
360
364
  };
361
365
  type Result_80 =
362
366
  variant {
363
367
  Err: Error;
364
- Ok: ChildOpening;
368
+ Ok: ChildAllowanceRow;
365
369
  };
366
370
  type Result_8 =
367
371
  variant {
@@ -371,52 +375,52 @@ type Result_8 =
371
375
  type Result_79 =
372
376
  variant {
373
377
  Err: Error;
374
- Ok: EvmAddresses;
378
+ Ok: ChildOpening;
375
379
  };
376
380
  type Result_78 =
377
381
  variant {
378
382
  Err: Error;
379
- Ok: AlertStatus;
383
+ Ok: EvmAddresses;
380
384
  };
381
385
  type Result_77 =
382
386
  variant {
383
387
  Err: Error;
384
- Ok: blob;
388
+ Ok: AlertStatus;
385
389
  };
386
390
  type Result_76 =
387
391
  variant {
388
392
  Err: Error;
389
- Ok: KeyBackupStatus;
393
+ Ok: blob;
390
394
  };
391
395
  type Result_75 =
392
396
  variant {
393
397
  Err: Error;
394
- Ok: MemoryHistory;
398
+ Ok: KeyBackupStatus;
395
399
  };
396
400
  type Result_74 =
397
401
  variant {
398
402
  Err: Error;
399
- Ok: MemoryRetentionPolicy;
403
+ Ok: MemoryHistory;
400
404
  };
401
405
  type Result_73 =
402
406
  variant {
403
407
  Err: Error;
404
- Ok: OwnerConsole;
408
+ Ok: MemoryRetentionPolicy;
405
409
  };
406
410
  type Result_72 =
407
411
  variant {
408
412
  Err: Error;
409
- Ok: OwnerSignInView;
413
+ Ok: OwnerConsole;
410
414
  };
411
415
  type Result_71 =
412
416
  variant {
413
417
  Err: Error;
414
- Ok: opt Offer;
418
+ Ok: OwnerSignInView;
415
419
  };
416
420
  type Result_70 =
417
421
  variant {
418
422
  Err: Error;
419
- Ok: ProfileRead;
423
+ Ok: opt Offer;
420
424
  };
421
425
  type Result_7 =
422
426
  variant {
@@ -426,52 +430,52 @@ type Result_7 =
426
430
  type Result_69 =
427
431
  variant {
428
432
  Err: Error;
429
- Ok: record {paths: vec text;};
433
+ Ok: ProfileRead;
430
434
  };
431
435
  type Result_68 =
432
436
  variant {
433
437
  Err: Error;
434
- Ok: RecipientHistory;
438
+ Ok: record {paths: vec text;};
435
439
  };
436
440
  type Result_67 =
437
441
  variant {
438
442
  Err: Error;
439
- Ok: SigningFloorStatus;
443
+ Ok: RecipientHistory;
440
444
  };
441
445
  type Result_66 =
442
446
  variant {
443
447
  Err: Error;
444
- Ok: SpendCeiling;
448
+ Ok: SigningFloorStatus;
445
449
  };
446
450
  type Result_65 =
447
451
  variant {
448
452
  Err: Error;
449
- Ok: SpendingPolicy;
453
+ Ok: SpendCeiling;
450
454
  };
451
455
  type Result_64 =
452
456
  variant {
453
457
  Err: Error;
454
- Ok: StorageReport;
458
+ Ok: SpendingPolicy;
455
459
  };
456
460
  type Result_63 =
457
461
  variant {
458
462
  Err: Error;
459
- Ok: WalletBalances;
463
+ Ok: StorageReport;
460
464
  };
461
465
  type Result_62 =
462
466
  variant {
463
467
  Err: Error;
464
- Ok: WorldIdConfig;
468
+ Ok: WalletBalances;
465
469
  };
466
470
  type Result_61 =
467
471
  variant {
468
472
  Err: Error;
469
- Ok: WorldIdRpContext;
473
+ Ok: WorldIdConfig;
470
474
  };
471
475
  type Result_60 =
472
476
  variant {
473
477
  Err: Error;
474
- Ok: opt text;
478
+ Ok: WorldIdRpContext;
475
479
  };
476
480
  type Result_6 =
477
481
  variant {
@@ -481,7 +485,7 @@ type Result_6 =
481
485
  type Result_59 =
482
486
  variant {
483
487
  Err: Error;
484
- Ok: bool;
488
+ Ok: opt text;
485
489
  };
486
490
  type Result_58 =
487
491
  variant {
@@ -1168,12 +1172,10 @@ type MemoryMaintainStatus =
1168
1172
  attachOk: bool;
1169
1173
  lastEvictions: nat;
1170
1174
  lastMaintainAtNs: opt int;
1171
- lastScrubbed: nat;
1172
1175
  more: bool;
1173
1176
  refused: bool;
1174
1177
  refusedQuota: text;
1175
1178
  totalEvictions: nat;
1176
- totalFindings: nat;
1177
1179
  };
1178
1180
  type MemoryLogOp =
1179
1181
  variant {
@@ -1540,7 +1542,7 @@ type Engram =
1540
1542
  /// nomination names. That check compares the caller inside the module, where
1541
1543
  /// test/key-replacement.test.mo runs it; this body names no roster gate, because the caller holds
1542
1544
  /// no role here until the move.
1543
- acceptAgentKeyNomination: (agentKey: principal) -> (Result_96);
1545
+ acceptAgentKeyNomination: (agentKey: principal) -> (Result_95);
1544
1546
  /// ⟨2026-11-15, from an adversarial review, ruled the same day: THE NEW OWNER MUST ACCEPT, and on
1545
1547
  /// acceptance what the former owner granted is ended, not carried over⟩ THE PRINCIPAL AN OFFER
1546
1548
  /// NAMES TAKES THE ENGRAM, as themselves. This is the only call that hands an owned engram to
@@ -1618,7 +1620,7 @@ type Engram =
1618
1620
  /// an expired offer (`OwnershipOffer.acceptRefusal`); an engram opened through another; a full
1619
1621
  /// custody chain; whatever the registry refuses (its own words, with a sentence saying the caller
1620
1622
  /// did not become the owner).
1621
- acceptOwnership: () -> (Result_95);
1623
+ acceptOwnership: () -> (Result_94);
1622
1624
  /// The person the owner asked again ACCEPTS: they become this engram's sign-in, and the sealed copy
1623
1625
  /// that came with the ask becomes the engram's (sealed for them). Until this call they have no power
1624
1626
  /// at all. Callable only by that person while the ask waits; refused (as at birth) if they are now
@@ -1704,7 +1706,7 @@ type Engram =
1704
1706
  };
1705
1707
  primaryType: text;
1706
1708
  verifyingContract: text;
1707
- }) -> (Result_93);
1709
+ }) -> (Result_92);
1708
1710
  /// ⟨0.16.0, refusals are values, never traps⟩ THE ROLE-CONFLICT ARM, and why three refusals here are
1709
1711
  /// not the same refusal.
1710
1712
  ///
@@ -1757,7 +1759,7 @@ type Engram =
1757
1759
  /// owner's next Convert). THE RESIDUAL, stated: a removal landing DURING the biller's own conversion call
1758
1760
  /// cannot stop that call — it finishes, and the reply (`finishedBeforeRemovalSeen`) and the record row say
1759
1761
  /// so. One inter-canister call, bounded by one cap.
1760
- agentConvertBalance: (token: text, amountE6: opt nat) -> (Result_91);
1762
+ agentConvertBalance: (token: text, amountE6: opt nat) -> (Result_90);
1761
1763
  /// Returns the write RECEIPT, not just the version.
1762
1764
  ///
1763
1765
  /// The receipt was always computed and then thrown away: MemoryRouter hands back
@@ -1798,7 +1800,7 @@ type Engram =
1798
1800
  /// Gated on requireWritesNotPaused — unlike the export. This one destroys retained entries, which
1799
1801
  /// is exactly what a guardian pause exists to hold. No action alert is raised: the operation is
1800
1802
  /// owner-initiated, owner-only, and already chained into the audit log.
1801
- applyCondense: (toSeq: nat) -> (Result_90);
1803
+ applyCondense: (toSeq: nat) -> (Result_89);
1802
1804
  /// Owner-only: activate a guardian who has registered against an invite.
1803
1805
  ///
1804
1806
  /// Until this call the guardian is `#Pending` and can do NOTHING — registering is a claim, this
@@ -1871,6 +1873,8 @@ type Engram =
1871
1873
  /// hash is the misreading to avoid — and it is an easy one to reach, because the REGISTRY's
1872
1874
  /// chunked upload (`engramWasmInit`/`PushChunk`/`Finalize`) has the same shape and DOES verify:
1873
1875
  /// it hashes the assembled bytes and refuses on mismatch. Same protocol, opposite semantics.
1876
+ /// ⟨2026-11-19, beside the paragraph above⟩ The argument is named `declaredSha256` now (it was `sha256`), so the
1877
+ /// name says what this paragraph says. A name only: Candid passes arguments by position, so no caller changes.
1874
1878
  ///
1875
1879
  /// **TWO DIFFERENT PERMISSIONS GUARD THE TWO HALVES.** Writing (init, push, finalize, abort) is
1876
1880
  /// owner-or-agent and an AGENT additionally needs `canAppendMemory`; reading
@@ -1879,13 +1883,13 @@ type Engram =
1879
1883
  ///
1880
1884
  /// The write half also refuses while writes are PAUSED.
1881
1885
  backupInit: (dbType: text, backupType: BackupType, parentBackupId:
1882
- opt text, sha256: text, backupLabel: opt text) -> (Result_58);
1886
+ opt text, declaredSha256: text, backupLabel: opt text) -> (Result_58);
1883
1887
  /// Read one chunk of a finalized backup, by index.
1884
1888
  ///
1885
1889
  /// ⚠ GATED ON `read_backup`, which is NOT the permission the upload half uses — that one is
1886
1890
  /// `canAppendMemory`. Holding one says nothing about the other, deliberately: taking a backup and
1887
1891
  /// carrying it away are different authorities.
1888
- backupPullChunk: (backupId: text, chunkIndex: nat) -> (Result_77) query;
1892
+ backupPullChunk: (backupId: text, chunkIndex: nat) -> (Result_76) query;
1889
1893
  backupPushChunk: (backupId: text, chunkIndex: nat, data: blob) ->
1890
1894
  (Result_2);
1891
1895
  /// The OWNER cancels an agent's pending key nomination; the agent keeps its current key. Refused
@@ -2061,7 +2065,7 @@ type Engram =
2061
2065
  /// situation rather than a safety measure. It IS gated on requireMemoryAttached: a store that
2062
2066
  /// failed its integrity check must not attest anything it cannot vouch for.
2063
2067
  exportMemoryRange: (fromSeq: nat, toSeq: nat, authorFilter:
2064
- opt principal) -> (Result_89);
2068
+ opt principal) -> (Result_88);
2065
2069
  /// ⟨0.16.0, same concept, same name — renamed from `guardianFreezePayments`⟩ The prefix LIED about who may call it.
2066
2070
  /// The gate is `requireOwnerOrGuardian`, and an owner freezing their own payments is the ordinary
2067
2071
  /// case — the guardian is the exceptional one. A name that says otherwise sends an owner looking
@@ -2109,7 +2113,7 @@ type Engram =
2109
2113
  /// Delivery status + config readback. Owner-only (the URL is a secret).
2110
2114
  /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2111
2115
  /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2112
- getActionAlertStatus: () -> (Result_78) query;
2116
+ getActionAlertStatus: () -> (Result_77) query;
2113
2117
  /// The agent-conversion rule's numbers.
2114
2118
  /// PUBLIC: the class of `getTopUpLimits` — a policy, nobody's data. ⟨2026-11-04, the market-route
2115
2119
  /// build: the marker's colon was missing, so the deployment's PUBLIC-rationale gate read the method as
@@ -2123,7 +2127,7 @@ type Engram =
2123
2127
  ///
2124
2128
  /// Refusal reason preserved from the trap: a grant is a power, and its absence and its
2125
2129
  /// concealment are different facts.
2126
- getAgentRevisablePaths: () -> (Result_69) query;
2130
+ getAgentRevisablePaths: () -> (Result_68) query;
2127
2131
  /// OWNER-ONLY: every engagement's seat weeks on this engram, with the agent's root — the day it
2128
2132
  /// paired, the days of its first and last payment signature, a 64-week map whose bit 0 is the week
2129
2133
  /// of the last one, and how many were produced. Never an amount, a recipient or a nonce.
@@ -2136,7 +2140,7 @@ type Engram =
2136
2140
  /// Two rows can name one root: an agent paired again after it left is a second engagement.
2137
2141
  /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2138
2142
  /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2139
- getAgentSeatWeeks: (start: nat, limit: nat) -> (Result_87) query;
2143
+ getAgentSeatWeeks: (start: nat, limit: nat) -> (Result_86) query;
2140
2144
  /// Owner: everything written into this engram by someone other than the owner since the last
2141
2145
  /// markAgentWritesReviewed() — agent appends/revisions AND paid-session appends (see
2142
2146
  /// qualifiesForReview for why those two families are recognised differently).
@@ -2147,7 +2151,7 @@ type Engram =
2147
2151
  /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2148
2152
  /// an engram opened through another, as the owner (`AccessControl.requireOwnerOrSignIn`); a first
2149
2153
  /// engram is unchanged.
2150
- getAgentWriteReview: () -> (Result_86) query;
2154
+ getAgentWriteReview: () -> (Result_85) query;
2151
2155
  /// Why anchoring is or is not advancing. PUBLIC: ungated on purpose — detecting a stalled
2152
2156
  /// engram is the point, a gated read would fail-to-empty and hand a third party fabricated zeros,
2153
2157
  /// and none of these fields is a secret — `total` is already public via getCertifiedAuditHead.
@@ -2166,7 +2170,7 @@ type Engram =
2166
2170
  /// below serves the same head WITH the subnet certificate for a caller that needs to verify it
2167
2171
  /// was signed rather than asserted.
2168
2172
  getAuditHead: () -> (AuditHead) query;
2169
- getBackupMetadata: (backupId: text) -> (Result_85) query;
2173
+ getBackupMetadata: (backupId: text) -> (Result_84) query;
2170
2174
  /// ⟨2026-10-21, the owner's approval of the mobile design's changes: a backup-retention getter⟩ How many backups of
2171
2175
  /// `dbType` each creator keeps, and whether that is the default — the read `setBackupRetention`
2172
2176
  /// lacked, so "Keeps your newest 3" showed only on the phone that last set it.
@@ -2177,7 +2181,7 @@ type Engram =
2177
2181
  /// denied"), a revoked or resigned agent, a guardian (guardians take no backups), a stranger and
2178
2182
  /// the anonymous caller. A kind the setter would refuse is `#Invalid` here too
2179
2183
  /// (`Backup.getRetention`). Records nothing (a query).
2180
- getBackupRetention: (dbType: text) -> (Result_84) query;
2184
+ getBackupRetention: (dbType: text) -> (Result_83) query;
2181
2185
  /// The canister this engram recognises as its rent biller — `null` until the registry pushes one.
2182
2186
  ///
2183
2187
  /// PUBLIC: a payer about to send money needs to know which biller this engram will accept credit
@@ -2194,7 +2198,7 @@ type Engram =
2194
2198
  /// `verifyBirthChain` checks both. Refused to anyone else by the combinator (`#ownerOnly`).
2195
2199
  /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2196
2200
  /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2197
- getBirthChain: () -> (Result_83) query;
2201
+ getBirthChain: () -> (Result_82) query;
2198
2202
  /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ Each brake: on or off, and while
2199
2203
  /// on, who pulled it LAST (their key and whether as owner or guardian), since when, and the reason
2200
2204
  /// they gave — the same person and time as the newest brake entry on the record
@@ -2203,7 +2207,7 @@ type Engram =
2203
2207
  /// are refused (`#ownerOrGuardian` — an agent learns a brake is on from the refusal of what it tried,
2204
2208
  /// and needs no more). `pull` is null for a brake that is off, and for one carried on across the
2205
2209
  /// upgrade that added this read (who pulled it was not recorded then) — never a guessed pull.
2206
- getBrakes: () -> (Result_82) query;
2210
+ getBrakes: () -> (Result_81) query;
2207
2211
  /// ⟨0.16.0, one implementation per behaviour, the interface files as the source — the interface
2208
2212
  /// plan's entry⟩ `Wire.CertifiedAuditHead`, not an anonymous record. The registry, market and biller
2209
2213
  /// already served the shared type; the engram — the canister that IS the evidence product — was the
@@ -2227,13 +2231,13 @@ type Engram =
2227
2231
  /// query's state writes are discarded when it returns, and the `denied` call first written here
2228
2232
  /// recorded nothing while reading as if it did. The refusal is loud in the reply instead. WHAT
2229
2233
  /// WOULD MAKE THIS WRONG: a reason to record who asked — then this becomes an update that says so.
2230
- getChildAllowance: (agentPrincipal: principal) -> (Result_81) query;
2234
+ getChildAllowance: (agentPrincipal: principal) -> (Result_80) query;
2231
2235
  /// Owner-only, Billing-class: what opening an engram costs this engram, the balance below which an
2232
2236
  /// agent's request is refused, the balance now, and every agent's allowance. The console's cost
2233
2237
  /// sentence reads it. Cycles are owner-class information, as on the owner's console read.
2234
2238
  /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2235
2239
  /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2236
- getChildOpening: () -> (Result_80) query;
2240
+ getChildOpening: () -> (Result_79) query;
2237
2241
  /// Derive the key that opens the sealed copy, encrypted under the caller's transport public key —
2238
2242
  /// for the SIGN-IN alone (the combinator's `#ownerSignIn`; the key file is refused by name: only the
2239
2243
  /// sign-in opens the backup, and the key file holds the plaintext anyway). The derivation input is the
@@ -2251,7 +2255,7 @@ type Engram =
2251
2255
  /// `VetKeys.ManagementCanister.vetKdDeriveKey`. A query cannot await.
2252
2256
  /// Named callers: an owner console signed in as the sign-in (the browser's recovery), and the owner
2253
2257
  /// kit's `--recover-key` signed by a key-file sign-in.
2254
- getEncryptedKeyBackupKey: (transportPublicKey: blob) -> (Result_77);
2258
+ getEncryptedKeyBackupKey: (transportPublicKey: blob) -> (Result_76);
2255
2259
  /// Derive the shared memory-encryption key, encrypted under the caller's transport
2256
2260
  /// public key. Gated to owner + read-agents (the same principals allowed to read
2257
2261
  /// memory). The client decrypts it locally with its transport secret key.
@@ -2276,7 +2280,7 @@ type Engram =
2276
2280
  /// cost. Stated here because the update-for-read rule requires the reason be readable from the interface rather than
2277
2281
  /// inferred by opening the body — which is exactly what had to happen to write this line.
2278
2282
  getEncryptedMemoryKey: (epoch: opt nat, transportPublicKey: blob) ->
2279
- (Result_77);
2283
+ (Result_76);
2280
2284
  /// ⟨0.16.0, owner ruling 2026-08-20⟩ `x402Support` REPORTS THE RAIL, not a constant.
2281
2285
  ///
2282
2286
  /// The card's config hardcodes `x402Support = true`, answering a buyer's question with a fact
@@ -2371,7 +2375,7 @@ type Engram =
2371
2375
  /// It refuses rather than half-answers: if either address cannot be derived the reply is
2372
2376
  /// `#Err`, never a record carrying an empty string (ic402's `getEvmAddress` answers `""` on a
2373
2377
  /// failed derivation — that is fail-to-empty on a money surface, and it stops here).
2374
- getEvmAddress: () -> (Result_79);
2378
+ getEvmAddress: () -> (Result_78);
2375
2379
  /// The owner's OWN EVM address, if they registered one — distinct from `getEvmAddress`, which is
2376
2380
  /// the address this canister derives for itself.
2377
2381
  ///
@@ -2398,7 +2402,7 @@ type Engram =
2398
2402
  /// cannot verify it, and nothing here identifies anybody.
2399
2403
  getGenesisNote: () -> (GenesisNote) query;
2400
2404
  /// A guardian's own channel status (their URL is their secret — each guardian sees only theirs).
2401
- getGuardianAlertStatus: () -> (Result_78) query;
2405
+ getGuardianAlertStatus: () -> (Result_77) query;
2402
2406
  /// The sealed copy itself — opaque bytes only the sign-in can open. Readable by the sign-in (it
2403
2407
  /// opens them with the key `getEncryptedKeyBackupKey` derives for it) and by the key file, which
2404
2408
  /// holds the plaintext already and so learns nothing — it reads them to compare with the copy the kit
@@ -2408,7 +2412,7 @@ type Engram =
2408
2412
  /// A QUERY: the refusal is in the reply, not the denial log (a query's writes are discarded).
2409
2413
  /// Named callers: the owner kit (`--recover-key`, and its check after sealing), and an owner console
2410
2414
  /// signed in as the sign-in (the browser's recovery).
2411
- getKeyBackupCiphertext: () -> (Result_77) query;
2415
+ getKeyBackupCiphertext: () -> (Result_76) query;
2412
2416
  /// Whether this engram holds a sealed copy of its owner's key, for whom, since when, whether it is
2413
2417
  /// sealed for the sign-in seated now, and whether a copy waits with an ask (`Types.KeyBackupStatus`).
2414
2418
  /// Readable by the key file and the sign-in (`#ownerOrSignIn`); refused loudly to anyone else
@@ -2417,7 +2421,7 @@ type Engram =
2417
2421
  /// A QUERY: the refusal is in the reply, not the denial log (a query's writes are discarded).
2418
2422
  /// Named callers: the owner kit after it opens an engram (it prints whether the copy is stored), and
2419
2423
  /// an owner console showing an engram opened through another (whether recovery can work).
2420
- getKeyBackupStatus: () -> (Result_76) query;
2424
+ getKeyBackupStatus: () -> (Result_75) query;
2421
2425
  /// BLS verification key under which the owner kit seals the backup (`IbeCiphertext.encrypt` to the
2422
2426
  /// sign-in's principal) and the opener verifies the derived key. Served on-canister so the kit never
2423
2427
  /// has to know which master key this network uses (the child build's design: a wrong guess would seal a copy
@@ -2460,8 +2464,8 @@ type Engram =
2460
2464
  /// Paging is by version number, which works as its own cursor because versions are dense and
2461
2465
  /// never renumbered: the next page starts at the last version returned plus one. Defaults
2462
2466
  /// return the whole history of any file a pre-FD engram could have held.
2463
- getMemoryHistory: (path: text, start: opt nat, max: opt nat) ->
2464
- (Result_75) query;
2467
+ getMemoryHistory: (path: text, start: opt nat, limit: opt nat) ->
2468
+ (Result_74) query;
2465
2469
  /// PUBLIC: the epoch alone, and deliberately nothing else (a public rotation history would tell everyone, the party just cut off included, when an owner ended a trust relationship). A `rotatedAt[]`
2466
2470
  /// history would be a public, fleet-enumerable feed of when each owner terminated a trust
2467
2471
  /// relationship — readable by, among others, the party just terminated.
@@ -2503,7 +2507,7 @@ type Engram =
2503
2507
  /// Refusal reasons of both merge: an empty policy reads as "nothing is capped, every version kept
2504
2508
  /// forever" — a claim about what this engram will DESTROY — and an empty guard list reads as
2505
2509
  /// "nothing is held back".
2506
- getMemoryRetentionPolicy: () -> (Result_74) query;
2510
+ getMemoryRetentionPolicy: () -> (Result_73) query;
2507
2511
  /// The metrics reader this engram answers — `null` until the spawning registry names one.
2508
2512
  ///
2509
2513
  /// PUBLIC: an owner deciding whether to switch the read off needs to know who it is, and anyone
@@ -2526,7 +2530,7 @@ type Engram =
2526
2530
  /// was `nat`, then widened to `opt nat` so a refusal could be `null`, which broke every published
2527
2531
  /// client (rule 4) and bought a masked answer nobody had asked for — the 0.16.0 interface plan could not
2528
2532
  /// even find a consumer that read the masked `0`. Behind a gate there is nobody to mask it from.
2529
- getOwnerConsole: () -> (Result_73) query;
2533
+ getOwnerConsole: () -> (Result_72) query;
2530
2534
  /// The engram's sign-in, as `Types.OwnerSignInView` describes it: whether this engram was opened
2531
2535
  /// through another, who its sign-in is, whether the caller is it, and any decline or waiting ask.
2532
2536
  /// Readable by the owner's key, the sign-in, and the person a waiting ask goes to (they need to see
@@ -2535,16 +2539,16 @@ type Engram =
2535
2539
  /// A QUERY: the refusal is in the reply, not the denial log (a query's writes are discarded).
2536
2540
  /// Named callers: an owner console showing an engram opened through another (who signs in, and a
2537
2541
  /// waiting ask with Accept and Decline), and the owner kit after it opens one.
2538
- getOwnerSignIn: () -> (Result_72) query;
2542
+ getOwnerSignIn: () -> (Result_71) query;
2539
2543
  /// ⟨2026-11-15⟩ The open offer, to the two parties to it: the owner and the principal it names.
2540
2544
  /// `null` when none is open or it has expired. Anyone else is refused: an offer names a principal
2541
2545
  /// who has not agreed to anything yet, so it is not public the way the custody chain is.
2542
- getOwnershipOffer: () -> (Result_71) query;
2546
+ getOwnershipOffer: () -> (Result_70) query;
2543
2547
  /// Read the four profile fields in one bounded batch. Raw per-field results preserve SDK
2544
2548
  /// decryption and first-failure ordering; only an explicit NotFound means an unset field.
2545
2549
  /// Query reads retain existing permission and owner visibility, without changing read counts.
2546
2550
  /// Callers: EngramClient.getProfile (ProfileManager.getProfile, the local MCP profile tool).
2547
- getProfile: () -> (Result_70) query;
2551
+ getProfile: () -> (Result_69) query;
2548
2552
  /// Owner + agents only (agents need it to avoid writing protected paths).
2549
2553
  ///
2550
2554
  /// A NAMED RECORD, not a Page: the setter replaces this list wholesale, so there is no window to
@@ -2556,7 +2560,7 @@ type Engram =
2556
2560
  /// path on this engram is protected", and an agent consults this list precisely to avoid
2557
2561
  /// writing one — so a fabricated empty here does not merely misinform, it invites the write the
2558
2562
  /// list exists to prevent.
2559
- getProtectedPaths: () -> (Result_69) query;
2563
+ getProtectedPaths: () -> (Result_68) query;
2560
2564
  /// What an approval card shows beside a payment to `payTo` (`Types.RecipientHistory`): whether an x402
2561
2565
  /// signature from this engram has paid it before and since when, whether it is a listed seller and
2562
2566
  /// counts now, and whether the history is full (then "not paid before" may be one it forgot). Read
@@ -2567,7 +2571,7 @@ type Engram =
2567
2571
  /// times, largest $12"; the history forgets the address paid longest ago when full.
2568
2572
  /// ⟨2026-11-03, the child build's pre-release fixes⟩ And when it was LAST paid (`lastPaidAtNs`; null when never).
2569
2573
  /// Named callers: an owner console's approval card for a payment request.
2570
- getRecipientHistory: (payTo: text) -> (Result_68) query;
2574
+ getRecipientHistory: (payTo: text) -> (Result_67) query;
2571
2575
  /// Whether the metrics reader's read is answered — `true` from birth.
2572
2576
  ///
2573
2577
  /// PUBLIC: the promise that an owner can switch this read off can be checked only if the switch
@@ -2582,7 +2586,7 @@ type Engram =
2582
2586
  /// the refusal is the truth on Billing.
2583
2587
  /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2584
2588
  /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2585
- getSigningFloor: () -> (Result_67) query;
2589
+ getSigningFloor: () -> (Result_66) query;
2586
2590
  /// The registry that spawned this engram, if it recorded one.
2587
2591
  ///
2588
2592
  /// PUBLIC: it is the provenance claim. An engram asserting it is part of a fleet, under that
@@ -2605,7 +2609,7 @@ type Engram =
2605
2609
  /// "none" and a spend of 0 are both real answers, so a fabricated one would be read as fact.
2606
2610
  /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2607
2611
  /// an engram opened through another, as the owner (`#ownerOrSignIn`); a first engram is unchanged.
2608
- getSpendCeiling: () -> (Result_66) query;
2612
+ getSpendCeiling: () -> (Result_65) query;
2609
2613
  /// Read the caps in force for a caller.
2610
2614
  ///
2611
2615
  /// OWNER-ONLY, and this is where it diverges from the market's inbound twin, which is public.
@@ -2622,14 +2626,17 @@ type Engram =
2622
2626
  /// defaults — a default-looking answer would understate the real limits to anyone probing them." The
2623
2627
  /// refusal itself is now the combinator's (`#Refused getSpendPolicy: …`, `requireOwner`'s words), and
2624
2628
  /// an engram with no owner yet is refused the same way rather than answered `#Conflict`.
2625
- getSpendPolicy: (caller: opt principal) -> (Result_65) query;
2626
- getStorageStats: () -> (Result_64) query;
2629
+ getSpendPolicy: (caller: opt principal) -> (Result_64) query;
2630
+ getStorageStats: () -> (Result_63) query;
2627
2631
  /// Timer arm-state. PUBLIC and deliberately so: these timers are self-arming to save cycles,
2628
2632
  /// and an optimisation nobody can verify is an optimisation nobody should trust. Cheap to read,
2629
2633
  /// leaks nothing (booleans about our own scheduling).
2630
2634
  ///
2631
2635
  /// IDLE STEADY STATE (no webhook, no x402 sessions, no service jobs):
2632
2636
  /// alertTimerArmed=false sessionExpiryArmed=false jobExpiryArmed=false jobExpiryFastMode=false
2637
+ /// ⟨2026-11-19, beside the line above⟩ `jobExpiryArmed` and `jobExpiryFastMode` are no longer served:
2638
+ /// the ServiceRegistry whose job sweep they described went at the 0.16.0 fresh install (Payments.mo
2639
+ /// `StableState`). The paragraphs below that discuss them are history.
2633
2640
  ///
2634
2641
  /// ⚠ CORRECTED 2026-08-19. This said `jobExpiryArmed=TRUE` and that it "stays true by design —
2635
2642
  /// ic402 keeps an hourly idle POLL because createJobFromReceipt is synchronous and cannot disarm a
@@ -2707,7 +2714,7 @@ type Engram =
2707
2714
  /// ⟨update-for-read⟩ MARKER ADDED 2026-08-23, reasoning above UNCHANGED — this block already said "Stays an
2708
2715
  /// UPDATE, marked as a read served as an update: it awaits three ICRC-1 ledgers". It was marked in
2709
2716
  /// prose and invisible to any gate; the glyph is what the update-for-read gate matches.
2710
- getWalletBalances: () -> (Result_63);
2717
+ getWalletBalances: () -> (Result_62);
2711
2718
  /// Cycles-only getter used by EngramClient.walletBalance and its stdio MCP/OpenClaw callers.
2712
2719
  /// The earlier walletBalance/walletBalances one-letter pair remains retired: this name states
2713
2720
  /// the unit, while getWalletBalances retains the distinct full token-wallet operation.
@@ -2721,7 +2728,7 @@ type Engram =
2721
2728
  /// read: three empty strings with `configured = false` is a VALID-LOOKING answer meaning "this
2722
2729
  /// engram has no World ID configuration" — handed to a caller who merely lacks a grant. The
2723
2730
  /// fabrication is indistinguishable from the truth by construction.
2724
- getWorldIdConfig: () -> (Result_62) query;
2731
+ getWorldIdConfig: () -> (Result_61) query;
2725
2732
  /// ⟨update-for-read⟩ UPDATE, NOT QUERY: this awaits THREE system calls — `raw_rand()` for the nonce,
2726
2733
  /// `Call.signWithEcdsa` for the signature, and `worldIdRpPublicKey()` for the derived key. A
2727
2734
  /// query can do none of them.
@@ -2730,7 +2737,7 @@ type Engram =
2730
2737
  /// Valid iff the derived signer address (getWorldIdRpSignerAddress) is registered for this rp_id in
2731
2738
  /// the World Developer Portal. Short-lived (300s TTL, idkit-server's default) and single-purpose —
2732
2739
  /// it authorizes opening one verification request, nothing else.
2733
- getWorldIdRpContext: () -> (Result_61);
2740
+ getWorldIdRpContext: () -> (Result_60);
2734
2741
  /// Owner-only: the EVM address derived from the engram's dedicated World ID RP signing key (the
2735
2742
  /// "worldid-rp" tECDSA path). Register THIS address as the rp_id's signer in the World Developer
2736
2743
  /// Portal — the engram never holds or exports a private key (only threshold shares exist, on the
@@ -2762,7 +2769,11 @@ type Engram =
2762
2769
  /// `///`, so the dead name was PUBLISHED in engram.did and pointed every client at a method the
2763
2770
  /// canister does not serve. The tombstones below and at `about()` are historical and correct as
2764
2771
  /// written; this one was present tense, which is the difference that matters.⟩
2765
- getWorldIdVerification: () -> (Result_60) query;
2772
+ ///
2773
+ /// ⟨2026-11-19, beside "stays role-gated" above⟩ Owner only now (it was any role: owner, agent or guardian). The
2774
+ /// nullifier is the owner's unique-human pseudonym; an agent never needed it, and a guardian is a check on agents,
2775
+ /// not a party to it. Everyone else reads `about().verifiedHuman`.
2776
+ getWorldIdVerification: () -> (Result_59) query;
2766
2777
  /// ⟨0.16.0, refusals are values, never traps⟩ THE EMERGENCY FAMILY. Every refusal below is `#Refused`
2767
2778
  /// or `#NotFound`, and the absence of a `#Conflict` here is the point: these are the calls someone
2768
2779
  /// makes while something is going wrong, and the only two answers that help are "you may not do this"
@@ -2813,34 +2824,6 @@ type Engram =
2813
2824
  };
2814
2825
  };
2815
2826
  }) query;
2816
- /// Owner-only: is the derived EVM address CACHED right now, without deriving it to find out.
2817
- ///
2818
- /// WHY A SEPARATE METHOD AND NOT A FIELD ON `getEvmAddress`. That method cannot answer this
2819
- /// question by construction: when the cache is null it DERIVES, caches the result and returns it,
2820
- /// so by the time a caller sees the reply the cache is populated either way. Asking it whether the
2821
- /// cache had been populated changes the answer.
2822
- ///
2823
- /// WHY IT EXISTS AT ALL, since a public surface is never free on a canister meant to go public.
2824
- /// `evmAddressCache` is money-classed and its annotation says why: derivation is deterministic, so
2825
- /// a lost cache LOOKS harmless, but until something re-derives, the EVM payment quote advertises
2826
- /// the fallback — an address that cannot receive. A window in which a live money surface publishes
2827
- /// an unreceivable address is a money defect, not a cache miss. Nothing else in this canister
2828
- /// reads that var — one reader and two writers, all in this file — so before this method there was
2829
- /// no observation anywhere that could tell a survived cache from a rebuilt one, and the upgrade
2830
- /// coverage gate carried a money-classed var nothing could prove.
2831
- ///
2832
- /// ⚠ IT MUST NEVER DERIVE. A version that fell back to deriving would answer `true` always and
2833
- /// prove nothing — the same trap `getEvmAddress` sets for anyone trying to use it as a witness.
2834
- /// It reads the var and nothing else, and it is a `query` precisely so that it CANNOT make the
2835
- /// inter-canister call a derivation requires: the restriction is enforced by the system, not by
2836
- /// this comment.
2837
- ///
2838
- /// Owner-gated because it reports on custody posture, and answered as a Result so that a
2839
- /// wrong-identity caller gets a refusal rather than a bare `false` that reads as "no address yet".
2840
- /// ⟨2026-11-03, the child build's pre-release fixes⟩ Also the seated sign-in of
2841
- /// an engram opened through another, as the owner (`AccessControl.requireOwnerOrSignIn`); a first
2842
- /// engram is unchanged.
2843
- isEvmAddressCached: () -> (Result_59) query;
2844
2827
  /// Issue an OAuth authorization code. Called by an OAuth client's sign-in bridge
2845
2828
  /// (an `/auth/connector`-style route) after II authentication. The client then
2846
2829
  /// redirects the user's browser to `redirectUri` with `?code=<this>` so the
@@ -3014,7 +2997,7 @@ type Engram =
3014
2997
  ///
3015
2998
  /// Owner-only like every other archive surface, and for the same structural reason: these rows
3016
2999
  /// carry the chain positions and roots of entries whose paths were inside the hash preimage.
3017
- listCondenseCheckpoints: (startSeq: nat, max: nat) -> (Result_49) query;
3000
+ listCondenseCheckpoints: (startSeq: nat, limit: nat) -> (Result_49) query;
3018
3001
  /// ⟨0.16.0⟩ `metrics()` DELETED — absorbed by `about()`.
3019
3002
  ///
3020
3003
  /// Two public projections of one canister (one concept, one name): `metrics()` and `status()` both answered "what
@@ -3083,7 +3066,7 @@ type Engram =
3083
3066
  ///
3084
3067
  /// Read `MemoryRouter.ReceiptPage` before reading `page.total` as a receipt count. It is not one;
3085
3068
  /// it is the chain's length, and the declaration says why.
3086
- listMemoryExportReceipts: (startSeq: nat, max: nat) -> (Result_42) query;
3069
+ listMemoryExportReceipts: (startSeq: nat, limit: nat) -> (Result_42) query;
3087
3070
  /// ⟨0.16.0⟩ THE `withheld` EXEMPLAR — the 0.16.0 interface law on refusals names this exact method as
3088
3071
  /// the defect it fixes.
3089
3072
  ///
@@ -3134,7 +3117,10 @@ type Engram =
3134
3117
  /// checks the page against. Flattening to a bare `Page` to satisfy the shape would buy uniformity
3135
3118
  /// with the disclosures that make the page verifiable — the hidden-bound defect the interface plan
3136
3119
  /// itself names on previewCondense's entry.
3137
- listMemoryLog: (startSeq: nat, max: nat, authorFilter: opt principal) ->
3120
+ /// ⟨2026-11-19⟩ The count argument is `limit`, as on every other list (it was `max` here and on
3121
+ /// `listMemoryExportReceipts`, `listCondenseCheckpoints` and `getMemoryHistory`). A name only: Candid passes
3122
+ /// arguments by position, so no caller changes.
3123
+ listMemoryLog: (startSeq: nat, limit: nat, authorFilter: opt principal) ->
3138
3124
  (Result_40) query;
3139
3125
  /// The caller's OWN spend-approval requests. ⟨0.16.0, refusals are values; the one page shape — fixed 2026-08-18⟩
3140
3126
  ///
@@ -3673,6 +3659,16 @@ type Engram =
3673
3659
  /// was the block index alone, which read as the amount. If the session's record is removed before
3674
3660
  /// the amount can be read back — a session closed in the same moment as the recovery and cleaned up
3675
3661
  /// during its transfer — it answers `#Other` naming the block, never a guessed amount.
3662
+ ///
3663
+ /// ⟨2026-11-18, ic402 2.22.0, beside the two paragraphs above⟩ A recovery is also capped at what the
3664
+ /// session's close recorded as still owed to the payer, less one ledger fee, and lowers that record by
3665
+ /// what it paid. So asking for everything returns what the escrow can pay, and `amountE6` says how
3666
+ /// much. A session with no such record (its close refunded in full, or it was recovered already) is
3667
+ /// refused: "Nothing is owed on this session…". One recovery of a session runs at a time.
3668
+ ///
3669
+ /// ⟨2026-11-19, ic402 2.23.0, beside the paragraphs above⟩ `amountE6` is now the library's own figure for
3670
+ /// what it paid, from its receipt. The `#Other` answer for a record removed during the transfer no longer
3671
+ /// occurs.
3676
3672
  recoverEscrow: (sessionId: text, amountE6: nat) -> (Result_20);
3677
3673
  /// ⟨0.16.0, refusals are values, never traps⟩ A REDEMPTION PATH, where the arm choice is a disclosure decision.
3678
3674
  ///
@@ -4371,17 +4367,7 @@ type Engram =
4371
4367
  /// The body is UNCHANGED. Each parameter was referenced exactly once below, so the record is
4372
4368
  /// destructured on entry rather than threaded through — the diff is the signature and this line,
4373
4369
  /// which is what makes a reshape of a money path reviewable.
4374
- signX402Payment: (req:
4375
- record {
4376
- amount: nat;
4377
- approvalId: opt text;
4378
- chainId: nat;
4379
- rationale: opt text;
4380
- recipient: text;
4381
- tokenAddress: text;
4382
- tokenName: text;
4383
- tokenVersion: text;
4384
- }) -> (Result_4);
4370
+ signX402Payment: (req: X402SignRequest) -> (Result_4);
4385
4371
  /// ⟨2026-10-21, the owner's approval of the mobile design's changes⟩ A GUARDIAN STEPS DOWN: the caller ends their own
4386
4372
  /// guardianship of this engram. It removes a power from the one who holds it and grants none.
4387
4373
  /// Before, only the owner could remove a guardian, so one who wanted out could only stop watching
@@ -4789,6 +4775,13 @@ type Engram =
4789
4775
  /// gate is unchanged and still binds: a payments freeze stops it, the recipient must be on the
4790
4776
  /// owner's EVM allowlist if the owner has set one, the per-transaction and per-day caps hold, and
4791
4777
  /// an over-policy request goes to the OWNER'S approval queue rather than through.
4778
+ /// ⟨2026-11-19, beside the sentence above⟩ The allowlist clause is history: the never-populated list
4779
+ /// and its check went at the 0.16.0 fresh install. The freeze, the caps and the queue still bind.
4780
+ ///
4781
+ /// ⟨2026-11-19, at the 0.16.0 fresh install⟩ ONE RECORD, THE OWNER RAIL'S SHAPE (`Types.X402SignRequest`).
4782
+ /// This took eight positional arguments, `tokenAddress` and `recipient` side by side as two `Text`
4783
+ /// values a caller could swap without a type error; it now takes the same named record as
4784
+ /// `signX402Payment`, so the two doors cannot drift apart and a swap is a field name, not a position.
4792
4785
  ///
4793
4786
  /// `#ApprovalPending` is a real answer here, not an error, exactly as it is for an agent: the
4794
4787
  /// market is told the spend needs the owner and can retry with the `approvalId` once granted. A
@@ -4800,9 +4793,7 @@ type Engram =
4800
4793
  ///
4801
4794
  /// ⟨2026-11-16⟩ REFUSED UNTIL THE OWNER SETS THAT POLICY. While the owner has set no spending
4802
4795
  /// policy for the market's principal, this method and `sysSignEip712` sign nothing.
4803
- sysSignX402Payment: (chainId: nat, tokenAddress: text, recipient:
4804
- text, amount: nat, tokenName: text, tokenVersion: text, rationale:
4805
- opt text, approvalId: opt text) -> (Result_4);
4796
+ sysSignX402Payment: (req: X402SignRequest) -> (Result_4);
4806
4797
  /// Write an `alerts.test` entry into the audit log; the drain timer delivers it to the webhook
4807
4798
  /// within ~60s. ⟨2026-10-29, beside "within ~60s"⟩ Within seconds (a minute if a delivery was just
4808
4799
  /// made). Owner-only; requires a configured URL so the test can actually go somewhere.