Skip to content
Back to skills

Htlc

ASecurity

"HTLC (Hash Time Locked Contract) trading for inscriptions and NFTs

  • 14 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 7, 2026
toolsrustbashnodegit

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 4 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill htlc --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Htlc?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Htlc
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-htlc/badge)](https://www.skillsdirectory.com/skills/modbender-htlc)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: htlc-trade
description: "HTLC (Hash Time Locked Contract) trading for inscriptions and NFTs
  on EVM chains. Use when: (1) Buying or selling inscriptions via atomic swap,
  (2) Trading NFTs peer-to-peer without intermediaries, (3) Setting up trustless
  escrow for any digital asset, (4) Implementing commit-reveal trading patterns.
  Supports Base, Ethereum, Arbitrum and other EVM chains."
---


# HTLC Trade

Atomic swap trading using Hash Time Locked Contracts.

## Quick Start

```bash
# Install dependencies
npm install ethers viem

# Set environment
export PRIVATE_KEY=0x...
export BASE_ETH_RPC=https://mainnet.base.org
```

## Commands

### Generate Preimage

```bash
node scripts/htlc.js preimage
```

### Lock Funds (Buyer)

```bash
node scripts/htlc.js lock <seller> <preimageHash> <timeout> <amountETH>
```

### Reveal (Seller)

```bash
node scripts/htlc.js reveal <lockHash> <preimage>
```

### Full Trade

```bash
node scripts/htlc.js trade <seller> <inscriptionTx> <amountETH>
```

## Contract

BaseTimelock: `0xa7f9f88e753147d69baf8f2fef89a551680dbac1`

## Flow

1. Seller generates preimage, shares hash + inscription
2. Buyer verifies inscription, calls lock() with ETH
3. Seller calls reveal() with preimage → ETH released
4. Buyer confirms receipt → trade complete

Files in this skill

  • README.md1.4 KB
  • SKILL.md1.3 KB
  • package.json658 B
  • scripts/htlc.js5.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…