Skip to content

feat: add multi-space session support to SessionConfig#25

Open
skgbafa wants to merge 2 commits intomainfrom
feat/multi-space-session
Open

feat: add multi-space session support to SessionConfig#25
skgbafa wants to merge 2 commits intomainfrom
feat/multi-space-session

Conversation

@skgbafa
Copy link
Contributor

@skgbafa skgbafa commented Feb 25, 2026

Summary

  • SessionConfig accepts optional additionalSpaces so a single SIWE signature covers multiple spaces (e.g., primary + public)
  • into_message() generates ReCap capability URIs for all spaces, not just the primary
  • PreparedSession and Session structs pass additional_spaces through the full session lifecycle
  • New test session_with_additional_spaces verifies both space URIs appear in the SIWE message

Test plan

  • cargo test in tinycloud-sdk-wasm — both existing and new tests pass
  • Integration test with web-sdk multi-space signIn (companion PR: TinyCloudLabs/web-sdk)

SessionConfig now accepts optional `additionalSpaces` so a single SIWE
signature can cover multiple spaces (e.g., primary + public). The
into_message() method generates ReCap capability URIs for all spaces,
enabling the SDK to operate on both default and public spaces without
requiring a second wallet interaction.
@skgbafa skgbafa force-pushed the feat/multi-space-session branch from 36cc666 to 30f6544 Compare February 25, 2026 00:55
…e sessions

Server now tolerates missing spaces during delegation processing instead
of failing with SpaceNotFound. For delegation-only transactions, spaces
that don't exist in the DB are skipped (no epoch/event_order created),
while the delegation record is still fully saved. Invocations continue
to fail explicitly with 404 for non-existent spaces.

The /delegate endpoint now returns JSON with activated/skipped space
lists, allowing clients to defer public space creation until needed
rather than eagerly creating it during signIn.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant