Developing with Crefy Connect
Learn how to build applications with Crefy Connect and integrate wallet functionality into your projects.Prerequisites
Requirements:
- Node.js version 16 or higher
- npm, yarn, pnpm, or bun package manager
- React 16.8+ (for hooks support)
- A Crefy Connect App ID from the Dashboard
Setting Up Your Development Environment
1
Install Crefy Connect
2
Get Your App ID
Visit the Crefy Connect Dashboard and create a new application to get your App ID.
3
Set Up Provider
Wrap your app with
CrefyConnectProvider:Development Patterns
Protected Routes
Conditional Rendering Based on Auth
Transaction Handling
Framework-Specific Guides
Vite.js + TypeScript
Next.js 13+ (App Router)
Create React App
Environment Variables
For security, use environment variables for your App ID:Testing
Mocking Crefy Connect in Tests
Best Practices
- Always wrap your app with
CrefyConnectProviderat the root level - Use environment variables for App IDs in production
- Handle loading states when using transaction hooks
- Provide user feedback for authentication and transaction states
- Validate inputs before sending transactions
