Hash Time Locked Contract

v1.0.0

Enables trustless atomic swaps and escrow for inscriptions and NFTs on EVM chains using Hash Time Locked Contracts.

0· 518·0 current·0 all-time
MIT-0
Download zip
LicenseMIT-0 · Free to use, modify, and redistribute. No attribution required.
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
The included script implements HTLC operations (preimage generation, lock, reveal, status) consistent with the described purpose (atomic swaps for NFTs/inscriptions). Requiring a signing key (PRIVATE_KEY) and an RPC endpoint (BASE_ETH_RPC) is expected for on-chain operations. However, the registry metadata declares no required environment variables or primary credential — that's inconsistent with what the skill actually needs.
!
Instruction Scope
SKILL.md instructs installing deps and exporting PRIVATE_KEY and BASE_ETH_RPC, and the script will use those env vars to send transactions. The script prints sensitive secrets (preimage and preimageHash) to stdout and suggests sharing the preimage with the seller; printing and sharing secrets is expected for HTLC flows but also increases risk if an agent exfiltrates them. The README and SKILL.md claim a 24h timeout, but the trade() function sets timeout = 3600 (1 hour) — an inconsistent timeout expectation. SKILL.md also instructs installing 'viem' though the code only imports 'ethers'.
Install Mechanism
No install spec is provided and this is effectively an instruction-only skill with a bundled JS script. The package.json lists 'ethers' as a dependency; SKILL.md asks the user to run 'npm install ethers viem'. Nothing is downloaded from arbitrary URLs and there is no extraction of remote archives — low install risk. However, the mismatch between declared dependency usage (viem requested but unused) is sloppy.
!
Credentials
The script requires PRIVATE_KEY (to sign transactions) and an RPC endpoint (BASE_ETH_RPC) and optionally CONTRACT, but the skill metadata lists no required environment variables or primary credential. Asking for a raw private key is sensitive but functionally necessary for the intended use; the lack of declaration in metadata and the absence of guidance about safe key handling (e.g., using a hardware wallet or signing proxy) are concerning. The script will send transactions and can move funds controlled by the provided private key — that privilege is inherent but should be explicit in metadata and documentation.
Persistence & Privilege
The skill does not request always: true and does not modify other skills' configuration. It can be invoked by the agent (default), which is normal. There is no evidence the skill attempts to persist itself beyond its bundle.
What to consider before installing
This skill appears to implement legitimate HTLC operations, but exercise caution: - Do not supply a real private key to the skill or an autonomous agent without auditing and strong trust. The script requires PRIVATE_KEY and will sign/send transactions, which can move funds. - The registry metadata fails to declare required env vars (PRIVATE_KEY, BASE_ETH_RPC). Treat that as a red flag and prefer skills that explicitly declare sensitive requirements. - Timeout inconsistency: README claims 24h but the code uses a 1-hour timeout in the trade() flow. Verify the intended timeout and contract behavior before locking funds. - The script prints the preimage/secret to stdout and suggests sharing it; that is necessary for HTLC flow but makes secrets easy to exfiltrate. Avoid running this under an agent that can send external network requests or log outputs to remote services. - Verify the CONTRACT address on-chain (0xa7f9f88e753147d69baf8f2fef89a551680dbac1) and audit the on-chain contract code before trusting it. - Prefer using a signing service or hardware wallet rather than a raw PRIVATE_KEY in environment variables. If you must test, do so on a testnet with small amounts. Given these mismatches and missing declarations, review and correct metadata and code (especially env var declarations, timeout value, and guidance on safe key handling) before installing or running this skill with real funds.

Like a lobster shell, security has layers — review code before you run it.

latestvk976gh1d3j8k082t98yq8mfzds81ee7b

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

Comments