Welcome to the Chainrails integration examples! This repository contains comprehensive guides and sample code to help you integrate Chainrails into your application.
This demo is divided into three main sections:
Backend integration examples using NestJS. Learn how to:
- Fetch available chains and supported tokens
- Get quotes and routes for cross-chain transfers
- Create and manage transfer intents
- Handle webhook events for real-time updates
- Build a complete end-to-end transfer flow
Perfect for developers building custom backend integrations with full control over the transfer experience.
Frontend integration examples showing how to use the Chainrails pre-built UI modal. Available in:
- React (
/modal/react) - React implementation with Vite - Next.js (
/modal/nextjs) - Next.js implementation
Ideal for quickly adding cross-chain transfers to your dApp with a beautiful, ready-to-use interface.
Lightweight SDK examples for programmatic transfers without a backend. Learn how to:
- Initialize the Chainrails SDK
- Create transfers programmatically
- Handle intent creation and monitoring
Great for simple integrations or client-side only applications.
Choose the integration path that best fits your needs:
- Need full control? → Start with the API Guide
- Want a quick UI solution? → Check out the Modal Guide
- Building something simple? → Try the SDK Guide
Each section includes detailed README files, code examples, and step-by-step instructions.