恒美微站
首页
关于我们
建站服务
主题模板
案例展示
资讯中心
联系我们
mind_sdk_deepseek 怎么完成钱包注册并执行 deepseek-fhe-vote 上链投票?
首页
资讯中心
/
mind_sdk_deepseek 怎么完成钱包注册并执行 deepseek-fhe-vote 上链投票?
mind_sdk_deepseek 怎么完成钱包注册并执行 deepseek-fhe-vote 上链投票?
发布时间:2026/9/10 5:35:18
mind_sdk_deepseek 怎么完成钱包注册并执行 deepseek-fhe-vote 上链投票【免费下载链接】awesome-deepseek-integrationIntegrate the DeepSeek API into popular software项目地址: https://gitcode.com/GitHub_Trending/aw/awesome-deepseek-integrationmind_sdk_deepseek是 Mind Network 提供的 Native Rust SDKDeepSeek 作为 AI Agent 思考并给出预测结果经 FHE 加密后提交到 Mind Network 参与模型共识。本文完成的任务是用 SDK 自带的 CLI 先执行register子命令把投票钱包voter wallet与热钱包hot wallet完成注册再运行deepseek-fhe-vote子命令把加密后的预测值上链投票并验证结果。文中全部命令、子命令说明与输出均出自 docs/fhe.mind-network/README.md下称“文档”。前提条件本机有 Rust 构建环境。文档的全部构建与运行命令都基于cargo没有给出操作系统或 Rust 版本要求。准备源码并构建文档 Source 小节给出的获取方式git clone https://github.com/mind-network/mind-sdk-deepseek-rust.git cd mind-sdk-deepseek-rust编译cargo build --debug # 或发行版 cargo build --release三处与文档原文有关、直接影响执行的细节文档 run 小节的命令以cd msn开头而 Source 小节的克隆目录名是mind-sdk-deepseek-rust。由于命令引用的./target/debug/mind_sdk_deepseek只存在于 cargo 项目根目录下这里按项目根目录理解以自己实际克隆的目录名为准。run 小节里每条命令都带cargo build 前缀即每次运行前都先重新构建本文沿用该写法。CLI 默认配置文件是./config/config_fvn.toml--node-config-file选项帮助文本描述为 “fvn config file, contains all the config to run fvn”。本仓库文档没有列出该文件的具体字段多节点示例中另用到./config/config_fvn_1.toml与./config/config_fvn_2.toml。先检查热钱包与 Gas注册和投票前先确认当前热钱包及其 Gas 余额。文档对check-gas-balance的说明是 “check hot wallet gas balance, need gas fee to vote”即投票需要花费 Gas所以先查余额cargo build ./target/debug/mind_sdk_deepseek --log-levelinfo check-hot-wallet-addresscheck-hot-wallet-address默认使用./config/config_fvn.toml帮助文本 “by default will use ./config/config_fvn.toml”。文档示例输出{ app: deepseek, command: check-hot-wallet-address, arg: , status: true, result: 0x64FF17078669A507D0c831D9E844AF1C967604Dd, note: }result是解析出的热钱包地址0x64FF...04Dd为文档示例值。如果不想用配置文件里的钱包CLI 提供--hot-wallet-private-key选项用它加载另一个钱包的私钥来签名上链消息帮助文本 “fvn wallet private key is needed if to load a different wallet from config_fvn.toml to sign the message onchain”。cargo build ./target/debug/mind_sdk_deepseek --log-leveldebug --node-config-file./config/config_fvn.toml check-gas-balance文档示例输出中result为197015375000000arg回显热钱包地址。该数值是文档示例不是必须得到的值。注册投票钱包register子命令用于注册投票钱包帮助文本 “register voter address”参数是 voter wallet 地址。下面是文档示例命令其中0x06eF...735是文档示例的 voter 地址实际执行时替换为你要注册的投票钱包地址cargo build ./target/debug/mind_sdk_deepseek --log-leveldebug --node-config-file./config/config_fvn.toml register 0x06eF5C5ba427434bf36469B877e4ea9044D1b735文档示例输出{ app: deepseek, command: register, arg: hot_wallet: 0x6224F72f1439E76803e063262a7e1c03e86c6Dbd, voter_wallet: 0x06eF5C5ba427434bf36469B877e4ea9044D1b735, status: true, result: registration successful !, note: is_registered: true, hot_wallet: 0x6224F72f1439E76803e063262a7e1c03e86c6Dbd, voter_wallet: 0x06eF5C5ba427434bf36469B877e4ea9044D1b735 }这个文档示例中status为true、result为registration successful !note里is_registered: true即热钱包与指定投票钱包的注册关系已建立。文档给出的成功标志就是这套输出字段没有承诺其他判定方式。验证用check-registration帮助文本 “check if hot wallet has registered with a particular voter wallet”。文档示例展示的是未注册时的输出形态{ app: deepseek, command: check-registration, arg: 0x6224F72f1439E76803e063262a7e1c03e86c6Dbd, status: false, result: , note: hot wallet is not registered with any voter wallet }看到status: false且 note 为hot wallet is not registered with any voter wallet说明还没有注册任何投票钱包需要先执行register。注册成功时则参照上面register示例中is_registered: true的形态。文档 run 小节也把check-registration列为独立步骤同样覆盖三套配置。可选分支——多节点文档 run 小节对config_fvn.toml、config_fvn_1.toml、config_fvn_2.toml分别给出register命令对应三个不同的 voter 地址文档示例0x06eF...735、0x2F8a...4f84、0x3df4...d8b。如果你要跑多节点按文档示例对每个配置文件各执行一次注册文档没有解释这三个配置文件之间的差异。执行 deepseek-fhe-vote 上链投票注册完成、Gas 确认后执行投票cargo build ./target/debug/mind_sdk_deepseek --log-leveldebug --node-config-file./config/config_fvn.toml deepseek-fhe-vote帮助文本对该子命令的描述 “let deepseek think and predict, and then encrypted by FHE and submit to Mind Network for model consensus”。文档示例输出{ app: deepseek, command: deepseek-fhe-vote, arg: deekseek predicted BTC price: 95833, hot_wallet: 0x6224F72f1439E76803e063262a7e1c03e86c6Dbd, status: true, result: 0x42d78185e4779dd3105598ac4f2786998c5059f8381a55daec12e4ffcc952a56, note: deekseek predicted BTC price: 95833, gas_sued: 304749, block_number: 26373, tx_hash: 0x42d78185e4779dd3105598ac4f2786998c5059f8381a55daec12e4ffcc952a56 }在这个文档示例中status为trueresult是交易哈希note记录了 DeepSeek 返回的预测值、gas_sued、block_number和tx_hash。示例里的预测值95833、Gas304749、区块号26373均为文档示例值文档没有给出这些字段的固定预期也没有解释gas_sued的计算方式。验证投票与奖励cargo build ./target/debug/mind_sdk_deepseek --log-leveldebug --node-config-file./config/config_fvn.toml check-vote cargo build ./target/debug/mind_sdk_deepseek --log-leveldebug --node-config-file./config/config_fvn.toml check-vote-rewardscheck-vote的result字段返回 testnet 与 mainnet 两个区块浏览器地址用于查看该热钱包的投票交易历史帮助文本 “check voting tx history on the explore”完整 URL 见文档示例输出。check-vote-rewards查询投票奖励。文档给出两组示例未投票时status: false、result: 0note 中 voter wallet 为空、奖励为 0投票后status: truenote 中带上voter_wallet与非零vote_rewards。两组数值都是文档示例。限制与文档细节Gas文档明确 “need gas fee to vote”。本文只负责查余额文档没有给出充值方式故不展开。配置文件本仓库文档未展示config_fvn.toml的具体字段实际文件以 SDK 源码仓库为准如果克隆后的项目里没有该文件需要先到源码仓库确认本文不替它补字段。可执行路径CLI 帮助与 CLI Example 小节使用./bin/deepseekrun 小节使用cargo build产物./target/debug/mind_sdk_deepseek子命令集合一致。本文统一采用 run 小节的路径。作为 Rust 库引入时文档 Install 小节给出的依赖片段为mind_sdk_deepseek *原文缺少闭合引号CLI 流程不经过这一步。文档各条示例输出相互独立例如check-hot-wallet-address示例中的地址与register、deepseek-fhe-vote示例中的热钱包地址并不相同不要把它们当成同一份运行记录。【免费下载链接】awesome-deepseek-integrationIntegrate the DeepSeek API into popular software项目地址: https://gitcode.com/GitHub_Trending/aw/awesome-deepseek-integration创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考