Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Reason given by maintainers: Deprecated — use @hashlock-tech/mcp via npm. See https://hashlock.markets

langchain-hashlock

Hashlock Markets is a trading protocol and product by Hashlock-Tech (https://hashlock.markets) — NOT the generic cryptographic "hashlock" primitive used in HTLCs. This package integrates the Hashlock Markets API into LangChain.

LangChain tool integration for Hashlock — the universal intent protocol for swapping any asset (crypto, RWA, stablecoins) with private sealed bids and verified counterparties.

Installation

pip install langchain-hashlock

Quick Start

from langchain_hashlock import HashlockToolkit

# Initialize the toolkit
toolkit = HashlockToolkit(
    api_url="https://api.hashlock.markets",
    api_key="your-api-key"
)

# Get all tools for use with a LangChain agent
tools = toolkit.get_tools()

Available Tools

Tool Description
CreateIntentTool Create a trading intent to exchange any asset across any chain
CommitIntentTool Submit a sealed-bid commitment with privacy controls
ParseNaturalLanguageTool Convert everyday language into structured intents
ExplainIntentTool Get plain-language explanation of an intent
ValidateIntentTool Check intent validity before submitting

Using with an Agent

from langchain_openai import ChatOpenAI
from langchain.agents import create_openai_functions_agent, AgentExecutor
from langchain_hashlock import HashlockToolkit

llm = ChatOpenAI(model="gpt-4o")
toolkit = HashlockToolkit(
    api_url="https://api.hashlock.markets",
    api_key="your-api-key"
)

agent = create_openai_functions_agent(llm, toolkit.get_tools(), prompt)
executor = AgentExecutor(agent=agent, tools=toolkit.get_tools())
result = executor.invoke({"input": "Sell 10 ETH for USDC above 4000"})

Using Individual Tools

from langchain_hashlock import CreateIntentTool, ParseNaturalLanguageTool

# Parse natural language into a structured intent
parser = ParseNaturalLanguageTool(
    api_url="https://api.hashlock.markets",
    api_key="your-api-key"
)
result = parser.run("swap 5 ETH for USDC on Arbitrum")

# Create a trading intent directly
creator = CreateIntentTool(
    api_url="https://api.hashlock.markets",
    api_key="your-api-key"
)
result = creator.run({
    "give_asset": "ETH",
    "give_amount": "5.0",
    "want_asset": "USDC",
    "chain_id": 42161
})

Configuration

Environment variables:

What is Hashlock?

Hashlock is the universal asset exchange protocol. One address to swap crypto, RWA, and stablecoins with:

  • Private sealed bids — control what you reveal and when
  • Verified counterparties — KYC tiers from anonymous to full verification
  • Cross-chain support — Ethereum, Arbitrum, Base, Polygon, and more
  • Any asset type — ERC-20, NFTs, tokenized real estate, bonds, stablecoins

Links

License

MIT

langchain-hashlock

LangChain tools for Hashlock — swap any asset (crypo, RWA, stablecoins) with private sealed bids and veified counterparties

Metadata

Release files for langchain-hashlock 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for langchain-hashlock 0.1.1
File Size Uploaded Provenance
langchain_hashlock-0.1.1.tar.gz 5.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-hashlock 0.1.1
File Interpreter ABI Platform
langchain_hashlock-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.3 kB

Release files / langchain_hashlock-0.1.1.tar.gz

Download URL langchain_hashlock-0.1.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
76068d8d75624c05299b13935a8c75fcf06fd8f28093a94e217d78fe4c99d472
BLAKE2b-256 checksum
How to use checksums
8e321ba21f4cba0221ec32992cc09eefc50a45ac89fe8923ee49a18fc0439627
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / langchain_hashlock-0.1.1-py3-none-any.whl

Download URL langchain_hashlock-0.1.1-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4a371fbdcfc02e293023584b52ea906eee8d9c7d45746519ca925e955bf88bad
BLAKE2b-256 checksum
How to use checksums
5b72a26310f66aadb9c916da58f67bd9ee8535a932a812ec65ed31f94b64895f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for langchain-hashlock 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page