a2aclear 1.0.0__py3-none-any.whl
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.
- a2aclear/__init__.py +41 -0
- a2aclear/clearinghouse.py +65 -0
- a2aclear/cli.py +112 -0
- a2aclear/contract.py +85 -0
- a2aclear/escrow.py +171 -0
- a2aclear/fiat_bridge.py +64 -0
- a2aclear/identity.py +112 -0
- a2aclear/integrations/__init__.py +8 -0
- a2aclear/integrations/crewai.py +65 -0
- a2aclear/integrations/langchain.py +87 -0
- a2aclear/negotiator.py +111 -0
- a2aclear/reputation.py +95 -0
- a2aclear/security.py +182 -0
- a2aclear-1.0.0.dist-info/METADATA +189 -0
- a2aclear-1.0.0.dist-info/RECORD +18 -0
- a2aclear-1.0.0.dist-info/WHEEL +5 -0
- a2aclear-1.0.0.dist-info/entry_points.txt +2 -0
- a2aclear-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: a2aclear
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A2AClear: Sovereign Financial Clearinghouse & Atomic Settlement Protocol for Autonomous AI Agents
|
|
5
|
+
Home-page: https://unnataisolutions.com/a2aclear
|
|
6
|
+
Author: Rohit
|
|
7
|
+
Author-email: contact@unnataisolutions.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Topic :: Security :: Cryptography
|
|
12
|
+
Classifier: Topic :: Office/Business :: Financial :: Point-Of-Sale
|
|
13
|
+
Requires-Python: >=3.9
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: cryptography>=41.0.0
|
|
16
|
+
Dynamic: author
|
|
17
|
+
Dynamic: author-email
|
|
18
|
+
Dynamic: classifier
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: home-page
|
|
22
|
+
Dynamic: requires-dist
|
|
23
|
+
Dynamic: requires-python
|
|
24
|
+
Dynamic: summary
|
|
25
|
+
|
|
26
|
+
# π A2AClear: Agent-to-Agent Clearinghouse & Settlement Protocol (RFC-0001)
|
|
27
|
+
|
|
28
|
+
[](https://unnataisolutions.com/a2aclear)
|
|
29
|
+
[](LICENSE.md)
|
|
30
|
+
[-06b6d4.svg)](PATENT-SPECIFICATION-A2ACLEAR-PROVISIONAL.md)
|
|
31
|
+
[](https://unnataisolutions.com/a2aclear)
|
|
32
|
+
[](RFC-0001-A2ACLEAR-SPECIFICATION.md)
|
|
33
|
+
[](https://unnataisolutions.com/a2aclear)
|
|
34
|
+
|
|
35
|
+
> **"Humans have Visa, Mastercard, and SWIFT. Autonomous AI agents have A2AClear."**
|
|
36
|
+
|
|
37
|
+
**A2AClear** is the open, sovereign, mathematically deterministic clearinghouse and atomic settlement standard engineered specifically for autonomous multi-agent artificial intelligence networks. It eliminates biological human-in-the-loop bottlenecks (SMS OTPs, CAPTCHAs, 3D-Secure, manual invoice approval) and enables agents to independently negotiate SLAs, lock programmable micro-escrow, and settle balances in **< 10 milliseconds**.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## ποΈ Architecture & Protocol Flow
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
AGENT ORIGINATOR (Buyer) A2ACLEAR CLEARINGHOUSE AGENT PROVIDER (Seller)
|
|
45
|
+
β β β
|
|
46
|
+
ββββ 1. Handshake & DID Exchange (Ed25519) ββββΆβββββ 1. Handshake & DID Exchange βββββββββ
|
|
47
|
+
β β β
|
|
48
|
+
ββββββββββββββββ 2. Deterministic Negotiation (ANP JSON-RPC) ββββββββββββββββββββββββββββΆβ
|
|
49
|
+
β β β
|
|
50
|
+
ββββ 3. Lock Micro-Escrow (Deposit + Fee) βββββΆβ β
|
|
51
|
+
β ββββ 4. Escrow Locked Notification βββββββΆβ
|
|
52
|
+
β β β
|
|
53
|
+
β ββββ 5. Submit Work + SHA256 Proof ββββββββ
|
|
54
|
+
β β β
|
|
55
|
+
β ββββ 6. Automated Schema/Test Validate ββββ
|
|
56
|
+
β β β
|
|
57
|
+
ββββ 7. Deliverable Released to Buyer βββββββββββββ 8. 99.5% Payout Released ββββββββββββΆβ
|
|
58
|
+
β β β
|
|
59
|
+
β ββββ 9. 0.5% Fee to Protocol Treasury ββββΆβ
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## β‘ The 5 Sovereign Core Capabilities
|
|
65
|
+
|
|
66
|
+
1. **Cryptographic Agent Decentralized Identity (`did:a2a:<pubkey_hex>`):**
|
|
67
|
+
Non-repudiable asymmetric 256-bit Ed25519 keypairs. Every contract commitment and envelope is digitally signed.
|
|
68
|
+
2. **Autonomous Negotiation Protocol (ANP):**
|
|
69
|
+
Deterministic finite-state machine (`PROPOSE` β `COUNTER_BID` β `ACCEPT` β `AGREED`) eliminating LLM negotiation hallucinations.
|
|
70
|
+
3. **Programmable Micro-Escrow (AP-Vault):**
|
|
71
|
+
Real-time fund isolation across domestic fiat (UPI AutoPay e-mandates) and cross-border stablecoins without human intervention.
|
|
72
|
+
4. **Sub-10ms Atomic Verification & Settlement:**
|
|
73
|
+
Automatic release upon cryptographic deliverable verification (`SHA256(deliverable) == contract.expected_hash`).
|
|
74
|
+
5. **Universal 0.50% Protocol Interchange Fee ($\phi$):**
|
|
75
|
+
Standardized 50 basis points settlement toll, creating the economic clearing rail for planetary machine-to-machine commerce.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## π Quickstart
|
|
80
|
+
|
|
81
|
+
### Python Core SDK
|
|
82
|
+
```bash
|
|
83
|
+
pip install a2aclear
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
from a2aclear import AgentIdentity, AutonomousNegotiator, MicroEscrowVault
|
|
88
|
+
|
|
89
|
+
# 1. Initialize Autonomous Ed25519 Identities
|
|
90
|
+
buyer = AgentIdentity.generate()
|
|
91
|
+
seller = AgentIdentity.generate()
|
|
92
|
+
|
|
93
|
+
# 2. Negotiate Task Contract
|
|
94
|
+
buyer_neg = AutonomousNegotiator(buyer)
|
|
95
|
+
proposal = buyer_neg.propose_contract(
|
|
96
|
+
task_id="task_jamabandi_9812",
|
|
97
|
+
provider_did=seller.did,
|
|
98
|
+
initial_bid_paise=5000, # βΉ50.00
|
|
99
|
+
currency="INR"
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
# 3. Lock Micro-Escrow & Atomically Settle in <10ms
|
|
103
|
+
vault = MicroEscrowVault()
|
|
104
|
+
vault.deposit(buyer.did, 10000)
|
|
105
|
+
contract = buyer_neg.active_contracts["task_jamabandi_9812"]
|
|
106
|
+
|
|
107
|
+
vault.lock_escrow(contract)
|
|
108
|
+
receipt = vault.verify_and_settle(contract, deliverable={"khasra": "12//4", "status": "VERIFIED"})
|
|
109
|
+
|
|
110
|
+
print("β
Settled! Hash:", receipt["settlement_hash"])
|
|
111
|
+
print("Provider Received (99.5%): βΉ", receipt["provider_received_paise"] / 100)
|
|
112
|
+
print("A2AClear Protocol Toll (0.50%): βΉ", receipt["protocol_fee_paise"] / 100)
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### LangChain & CrewAI Integration
|
|
116
|
+
```python
|
|
117
|
+
from a2aclear.integrations import A2AClearLangChainTool, A2ACrewSettlementHandler
|
|
118
|
+
|
|
119
|
+
# LangChain Agent Delegation Tool
|
|
120
|
+
payment_tool = A2AClearLangChainTool()
|
|
121
|
+
payment_tool.run(
|
|
122
|
+
"HIRE_AND_LOCK_ESCROW",
|
|
123
|
+
provider_did="did:a2a:e8b28cf931d87192a40b82...",
|
|
124
|
+
amount_paise=5000,
|
|
125
|
+
task_spec={"action": "ANALYZE_FINANCIAL_REPORTS"}
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
# CrewAI Multi-Agent Swarm Settlement
|
|
129
|
+
crew_pay = A2ACrewSettlementHandler(crew_name="EnterpriseLeadsCrew")
|
|
130
|
+
crew_pay.settle_crew_step("researcher", "writer", "generate_brief", 2500, {"status": "ok"})
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### TypeScript / Node.js SDK
|
|
134
|
+
```bash
|
|
135
|
+
npm install @a2aclear/core
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
import { AgentIdentity, TaskContract, MicroEscrowVault } from '@a2aclear/core';
|
|
140
|
+
|
|
141
|
+
const buyer = AgentIdentity.generate();
|
|
142
|
+
const seller = AgentIdentity.generate();
|
|
143
|
+
const vault = new MicroEscrowVault();
|
|
144
|
+
|
|
145
|
+
vault.deposit(buyer.did, 10000);
|
|
146
|
+
const contract = new TaskContract({
|
|
147
|
+
taskId: 'task_001',
|
|
148
|
+
originatorDid: buyer.did,
|
|
149
|
+
providerDid: seller.did,
|
|
150
|
+
amountPaise: 5000
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
vault.lockEscrow(contract);
|
|
154
|
+
const receipt = vault.verifyAndSettle(contract, { answer: "success" });
|
|
155
|
+
console.log('Settled in <10ms! Hash:', receipt.settlementHash);
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## π Cybersecurity & Anti-Theft Armor
|
|
161
|
+
|
|
162
|
+
A2AClear implements 4 sovereign defense layers:
|
|
163
|
+
- **AES-256-GCM Encrypted Keystores:** PBKDF2 (100,000 iterations) private key protection on disk.
|
|
164
|
+
- **Replay Attack Defense:** Monotonic timestamp window (Β±60s) and non-repeating cryptographic nonces.
|
|
165
|
+
- **Payload Sanitizer:** Deep recursion and prompt injection scanner blocking shell escapes and oversized files.
|
|
166
|
+
- **Steganographic Authorship Watermark:** Mathematical proof of origin derived from Rohit & Unnat AI Solutions embedded into canonical contract hashing.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## π Intellectual Property & Licensing
|
|
171
|
+
|
|
172
|
+
* **License:** [Business Source License 1.1 (BSL 1.1)](LICENSE.md). Free for research, non-commercial, and startups (< βΉ10,00,000/mo volume). Cloud hosting and commercial re-sale strictly require an enterprise license.
|
|
173
|
+
* **Patent Status:** [Provisional Patent Specification Draft](PATENT-SPECIFICATION-A2ACLEAR-PROVISIONAL.md) prepared under Indian Patent Act 1970 (Form 2, Section 10) & International PCT.
|
|
174
|
+
* **Trademark:** [Form TM-A Application](TRADEMARK-APPLICATION-A2ACLEAR.md) registered under Classes 9, 36, and 42 for `A2AClear`, `ANP`, and `AP-Vault`.
|
|
175
|
+
* **Notarization:** Immutable SHA-256 prior art hashes published at [unnataisolutions.com/a2aclear/notarization.json](https://unnataisolutions.com/a2aclear/notarization.json).
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## ποΈ Sovereign Governance & Contact
|
|
180
|
+
|
|
181
|
+
* **Organization:** Unnat AI Solutions
|
|
182
|
+
* **Founder & Chief Systems Architect:** Rohit
|
|
183
|
+
* **Operating Headquarters:** Kurukshetra Tech Hub, Haryana, 136118, Bharat
|
|
184
|
+
* **DPIIT Startup India (BHASKAR ID):** `IN-1026-9560CK`
|
|
185
|
+
* **MSME Udyam Registration:** `UDYAM-HR-11-0069591`
|
|
186
|
+
* **Live Interactive Portal:** [https://unnataisolutions.com/a2aclear](https://unnataisolutions.com/a2aclear)
|
|
187
|
+
* **Official Contact:** contact@unnataisolutions.com | +91 83072 64895
|
|
188
|
+
|
|
189
|
+
*(C) 2026 Unnat AI Solutions. All Sovereign & Protocol Rights Reserved.*
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
a2aclear/__init__.py,sha256=XaMWSxKmIDLfW2N7c_fxXo7ZIGBfotvDIBp6XA7l4NA,1226
|
|
2
|
+
a2aclear/clearinghouse.py,sha256=Qmblepgp5Db_h1050SUIU4eJ1f2KzWW3ww3FV5uDNWs,2432
|
|
3
|
+
a2aclear/cli.py,sha256=F1JW3pJMrwvOFdxeCMFlzS4RKRtVvzYU9KA_ynbGBz4,4375
|
|
4
|
+
a2aclear/contract.py,sha256=tghfYTzDCTHM9AzUx3zyCsB5SAuQo538rPrZIjl9uCU,2893
|
|
5
|
+
a2aclear/escrow.py,sha256=VzlrE6njIwTZpG0thL434UL-kf8gBcMyzxYbASLZ5QU,7667
|
|
6
|
+
a2aclear/fiat_bridge.py,sha256=OmCW8D_HJzlTyOoeC4J-yXcZYUB11srbAKUEKpZ_qs0,2538
|
|
7
|
+
a2aclear/identity.py,sha256=5scsvGci9ItutHvRa_4l2FvH338N47_RAa_0znzwyYk,4102
|
|
8
|
+
a2aclear/negotiator.py,sha256=G_BaeY9n-ttIqnfB1pRbipvUOlw1Ep9gF6F06mns7Sk,4229
|
|
9
|
+
a2aclear/reputation.py,sha256=xSzPaOUZdRj-Pr9PBdEULH4bfrXzUx3LeJbEpDLpCLg,3640
|
|
10
|
+
a2aclear/security.py,sha256=mKFAJYQRMEYHGMYyoFsE4GVsEVLc4kQRc3iVP1iSBkQ,7062
|
|
11
|
+
a2aclear/integrations/__init__.py,sha256=GhRrKfvSTL7tDeobLFVhKfG6q5TD2lim6KkLPDzXqaE,225
|
|
12
|
+
a2aclear/integrations/crewai.py,sha256=ec11BdIQSATrO_UvCJGhbMs_CD0Blqf9jvBlPaKsxA0,2355
|
|
13
|
+
a2aclear/integrations/langchain.py,sha256=s5qXx3A0AXjL5aF2y2aYeV6qt86aD3awLQifUZ8zJB4,3721
|
|
14
|
+
a2aclear-1.0.0.dist-info/METADATA,sha256=ib5uAaXpyMZsu1w-Z1idlOyeBZZVrnpWfHfnCxj4j44,9356
|
|
15
|
+
a2aclear-1.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
16
|
+
a2aclear-1.0.0.dist-info/entry_points.txt,sha256=E53YKpGCNeubPYpeKnuNwLCKPiqF8qoRUc2dtX3NQjI,42
|
|
17
|
+
a2aclear-1.0.0.dist-info/top_level.txt,sha256=uB8pqMl26TuboxRP3iJ2Urn8ovJCcI_cEIwwTLA35AA,9
|
|
18
|
+
a2aclear-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
a2aclear
|