A minimal Vite + React + TypeScript quickstart demonstrating basic usage of the @abstraxn/signer-react SDK.
- Node.js (v18 or higher recommended)
- npm or yarn
-
Clone or download this repository
-
Install dependencies:
npm installCreate a .env file in the project root (see env.example) and set:
VITE_ABSTRAXN_API_KEY=your_api_key_hereStart the development server:
npm run devThe app will be available at http://localhost:5173 (or the port shown in the terminal).
Build for production:
npm run buildPreview the production build:
npm run previewThis quickstart provides a basic example of:
- SDK onboarding UI via
ConnectButton- Opens the Abstraxn wallet onboarding modal - Wallet connection state management via
useAbstraxnWallet()hook - Wallet management UI via
WalletModal- Shows active chains, send/transfer options - Display connection status and wallet address
- Connect Wallet - Click to open the Abstraxn onboarding UI (supports email OTP, Google, and external wallets)
- Open Wallet - Opens the SDK's wallet modal with:
- Active chain/network selector
- Send/transfer functionality
- Receive options
- Wallet management features
- Disconnect - Disconnects the connected wallet
- Review
src/main.tsxforAbstraxnProvidersetup with API key configuration - Review
src/App.tsxforConnectButton,useAbstraxnWallet(), andWalletModalusage - Refer to the Abstraxn documentation for detailed SDK usage
├── src/
│ ├── App.tsx # Main app component with signer integration
│ ├── App.css # Styling
│ ├── main.tsx # React entry point
│ └── vite-env.d.ts # Vite type definitions
├── index.html # HTML entry point
├── package.json # Dependencies
├── vite.config.ts # Vite configuration
└── tsconfig.json # TypeScript configuration
MIT