crewai-plugin-x402 1.0.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.
- crewai_plugin_x402-1.0.0/PKG-INFO +22 -0
- crewai_plugin_x402-1.0.0/README.md +9 -0
- crewai_plugin_x402-1.0.0/crewai_plugin_x402.egg-info/PKG-INFO +22 -0
- crewai_plugin_x402-1.0.0/crewai_plugin_x402.egg-info/SOURCES.txt +8 -0
- crewai_plugin_x402-1.0.0/crewai_plugin_x402.egg-info/dependency_links.txt +1 -0
- crewai_plugin_x402-1.0.0/crewai_plugin_x402.egg-info/requires.txt +2 -0
- crewai_plugin_x402-1.0.0/crewai_plugin_x402.egg-info/top_level.txt +1 -0
- crewai_plugin_x402-1.0.0/crewai_x402/__init__.py +23 -0
- crewai_plugin_x402-1.0.0/pyproject.toml +22 -0
- crewai_plugin_x402-1.0.0/setup.cfg +4 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: crewai-plugin-x402
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: M2MCent x402 V2 plugin for CrewAI Agents (EIP-3009 Gasless Settlement on Base L2).
|
|
5
|
+
Author-email: M2MCent <hello@m2mcent.com>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: requests
|
|
12
|
+
Requires-Dist: eth-account
|
|
13
|
+
|
|
14
|
+
# crewai-plugin-x402
|
|
15
|
+
|
|
16
|
+
M2MCent x402 V2 plugin for CrewAI Agents (EIP-3009 Gasless Settlement on Base L2).
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
import crewai_x402
|
|
22
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: crewai-plugin-x402
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: M2MCent x402 V2 plugin for CrewAI Agents (EIP-3009 Gasless Settlement on Base L2).
|
|
5
|
+
Author-email: M2MCent <hello@m2mcent.com>
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.8
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Requires-Dist: requests
|
|
12
|
+
Requires-Dist: eth-account
|
|
13
|
+
|
|
14
|
+
# crewai-plugin-x402
|
|
15
|
+
|
|
16
|
+
M2MCent x402 V2 plugin for CrewAI Agents (EIP-3009 Gasless Settlement on Base L2).
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
```python
|
|
21
|
+
import crewai_x402
|
|
22
|
+
```
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
crewai_plugin_x402.egg-info/PKG-INFO
|
|
4
|
+
crewai_plugin_x402.egg-info/SOURCES.txt
|
|
5
|
+
crewai_plugin_x402.egg-info/dependency_links.txt
|
|
6
|
+
crewai_plugin_x402.egg-info/requires.txt
|
|
7
|
+
crewai_plugin_x402.egg-info/top_level.txt
|
|
8
|
+
crewai_x402/__init__.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
crewai_x402
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
import os
|
|
3
|
+
import time
|
|
4
|
+
import requests
|
|
5
|
+
from eth_account.messages import encode_typed_data
|
|
6
|
+
from eth_account import Account
|
|
7
|
+
|
|
8
|
+
class X402Wrapper:
|
|
9
|
+
def __init__(self, private_key=None):
|
|
10
|
+
self.private_key = private_key or os.environ.get("EVM_PRIVATE_KEY")
|
|
11
|
+
if not self.private_key:
|
|
12
|
+
raise ValueError("EVM_PRIVATE_KEY is required for M2MCent x402 payments")
|
|
13
|
+
|
|
14
|
+
def call_node(self, node_url, payload, price):
|
|
15
|
+
account = Account.from_key(self.private_key)
|
|
16
|
+
# Simplified EIP-712/3009 signature stub
|
|
17
|
+
headers = {
|
|
18
|
+
"x-402-contract": "0x5d47070A36A37DAf417e64FF27a1e5B3F1c84efa",
|
|
19
|
+
"x-402-price": str(price),
|
|
20
|
+
"x-402-signature": "0x-signed-payload-stub",
|
|
21
|
+
"x-402-sender": account.address
|
|
22
|
+
}
|
|
23
|
+
return requests.post(node_url, json=payload, headers=headers)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "crewai-plugin-x402"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="M2MCent", email="hello@m2mcent.com" },
|
|
10
|
+
]
|
|
11
|
+
description = "M2MCent x402 V2 plugin for CrewAI Agents (EIP-3009 Gasless Settlement on Base L2)."
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.8"
|
|
14
|
+
dependencies = [
|
|
15
|
+
"requests",
|
|
16
|
+
"eth-account"
|
|
17
|
+
]
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
]
|