Expand description
交易密码来源封装
优先级(对 LLM 透明,它只会调 futu_unlock_trade 工具,密码永不入 prompt):
- 环境变量
FUTU_TRADE_PWD(显式运行时 override) - 账号级 OS credential store(macOS 发布包仅兼容读取旧条目)
- legacy 全局 credential store —— v1.4.109 前的
trade-password兜底读取 - 都没有 → 报错
MD5 在 server 端计算后再发网关。LLM 从来看不到明文 / MD5。所有 credential-store 操作由 futu-auth 的 single-flight / circuit-breaker owner 执行。
Functions§
- get_
trade_ password_ for_ account - 试着拿到交易密码明文。成功则返回
Ok(pwd);任何来源都没找到返回Err。 - get_
trade_ password_ md5_ for_ account - 把密码 MD5 化再返回(unlock_trade RPC 要的格式)
- keyring_
platform_ 🔒detail - keyring_
read_ 🔒error - md5_hex 🔒
- missing_
trade_ 🔒password_ message - non_
empty_ 🔒trimmed - read_
keyring_ 🔒password - trade_
password_ 🔒from_ sources - trade_
pwd_ 🔒account_ from