What problem does it solve?
Integrating Cartridge Controller into React applications removes wallet popup friction and streamlines Starknet authentication and transaction signing by providing session-key based connectors, configurable session policies, and provider integration for instant, in-app transactions.
Core Features & Use Cases
- Provider & Connector Setup: Create a ControllerConnector outside React components, define SessionPolicies, and configure a jsonRpcProvider with chains (including local Katana) for seamless provider routing.
- Wallet UI & Hooks: Use starknet-react hooks like useConnect, useAccount, and useDisconnect to build ConnectWallet components that surface address, username, and dynamic auth flows for external providers.
- Transaction Execution & Observability: Execute multi-call transactions via account.execute, surface transaction links via an explorer, and use external wallet helpers to wait for confirmations or switch chains.
- Developer Experience: Support HTTPS local development with mkcert in Vite, and run hybrid dev modes that mix local keychain with production APIs for testing.
- Use Case: Ideal for Web3 React/Next.js dApps and games that require popup-free session keys, fast in-app transactions, and flexible auth options (metamask, phantom, walletconnect, etc.).
Quick Start
Create a ControllerConnector with session policies, register it in StarknetConfig with a jsonRpcProvider and Katana chain, and implement a ConnectWallet component that uses connect and account.execute to submit transactions.