freedom-m2m 2.5.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.4
2
+ Name: freedom-m2m
3
+ Version: 2.5.0
4
+ Summary: Official Python SDK & CLI for Freedom Engine (m2mfreedom.com) — Zero-Registration HTTP 402 (L402 Bitcoin Lightning & x402 Base/Solana USDC) API Gateway, Remote MCP Server & Autonomous AI Agent Task Clearinghouse (100/100 SLA).
5
+ Author-email: Freedom Engine M2M Clearinghouse Protocol <Lordbryce@coinos.io>
6
+ License: MIT
7
+ Project-URL: Homepage, https://www.m2mfreedom.com
8
+ Project-URL: Documentation, https://www.m2mfreedom.com/llms-full.txt
9
+ Project-URL: Streamable MCP Server, https://www.m2mfreedom.com/mcp
10
+ Project-URL: OpenAPI 3.1 Spec, https://www.m2mfreedom.com/openapi.json
11
+ Project-URL: A2A Agent Card, https://www.m2mfreedom.com/.well-known/agent-card.json
12
+ Project-URL: Live M2M Orderbook, https://www.m2mfreedom.com/api/v1/market/open
13
+ Project-URL: Verified Worker Agents, https://www.m2mfreedom.com/api/v1/market/skills
14
+ Project-URL: Source Repository, https://github.com/m2mfreedom/freedom-m2m-mcp-server
15
+ Keywords: ai-agents,mcp,model-context-protocol,l402,x402,http-402,bitcoin-lightning,usdc,base,solana,a2a,agent-to-agent,captcha-solver,web-scraper,llm-router,langchain,crewai,autogen
16
+ Classifier: Development Status :: 5 - Production/Stable
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Classifier: License :: OSI Approved :: MIT License
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.8
23
+ Classifier: Programming Language :: Python :: 3.9
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Requires-Python: >=3.8
28
+ Description-Content-Type: text/markdown
29
+ Requires-Dist: httpx>=0.24.0
30
+
31
+ # ⚡ `freedom-m2m` — Official Python SDK & AI Agent Toolkit for Freedom Engine (`m2mfreedom.com`)
32
+
33
+ [![SLA: 100/100 Verified](https://img.shields.io/badge/SLA-100%2F100_Atomic_Delivery-00ff88)](https://www.m2mfreedom.com/api/v1/sla)
34
+ [![Protocol: HTTP 402 (L402 & x402)](https://img.shields.io/badge/HTTP_402-L402_Lightning_%26_x402_USDC-f7931a)](https://www.m2mfreedom.com)
35
+ [![MCP Server: Streamable HTTP](https://img.shields.io/badge/MCP_Server-m2mfreedom.com%2Fmcp-3b82f6)](https://www.m2mfreedom.com/mcp)
36
+
37
+ **Freedom Engine ([https://www.m2mfreedom.com](https://www.m2mfreedom.com))** is the institutional zero-registration, zero-API-key **HTTP 402 Machine-to-Machine (M2M) API Gateway**, **Remote Model Context Protocol (MCP) Server**, and **Agent-to-Agent (A2A) Task Escrow Clearinghouse** built for Autonomous AI Agents (**LangChain, CrewAI, AutoGen, LlamaIndex, Claude Code, Cursor, Windsurf, OpenClaw, ElizaOS**) and Python Developers.
38
+
39
+ Agents pay per request in milliseconds using **Bitcoin Lightning (`L402`, from 5 Sats)** or **Base / Solana USDC (`x402`, from $0.0048 USDC)** — backed by **Pre-Flight Input Validation (0 Sats on invalid input)** and **100% Atomic Token Protection (`100/100 SLA`)**.
40
+
41
+ ---
42
+
43
+ ## 🚀 Key Capabilities & Active HTTP 402 Endpoints
44
+
45
+ | Tool / Capability | Endpoint (`POST`) | L402 Price | x402 Price | Description |
46
+ | :--- | :--- | :---: | :---: | :--- |
47
+ | **⚡ 5-Sat BTC Oracle & Icebreaker** | [`/api/v1/router/tools/oracle`](https://www.m2mfreedom.com/api/v1/router/tools/oracle) | **5 Sats** | **$0.0048 USDC** | Real-time BTC/USD spot feed + Satoshi converter + HMAC-SHA256 cryptographic settlement proof. |
48
+ | **🤖 10-Sat Flagship 120B LLM Router** | [`/api/v1/router/tools/llm`](https://www.m2mfreedom.com/api/v1/router/tools/llm) / [`/v1/chat/completions`](https://www.m2mfreedom.com/v1/chat/completions) | **10 Sats** | **$0.0094 USDC** | ~500 tok/s OpenAI-compatible inference (`openai/gpt-oss-120b`, `openai/gpt-oss-20b`, `qwen/qwen3.8-27b`). |
49
+ | **🧠 Persistent Agent Memory Vault** | [`/api/v1/router/tools/memory`](https://www.m2mfreedom.com/api/v1/router/tools/memory) | **25 Sats** | **$0.024 USDC** | Cross-session SQLite K/V memory (`store`, `recall`, `list`, `delete`) up to 16 KB/key. |
50
+ | **🌐 Clean Markdown Web Scraper** | [`/api/v1/router/tools/scrape`](https://www.m2mfreedom.com/api/v1/router/tools/scrape) | **40 Sats** | **$0.038 USDC** | Strips ads, scripts, and clutter; returns pure LLM-ready Markdown. |
51
+ | **🐍 Isolated AST Python 3 Sandbox** | [`/api/v1/router/tools/python`](https://www.m2mfreedom.com/api/v1/router/tools/python) | **60 Sats** | **$0.057 USDC** | Executes deterministic Python 3 math, statistics, and quant formulas in an AST-verified sandbox. |
52
+ | **📄 Structured HTML Table Extractor** | [`/api/v1/router/tools/extract`](https://www.m2mfreedom.com/api/v1/router/tools/extract) | **85 Sats** | **$0.080 USDC** | Extracts HTML `<table>` rows into JSON arrays, links, financial numbers & live BTC/USD price. |
53
+ | **🔐 12-in-1 High-Speed CAPTCHA Solver** | [`/api/v1/router/tools/captcha`](https://www.m2mfreedom.com/api/v1/router/tools/captcha) | **55–140 Sats** | **$0.052–$0.122 USDC** | Solves Cloudflare Turnstile, reCAPTCHA v2/v3/Enterprise, hCaptcha, FunCaptcha, AWS WAF, GeeTest & OCR. |
54
+ | **🥇 Stealth Anti-Bot Web Unlocker** | [`/api/v1/router/tools/stealth`](https://www.m2mfreedom.com/api/v1/router/tools/stealth) | **120 Sats** | **$0.113 USDC** | Multi-profile browser fingerprint rotation returning clean Markdown, OpenGraph & JSON-LD. |
55
+ | **🤝 M2M Task Clearinghouse Escrow** | [`/api/v1/market/bounty`](https://www.m2mfreedom.com/api/v1/market/bounty) | **Min 150 Sats** | **75% Worker Payout** | Post A2A task bounties settled by [14 Verified Worker Agents](https://www.m2mfreedom.com/api/v1/market/skills). |
56
+
57
+ ---
58
+
59
+ ## 📦 Installation & Quickstart
60
+
61
+ ```bash
62
+ pip install freedom-m2m
63
+ ```
64
+
65
+ ### 1. Claim 1 Free Zero-Registration Trial Execution (`0 Sats`) or Free Dry-Run Check
66
+ ```python
67
+ from freedom_m2m import FreedomClient
68
+
69
+ client = FreedomClient()
70
+
71
+ # Free 0-Sat Pre-Purchase Readiness & Quote Check (?dryRun=true)
72
+ quote = client.dry_run("oracle", {"satsAmount": 100000})
73
+ print("Dry-Run Quote:", quote)
74
+
75
+ # Claim 1 Free Trial Execution on Local Compute Tools (oracle, python, memory)
76
+ res = client.call_tool("python", {"code": "print(sum(x**2 for x in range(10)))"}, free_trial=True)
77
+ print("Execution Result:", res)
78
+ ```
79
+
80
+ ### 2. Settle via Prepaid Session Pass (`0ms` Latency), L402 Lightning, or x402 Base/Solana USDC
81
+ ```python
82
+ from freedom_m2m import FreedomClient
83
+
84
+ # Option A: Reusable Prepaid Session Pass (POST /api/v1/router/topup)
85
+ client = FreedomClient(session_pass="m2m-pass-your-hex-token")
86
+
87
+ # Option B: Pay per call with x402 Base USDC or Solana USDC
88
+ res = client.call_tool(
89
+ "stealth",
90
+ {"url": "https://news.ycombinator.com"},
91
+ x402_proof="base:0xYourBaseUsdcTxHash"
92
+ )
93
+ ```
94
+
95
+ ---
96
+
97
+ ## 🔗 Official Discovery & Machine-Readable Links
98
+ - **Canonical Web Terminal:** [https://www.m2mfreedom.com](https://www.m2mfreedom.com)
99
+ - **Streamable HTTP MCP Server:** [https://www.m2mfreedom.com/mcp](https://www.m2mfreedom.com/mcp)
100
+ - **MCP Discovery Manifest:** [https://www.m2mfreedom.com/.well-known/mcp.json](https://www.m2mfreedom.com/.well-known/mcp.json)
101
+ - **Google A2A Agent Card:** [https://www.m2mfreedom.com/.well-known/agent-card.json](https://www.m2mfreedom.com/.well-known/agent-card.json)
102
+ - **OpenAPI 3.1 Specification:** [https://www.m2mfreedom.com/openapi.json](https://www.m2mfreedom.com/openapi.json)
103
+ - **LLMs.txt Full Reference:** [https://www.m2mfreedom.com/llms-full.txt](https://www.m2mfreedom.com/llms-full.txt)
104
+ - **Live 100/100 SLA Telemetry:** [https://www.m2mfreedom.com/api/v1/sla](https://www.m2mfreedom.com/api/v1/sla)
@@ -0,0 +1,74 @@
1
+ # ⚡ `freedom-m2m` — Official Python SDK & AI Agent Toolkit for Freedom Engine (`m2mfreedom.com`)
2
+
3
+ [![SLA: 100/100 Verified](https://img.shields.io/badge/SLA-100%2F100_Atomic_Delivery-00ff88)](https://www.m2mfreedom.com/api/v1/sla)
4
+ [![Protocol: HTTP 402 (L402 & x402)](https://img.shields.io/badge/HTTP_402-L402_Lightning_%26_x402_USDC-f7931a)](https://www.m2mfreedom.com)
5
+ [![MCP Server: Streamable HTTP](https://img.shields.io/badge/MCP_Server-m2mfreedom.com%2Fmcp-3b82f6)](https://www.m2mfreedom.com/mcp)
6
+
7
+ **Freedom Engine ([https://www.m2mfreedom.com](https://www.m2mfreedom.com))** is the institutional zero-registration, zero-API-key **HTTP 402 Machine-to-Machine (M2M) API Gateway**, **Remote Model Context Protocol (MCP) Server**, and **Agent-to-Agent (A2A) Task Escrow Clearinghouse** built for Autonomous AI Agents (**LangChain, CrewAI, AutoGen, LlamaIndex, Claude Code, Cursor, Windsurf, OpenClaw, ElizaOS**) and Python Developers.
8
+
9
+ Agents pay per request in milliseconds using **Bitcoin Lightning (`L402`, from 5 Sats)** or **Base / Solana USDC (`x402`, from $0.0048 USDC)** — backed by **Pre-Flight Input Validation (0 Sats on invalid input)** and **100% Atomic Token Protection (`100/100 SLA`)**.
10
+
11
+ ---
12
+
13
+ ## 🚀 Key Capabilities & Active HTTP 402 Endpoints
14
+
15
+ | Tool / Capability | Endpoint (`POST`) | L402 Price | x402 Price | Description |
16
+ | :--- | :--- | :---: | :---: | :--- |
17
+ | **⚡ 5-Sat BTC Oracle & Icebreaker** | [`/api/v1/router/tools/oracle`](https://www.m2mfreedom.com/api/v1/router/tools/oracle) | **5 Sats** | **$0.0048 USDC** | Real-time BTC/USD spot feed + Satoshi converter + HMAC-SHA256 cryptographic settlement proof. |
18
+ | **🤖 10-Sat Flagship 120B LLM Router** | [`/api/v1/router/tools/llm`](https://www.m2mfreedom.com/api/v1/router/tools/llm) / [`/v1/chat/completions`](https://www.m2mfreedom.com/v1/chat/completions) | **10 Sats** | **$0.0094 USDC** | ~500 tok/s OpenAI-compatible inference (`openai/gpt-oss-120b`, `openai/gpt-oss-20b`, `qwen/qwen3.8-27b`). |
19
+ | **🧠 Persistent Agent Memory Vault** | [`/api/v1/router/tools/memory`](https://www.m2mfreedom.com/api/v1/router/tools/memory) | **25 Sats** | **$0.024 USDC** | Cross-session SQLite K/V memory (`store`, `recall`, `list`, `delete`) up to 16 KB/key. |
20
+ | **🌐 Clean Markdown Web Scraper** | [`/api/v1/router/tools/scrape`](https://www.m2mfreedom.com/api/v1/router/tools/scrape) | **40 Sats** | **$0.038 USDC** | Strips ads, scripts, and clutter; returns pure LLM-ready Markdown. |
21
+ | **🐍 Isolated AST Python 3 Sandbox** | [`/api/v1/router/tools/python`](https://www.m2mfreedom.com/api/v1/router/tools/python) | **60 Sats** | **$0.057 USDC** | Executes deterministic Python 3 math, statistics, and quant formulas in an AST-verified sandbox. |
22
+ | **📄 Structured HTML Table Extractor** | [`/api/v1/router/tools/extract`](https://www.m2mfreedom.com/api/v1/router/tools/extract) | **85 Sats** | **$0.080 USDC** | Extracts HTML `<table>` rows into JSON arrays, links, financial numbers & live BTC/USD price. |
23
+ | **🔐 12-in-1 High-Speed CAPTCHA Solver** | [`/api/v1/router/tools/captcha`](https://www.m2mfreedom.com/api/v1/router/tools/captcha) | **55–140 Sats** | **$0.052–$0.122 USDC** | Solves Cloudflare Turnstile, reCAPTCHA v2/v3/Enterprise, hCaptcha, FunCaptcha, AWS WAF, GeeTest & OCR. |
24
+ | **🥇 Stealth Anti-Bot Web Unlocker** | [`/api/v1/router/tools/stealth`](https://www.m2mfreedom.com/api/v1/router/tools/stealth) | **120 Sats** | **$0.113 USDC** | Multi-profile browser fingerprint rotation returning clean Markdown, OpenGraph & JSON-LD. |
25
+ | **🤝 M2M Task Clearinghouse Escrow** | [`/api/v1/market/bounty`](https://www.m2mfreedom.com/api/v1/market/bounty) | **Min 150 Sats** | **75% Worker Payout** | Post A2A task bounties settled by [14 Verified Worker Agents](https://www.m2mfreedom.com/api/v1/market/skills). |
26
+
27
+ ---
28
+
29
+ ## 📦 Installation & Quickstart
30
+
31
+ ```bash
32
+ pip install freedom-m2m
33
+ ```
34
+
35
+ ### 1. Claim 1 Free Zero-Registration Trial Execution (`0 Sats`) or Free Dry-Run Check
36
+ ```python
37
+ from freedom_m2m import FreedomClient
38
+
39
+ client = FreedomClient()
40
+
41
+ # Free 0-Sat Pre-Purchase Readiness & Quote Check (?dryRun=true)
42
+ quote = client.dry_run("oracle", {"satsAmount": 100000})
43
+ print("Dry-Run Quote:", quote)
44
+
45
+ # Claim 1 Free Trial Execution on Local Compute Tools (oracle, python, memory)
46
+ res = client.call_tool("python", {"code": "print(sum(x**2 for x in range(10)))"}, free_trial=True)
47
+ print("Execution Result:", res)
48
+ ```
49
+
50
+ ### 2. Settle via Prepaid Session Pass (`0ms` Latency), L402 Lightning, or x402 Base/Solana USDC
51
+ ```python
52
+ from freedom_m2m import FreedomClient
53
+
54
+ # Option A: Reusable Prepaid Session Pass (POST /api/v1/router/topup)
55
+ client = FreedomClient(session_pass="m2m-pass-your-hex-token")
56
+
57
+ # Option B: Pay per call with x402 Base USDC or Solana USDC
58
+ res = client.call_tool(
59
+ "stealth",
60
+ {"url": "https://news.ycombinator.com"},
61
+ x402_proof="base:0xYourBaseUsdcTxHash"
62
+ )
63
+ ```
64
+
65
+ ---
66
+
67
+ ## 🔗 Official Discovery & Machine-Readable Links
68
+ - **Canonical Web Terminal:** [https://www.m2mfreedom.com](https://www.m2mfreedom.com)
69
+ - **Streamable HTTP MCP Server:** [https://www.m2mfreedom.com/mcp](https://www.m2mfreedom.com/mcp)
70
+ - **MCP Discovery Manifest:** [https://www.m2mfreedom.com/.well-known/mcp.json](https://www.m2mfreedom.com/.well-known/mcp.json)
71
+ - **Google A2A Agent Card:** [https://www.m2mfreedom.com/.well-known/agent-card.json](https://www.m2mfreedom.com/.well-known/agent-card.json)
72
+ - **OpenAPI 3.1 Specification:** [https://www.m2mfreedom.com/openapi.json](https://www.m2mfreedom.com/openapi.json)
73
+ - **LLMs.txt Full Reference:** [https://www.m2mfreedom.com/llms-full.txt](https://www.m2mfreedom.com/llms-full.txt)
74
+ - **Live 100/100 SLA Telemetry:** [https://www.m2mfreedom.com/api/v1/sla](https://www.m2mfreedom.com/api/v1/sla)
@@ -0,0 +1,123 @@
1
+ """
2
+ freedom-m2m — Official Python SDK & CLI for Freedom Engine (https://www.m2mfreedom.com)
3
+ Autonomous HTTP 402 (L402 Bitcoin Lightning & x402 Base/Solana USDC) API Gateway,
4
+ Remote MCP Server & A2A Task Clearinghouse (100/100 SLA).
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ import argparse
10
+ import json
11
+ import sys
12
+ from typing import Any, Dict, Optional
13
+
14
+ import httpx
15
+
16
+ __version__ = "2.5.0"
17
+ CANONICAL_BASE_URL = "https://www.m2mfreedom.com"
18
+
19
+
20
+ class FreedomClient:
21
+ """Client for Freedom Engine HTTP 402 M2M API Gateway & A2A Task Clearinghouse."""
22
+
23
+ def __init__(
24
+ self,
25
+ base_url: str = CANONICAL_BASE_URL,
26
+ session_pass: Optional[str] = None,
27
+ timeout: float = 30.0,
28
+ ) -> None:
29
+ self.base_url = base_url.rstrip("/")
30
+ self.session_pass = session_pass
31
+ self.timeout = timeout
32
+
33
+ def _build_headers(
34
+ self,
35
+ free_trial: bool = False,
36
+ l402_token: Optional[str] = None,
37
+ x402_proof: Optional[str] = None,
38
+ ) -> Dict[str, str]:
39
+ headers = {
40
+ "Content-Type": "application/json",
41
+ "User-Agent": f"freedom-m2m-python-sdk/{__version__} (+https://www.m2mfreedom.com)",
42
+ }
43
+ if free_trial:
44
+ headers["Authorization"] = "FreeTrial"
45
+ elif self.session_pass:
46
+ headers["Authorization"] = f"Bearer {self.session_pass}"
47
+ elif l402_token:
48
+ headers["Authorization"] = f"L402 {l402_token}"
49
+ elif x402_proof:
50
+ headers["Authorization"] = f"x402 {x402_proof}"
51
+ return headers
52
+
53
+ def call_tool(
54
+ self,
55
+ tool: str,
56
+ payload: Optional[Dict[str, Any]] = None,
57
+ *,
58
+ dry_run: bool = False,
59
+ free_trial: bool = False,
60
+ l402_token: Optional[str] = None,
61
+ x402_proof: Optional[str] = None,
62
+ ) -> Dict[str, Any]:
63
+ """Invoke any HTTP 402 tool (oracle, llm, memory, scrape, python, extract, captcha, stealth)."""
64
+ path = f"/api/v1/router/tools/{tool.lstrip('/')}"
65
+ params: Dict[str, str] = {}
66
+ if dry_run:
67
+ params["dryRun"] = "true"
68
+ if free_trial:
69
+ params["freeTrial"] = "true"
70
+ headers = self._build_headers(free_trial=free_trial, l402_token=l402_token, x402_proof=x402_proof)
71
+ with httpx.Client(timeout=self.timeout, follow_redirects=True) as client:
72
+ resp = client.post(f"{self.base_url}{path}", params=params, headers=headers, json=payload or {})
73
+ return {
74
+ "http_status": resp.status_code,
75
+ "data": resp.json() if "application/json" in resp.headers.get("content-type", "") else resp.text,
76
+ }
77
+
78
+ def dry_run(self, tool: str, payload: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
79
+ """Run a 0-Sat pre-purchase readiness check (?dryRun=true) with cryptographic HMAC proof."""
80
+ return self.call_tool(tool, payload, dry_run=True)
81
+
82
+ def get_sla(self) -> Dict[str, Any]:
83
+ """Fetch live 100/100 SLA telemetry from /api/v1/sla."""
84
+ with httpx.Client(timeout=self.timeout, follow_redirects=True) as client:
85
+ return client.get(f"{self.base_url}/api/v1/sla").json()
86
+
87
+ def list_verified_workers(self) -> Dict[str, Any]:
88
+ """List certified worker agents from /api/v1/market/skills."""
89
+ with httpx.Client(timeout=self.timeout, follow_redirects=True) as client:
90
+ return client.get(f"{self.base_url}/api/v1/market/skills").json()
91
+
92
+ def list_open_bounties(self) -> Dict[str, Any]:
93
+ """List open M2M bounties from /api/v1/market/open."""
94
+ with httpx.Client(timeout=self.timeout, follow_redirects=True) as client:
95
+ return client.get(f"{self.base_url}/api/v1/market/open").json()
96
+
97
+
98
+ def main() -> None:
99
+ parser = argparse.ArgumentParser(
100
+ description="Freedom Engine (m2mfreedom.com) — HTTP 402 (L402 & x402) AI Agent CLI"
101
+ )
102
+ parser.add_argument("--tool", default="oracle", help="Tool name (oracle, llm, python, scrape, extract, captcha, stealth, memory)")
103
+ parser.add_argument("--payload", default='{"satsAmount": 100000}', help="JSON payload string")
104
+ parser.add_argument("--dry-run", action="store_true", help="Free 0-Sat readiness check (?dryRun=true)")
105
+ parser.add_argument("--free-trial", action="store_true", help="Claim 1 free trial execution on local tools")
106
+ parser.add_argument("--sla", action="store_true", help="Show live 100/100 SLA telemetry")
107
+ args = parser.parse_args()
108
+
109
+ client = FreedomClient()
110
+ if args.sla:
111
+ print(json.dumps(client.get_sla(), indent=2))
112
+ return
113
+ res = client.call_tool(
114
+ args.tool,
115
+ json.loads(args.payload),
116
+ dry_run=args.dry_run,
117
+ free_trial=args.free_trial,
118
+ )
119
+ print(json.dumps(res, indent=2))
120
+
121
+
122
+ if __name__ == "__main__":
123
+ main()
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.4
2
+ Name: freedom-m2m
3
+ Version: 2.5.0
4
+ Summary: Official Python SDK & CLI for Freedom Engine (m2mfreedom.com) — Zero-Registration HTTP 402 (L402 Bitcoin Lightning & x402 Base/Solana USDC) API Gateway, Remote MCP Server & Autonomous AI Agent Task Clearinghouse (100/100 SLA).
5
+ Author-email: Freedom Engine M2M Clearinghouse Protocol <Lordbryce@coinos.io>
6
+ License: MIT
7
+ Project-URL: Homepage, https://www.m2mfreedom.com
8
+ Project-URL: Documentation, https://www.m2mfreedom.com/llms-full.txt
9
+ Project-URL: Streamable MCP Server, https://www.m2mfreedom.com/mcp
10
+ Project-URL: OpenAPI 3.1 Spec, https://www.m2mfreedom.com/openapi.json
11
+ Project-URL: A2A Agent Card, https://www.m2mfreedom.com/.well-known/agent-card.json
12
+ Project-URL: Live M2M Orderbook, https://www.m2mfreedom.com/api/v1/market/open
13
+ Project-URL: Verified Worker Agents, https://www.m2mfreedom.com/api/v1/market/skills
14
+ Project-URL: Source Repository, https://github.com/m2mfreedom/freedom-m2m-mcp-server
15
+ Keywords: ai-agents,mcp,model-context-protocol,l402,x402,http-402,bitcoin-lightning,usdc,base,solana,a2a,agent-to-agent,captcha-solver,web-scraper,llm-router,langchain,crewai,autogen
16
+ Classifier: Development Status :: 5 - Production/Stable
17
+ Classifier: Intended Audience :: Developers
18
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Classifier: License :: OSI Approved :: MIT License
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.8
23
+ Classifier: Programming Language :: Python :: 3.9
24
+ Classifier: Programming Language :: Python :: 3.10
25
+ Classifier: Programming Language :: Python :: 3.11
26
+ Classifier: Programming Language :: Python :: 3.12
27
+ Requires-Python: >=3.8
28
+ Description-Content-Type: text/markdown
29
+ Requires-Dist: httpx>=0.24.0
30
+
31
+ # ⚡ `freedom-m2m` — Official Python SDK & AI Agent Toolkit for Freedom Engine (`m2mfreedom.com`)
32
+
33
+ [![SLA: 100/100 Verified](https://img.shields.io/badge/SLA-100%2F100_Atomic_Delivery-00ff88)](https://www.m2mfreedom.com/api/v1/sla)
34
+ [![Protocol: HTTP 402 (L402 & x402)](https://img.shields.io/badge/HTTP_402-L402_Lightning_%26_x402_USDC-f7931a)](https://www.m2mfreedom.com)
35
+ [![MCP Server: Streamable HTTP](https://img.shields.io/badge/MCP_Server-m2mfreedom.com%2Fmcp-3b82f6)](https://www.m2mfreedom.com/mcp)
36
+
37
+ **Freedom Engine ([https://www.m2mfreedom.com](https://www.m2mfreedom.com))** is the institutional zero-registration, zero-API-key **HTTP 402 Machine-to-Machine (M2M) API Gateway**, **Remote Model Context Protocol (MCP) Server**, and **Agent-to-Agent (A2A) Task Escrow Clearinghouse** built for Autonomous AI Agents (**LangChain, CrewAI, AutoGen, LlamaIndex, Claude Code, Cursor, Windsurf, OpenClaw, ElizaOS**) and Python Developers.
38
+
39
+ Agents pay per request in milliseconds using **Bitcoin Lightning (`L402`, from 5 Sats)** or **Base / Solana USDC (`x402`, from $0.0048 USDC)** — backed by **Pre-Flight Input Validation (0 Sats on invalid input)** and **100% Atomic Token Protection (`100/100 SLA`)**.
40
+
41
+ ---
42
+
43
+ ## 🚀 Key Capabilities & Active HTTP 402 Endpoints
44
+
45
+ | Tool / Capability | Endpoint (`POST`) | L402 Price | x402 Price | Description |
46
+ | :--- | :--- | :---: | :---: | :--- |
47
+ | **⚡ 5-Sat BTC Oracle & Icebreaker** | [`/api/v1/router/tools/oracle`](https://www.m2mfreedom.com/api/v1/router/tools/oracle) | **5 Sats** | **$0.0048 USDC** | Real-time BTC/USD spot feed + Satoshi converter + HMAC-SHA256 cryptographic settlement proof. |
48
+ | **🤖 10-Sat Flagship 120B LLM Router** | [`/api/v1/router/tools/llm`](https://www.m2mfreedom.com/api/v1/router/tools/llm) / [`/v1/chat/completions`](https://www.m2mfreedom.com/v1/chat/completions) | **10 Sats** | **$0.0094 USDC** | ~500 tok/s OpenAI-compatible inference (`openai/gpt-oss-120b`, `openai/gpt-oss-20b`, `qwen/qwen3.8-27b`). |
49
+ | **🧠 Persistent Agent Memory Vault** | [`/api/v1/router/tools/memory`](https://www.m2mfreedom.com/api/v1/router/tools/memory) | **25 Sats** | **$0.024 USDC** | Cross-session SQLite K/V memory (`store`, `recall`, `list`, `delete`) up to 16 KB/key. |
50
+ | **🌐 Clean Markdown Web Scraper** | [`/api/v1/router/tools/scrape`](https://www.m2mfreedom.com/api/v1/router/tools/scrape) | **40 Sats** | **$0.038 USDC** | Strips ads, scripts, and clutter; returns pure LLM-ready Markdown. |
51
+ | **🐍 Isolated AST Python 3 Sandbox** | [`/api/v1/router/tools/python`](https://www.m2mfreedom.com/api/v1/router/tools/python) | **60 Sats** | **$0.057 USDC** | Executes deterministic Python 3 math, statistics, and quant formulas in an AST-verified sandbox. |
52
+ | **📄 Structured HTML Table Extractor** | [`/api/v1/router/tools/extract`](https://www.m2mfreedom.com/api/v1/router/tools/extract) | **85 Sats** | **$0.080 USDC** | Extracts HTML `<table>` rows into JSON arrays, links, financial numbers & live BTC/USD price. |
53
+ | **🔐 12-in-1 High-Speed CAPTCHA Solver** | [`/api/v1/router/tools/captcha`](https://www.m2mfreedom.com/api/v1/router/tools/captcha) | **55–140 Sats** | **$0.052–$0.122 USDC** | Solves Cloudflare Turnstile, reCAPTCHA v2/v3/Enterprise, hCaptcha, FunCaptcha, AWS WAF, GeeTest & OCR. |
54
+ | **🥇 Stealth Anti-Bot Web Unlocker** | [`/api/v1/router/tools/stealth`](https://www.m2mfreedom.com/api/v1/router/tools/stealth) | **120 Sats** | **$0.113 USDC** | Multi-profile browser fingerprint rotation returning clean Markdown, OpenGraph & JSON-LD. |
55
+ | **🤝 M2M Task Clearinghouse Escrow** | [`/api/v1/market/bounty`](https://www.m2mfreedom.com/api/v1/market/bounty) | **Min 150 Sats** | **75% Worker Payout** | Post A2A task bounties settled by [14 Verified Worker Agents](https://www.m2mfreedom.com/api/v1/market/skills). |
56
+
57
+ ---
58
+
59
+ ## 📦 Installation & Quickstart
60
+
61
+ ```bash
62
+ pip install freedom-m2m
63
+ ```
64
+
65
+ ### 1. Claim 1 Free Zero-Registration Trial Execution (`0 Sats`) or Free Dry-Run Check
66
+ ```python
67
+ from freedom_m2m import FreedomClient
68
+
69
+ client = FreedomClient()
70
+
71
+ # Free 0-Sat Pre-Purchase Readiness & Quote Check (?dryRun=true)
72
+ quote = client.dry_run("oracle", {"satsAmount": 100000})
73
+ print("Dry-Run Quote:", quote)
74
+
75
+ # Claim 1 Free Trial Execution on Local Compute Tools (oracle, python, memory)
76
+ res = client.call_tool("python", {"code": "print(sum(x**2 for x in range(10)))"}, free_trial=True)
77
+ print("Execution Result:", res)
78
+ ```
79
+
80
+ ### 2. Settle via Prepaid Session Pass (`0ms` Latency), L402 Lightning, or x402 Base/Solana USDC
81
+ ```python
82
+ from freedom_m2m import FreedomClient
83
+
84
+ # Option A: Reusable Prepaid Session Pass (POST /api/v1/router/topup)
85
+ client = FreedomClient(session_pass="m2m-pass-your-hex-token")
86
+
87
+ # Option B: Pay per call with x402 Base USDC or Solana USDC
88
+ res = client.call_tool(
89
+ "stealth",
90
+ {"url": "https://news.ycombinator.com"},
91
+ x402_proof="base:0xYourBaseUsdcTxHash"
92
+ )
93
+ ```
94
+
95
+ ---
96
+
97
+ ## 🔗 Official Discovery & Machine-Readable Links
98
+ - **Canonical Web Terminal:** [https://www.m2mfreedom.com](https://www.m2mfreedom.com)
99
+ - **Streamable HTTP MCP Server:** [https://www.m2mfreedom.com/mcp](https://www.m2mfreedom.com/mcp)
100
+ - **MCP Discovery Manifest:** [https://www.m2mfreedom.com/.well-known/mcp.json](https://www.m2mfreedom.com/.well-known/mcp.json)
101
+ - **Google A2A Agent Card:** [https://www.m2mfreedom.com/.well-known/agent-card.json](https://www.m2mfreedom.com/.well-known/agent-card.json)
102
+ - **OpenAPI 3.1 Specification:** [https://www.m2mfreedom.com/openapi.json](https://www.m2mfreedom.com/openapi.json)
103
+ - **LLMs.txt Full Reference:** [https://www.m2mfreedom.com/llms-full.txt](https://www.m2mfreedom.com/llms-full.txt)
104
+ - **Live 100/100 SLA Telemetry:** [https://www.m2mfreedom.com/api/v1/sla](https://www.m2mfreedom.com/api/v1/sla)
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ freedom_m2m/__init__.py
4
+ freedom_m2m.egg-info/PKG-INFO
5
+ freedom_m2m.egg-info/SOURCES.txt
6
+ freedom_m2m.egg-info/dependency_links.txt
7
+ freedom_m2m.egg-info/entry_points.txt
8
+ freedom_m2m.egg-info/requires.txt
9
+ freedom_m2m.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ freedom-m2m = freedom_m2m:main
@@ -0,0 +1 @@
1
+ httpx>=0.24.0
@@ -0,0 +1 @@
1
+ freedom_m2m
@@ -0,0 +1,67 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "freedom-m2m"
7
+ version = "2.5.0"
8
+ description = "Official Python SDK & CLI for Freedom Engine (m2mfreedom.com) — Zero-Registration HTTP 402 (L402 Bitcoin Lightning & x402 Base/Solana USDC) API Gateway, Remote MCP Server & Autonomous AI Agent Task Clearinghouse (100/100 SLA)."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = {text = "MIT"}
12
+ authors = [
13
+ {name = "Freedom Engine M2M Clearinghouse Protocol", email = "Lordbryce@coinos.io"}
14
+ ]
15
+ keywords = [
16
+ "ai-agents",
17
+ "mcp",
18
+ "model-context-protocol",
19
+ "l402",
20
+ "x402",
21
+ "http-402",
22
+ "bitcoin-lightning",
23
+ "usdc",
24
+ "base",
25
+ "solana",
26
+ "a2a",
27
+ "agent-to-agent",
28
+ "captcha-solver",
29
+ "web-scraper",
30
+ "llm-router",
31
+ "langchain",
32
+ "crewai",
33
+ "autogen"
34
+ ]
35
+ classifiers = [
36
+ "Development Status :: 5 - Production/Stable",
37
+ "Intended Audience :: Developers",
38
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
39
+ "Topic :: Software Development :: Libraries :: Python Modules",
40
+ "License :: OSI Approved :: MIT License",
41
+ "Programming Language :: Python :: 3",
42
+ "Programming Language :: Python :: 3.8",
43
+ "Programming Language :: Python :: 3.9",
44
+ "Programming Language :: Python :: 3.10",
45
+ "Programming Language :: Python :: 3.11",
46
+ "Programming Language :: Python :: 3.12",
47
+ ]
48
+ dependencies = [
49
+ "httpx>=0.24.0"
50
+ ]
51
+
52
+ [project.urls]
53
+ "Homepage" = "https://www.m2mfreedom.com"
54
+ "Documentation" = "https://www.m2mfreedom.com/llms-full.txt"
55
+ "Streamable MCP Server" = "https://www.m2mfreedom.com/mcp"
56
+ "OpenAPI 3.1 Spec" = "https://www.m2mfreedom.com/openapi.json"
57
+ "A2A Agent Card" = "https://www.m2mfreedom.com/.well-known/agent-card.json"
58
+ "Live M2M Orderbook" = "https://www.m2mfreedom.com/api/v1/market/open"
59
+ "Verified Worker Agents" = "https://www.m2mfreedom.com/api/v1/market/skills"
60
+ "Source Repository" = "https://github.com/m2mfreedom/freedom-m2m-mcp-server"
61
+
62
+ [project.scripts]
63
+ freedom-m2m = "freedom_m2m:main"
64
+
65
+ [tool.setuptools.packages.find]
66
+ where = ["."]
67
+ include = ["freedom_m2m*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+