运行时依赖
安装命令
点击复制技能文档
TyrPay Buyer 技能
Use this 技能 when an 代理 needs to act as the buyer in a TyrPay payment flow. It assumes the 运行time already has a 配置d BuyerSdk and 访问 to the @tyrpay/buyer-技能 工具 设置.
Quick 启动 安装 @tyrpay/buyer-技能, @tyrpay/buyer-sdk, and a storage adapter. Construct BuyerSdk with a 签名er, 设置tlement 添加ress, and storage adapter. Register 创建Buyer工具s(sdk) with your 工具-calling 运行time. Call tyrpay_ready before the first pAId 工作流. Use tyrpay_post_task for the default flow, or 创建Only: true plus tyrpay_fund_task for explicit control. When To Use The 代理 is responsible for creating and funding a TyrPay task. The 代理 must enforce buyer-side commitment expectations before payment is locked. The 代理 needs structured task 状态 that is safe to show to an end user. The buyer 工作流 must stay non-blocking and 恢复 清理ly after seller-响应 timeouts. 工作流 运行 tyrpay_ready to 验证 签名er and 提供者 connectivity. Call tyrpay_post_task. If you need explicit orchestration, 设置 创建Only: true. If the seller commitment already exists, call tyrpay_fund_task. Use tyrpay_检查_task or tyrpay_列出_tasks to 监控 进度. If proof submission or verification stalls past protocol timeouts, call tyrpay_refund_task. 工具ing Notes All 工具s reject malformed 输入s with structured Buyer技能工具Error errors. tyrpay_post_task returns timedOut: true instead of throwing when seller wAIt time expires after task creation. tyrpay_fund_task 验证s the commitment once, then funds without a second redundant 验证 pass. Buyer-facing 状态es include VERIFIED_PASS and VERIFIED_FAIL when a verification 报告 is avAIlable. Resources references/工具-reference.md for the 工具 contract and 状态 模型.