{
  "schemaVersion": "1.0",
  "item": {
    "slug": "htlc",
    "name": "Hash Time Locked Contract",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/web4agent/htlc",
    "canonicalUrl": "https://clawhub.ai/web4agent/htlc",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/htlc",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=htlc",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "package.json",
      "README.md",
      "SKILL.md",
      "scripts/htlc.js"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/htlc"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/htlc",
    "agentPageUrl": "https://openagent3.xyz/skills/htlc/agent",
    "manifestUrl": "https://openagent3.xyz/skills/htlc/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/htlc/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "HTLC Trade",
        "body": "Atomic swap trading using Hash Time Locked Contracts."
      },
      {
        "title": "Quick Start",
        "body": "# Install dependencies\nnpm install ethers viem\n\n# Set environment\nexport PRIVATE_KEY=0x...\nexport BASE_ETH_RPC=https://mainnet.base.org"
      },
      {
        "title": "Generate Preimage",
        "body": "node scripts/htlc.js preimage"
      },
      {
        "title": "Lock Funds (Buyer)",
        "body": "node scripts/htlc.js lock <seller> <preimageHash> <timeout> <amountETH>"
      },
      {
        "title": "Reveal (Seller)",
        "body": "node scripts/htlc.js reveal <lockHash> <preimage>"
      },
      {
        "title": "Full Trade",
        "body": "node scripts/htlc.js trade <seller> <inscriptionTx> <amountETH>"
      },
      {
        "title": "Contract",
        "body": "BaseTimelock: 0xa7f9f88e753147d69baf8f2fef89a551680dbac1"
      },
      {
        "title": "Flow",
        "body": "Seller generates preimage, shares hash + inscription\nBuyer verifies inscription, calls lock() with ETH\nSeller calls reveal() with preimage → ETH released\nBuyer confirms receipt → trade complete"
      }
    ],
    "body": "HTLC Trade\n\nAtomic swap trading using Hash Time Locked Contracts.\n\nQuick Start\n# Install dependencies\nnpm install ethers viem\n\n# Set environment\nexport PRIVATE_KEY=0x...\nexport BASE_ETH_RPC=https://mainnet.base.org\n\nCommands\nGenerate Preimage\nnode scripts/htlc.js preimage\n\nLock Funds (Buyer)\nnode scripts/htlc.js lock <seller> <preimageHash> <timeout> <amountETH>\n\nReveal (Seller)\nnode scripts/htlc.js reveal <lockHash> <preimage>\n\nFull Trade\nnode scripts/htlc.js trade <seller> <inscriptionTx> <amountETH>\n\nContract\n\nBaseTimelock: 0xa7f9f88e753147d69baf8f2fef89a551680dbac1\n\nFlow\nSeller generates preimage, shares hash + inscription\nBuyer verifies inscription, calls lock() with ETH\nSeller calls reveal() with preimage → ETH released\nBuyer confirms receipt → trade complete"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/web4agent/htlc",
    "publisherUrl": "https://clawhub.ai/web4agent/htlc",
    "owner": "web4agent",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/htlc",
    "downloadUrl": "https://openagent3.xyz/downloads/htlc",
    "agentUrl": "https://openagent3.xyz/skills/htlc/agent",
    "manifestUrl": "https://openagent3.xyz/skills/htlc/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/htlc/agent.md"
  }
}