Skip to content

docs: cookbook for multi-tenant server apps (one MemWalAccount, namespace per end-user wallet) #246

@Olympusxvn

Description

@Olympusxvn

Context

Building Mr. Toxic Special One for Walrus Sessions 4 (World Cup 2026 roast chatbot). Pattern we had to infer:

  • Operator creates one MemWalAccount + delegate key on memory.walrus.xyz/dashboard
  • Server (Next.js API routes on Vercel) holds MEMWAL_PRIVATE_KEY + MEMWAL_ACCOUNT_ID
  • End users only connect a Sui wallet for auth — no MemWalAccount per user
  • Isolation via per-wallet namespace, e.g. special-one-{walletAddress.toLowerCase()}

This is a common SaaS / hackathon pattern but not spelled out in SDK quickstart (which focuses on single-user or chatbot middleware).

What would help

A short cookbook page covering:

  1. Delegate key setup (not owner key) + revoke flow
  2. Recommended namespace naming for multi-user apps
  3. Next.js / serverless example: load profile → mutate → remember/rememberAndWait in API route
  4. Security notes: never expose delegate key to browser; wallet signature for identity only
  5. Link to MemWalAccount explorer for submission/demos

Our implementation (reference)

Environment

  • @mysten-incubation/memwal@0.0.7
  • Relayer: https://relayer.memory.walrus.xyz (mainnet)
  • Deploy: Vercel serverless

Walrus Sessions 4 feedback — happy to PR a docs snippet if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions