The canister is freestanding wasm32 importing only ic0. Each caller principal gets a CapTP session: start carries op:start-session, deliver carries later frames, and each reply carries the canister's frames. The client peer is wasm too, driven from Node by @icp-sdk/core. It holds answer releases so they ride ahead of the next call instead of costing an update call of their own: handshake, fetch, and each send are one update call apiece. Generated-by: Claude Code (claude-opus-5-5)
8 lines
242 B
Plaintext
8 lines
242 B
Plaintext
// Each blob is CapTP frames in Syrup byte-string envelopes.
|
|
service : {
|
|
// Open the caller's session with its `op:start-session`.
|
|
start : (blob) -> (blob);
|
|
// Carry later frames on the caller's session.
|
|
deliver : (blob) -> (blob);
|
|
}
|