feat: homes per caller and counters that survive upgrades

Nodes on a canister's subnet can read its state, so no authority rests
on swiss numbers. fetch("home") answers the caller principal's own
durable store of named objects (init, get), found through Loam's name
index and made on first use; fetch("makeCounter") answers the public
maker. Homes, counters, and the CapTP identity live in Loam over the
stable-memory log, reopened in post_upgrade; sessions end with the heap.

The canister installs from 32 bytes of entropy passed as its argument
and refuses the anonymous principal. The client takes a key file, so a
caller can come back to its home, and sends string and reference
arguments.

Generated-by: Claude Code (claude-opus-5-5)
This commit is contained in:
dckc committed 2026-11-18 06:21:31 -06:00
1 parent eb15a05668
commit b717ccaedf
11 files changed
+782 -233

No files matched your search

+5 -4
View File
@@ -1,7 +1,8 @@
// Each blob is CapTP frames in Syrup byte-string envelopes.
service : {
// Each blob of frames is CapTP frames in Syrup byte-string envelopes.
// Install with 32 bytes of fresh entropy.
service : (entropy : blob) -> {
// Open the caller's session with its `op:start-session`.
start : (blob) -> (blob);
start : (frames : blob) -> (blob);
// Carry later frames on the caller's session.
deliver : (blob) -> (blob);
deliver : (frames : blob) -> (blob);
}