
- Built complete CEX platform with FastAPI and Python - JWT-based authentication system with secure password hashing - Multi-currency crypto wallet support (BTC, ETH, USDT) - Fiat account management (USD, EUR, GBP) - Local transaction signing without external APIs - Comprehensive transaction handling (send/receive/deposit/withdraw) - SQLAlchemy models with Alembic migrations - Security middleware (rate limiting, headers, logging) - Input validation and sanitization - Encrypted private key storage with PBKDF2 - Standardized codebase architecture with service layer pattern - Complete API documentation with health endpoints - Comprehensive README with setup instructions Features: - User registration and authentication - Crypto wallet creation and management - Secure transaction signing using local private keys - Fiat deposit/withdrawal system - Transaction history and tracking - Rate limiting and security headers - Input validation for all endpoints - Error handling and logging
39 lines
618 B
Python
39 lines
618 B
Python
from pydantic import BaseModel
|
|
from datetime import datetime
|
|
|
|
|
|
class WalletBase(BaseModel):
|
|
currency: str
|
|
|
|
|
|
class WalletCreate(WalletBase):
|
|
pass
|
|
|
|
|
|
class WalletResponse(WalletBase):
|
|
id: int
|
|
address: str
|
|
balance: float
|
|
is_active: bool
|
|
created_at: datetime
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class FiatAccountBase(BaseModel):
|
|
currency: str
|
|
|
|
|
|
class FiatAccountCreate(FiatAccountBase):
|
|
pass
|
|
|
|
|
|
class FiatAccountResponse(FiatAccountBase):
|
|
id: int
|
|
balance: float
|
|
is_active: bool
|
|
created_at: datetime
|
|
|
|
class Config:
|
|
from_attributes = True |