Skip to main content

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

  1. Always wrap your app with CrefyConnectProvider at the root level
  2. Use environment variables for App IDs in production
  3. Handle loading states when using transaction hooks
  4. Provide user feedback for authentication and transaction states
  5. Validate inputs before sending transactions
Development Mode: Use “sepolia” testnet during development to avoid spending real ETH on transactions.