Backend for XRPL to Flare Smart Accounts flow using Fastify, TypeScript, Zod, Prisma, and SQLite.
-
Install dependencies:
npm install
-
Generate Prisma client:
npm run prisma:generate
-
Run migrations:
npm run prisma:migrate
-
Set environment variables in
.env:PORT=3000 FLARE_RPC_URL=https://flare-api.flare.network/ext/C/rpc FLARE_PRIVATE_KEY=your_private_key XRPL_WALLET_ID=0 DATABASE_URL="file:./dev.db" -
Run in development:
npm run dev
-
Build for production:
npm run build npm start
POST /api/intents- Create a new intentGET /api/intents- List all intentsGET /api/intents/:id- Get intent by ID