// Add or update this route in your node.cjs file app.post('/api/signup', async (req, res) => { try { const { username, password } = req.body; // This triggers your AuthService which calls the BIP39 C++ logic const result = await authService.signup(username, password); // Return success with address and mnemonic so verify.html can move forward res.json({ success: true, address: result.address, mnemonic: result.mnemonic }); } catch (e) { res.status(400).json({ success: false, error: e.message }); } });