Critical fix: switched from optional_namespaces to required_namespaces.
This is the real reason behind the wallet-side rejection/error.
cargo runYou should see:
π WalletConnect for Qubic - QR connection
Step 1: Creating configuration...
Step 2: Creating client...
Step 3: Initializing...
Step 4: Generating URI...
βΉοΈ Old sessions/state are cleaned up automatically
βΉοΈ Each run generates a NEW unique URI
β
URI generated successfully
If you run with RUST_LOG=debug, you should see that Qubic is placed in required_namespaces.
set RUST_LOG=debug
cargo run- Open the Qubic wallet on your phone
- Find WalletConnect
- Scan the QR code
- Approve the connection
β Success β the wallet connects without the previous rejection.
required_namespaces: HashMap::new(), // empty β
optional_namespaces, // Qubic was hererequired_namespaces, // Qubic is here β
optional_namespaces: HashMap::new(), // empty-
cargo buildsucceeds -
cargo runstarts - QR code/URI is displayed
- Wallet scans the QR successfully
- Wallet approves the connection
- Session becomes active
- Restarting the program keeps working (fresh URI each run)
If you still see a rejection:
- Verify the wallet supports WalletConnect v2 + Qubic namespace
- Verify the Project ID is valid
- Clear old WalletConnect sessions in the wallet
- Inspect logs and confirm
required_namespacesusage - Compare the proposal payload with the JavaScript implementation
WALLETCONNECT_FIX_REQUIRED_NAMESPACES.md- root cause explanationWALLET_CONNECT_QUICKSTART.md- quick startTROUBLESHOOTING.md- common issues
Next step: run cargo run and verify a successful wallet connection.