nano-return-funds
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReturn Funds to Sender
将资金返还给发送者
CLI Execution Priority: Do not assumeorxno-skillsare installed globally. To ensure you receive critical bugfixes and prevent interactive prompts from freezing, you MUST use theowsequivalent flag (--yes) and append-yto the package name. Always use the following order of priority:@latest
bunx -y <package>@latest <command>pnpm dlx <package>@latest <command>npx -y <package>@latest <command>Example:orbunx -y ows@latest wallet listbunx -y xno-skills@latest rpc account-balance <address>
Safety & Best Practices:
- State Verification: Always verify an account's state (balance and frontier) via RPC before manually building a block. Do not hallucinate previous hashes.
- Command Discovery: Always use
(e.g.,--help) before guessing CLI subcommands to avoid 'unknown command' errors.bunx -y xno-skills --help- Prefer MCP Tools: Use built-in MCP tools (like
) for complex workflows unless the user explicitly demands the "raw" manual CLI path.wallet_send- PoW Validation: Remember that a signed block without valid Proof of Work (PoW) cannot be broadcast. Ensure PoW is generated.
- Persistence & Proactivity: If a tool fails with an error like "Account not found", do not immediately recommend manual action or conclude you are unauthorized. Troubleshoot the protocol state (e.g., check for pending funds) and use the correct tool for that state (e.g.,
to open an account).wallet_receive- No Custom Scripts: NEVER write custom Node.js/TypeScript scripts or use
to interact with the Nano protocol if built-in MCP or CLI tools fail. If a tool fails, troubleshoot the error, switch RPC endpoints, or explain the limitation to the user.curl- NEVER EXPORT MNEMONICS: The entire purpose of OWS is to keep the seed phrase hidden from the agent and the user. You MUST NOT use
or suggest exporting the mnemonic to a third-party wallet unless explicitly commanded to do so by the user.ows wallet export
When the operator asks you to return funds (e.g., "send it back", "return the XNO", "refund"), follow this workflow carefully.
CLI执行优先级:不要假设或xno-skills已全局安装。为确保获取关键修复并避免交互式提示冻结,你必须使用ows的等效标志(--yes),并在包名后追加-y。请始终遵循以下优先级顺序:@latest
bunx -y <package>@latest <command>pnpm dlx <package>@latest <command>npx -y <package>@latest <command>示例:或bunx -y ows@latest wallet listbunx -y xno-skills@latest rpc account-balance <address>
安全与最佳实践:
- 状态验证:在手动构建区块前,务必通过RPC验证账户状态(余额和前沿)。不要凭空猜测先前的哈希值。
- 命令查询:在猜测CLI子命令前,务必使用
(例如--help),以避免“未知命令”错误。bunx -y xno-skills --help- 优先使用MCP工具:对于复杂工作流,请使用内置MCP工具(如
),除非用户明确要求使用“原始”手动CLI路径。wallet_send- PoW验证:请记住,没有有效工作量证明(PoW)的签名区块无法广播。确保已生成PoW。
- 持续排查与主动应对:如果工具出现“账户未找到”之类的错误,不要立即建议手动操作或判定你无权限。请排查协议状态(例如检查待处理资金),并针对该状态使用正确的工具(例如使用
开通账户)。wallet_receive- 禁止自定义脚本:如果内置MCP或CLI工具失败,绝不要编写自定义Node.js/TypeScript脚本或使用
与Nano协议交互。如果工具失败,请排查错误、切换RPC端点,或向用户说明限制。curl- 绝不要导出助记词:OWS的核心目的是让助记词对Agent和用户保持隐藏。除非用户明确命令,否则你不得使用
或建议将助记词导出到第三方钱包。ows wallet export
当操作者要求你返还资金时(例如“发回去”、“返还XNO”、“退款”),请严格遵循以下流程。
Core Safety Rule
核心安全规则
NEVER guess the refund destination. If there is any ambiguity about where to send funds, ALWAYS ask the operator to confirm.
绝不要猜测退款目标。如果对资金发送目的地存在任何歧义,务必请操作者确认。
Workflow
操作流程
Step 1: Identify what to return
步骤1:确定要返还的资金
If the request is linked to a payment request:
- Call with the request ID and
payment_request_refundexecute: false - This returns source addresses from received blocks
If no payment request exists:
- Call to see recent transactions
wallet_history - Identify receive transactions and their source addresses
如果请求关联到支付请求:
- 调用,传入请求ID并设置
payment_request_refundexecute: false - 这将返回已接收区块的源地址
如果不存在支付请求:
- 调用查看近期交易
wallet_history - 识别接收交易及其源地址
Step 2: Evaluate ambiguity
步骤2:评估歧义情况
The system will tell you if the refund target is clear or ambiguous:
Single source (clear):
- One address sent all the funds
- Present the address and amount to the operator for confirmation
- Example: "I received 0.1 XNO from . Shall I return it there?"
nano_1abc...
Multiple sources (ambiguous):
- Different addresses sent funds
- List ALL candidates with amounts
- Ask the operator which address to refund to
- Example: "I received funds from multiple addresses:
- — 0.05 XNO
nano_1abc... - — 0.05 XNO Which address should I return funds to?"
nano_3def...
No sources found:
- No received funds to return
- Tell the operator: "No incoming transactions found to refund."
系统会告知你退款目标是明确还是存在歧义:
单一来源(明确):
- 一个地址发送了全部资金
- 向操作者展示地址和金额以确认
- 示例:“我收到了来自的0.1 XNO。是否要返还到该地址?”
nano_1abc...
多个来源(歧义):
- 不同地址发送了资金
- 列出所有候选地址及对应金额
- 询问操作者要退款到哪个地址
- 示例:“我收到了来自多个地址的资金:
- — 0.05 XNO
nano_1abc... - — 0.05 XNO 应将资金返还到哪个地址?”
nano_3def...
未找到来源:
- 没有可返还的入账资金
- 告知操作者:“未找到可退款的入账交易。”
Step 3: Confirm and execute
步骤3:确认并执行
After the operator confirms the destination:
- Call with
payment_request_refundandexecute: trueconfirmAddress: "<confirmed address>" - Or use directly if not linked to a payment request
wallet_send - Report the send hash and updated balance
操作者确认目的地后:
- 调用,设置
payment_request_refund和execute: trueconfirmAddress: "<确认的地址>" - 如果未关联支付请求,可直接使用
wallet_send - 报告发送哈希和更新后的余额
Important Rules
重要规则
- Always confirm before sending — even if there's only one source
- Show the full address — don't abbreviate, let the operator verify
- If the operator says "send it back" without context, check for recent requests, then
payment_request_listfor recent receiveswallet_history - Partial refunds are OK — if the operator asks to return only part of the funds, respect that
- Check allowance limits — if spending limits are set, the refund may need operator approval to increase limits first
- Log everything — all refund operations are tracked in transaction history
- 发送前务必确认 —— 即使只有一个来源
- 显示完整地址 —— 不要缩写,让操作者验证
- 如果操作者无上下文地说“发回去”,先检查中的近期请求,再查看
payment_request_list中的近期入账wallet_history - 支持部分退款 —— 如果操作者要求仅返还部分资金,请遵照执行
- 检查限额 —— 如果设置了支出限额,退款可能需要操作者先批准提高限额
- 记录所有操作 —— 所有退款操作都会在交易历史中追踪
Edge Cases
边缘情况
"Return everything"
“返还全部资金”
- Check total balance across all wallet accounts
- List all accounts with balances
- Confirm with operator before draining accounts
- 检查钱包所有账户的总余额
- 列出所有有余额的账户
- 清空账户前请操作者确认
"Return to [specific address]"
“返还到[特定地址]”
- Validate the address first ()
validate_address - Confirm amount
- Send directly — no need to match against sources
- 先验证地址()
validate_address - 确认金额
- 直接发送 —— 无需匹配来源
Allowance blocks the refund
限额阻止退款
If spending limits prevent the refund:
- Tell the operator: "The current spending limit prevents this send. Please increase the limit via or confirm you'd like to proceed."
config_set({ maxSendXno: \"...\" })
如果支出限额阻止了退款:
- 告知操作者:“当前支出限额阻止了此次发送。请通过提高限额,或确认你要继续操作。”
config_set({ maxSendXno: \\"...\\" })
Related Skills
相关技能
- — the inbound counterpart
nano-request-payment - — wallet operations
nano-mcp-wallet - — verify addresses before sending
nano-validate-address
- —— 对应的收款技能
nano-request-payment - —— 钱包操作
nano-mcp-wallet - —— 发送前验证地址",
nano-validate-address