a typed command client in the webview, generated from wallet-entities #13

Closed
opened 2026-09-15 12:37:27 +00:00 by grenade · 0 comments
Owner

Parent: #1

Scope

ui/src/api/wallet.ts is one function per Tauri command, each typed with the ts-rs output in ui/src/api/generated. Decide and document the error shape: commands return Result<T, WalletError> and the client rethrows a typed WalletError. Add a useCommand hook or a React Query setup so screens never call invoke directly.

Acceptance

invoke( appears exactly once in ui/src, in api/wallet.ts. A field renamed in wallet-entities fails pnpm typecheck until the UI follows.

Depends on

Nothing.

Parent: #1 ## Scope `ui/src/api/wallet.ts` is one function per Tauri command, each typed with the ts-rs output in `ui/src/api/generated`. Decide and document the error shape: commands return `Result<T, WalletError>` and the client rethrows a typed `WalletError`. Add a `useCommand` hook or a React Query setup so screens never call `invoke` directly. ## Acceptance `invoke(` appears exactly once in `ui/src`, in `api/wallet.ts`. A field renamed in `wallet-entities` fails `pnpm typecheck` until the UI follows. ## Depends on Nothing.
grenade added the child label 2026-09-15 12:38:54 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blackbeard/wallet#13