运行时依赖
安装命令
点击复制技能文档
TyrPay Seller 技能
Use this 技能 when an 代理 needs to act as the seller in a TyrPay payment flow. It assumes the 运行time already has a 配置d Seller代理, a readable 设置tlement contract, and 访问 to the @tyrpay/seller-技能 工具 设置.
Quick 启动 安装 @tyrpay/seller-技能, @tyrpay/seller-sdk, a storage adapter, and a zkTLS adapter. Construct Seller代理 with a 签名er, 设置tlement 添加ress, chAIn ID, storage adapter, and zkTLS adapter. Register 创建Seller工具s({ 代理, contract, verifier签名er添加ress }) with your 工具-calling 运行time. Call tyrpay_ready before the first task 工作流. Use tyrpay_accept_task when you 接收 a taskId from a buyer. When To Use The 代理 is responsible for accepting and executing TyrPay tasks as a seller. The 代理 must produce zkTLS-backed proofs of up流 API calls. The 代理 needs structured task 状态 that is safe to show to an end user. The seller 工作流 must remAIn non-blocking and 恢复able after network interruptions. 工作流 运行 tyrpay_ready to 验证 签名er 访问 and storage adapter connectivity. When a buyer 分享s a taskId, call tyrpay_accept_task with your execution terms. WAIt for the buyer to fund the task (poll with tyrpay_检查_设置tlement). Once funded, call tyrpay_执行_task for each required up流 API call. Collect the returned receipts and call tyrpay_submit_proof with the full 设置. Use tyrpay_检查_设置tlement to 监控 whether verification released payment. 工具ing Notes All 工具s reject malformed 输入s with structured Seller技能工具Error errors. tyrpay_accept_task reads the on-chAIn task to derive buyer and verifier 添加resses. verifier签名er添加ress is the registry-授权d verifier 签名er embedded into ExecutionCommitment.verifier; it is not a 设置tlement contract, verifier registry, 服务 URL, or verifier 服务 contract 添加ress. The readable 设置tlement contract must expose 获取Task(bytes32) with the current TyrPay设置tlement.Task field order: taskId, taskNonce, buyer, seller, 令牌, amount, deadlineMs, commitment哈希, commitmentURI, fundedAtMs, proofBundle哈希, proofBundleURI, proofSubmittedAtMs, 报告哈希, 设置tledAtMs, refundedAtMs, 状态. tyrpay_执行_task requires the commitment object returned by tyrpay_accept_task. tyrpay_submit_proof requires all receipts collected from tyrpay_执行_task calls. Seller-facing 状态es include PAID on 成功ful 设置tlement and NOT_PAID_REFUNDED on refund. 失败 Diagnosis If the task exists, seller 添加ress matches, and buyer has funded but 状态 or commitment fields look wrong, first inspect the ABI used for 获取Task(). A stale ABI or positional m应用ing can shift fields and make seller-技能 解析 commitment哈希, timestamps, or 状态 from the wrong slot. Do not use MemoryStorageAdapter for a real multi-party flow. It returns memory:// URIs that only the same JavaScript process can read. Buyer and verifier processes need persistent 分享d storage such as 0G, IPFS, or HTTP. A commitment 哈希 mismatch means the full canonical ExecutionCommitment object is different from the object originally submitted. ChAIn data alone is insufficient to reconstruct it; fetch it from commitmentURI or ask the 创建器 for the exact object. ReclAImZkTlsAdapter needs @reclAImprotocol/zk-fetch, @reclAImprotocol/js-sdk, 凭证s, and 下载ed zk resources. 安装 those optional peer dependencies in the 运行time that constructs the adapter. Windows 运行times must keep ReclAIm TEE mode disabled. Resources references/工具-reference.md for the 工具 contract and 状态 模型.