Context
PlotToon is adding multi-wallet support for OWS wallets. The same user need also exists in plotlink-ows: users may want to maintain multiple local OWS wallets on one machine and switch which wallet is active for publishing, dashboard, royalty, and AI writer/account operations.
Current plotlink-ows behavior appears to be single-wallet oriented: several routes call listAgentWallets() and then choose the first wallet whose name starts with plotlink-writer. That works for one wallet, but it is ambiguous once multiple OWS wallets exist.
Scope
- Add an active OWS wallet selection model for plotlink-ows.
- Persist selected wallet identity locally.
- Store/display non-secret metadata only: wallet name/id, normalized address, source/label.
- Do not expose passphrases, private keys, wallet file contents, or sensitive local paths.
- Replace first-
plotlink-writer lookup behavior with explicit active-wallet selection in wallet-bound routes.
- Add wallet switcher UI for local OWS wallets.
- Ensure these surfaces use the active wallet:
/api/wallet
/api/wallet/create
- publish preflight and publish routes
- cover/plot image upload signatures if wallet-signed
- storyline update signing
- dashboard/balance display
- royalty claim flow
- AI writer registration and owner/binding flows
- Keep single-wallet users working without extra setup.
- Add legacy behavior for existing installs: if exactly one recognized OWS wallet exists, select it automatically; if multiple exist and no active wallet is selected, prompt the user to choose.
Acceptance Criteria
- A user can create or discover more than one local OWS wallet and select the active one.
- Publishing and signing use the selected wallet, not the first wallet matching a prefix.
- Dashboard/account/royalty/AI writer views reflect the selected wallet.
- Switching wallets does not mix story/dashboard/publish context.
- Existing one-wallet installs remain usable.
- Tests cover at least two fake wallet identities and active-wallet switching.
Security Notes
- Use fake addresses in tests and public PR text.
- Never log or render private keys, seed material, passphrases, wallet file contents, or sensitive local paths.
Context
PlotToon is adding multi-wallet support for OWS wallets. The same user need also exists in plotlink-ows: users may want to maintain multiple local OWS wallets on one machine and switch which wallet is active for publishing, dashboard, royalty, and AI writer/account operations.
Current plotlink-ows behavior appears to be single-wallet oriented: several routes call
listAgentWallets()and then choose the first wallet whose name starts withplotlink-writer. That works for one wallet, but it is ambiguous once multiple OWS wallets exist.Scope
plotlink-writerlookup behavior with explicit active-wallet selection in wallet-bound routes./api/wallet/api/wallet/createAcceptance Criteria
Security Notes