# sepolia **Repository Path**: tmkbk/sepolia ## Basic Information - **Project Name**: sepolia - **Description**: 这是一个毕业设计,题目为基于区块链的实现公益捐款透明化 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-18 - **Last Updated**: 2025-10-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Charity Backend 本仓库为示例后端,包含用户认证、项目与捐款等功能。 快速开始(开发) 1. 安装依赖 ```powershell npm install ``` 2. 配置数据库与环境变量 - 修改 `config/config.default.ts` 中的数据库连接或在环境变量中设置 `DB_HOST`, `DB_USER`, `DB_PASSWORD`, `DB_NAME` 等。 3. 运行服务 ```powershell npm run dev ``` 4. 示例:钱包绑定演示 - 登录或注册得到 JWT token:POST /api/auth/login 或 /api/auth/register(返回 data.token) - 打开演示页面: http://localhost:7001/public/wallet-verify.html - 在页面中填写 token,点击“获取 Nonce”,连接钱包并签名,然后点击“提交验证”。 前端流程(快速参考) 1. 请求 `/api/auth/wallet-nonce`(带 Authorization: Bearer )获取 nonce。 2. 用钱包(MetaMask)signMessage(nonce) 得到 signature。 3. 请求 `/api/auth/verify-wallet`(带相同 token),body: { address, message: nonce, signature }。