This implementation provides a comprehensive anchor provider selection system that allows users to:
- Select anchor providers from a dropdown
- View detailed fee structures
- View transaction limits
- Review compliance requirements
api/src/types/anchor.ts- TypeScript interfaces for anchor dataapi/src/routes/anchors.ts- REST API endpoints for anchor providersapi/src/app.ts- Updated to include anchors route
frontend/src/components/AnchorSelector.tsx- Main React componentfrontend/src/components/AnchorSelector.css- Stylingfrontend/src/components/__tests__/AnchorSelector.test.tsx- Unit tests
Returns all available anchor providers with optional filtering.
Query Parameters:
status(optional): Filter by status (active, inactive, maintenance)currency(optional): Filter by supported currency
Response:
{
"success": true,
"data": [...],
"count": 3,
"timestamp": "2026-02-25T10:30:00.000Z"
}Returns details for a specific anchor provider.
import { AnchorSelector } from './components/AnchorSelector';
function MyComponent() {
const handleAnchorSelect = (anchor) => {
console.log('Selected:', anchor);
};
return (
<AnchorSelector
onSelect={handleAnchorSelect}
currency="USD"
apiUrl="http://localhost:3000"
/>
);
}- Dropdown interface with search/filter capability
- Visual indicators for verified providers
- Rating display
- Logo support
- Deposit fees (percentage + fixed)
- Withdrawal fees (percentage + fixed)
- Minimum and maximum fee caps
- Clear fee calculation display
- Per-transaction limits (min/max)
- Daily transaction limits
- Monthly transaction limits
- KYC level indicators (Basic, Standard, Enhanced)
- Required documents list
- Supported countries
- Restricted countries with warnings
- Visual badges for compliance levels
The implementation includes 3 mock anchor providers:
- MoneyGram Access - Intermediate KYC, global coverage
- Circle USDC - Enhanced KYC, instant settlement
- AnchorUSD - Basic KYC, Americas focus
Run tests with:
npm test --prefix frontendTo integrate with production:
- Replace mock data with database queries
- Add authentication/authorization
- Implement real-time anchor status updates
- Add anchor registration workflow
- Integrate with smart contract for on-chain verification