hailin
af08f0f9c6
fix(mpc-system): 修复通过邀请码加入会话时 invalid token 错误
...
问题: 通过邀请码查询会话后加入时报 "13 INTERNAL: invalid token"
原因: GetSessionByInviteCode API 没有返回 join_token
修复:
- account-service: GetSessionByInviteCode 在查询时生成新的 wildcard join token
- account-service: CoManagedHTTPHandler 添加 jwtService 依赖注入
- service-party-app: validateInviteCode 返回 join_token
- service-party-app: Join.tsx 保存并使用 joinToken 和 partyId
- service-party-app: preload.ts joinSession 使用正确的参数格式
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 03:40:36 -08:00
hailin
21985abde5
fix(session-coordinator): 保存 WalletName 和 InviteCode 到数据库
...
- CreateSessionInput 添加 WalletName 和 InviteCode 字段
- gRPC handler 从请求中读取并传递这些字段
- CreateSession use case 在创建会话时设置这些字段
修复: 通过邀请码查询会话时找不到记录的问题
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 03:07:44 -08:00
hailin
591dc50eb9
fix(service-party-app): 创建会话时添加 initiator_party_id 参数
...
- CreateKeygenSessionRequest 添加 initiator_party_id 和 initiator_name 字段
- 创建会话前检查是否已连接到消息路由器
- 自动获取已注册的 partyId 作为发起者
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 02:54:43 -08:00
hailin
19e366e0d9
fix(service-party-app): 修复 Account 服务 URL 为 rwaapi.szaiai.com
...
api.szaiai.com 被 OSS/CDN 拦截,改用 rwaapi.szaiai.com 直接访问 Kong 网关
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 02:45:23 -08:00
hailin
551f3d27d2
feat(api-gateway): 添加 MPC Account Service 路由配置
...
添加共管钱包 API 路由,将 /api/v1/co-managed/* 请求转发到 account-service (端口 4000)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 02:31:56 -08:00
hailin
b1234bc434
feat(admin-web): 添加 TSS WASM 集成,实现与 Service-Party-App 功能对等
...
## 功能概述
Admin-Web 现在可以作为独立的 TSS 参与方参与共管钱包创建,
与 Service-Party-App 桌面应用功能完全对等。
## 主要变更
### 1. TSS WASM 模块 (backend/mpc-system/services/tss-wasm/)
- main.go: Go WASM 模块,封装 bnb-chain/tss-lib
- 支持 keygen 和 signing 操作
- 通过 syscall/js 与 JavaScript 通信
### 2. Admin-Web TSS 库 (frontend/admin-web/src/lib/tss/)
- tss-wasm-loader.ts: WASM 加载器
- tss-client.ts: 高级 TSS 客户端 API
- grpc-web-client.ts: gRPC-Web 客户端连接 Message Router
### 3. 本地存储模块 (frontend/admin-web/src/lib/storage/)
- share-storage.ts: IndexedDB 加密存储
- 使用 AES-256-GCM 加密,PBKDF2 密钥派生
### 4. React Hooks
- useTSSClient.ts: TSS 客户端状态管理
- useShareStorage.ts: 存储操作封装
### 5. 组件更新
- CreateWalletModal.tsx: 集成 TSS 客户端
- 添加密码保护对话框
- 实现真实 keygen 流程
- 自动保存 share 到 IndexedDB
- CoManagedWalletSection.tsx: 使用真实 API
- coManagedWalletService.ts: API 服务层
### 6. WASM 文件
- frontend/admin-web/public/wasm/tss.wasm (~19MB)
- frontend/admin-web/public/wasm/wasm_exec.js (Go 运行时)
## 技术栈
- Go 1.21+ (WASM 编译)
- bnb-chain/tss-lib v2.0.2 (TSS 协议)
- Web Crypto API (AES-256-GCM)
- IndexedDB (本地存储)
- gRPC-Web (消息路由)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 01:39:43 -08:00
hailin
be94a6ab18
fix(server-party): session 事件订阅断开后自动重连
...
Message Router 重启后,server-party 的 gRPC stream 会断开,
之前的实现会直接退出 goroutine 导致无法收到新的 session 事件。
修改内容:
- 添加自动重连逻辑,stream 断开时会尝试重新订阅
- 使用指数退避策略,从 1 秒到最大 30 秒
- 重连成功后重置退避时间
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 01:25:30 -08:00
hailin
40a257e55c
fix(mpc-system): 开发模式添加 message-router gRPC 端口映射
...
添加 50051:50051 端口映射,使开发模式与生产模式保持一致
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-29 00:56:04 -08:00
hailin
e78b6e6dcb
fix(service-party-app): 延迟加载 proto 定义避免启动时崩溃
...
将 proto 文件加载改为延迟加载模式,在 connect() 时才加载,
避免模块加载时 app.isPackaged 还未准备好导致的路径错误。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 23:38:42 -08:00
hailin
4794cafdaa
fix(service-party-app): 改为非阻塞方式连接 Message Router
...
将 connectAndRegisterToMessageRouter() 改为非阻塞调用,
不再使用 await 阻塞应用启动。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 23:34:10 -08:00
hailin
28da7f6807
feat(service-party-app): 实现启动时自动注册到 Message Router,状态验证真实化
...
## 主要变更
### 1. 启动时自动连接并注册
- main.ts: 添加 `connectAndRegisterToMessageRouter()` 函数
- 应用启动时自动连接到 Message Router 并注册为 temporary 角色
- 自动生成并持久化 partyId(使用 crypto.randomUUID)
- 自动订阅会话事件
### 2. 状态验证真实化
- appStore.ts: 重写 `checkAllServices()` 消息路由检测逻辑
- 不再只检测连接成功,而是:
1. 调用 isConnected() 检查连接状态
2. 调用 getPartyId() 检查是否已注册
3. 调用 getRegisteredParties() 从 Message Router 获取注册列表
4. 验证自己的 partyId 是否在列表中
- 状态显示更准确:
- "未连接到 xxx" - 未连接
- "已连接但未注册" - 已连接但没注册
- "已注册 (在线)" - 完全正常
- "注册验证失败" - 注册了但验证失败
### 3. 新增 IPC API
- grpc:getPartyId - 获取当前 partyId
- grpc:isConnected - 检查连接状态
- grpc:connect - 连接到 Message Router
- grpc:register - 注册为参与方
### 修改的文件
- electron/main.ts
- electron/preload.ts
- src/stores/appStore.ts
- src/types/electron.d.ts
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 23:29:04 -08:00
hailin
73034c072c
feat(service-party-app): 添加获取已注册参与方列表API
...
新增 grpc.getRegisteredParties() API,用于查询 Message Router 中已注册的参与方:
- grpc-client.ts: 添加 getRegisteredParties() 方法
- main.ts: 添加 IPC 处理器
- preload.ts: 暴露 API 到渲染进程
- electron.d.ts: 添加类型定义
此功能用于测试和调试,确认 Service-Party-App 是否成功注册到 Message Router。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 22:50:46 -08:00
hailin
de29fa4800
feat(co-managed-wallet): 添加签名会话API和Service-Party-App HTTP客户端
...
## Account Service 新增 API
- GET /api/v1/co-managed/sessions/by-invite-code/:inviteCode - 通过邀请码查询keygen会话
- POST /api/v1/co-managed/sign - 创建签名会话
- GET /api/v1/co-managed/sign/by-invite-code/:inviteCode - 通过邀请码查询签名会话
## Service-Party-App 变更
- 新增 account-client.ts HTTP客户端模块
- 集成Account服务API到Electron主进程
- 添加account相关IPC处理器
- 更新preload.ts暴露account API到渲染进程
- Settings页面添加Account服务URL配置
## 文档更新
- 更新 docs/service-party-app.md 反映实际实现
- 添加Account Service HTTP API说明
- 添加签名流程文档
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 22:34:35 -08:00
hailin
81c8db9d50
fix(service-party-app): 修复Kava API健康检查逻辑
...
问题: Kava API检测失败,原因是使用测试地址查询余额的方式不可靠
解决方案:
1. 添加 healthCheck() 方法到 KavaTxService,查询最新区块
2. 添加 kava:healthCheck IPC 处理器
3. 更新 appStore 使用 healthCheck API 而非 getBalance
修改的文件:
- kava-tx-service.ts: 添加 healthCheck() 方法
- main.ts: 添加 kava:healthCheck IPC 处理器
- preload.ts: 暴露 healthCheck API
- appStore.ts: 使用 healthCheck 检测 Kava API
- electron.d.ts: 添加 KavaHealthCheckResult 类型
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 21:01:27 -08:00
hailin
a2508ab0fd
fix(service-party-app): 修复sql.js在打包后无法加载的问题
...
问题: Electron打包后sql.js模块报"Cannot find module"错误
解决方案:
1. 使用extraResources将sql-wasm.wasm复制到resources目录
2. 修改database.ts使用wasmBinary方式加载WASM文件
3. 直接读取WASM文件作为ArrayBuffer,避免模块解析问题
修改的文件:
- package.json: 添加extraResources配置复制WASM文件
- database.ts: 使用fs.readFileSync读取WASM并传递给initSqlJs
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:50:28 -08:00
hailin
761e03ebb0
fix(service-party-app): 修复sql.js在打包后找不到模块的问题
...
## 问题
打包后的应用运行时报错 "Cannot find module 'sql.js'"
## 解决方案
### 1. electron-builder 配置
- 添加 `asarUnpack` 配置,将 sql.js 解压到 asar.unpacked 目录
- 将 `node_modules/sql.js/**/*` 添加到 files 列表
### 2. database.ts 修改
- 添加 `getSqlJsWasmPath()` 函数,根据环境返回正确的 WASM 路径
- 开发环境: node_modules/sql.js/dist/sql-wasm.wasm
- 生产环境: app.asar.unpacked/node_modules/sql.js/dist/sql-wasm.wasm
- 使用 locateFile 配置指定 WASM 文件位置
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:41:01 -08:00
hailin
f5cbc855f6
feat(service-party-app): 添加应用状态检测和启动检查功能
...
## 新增功能
### 1. 启动检测页面 (StartupCheck)
- 应用启动时显示环境检测界面
- 检测三个核心服务: 本地数据库、消息路由、Kava API
- 检测完成后自动进入主界面 (1.5秒延迟)
- 支持查看详细错误信息
- 即使部分服务异常也可进入应用
### 2. 应用状态管理 (appStore)
- 使用 Zustand 管理全局应用状态
- 跟踪各服务的连接状态: unknown/checking/connected/disconnected/error
- 支持操作进度跟踪 (keygen/sign)
- 提供状态辅助函数: getStatusColor, getStatusText, getOverallStatus
### 3. 侧边栏状态面板
- 实时显示三个服务的连接状态
- 显示当前操作进度 (keygen/sign 时)
- 支持手动刷新检测
- 显示整体就绪状态
## 新增文件
- src/stores/appStore.ts: 应用状态管理
- src/components/StartupCheck.tsx: 启动检测组件
- src/components/StartupCheck.module.css: 启动检测样式
## 修改文件
- src/App.tsx: 集成启动检测流程
- src/components/Layout.tsx: 添加状态面板
- src/components/Layout.module.css: 状态面板样式
- src/types/electron.d.ts: 添加 metadata 字段兼容
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:33:00 -08:00
hailin
6b2b9e821e
fix(service-party-app): 更新build-windows.bat支持clean选项
...
添加命令行参数支持:
- build-windows.bat 正常构建
- build-windows.bat clean 清理构建产物后重建
- build-windows.bat cleanall 完全清理(含node_modules)后重建
在其他电脑上首次编译时,建议使用:
build-windows.bat cleanall
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:17:27 -08:00
hailin
eb283389c4
fix(service-party-app): 添加bech32类型声明和清理脚本
...
## 变更
### 1. 添加 bech32 类型声明
- 新增 electron/types/bech32.d.ts 手动声明模块类型
- 解决跨机器编译时找不到 bech32 类型的问题
### 2. 添加清理脚本
- npm run clean: 清理构建产物 (dist, dist-electron, release)
- npm run clean:all: 完全清理 (包括 node_modules)
- npm run rebuild: 清理后重新构建
- npm run rebuild:win: 清理后重新构建 Windows 版本
## 跨机器编译说明
在新电脑上编译时,建议执行:
```bash
npm run clean:all
npm install
npm run build:win
```
或使用一键重建:
```bash
npm run rebuild:win
```
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:14:17 -08:00
hailin
59b0e2bb22
fix(service-party-app): 移除不兼容的@types/bech32
...
bech32 v2.0.0 自带TypeScript类型定义,不需要单独的
@types/bech32 包(该包是针对v1.x版本的)。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:10:05 -08:00
hailin
3f25424049
fix(service-party-app): 添加bech32类型定义修复编译错误
...
添加 @types/bech32 开发依赖以解决 TypeScript 编译时
找不到 bech32 模块类型声明的问题。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:07:13 -08:00
hailin
c97cd208ab
feat(service-party-app): 添加SQLite存储和Kava区块链集成
...
## 主要变更
### 1. SQLite 本地存储 (sql.js)
- 使用 sql.js (纯 JavaScript SQLite) 替代 better-sqlite3
- 无需本地数据库服务,跨平台兼容
- 表结构: shares, derived_addresses, signing_history, settings
- AES-256-GCM 加密 share 数据,PBKDF2 密钥派生
### 2. Kava 区块链集成
- 新增 kava-tx-service.ts: REST API 交易服务
- 余额查询 (ukava/KAVA)
- 交易构建和广播
- 交易状态查询
- 支持多个备用端点自动切换
### 3. 地址派生
- 新增 address-derivation.ts: 多链地址派生
- 支持 Kava, Cosmos, Osmosis, Ethereum 等链
- 使用 Node.js crypto 替代 @noble/hashes 以解决模块兼容问题
- 手动实现 secp256k1 公钥解压缩
### 4. IPC 处理器
- main.ts: 添加 Kava 相关 IPC 处理器
- preload.ts: 暴露 kava API 给渲染进程
- electron.d.ts: 完整的 TypeScript 类型定义
## 新增文件
- electron/modules/database.ts
- electron/modules/address-derivation.ts
- electron/modules/kava-client.ts
- electron/modules/kava-tx-service.ts
- electron/types/sql.js.d.ts
- src/utils/address.ts
- .gitignore
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 19:45:45 -08:00
hailin
76ef8b0a8c
fix(service-party-app): 修复gRPC测试连接方法
...
将testConnection从URL解析改为直接使用host:port格式,
与grpc-client.ts的connect方法保持一致。
地址格式: mpc-grpc.szaiai.com:443 (自动检测TLS)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 18:48:04 -08:00
hailin
2a11392ce2
fix(nginx): 配置文件使用.conf后缀以匹配nginx include规则
...
nginx.conf 使用 include /etc/nginx/sites-enabled/*.conf
因此配置文件必须以 .conf 结尾才能被加载。
变更:
- 添加 DOMAIN_CONF 变量 (mpc-grpc.szaiai.com.conf)
- 更新所有文件路径使用 .conf 后缀
- 卸载时兼容新旧文件名
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 18:39:45 -08:00
hailin
e268c33fa9
fix(nginx): 集成certbot目录创建到安装脚本
...
在安装脚本的configure_http步骤中添加:
- 创建完整的webroot目录结构: /var/www/certbot/.well-known/acme-challenge
- 设置正确的权限: chmod -R 755
这确保Let's Encrypt验证能正常工作,解决404错误问题。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 18:29:59 -08:00
hailin
c457d15829
feat(co-managed-wallet): 添加分布式共管钱包 API 和 gRPC 代理
...
## 功能概述
实现分布式多方共管钱包创建功能的后端 API 和网络基础设施,
支持 Service Party App 通过公网连接参与 TSS 协议。
## 主要变更
### 1. Account Service - 共管钱包 API (新增)
- 新增 co_managed_handler.go - 独立的共管钱包 HTTP handler
- 新增 API 端点:
- POST /api/v1/co-managed/sessions - 创建共管钱包会话
- POST /api/v1/co-managed/sessions/:id/join - 加入会话
- GET /api/v1/co-managed/sessions/:id - 获取会话状态
- 扩展 session_coordinator_client.go:
- 添加 CreateCoManagedKeygenSession 方法
- 添加 JoinSession 方法
- 添加响应类型定义
- 更新 main.go 注册新路由 (SkipPaths 免认证)
### 2. Nginx gRPC 代理 (新增)
- 新增 mpc-grpc.szaiai.com.conf - gRPC over TLS 代理配置
- 新增 install-mpc-grpc.sh - 自动化安装脚本
- 支持 Let's Encrypt SSL 证书
- 代理到后端 Message Router (192.168.1.111:50051)
### 3. Service Party App 更新
- grpc-client.ts: 支持 TLS 连接,自动检测端口 443
- Settings.tsx: 默认地址改为 mpc-grpc.szaiai.com:443
- Home.tsx/Create.tsx: UI 样式优化
## 架构
```
Service Party App (用户电脑)
│
│ gRPC over TLS (端口 443)
▼
Nginx (mpc-grpc.szaiai.com:443)
│
│ grpc_pass
▼
Message Router (192.168.1.111:50051)
│
▼
Session Coordinator → Server Parties
```
## 100% 不影响现有功能
- 所有修改均为新增代码,不修改现有逻辑
- 共管钱包 API 完全独立于现有 RWADurian 系统
- Nginx 配置为独立文件,不影响现有 rwaapi.szaiai.com
- 使用现有 proto 定义 (co_managed_keygen, wallet_name, invite_code)
## 部署步骤
1. DNS: 添加 mpc-grpc.szaiai.com A 记录
2. 安装: sudo ./install-mpc-grpc.sh
3. 验证: curl https://mpc-grpc.szaiai.com/health
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 18:11:57 -08:00
hailin
a830a88cc3
feat(service-party-app): 添加签名功能并重命名应用
...
## 新增功能
- 添加"参与签名"页面 (Sign.tsx)
- 支持选择本地 share 参与 TSS 签名
- 支持导入备份文件参与签名
- 签名进度实时显示
## 应用重命名
- 应用名称改为"榴莲皇后绿积分共管账户服务"
- 更新 package.json productName
- 更新 index.html title
- 更新侧边栏 logo 文字
## 代码完善
- 完善 preload.ts API 定义
- 添加 main.ts IPC 处理器
- 更新 electron.d.ts 类型定义
- 添加 storage.ts saveSettings 方法
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 08:00:00 -08:00
hailin
7cfaacc833
fix(service-party-app): 修改默认阈值为 3-of-5
...
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 07:50:15 -08:00
hailin
47328c67d7
fix(service-party-app): 修复路由和启动问题
...
1. 将 BrowserRouter 改为 HashRouter - Electron 使用 file:// 协议
2. 移除生产环境自动打开浏览器的代码
3. HTTP 服务器仅在开发模式下启动
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 07:45:43 -08:00
hailin
15cbb2401f
fix(service-party-app): 修复 proto 文件打包路径问题
...
- 复制 message_router.proto 到 service-party-app/proto/
- 修改 grpc-client.ts 使用 process.resourcesPath 加载 proto 文件
- 使用 extraResources 将 proto 文件打包到 resources 目录外
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 07:39:55 -08:00
hailin
e43500fc3f
fix(service-party-app): 修复 electron-builder files 配置
...
- 将 electron/**/* 改为 dist-electron/**/* (编译后的文件)
- 添加 proto/**/* (gRPC proto 文件)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 07:35:26 -08:00
hailin
7cec5b2b4c
fix(service-party-app): 修复 gRPC 客户端 TypeScript 类型错误
...
添加 ProtoPackage 接口定义 proto 包结构类型,避免类型推断错误
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 07:33:10 -08:00
hailin
1f476e8e5a
fix(service-party-app): 修复 Electron 主进程编译配置
...
- 新增 tsconfig.electron.json 单独编译 Electron 主进程到 dist-electron/
- 更新 package.json main 入口为 dist-electron/main.js
- 更新 build 脚本先编译 electron 再 vite build
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 07:31:26 -08:00
hailin
fcaa57605a
fix(service-party-app): fix TypeScript compilation errors
...
- Fix import/export consistency (use default exports)
- Add CSS module type declarations
- Fix ElectronAPI type definitions (ListSharesResult, ExportShareResult)
- Fix null checks for sessionInfo and session
- Change build script to use npx tsc
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 07:27:12 -08:00
hailin
88370691d1
fix(service-party-app): fix build script and remove icon requirement
...
- Rewrite build-windows.bat in English to avoid encoding issues
- Remove icon configuration from electron-builder.json (use default)
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 07:19:19 -08:00
hailin
8733e49735
feat(service-party-app): 添加 Windows 一键编译脚本
...
添加 build-windows.bat 脚本,支持:
- 检查 Node.js 和 Go 环境
- 编译 TSS 子进程 (tss-party.exe)
- 安装 npm 依赖
- 编译 Electron 应用
使用方法: 双击运行 build-windows.bat
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 07:07:43 -08:00
hailin
1908544698
fix(mobile-app): 修复 ProfilePage 在 initState 中修改 provider 导致的错误
...
将 _loadUnreadNotificationCount() 调用包装在 addPostFrameCallback 中,
延迟到 widget tree 构建完成后执行,避免 Riverpod 报错:
"Tried to modify a provider while the widget tree was building"
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:57:37 -08:00
hailin
b3142387f7
chore(mobile-app): 减少频繁轮询产生的调试日志
...
- 移除合同检查服务的频繁日志输出
- 移除维护状态检查的正常状态日志
- 只在检测到异常状态(维护中、待签署合同)时输出日志
- 减少服务器日志压力
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:54:16 -08:00
hailin
9e21d8c8cd
feat(api-gateway): 添加移动端系统维护接口的 Kong 路由
...
添加 /api/v1/mobile/system 路由到 admin-service,
使移动端可以访问 /mobile/system/maintenance-status 接口
检查系统维护状态。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:36:02 -08:00
hailin
8a839b5e14
chore(mobile-app): 减少频繁日志输出
...
移除以下频繁执行操作的日志,只保留错误和关键状态日志:
- MaintenanceProvider: 移除正常状态日志,只保留检测到维护的日志
- ContractCheckService: 移除常规检查日志,只保留检测到异常的日志
- ContractSigningService: 移除KYC检查、获取任务列表等常规日志
- HomeShellPage: 移除合同检查定时器日志和路由栈打印
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:31:45 -08:00
hailin
68237d9905
chore(mobile-app): 调整维护状态轮询间隔为30-60秒
...
减少服务器压力:
- 将轮询间隔从 3-6 秒调整为 30-60 秒
- 10,000 用户时每秒约 222 次请求(之前约 2,222 次)
- 用户最多 60 秒内发现维护状态变化
- 启动时和从后台恢复时仍立即检查
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:23:20 -08:00
hailin
7e8113805d
feat(mobile-app): 在主页添加随机3-6秒轮询检查维护状态
...
- 用户登录后在 HomeShellPage 每 3-6 秒(随机)检查一次维护状态
- 随机间隔可避免所有用户同时请求,减少服务器压力
- 后端发起维护后,用户最多 6 秒内会看到维护弹窗
- App 进入后台时暂停检查,恢复前台时立即检查并重启定时器
- 启动时、从后台恢复时也会立即检查一次
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:21:21 -08:00
hailin
0781c53101
fix(admin-service): 修复 getCurrentStatus 方法使用旧响应格式的问题
...
AdminMaintenanceController.getCurrentStatus() 方法仍使用旧的 inMaintenance 字段,
导致构建失败。更新为与 MobileMaintenanceController 一致的新格式:
- 使用 isUnderMaintenance 代替 inMaintenance
- 使用嵌套的 maintenance 对象包含详情
- 添加 remainingMinutes 字段计算
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 06:11:54 -08:00
hailin
6c4a40c42d
fix(migration): 使数据库迁移脚本幂等化,支持重复执行
...
将 008_add_co_managed_wallet_fields.up.sql 改为幂等脚本:
- 使用 DO $$ ... IF NOT EXISTS 检查列是否存在再添加
- 使用 CREATE INDEX IF NOT EXISTS 创建索引
- 使用 DROP CONSTRAINT IF EXISTS 删除约束
这确保迁移脚本可以安全地多次执行,不会因列/索引已存在而失败。
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 05:26:38 -08:00
hailin
75a9ffadef
fix(admin-service): 修复移动端维护状态API响应格式不匹配问题
...
移动端期望的格式:
{
"isUnderMaintenance": true,
"maintenance": { "title", "message", "startTime", "endTime", "remainingMinutes" }
}
后端之前返回的格式:
{
"inMaintenance": true,
"title", "message", "endTime"
}
修改内容:
- 字段名 inMaintenance → isUnderMaintenance
- 嵌套维护详情到 maintenance 对象
- 添加 startTime 和 remainingMinutes 字段
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 05:10:18 -08:00
hailin
912cc1eb8f
fix(admin-web): 修复切换维护状态HTTP方法不匹配问题 (PATCH→PUT)
2025-12-28 05:03:34 -08:00
hailin
ba3a21d049
fix(admin-web): 修复系统维护"立即激活"按钮不显示的问题
...
- 修复 getStatusTag 函数逻辑,未激活状态使用 'inactive' 样式而不是 'expired'
- 添加更细化的状态判断:维护中、已过期、已计划、未激活、待激活
- 添加 inactive 标签样式(橙色背景)
- 现在未激活的维护计划会正确显示"立即激活"按钮
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 04:59:06 -08:00
hailin
8df2046a4e
docs: 添加 Service Party App 技术文档
...
添加分布式共管钱包桌面应用的详细技术文档,包括:
- 应用概述和使用场景
- 目录结构说明
- 技术架构和技术栈
- TSS 子进程架构设计
- IPC 消息格式定义
- 核心功能说明
- 编译与运行指南
- 安全考虑
- 系统集成说明
- 未来扩展规划
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 04:42:09 -08:00
hailin
cc3644de9d
feat(mpc-system): 添加单服务管理命令到deploy.sh
...
新增命令:
- start-svc: 启动单个服务
- stop-svc: 停止单个服务
- restart-svc: 重启单个服务
- rebuild-svc: 重建并重启服务 (支持--no-cache)
支持开发模式和生产模式
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 04:23:22 -08:00
hailin
1af5780b19
fix(admin-service): 修复共管钱包 status 类型不匹配问题
...
使用 Prisma 生成的类型替代手动定义的接口:
- PrismaCoManagedWalletSession -> @prisma/client
- PrismaCoManagedWallet -> @prisma/client
- status 字段使用 PrismaWalletSessionStatus 枚举类型
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 00:02:18 -08:00