langchain - ✅(Solved) Fix Add TTTPoTTool for Proof-of-Time transaction attestation [2 pull requests, 5 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
langchain-ai/langchain#36005Fetched 2026-04-08 00:47:39
View on GitHub
Comments
5
Participants
3
Timeline
9
Reactions
0
Timeline (top)
commented ×5cross-referenced ×2closed ×1labeled ×1

Add TTTPoTTool and TTTPoTVerifyTool to langchain community tools for generating and verifying cryptographic temporal attestations on blockchain transactions.

Error Message

  • Full error handling with raise_for_status()

Root Cause

Add TTTPoTTool and TTTPoTVerifyTool to langchain community tools for generating and verifying cryptographic temporal attestations on blockchain transactions.

Fix Action

Fixed

PR fix notes

PR #36002: community: add TTTPoTTool for Proof-of-Time transaction attestation

Description (problem / solution / changelog)

Closes #36005

Summary

Adds TTTPoTTool and TTTPoTVerifyTool for generating and verifying cryptographic temporal attestations on blockchain transactions.

Motivation

When multiple AI agents compete for the same on-chain resource, ordering disputes are inevitable. TTT provides Byzantine-resistant proof of when a transaction was submitted, using 4 independent HTTPS time sources.

New tools

  • TTTPoTTool — Generate a PoT attestation before a transaction hits the chain
  • TTTPoTVerifyTool — Verify a PoT attestation after transaction confirms

Dependencies

  • httpx (already in langchain deps)

Links

Changed files

  • libs/langchain/langchain_classic/tools/ttt/__init__.py (added, +3/-0)
  • libs/langchain/langchain_classic/tools/ttt/ttt_pot_tool.py (added, +92/-0)
  • libs/langchain/tests/unit_tests/tools/ttt/__init__.py (added, +0/-0)
  • libs/langchain/tests/unit_tests/tools/ttt/test_ttt_pot_tool.py (added, +29/-0)

PR #36006: community: add TTTPoTTool for Proof-of-Time transaction attestation

Description (problem / solution / changelog)

Closes #36005

Summary

Adds TTTPoTTool and TTTPoTVerifyTool for generating and verifying cryptographic temporal attestations on blockchain transactions.

Motivation

When multiple AI agents compete for the same on-chain resource, ordering disputes are inevitable. TTT provides Byzantine-resistant proof of when a transaction was submitted, using 4 independent HTTPS time sources.

New tools

  • TTTPoTTool — Generate a PoT attestation before a transaction hits the chain
  • TTTPoTVerifyTool — Verify a PoT attestation after transaction confirms

Dependencies

  • httpx (already in langchain deps)

Links

Changed files

  • libs/langchain/langchain_classic/tools/ttt/__init__.py (added, +3/-0)
  • libs/langchain/langchain_classic/tools/ttt/ttt_pot_tool.py (added, +92/-0)
  • libs/langchain/tests/unit_tests/tools/ttt/__init__.py (added, +0/-0)
  • libs/langchain/tests/unit_tests/tools/ttt/test_ttt_pot_tool.py (added, +29/-0)
RAW_BUFFERClick to expand / collapse

Feature Request

Description

Add TTTPoTTool and TTTPoTVerifyTool to langchain community tools for generating and verifying cryptographic temporal attestations on blockchain transactions.

Motivation

When multiple AI agents compete for the same on-chain resource (DeFi trades, NFT mints, auction bids), ordering disputes are inevitable. No existing LangChain tool provides temporal proof of when an action was initiated.

TTT (TLS TimeToken) solves this by synthesizing time from 4 independent HTTPS sources (NIST, Apple, Google, Cloudflare) to produce a signed, tamper-evident timestamp.

Implementation

  • Two tools: TTTPoTTool (generate) + TTTPoTVerifyTool (verify)
  • Dependency: httpx (already in langchain)
  • MCP server URL configurable via TTT_MCP_URL env var
  • Full error handling with raise_for_status()

References

I have an implementation ready

PR with code + tests ready to submit once this issue is approved.

extent analysis

Fix Plan

To implement TTTPoTTool and TTTPoTVerifyTool, follow these steps:

  • Create a new Python module for the tools, e.g., tttpot_tools.py
  • Install the required dependency: httpx
  • Set up the MCP server URL configuration via the TTT_MCP_URL environment variable
  • Implement the TTTPoTTool class with a generate method to create a timestamp proof
  • Implement the TTTPoTVerifyTool class with a verify method to verify a timestamp proof

Example Code

import httpx
import os

class TTTPoTTool:
    def __init__(self, mcp_url):
        self.mcp_url = mcp_url

    def generate(self):
        # Synthesize time from 4 independent HTTPS sources
        responses = []
        for url in ["https://www.nist.gov", "https://www.apple.com", "https://www.google.com", "https://www.cloudflare.com"]:
            response = httpx.get(url)
            response.raise_for_status()
            responses.append(response.headers["Date"])

        # Create a signed, tamper-evident timestamp
        timestamp = ...
        # Implement timestamp creation logic here

        return timestamp

class TTTPoTVerifyTool:
    def __init__(self, mcp_url):
        self.mcp_url = mcp_url

    def verify(self, timestamp):
        # Verify the timestamp proof
        # Implement verification logic here
        pass

# Usage
mcp_url = os.environ["TTT_MCP_URL"]
tttpot_tool = TTTPoTTool(mcp_url)
timestamp = tttpot_tool.generate()

tttpot_verify_tool = TTTPoTVerifyTool(mcp_url)
tttpot_verify_tool.verify(timestamp)

Verification

To verify the fix, test the TTTPoTTool and TTTPoTVerifyTool classes with different inputs and edge cases. Ensure that the tools correctly generate and verify timestamp proofs.

Extra Tips

  • Handle errors and exceptions properly using raise_for_status() and try-except blocks.
  • Consider adding logging and monitoring to track the performance and usage of the tools.
  • Review the IETF Draft and OpenTTT documentation to ensure compliance with the TTT protocol.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

langchain - ✅(Solved) Fix Add TTTPoTTool for Proof-of-Time transaction attestation [2 pull requests, 5 comments, 3 participants]