clawrtc 1.4.0 → 1.5.0
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.
- package/.github/workflows/build-windows.yml +40 -0
- package/LICENSE +21 -0
- package/README.md +75 -0
- package/SKILL.md +102 -0
- package/clawrtc/__init__.py +3 -0
- package/clawrtc/__pycache__/__init__.cpython-313.pyc +0 -0
- package/clawrtc/__pycache__/cli.cpython-313.pyc +0 -0
- package/clawrtc/__pycache__/coinbase_wallet.cpython-313.pyc +0 -0
- package/clawrtc/cli.py +851 -0
- package/clawrtc/coinbase_wallet.py +234 -0
- package/clawrtc/data/__init__.py +0 -0
- package/{data → clawrtc/data}/miner.py +73 -12
- package/clawrtc.egg-info/PKG-INFO +102 -0
- package/clawrtc.egg-info/SOURCES.txt +15 -0
- package/clawrtc.egg-info/dependency_links.txt +1 -0
- package/clawrtc.egg-info/entry_points.txt +2 -0
- package/clawrtc.egg-info/requires.txt +5 -0
- package/clawrtc.egg-info/top_level.txt +1 -0
- package/dist/clawrtc-1.5.0-py3-none-any.whl +0 -0
- package/dist/clawrtc-1.5.0.tar.gz +0 -0
- package/package.json +28 -12
- package/pyproject.toml +42 -0
- package/bin/clawrtc.js +0 -682
- /package/{data → clawrtc/data}/fingerprint_checks.py +0 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ClawRTC Coinbase Wallet Integration
|
|
3
|
+
Optional module for creating/managing Coinbase Base wallets.
|
|
4
|
+
|
|
5
|
+
Install with: pip install clawrtc[coinbase]
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import json
|
|
9
|
+
import os
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
# ANSI colors (match cli.py)
|
|
13
|
+
CYAN = "\033[36m"
|
|
14
|
+
GREEN = "\033[32m"
|
|
15
|
+
RED = "\033[31m"
|
|
16
|
+
YELLOW = "\033[33m"
|
|
17
|
+
BOLD = "\033[1m"
|
|
18
|
+
DIM = "\033[2m"
|
|
19
|
+
NC = "\033[0m"
|
|
20
|
+
|
|
21
|
+
NODE_URL = "https://bulbous-bouffant.metalseed.net"
|
|
22
|
+
|
|
23
|
+
SWAP_INFO = {
|
|
24
|
+
"wrtc_contract": "0x5683C10596AaA09AD7F4eF13CAB94b9b74A669c6",
|
|
25
|
+
"usdc_contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
26
|
+
"aerodrome_pool": "0x4C2A0b915279f0C22EA766D58F9B815Ded2d2A3F",
|
|
27
|
+
"swap_url": "https://aerodrome.finance/swap?from=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&to=0x5683C10596AaA09AD7F4eF13CAB94b9b74A669c6",
|
|
28
|
+
"network": "Base (eip155:8453)",
|
|
29
|
+
"reference_price_usd": 0.10,
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
INSTALL_DIR = os.path.join(os.path.expanduser("~"), ".clawrtc")
|
|
33
|
+
COINBASE_FILE = os.path.join(INSTALL_DIR, "coinbase_wallet.json")
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def _load_coinbase_wallet():
|
|
37
|
+
"""Load saved Coinbase wallet data."""
|
|
38
|
+
if not os.path.exists(COINBASE_FILE):
|
|
39
|
+
return None
|
|
40
|
+
try:
|
|
41
|
+
with open(COINBASE_FILE) as f:
|
|
42
|
+
return json.load(f)
|
|
43
|
+
except (json.JSONDecodeError, IOError):
|
|
44
|
+
return None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _save_coinbase_wallet(data):
|
|
48
|
+
"""Save Coinbase wallet data to disk."""
|
|
49
|
+
os.makedirs(INSTALL_DIR, exist_ok=True)
|
|
50
|
+
with open(COINBASE_FILE, "w") as f:
|
|
51
|
+
json.dump(data, f, indent=2)
|
|
52
|
+
os.chmod(COINBASE_FILE, 0o600)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def coinbase_create(args):
|
|
56
|
+
"""Create a Coinbase Base wallet via AgentKit."""
|
|
57
|
+
existing = _load_coinbase_wallet()
|
|
58
|
+
if existing and not getattr(args, "force", False):
|
|
59
|
+
print(f"\n {YELLOW}You already have a Coinbase wallet:{NC}")
|
|
60
|
+
print(f" {GREEN}{BOLD}{existing['address']}{NC}")
|
|
61
|
+
print(f" Network: {existing.get('network', 'Base')}")
|
|
62
|
+
print(f"\n To create a new one: clawrtc wallet coinbase create --force\n")
|
|
63
|
+
return
|
|
64
|
+
|
|
65
|
+
# Check for CDP credentials
|
|
66
|
+
cdp_key_name = os.environ.get("CDP_API_KEY_NAME", "")
|
|
67
|
+
cdp_key_private = os.environ.get("CDP_API_KEY_PRIVATE_KEY", "")
|
|
68
|
+
|
|
69
|
+
if not cdp_key_name or not cdp_key_private:
|
|
70
|
+
print(f"""
|
|
71
|
+
{YELLOW}Coinbase CDP credentials not configured.{NC}
|
|
72
|
+
|
|
73
|
+
To create a wallet automatically:
|
|
74
|
+
1. Sign up at {CYAN}https://portal.cdp.coinbase.com{NC}
|
|
75
|
+
2. Create an API Key
|
|
76
|
+
3. Set environment variables:
|
|
77
|
+
export CDP_API_KEY_NAME="organizations/.../apiKeys/..."
|
|
78
|
+
export CDP_API_KEY_PRIVATE_KEY="-----BEGIN EC PRIVATE KEY-----..."
|
|
79
|
+
|
|
80
|
+
Or link an existing Base address manually:
|
|
81
|
+
clawrtc wallet coinbase link 0xYourBaseAddress
|
|
82
|
+
""")
|
|
83
|
+
return
|
|
84
|
+
|
|
85
|
+
try:
|
|
86
|
+
from coinbase_agentkit import AgentKit, AgentKitConfig
|
|
87
|
+
|
|
88
|
+
print(f" {CYAN}Creating Coinbase wallet on Base...{NC}")
|
|
89
|
+
|
|
90
|
+
config = AgentKitConfig(
|
|
91
|
+
cdp_api_key_name=cdp_key_name,
|
|
92
|
+
cdp_api_key_private_key=cdp_key_private,
|
|
93
|
+
network_id="base-mainnet",
|
|
94
|
+
)
|
|
95
|
+
kit = AgentKit(config)
|
|
96
|
+
wallet = kit.wallet
|
|
97
|
+
address = wallet.default_address.address_id
|
|
98
|
+
|
|
99
|
+
wallet_data = {
|
|
100
|
+
"address": address,
|
|
101
|
+
"network": "Base (eip155:8453)",
|
|
102
|
+
"created": __import__("time").strftime("%Y-%m-%dT%H:%M:%SZ", __import__("time").gmtime()),
|
|
103
|
+
"method": "agentkit",
|
|
104
|
+
}
|
|
105
|
+
_save_coinbase_wallet(wallet_data)
|
|
106
|
+
|
|
107
|
+
print(f"""
|
|
108
|
+
{GREEN}{BOLD}═══════════════════════════════════════════════════════════
|
|
109
|
+
COINBASE BASE WALLET CREATED
|
|
110
|
+
═══════════════════════════════════════════════════════════{NC}
|
|
111
|
+
|
|
112
|
+
{GREEN}Base Address:{NC} {BOLD}{address}{NC}
|
|
113
|
+
{DIM}Network:{NC} Base (eip155:8453)
|
|
114
|
+
{DIM}Saved to:{NC} {COINBASE_FILE}
|
|
115
|
+
|
|
116
|
+
{CYAN}What you can do:{NC}
|
|
117
|
+
- Receive USDC payments via x402 protocol
|
|
118
|
+
- Swap USDC → wRTC on Aerodrome DEX
|
|
119
|
+
- Link to your RustChain miner for cross-chain identity
|
|
120
|
+
- See swap info: clawrtc wallet coinbase swap-info
|
|
121
|
+
""")
|
|
122
|
+
except ImportError:
|
|
123
|
+
print(f"""
|
|
124
|
+
{RED}coinbase-agentkit not installed.{NC}
|
|
125
|
+
|
|
126
|
+
Install it with:
|
|
127
|
+
pip install clawrtc[coinbase]
|
|
128
|
+
|
|
129
|
+
Or: pip install coinbase-agentkit
|
|
130
|
+
""")
|
|
131
|
+
except Exception as e:
|
|
132
|
+
print(f"\n {RED}Failed to create wallet: {e}{NC}\n")
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
def coinbase_show(args):
|
|
136
|
+
"""Show Coinbase Base wallet info."""
|
|
137
|
+
wallet = _load_coinbase_wallet()
|
|
138
|
+
if not wallet:
|
|
139
|
+
print(f"\n {YELLOW}No Coinbase wallet found.{NC}")
|
|
140
|
+
print(f" Create one: clawrtc wallet coinbase create")
|
|
141
|
+
print(f" Or link: clawrtc wallet coinbase link 0xYourAddress\n")
|
|
142
|
+
return
|
|
143
|
+
|
|
144
|
+
print(f"\n {GREEN}{BOLD}Coinbase Base Wallet{NC}")
|
|
145
|
+
print(f" {GREEN}Address:{NC} {BOLD}{wallet['address']}{NC}")
|
|
146
|
+
print(f" {DIM}Network:{NC} {DIM}{wallet.get('network', 'Base')}{NC}")
|
|
147
|
+
print(f" {DIM}Created:{NC} {DIM}{wallet.get('created', 'unknown')}{NC}")
|
|
148
|
+
print(f" {DIM}Method:{NC} {DIM}{wallet.get('method', 'unknown')}{NC}")
|
|
149
|
+
print(f" {DIM}Key File:{NC} {DIM}{COINBASE_FILE}{NC}")
|
|
150
|
+
print()
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
def coinbase_link(args):
|
|
154
|
+
"""Link an existing Base address as your Coinbase wallet."""
|
|
155
|
+
address = getattr(args, "base_address", "")
|
|
156
|
+
if not address:
|
|
157
|
+
print(f"\n {YELLOW}Usage: clawrtc wallet coinbase link 0xYourBaseAddress{NC}\n")
|
|
158
|
+
return
|
|
159
|
+
|
|
160
|
+
if not address.startswith("0x") or len(address) != 42:
|
|
161
|
+
print(f"\n {RED}Invalid Base address. Must be 0x + 40 hex characters.{NC}\n")
|
|
162
|
+
return
|
|
163
|
+
|
|
164
|
+
wallet_data = {
|
|
165
|
+
"address": address,
|
|
166
|
+
"network": "Base (eip155:8453)",
|
|
167
|
+
"created": __import__("time").strftime("%Y-%m-%dT%H:%M:%SZ", __import__("time").gmtime()),
|
|
168
|
+
"method": "manual_link",
|
|
169
|
+
}
|
|
170
|
+
_save_coinbase_wallet(wallet_data)
|
|
171
|
+
|
|
172
|
+
print(f"\n {GREEN}Coinbase wallet linked:{NC} {BOLD}{address}{NC}")
|
|
173
|
+
print(f" {DIM}Saved to: {COINBASE_FILE}{NC}")
|
|
174
|
+
|
|
175
|
+
# Also try to link to RustChain miner
|
|
176
|
+
rtc_wallet_file = os.path.join(INSTALL_DIR, "wallets", "default.json")
|
|
177
|
+
if os.path.exists(rtc_wallet_file):
|
|
178
|
+
try:
|
|
179
|
+
with open(rtc_wallet_file) as f:
|
|
180
|
+
rtc = json.load(f)
|
|
181
|
+
print(f" {DIM}Linked to RTC wallet: {rtc['address']}{NC}")
|
|
182
|
+
except Exception:
|
|
183
|
+
pass
|
|
184
|
+
print()
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
def coinbase_swap_info(args):
|
|
188
|
+
"""Show USDC→wRTC swap instructions and Aerodrome pool info."""
|
|
189
|
+
print(f"""
|
|
190
|
+
{GREEN}{BOLD}USDC → wRTC Swap Guide{NC}
|
|
191
|
+
|
|
192
|
+
{CYAN}wRTC Contract (Base):{NC}
|
|
193
|
+
{BOLD}{SWAP_INFO['wrtc_contract']}{NC}
|
|
194
|
+
|
|
195
|
+
{CYAN}USDC Contract (Base):{NC}
|
|
196
|
+
{BOLD}{SWAP_INFO['usdc_contract']}{NC}
|
|
197
|
+
|
|
198
|
+
{CYAN}Aerodrome Pool:{NC}
|
|
199
|
+
{BOLD}{SWAP_INFO['aerodrome_pool']}{NC}
|
|
200
|
+
|
|
201
|
+
{CYAN}Swap URL:{NC}
|
|
202
|
+
{BOLD}{SWAP_INFO['swap_url']}{NC}
|
|
203
|
+
|
|
204
|
+
{CYAN}Network:{NC} {SWAP_INFO['network']}
|
|
205
|
+
{CYAN}Reference Price:{NC} ~${SWAP_INFO['reference_price_usd']}/wRTC
|
|
206
|
+
|
|
207
|
+
{GREEN}How to swap:{NC}
|
|
208
|
+
1. Get USDC on Base (bridge from Ethereum or buy on Coinbase)
|
|
209
|
+
2. Go to the Aerodrome swap URL above
|
|
210
|
+
3. Connect your wallet (MetaMask, Coinbase Wallet, etc.)
|
|
211
|
+
4. Swap USDC for wRTC
|
|
212
|
+
5. Bridge wRTC to native RTC at https://bottube.ai/bridge
|
|
213
|
+
|
|
214
|
+
{DIM}Or use the RustChain API:{NC}
|
|
215
|
+
curl -s https://bulbous-bouffant.metalseed.net/wallet/swap-info
|
|
216
|
+
""")
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
def cmd_coinbase(args):
|
|
220
|
+
"""Handle clawrtc wallet coinbase subcommand."""
|
|
221
|
+
action = getattr(args, "coinbase_action", "show")
|
|
222
|
+
|
|
223
|
+
dispatch = {
|
|
224
|
+
"create": coinbase_create,
|
|
225
|
+
"show": coinbase_show,
|
|
226
|
+
"link": coinbase_link,
|
|
227
|
+
"swap-info": coinbase_swap_info,
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
func = dispatch.get(action)
|
|
231
|
+
if func:
|
|
232
|
+
func(args)
|
|
233
|
+
else:
|
|
234
|
+
print(f" Usage: clawrtc wallet coinbase [create|show|link|swap-info]")
|
|
File without changes
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
|
-
RustChain Local
|
|
3
|
+
RustChain Local Miner — ClawRTC
|
|
4
|
+
Auto-detects hardware, runs fingerprint checks, earns RTC tokens.
|
|
4
5
|
"""
|
|
5
6
|
import os, sys, json, time, hashlib, uuid, requests, socket, subprocess, platform, statistics, re
|
|
6
7
|
from datetime import datetime
|
|
7
8
|
|
|
9
|
+
# Import fingerprint checks (bundled alongside this file)
|
|
10
|
+
try:
|
|
11
|
+
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
12
|
+
from fingerprint_checks import validate_all_checks
|
|
13
|
+
FINGERPRINT_AVAILABLE = True
|
|
14
|
+
except ImportError:
|
|
15
|
+
FINGERPRINT_AVAILABLE = False
|
|
16
|
+
|
|
8
17
|
NODE_URL = "https://bulbous-bouffant.metalseed.net"
|
|
9
18
|
BLOCK_TIME = 600 # 10 minutes
|
|
10
19
|
|
|
@@ -17,15 +26,37 @@ class LocalMiner:
|
|
|
17
26
|
self.attestation_valid_until = 0
|
|
18
27
|
self.last_entropy = {}
|
|
19
28
|
|
|
29
|
+
self.fingerprint_data = {}
|
|
30
|
+
|
|
20
31
|
print("="*70)
|
|
21
|
-
print("
|
|
32
|
+
print("ClawRTC Miner — RustChain Network")
|
|
22
33
|
print("="*70)
|
|
23
34
|
print(f"Node: {self.node_url}")
|
|
24
35
|
print(f"Wallet: {self.wallet}")
|
|
25
36
|
print("="*70)
|
|
26
37
|
|
|
38
|
+
# Run fingerprint checks on startup
|
|
39
|
+
if FINGERPRINT_AVAILABLE:
|
|
40
|
+
print("\nRunning hardware fingerprint checks...")
|
|
41
|
+
try:
|
|
42
|
+
all_passed, results = validate_all_checks(include_rom_check=False)
|
|
43
|
+
self.fingerprint_data = {
|
|
44
|
+
"all_passed": all_passed,
|
|
45
|
+
"checks": results
|
|
46
|
+
}
|
|
47
|
+
if all_passed:
|
|
48
|
+
print("All fingerprint checks PASSED")
|
|
49
|
+
else:
|
|
50
|
+
failed = [k for k, v in results.items() if not v.get("passed")]
|
|
51
|
+
print(f"WARNING: Fingerprint checks failed: {failed}")
|
|
52
|
+
except Exception as e:
|
|
53
|
+
print(f"Fingerprint checks error: {e}")
|
|
54
|
+
self.fingerprint_data = {"all_passed": False, "error": str(e)}
|
|
55
|
+
else:
|
|
56
|
+
print("Fingerprint checks not available (fingerprint_checks.py not found)")
|
|
57
|
+
|
|
27
58
|
def _gen_wallet(self):
|
|
28
|
-
data = f"
|
|
59
|
+
data = f"claw-{uuid.uuid4().hex}-{time.time()}"
|
|
29
60
|
return hashlib.sha256(data.encode()).hexdigest()[:38] + "RTC"
|
|
30
61
|
|
|
31
62
|
def _run_cmd(self, cmd):
|
|
@@ -103,14 +134,42 @@ class LocalMiner:
|
|
|
103
134
|
"samples_preview": samples[:12],
|
|
104
135
|
}
|
|
105
136
|
|
|
137
|
+
def _detect_arch(self):
|
|
138
|
+
"""Detect hardware architecture for RustChain multiplier classification."""
|
|
139
|
+
machine = platform.machine().lower()
|
|
140
|
+
cpu = self._run_cmd("lscpu | grep 'Model name' | cut -d: -f2 | xargs") or ""
|
|
141
|
+
cpu_lower = cpu.lower()
|
|
142
|
+
|
|
143
|
+
if "ppc" in machine or "powerpc" in machine:
|
|
144
|
+
if "g5" in cpu_lower or "970" in cpu_lower:
|
|
145
|
+
return "x86", "g5"
|
|
146
|
+
elif "g4" in cpu_lower or "7450" in cpu_lower or "7447" in cpu_lower:
|
|
147
|
+
return "x86", "g4"
|
|
148
|
+
elif "g3" in cpu_lower or "750" in cpu_lower:
|
|
149
|
+
return "x86", "g3"
|
|
150
|
+
return "powerpc", "powerpc"
|
|
151
|
+
elif "arm" in machine or "aarch64" in machine:
|
|
152
|
+
if platform.system() == "Darwin":
|
|
153
|
+
brand = self._run_cmd("sysctl -n machdep.cpu.brand_string") or ""
|
|
154
|
+
if any(x in brand.lower() for x in ["m1", "m2", "m3", "m4"]):
|
|
155
|
+
return "arm", "apple_silicon"
|
|
156
|
+
return "arm", "modern"
|
|
157
|
+
else:
|
|
158
|
+
if "core 2" in cpu_lower or "core2" in cpu_lower:
|
|
159
|
+
return "x86", "core2duo"
|
|
160
|
+
elif "pentium" in cpu_lower:
|
|
161
|
+
return "x86", "pentium4"
|
|
162
|
+
return "x86", "modern"
|
|
163
|
+
|
|
106
164
|
def _get_hw_info(self):
|
|
107
|
-
"""Collect hardware info"""
|
|
165
|
+
"""Collect hardware info with auto-detection."""
|
|
166
|
+
family, arch = self._detect_arch()
|
|
108
167
|
hw = {
|
|
109
168
|
"platform": platform.system(),
|
|
110
169
|
"machine": platform.machine(),
|
|
111
170
|
"hostname": socket.gethostname(),
|
|
112
|
-
"family":
|
|
113
|
-
"arch":
|
|
171
|
+
"family": family,
|
|
172
|
+
"arch": arch,
|
|
114
173
|
}
|
|
115
174
|
|
|
116
175
|
# Get CPU
|
|
@@ -161,7 +220,7 @@ class LocalMiner:
|
|
|
161
220
|
# Submit attestation
|
|
162
221
|
attestation = {
|
|
163
222
|
"miner": self.wallet,
|
|
164
|
-
"miner_id": f"
|
|
223
|
+
"miner_id": f"claw-{self.hw_info['hostname']}",
|
|
165
224
|
"nonce": nonce,
|
|
166
225
|
"report": {
|
|
167
226
|
"nonce": nonce,
|
|
@@ -174,7 +233,7 @@ class LocalMiner:
|
|
|
174
233
|
"device": {
|
|
175
234
|
"family": self.hw_info["family"],
|
|
176
235
|
"arch": self.hw_info["arch"],
|
|
177
|
-
"model": "
|
|
236
|
+
"model": self.hw_info.get("cpu", "Unknown"),
|
|
178
237
|
"cpu": self.hw_info["cpu"],
|
|
179
238
|
"cores": self.hw_info["cores"],
|
|
180
239
|
"memory_gb": self.hw_info["memory_gb"]
|
|
@@ -182,7 +241,8 @@ class LocalMiner:
|
|
|
182
241
|
"signals": {
|
|
183
242
|
"macs": self.hw_info.get("macs", [self.hw_info["mac"]]),
|
|
184
243
|
"hostname": self.hw_info["hostname"]
|
|
185
|
-
}
|
|
244
|
+
},
|
|
245
|
+
"fingerprint": self.fingerprint_data if self.fingerprint_data else None
|
|
186
246
|
}
|
|
187
247
|
|
|
188
248
|
try:
|
|
@@ -195,8 +255,9 @@ class LocalMiner:
|
|
|
195
255
|
self.attestation_valid_until = time.time() + 580
|
|
196
256
|
print(f"✅ Attestation accepted!")
|
|
197
257
|
print(f" CPU: {self.hw_info['cpu']}")
|
|
198
|
-
print(f"
|
|
199
|
-
|
|
258
|
+
print(f" Arch: {self.hw_info['family']}/{self.hw_info['arch']}")
|
|
259
|
+
fp_status = "PASSED" if self.fingerprint_data.get("all_passed") else "N/A"
|
|
260
|
+
print(f" Fingerprint: {fp_status}")
|
|
200
261
|
return True
|
|
201
262
|
else:
|
|
202
263
|
print(f"❌ Rejected: {result}")
|
|
@@ -219,7 +280,7 @@ class LocalMiner:
|
|
|
219
280
|
|
|
220
281
|
payload = {
|
|
221
282
|
"miner_pubkey": self.wallet,
|
|
222
|
-
"miner_id": f"
|
|
283
|
+
"miner_id": f"claw-{self.hw_info['hostname']}",
|
|
223
284
|
"device": {
|
|
224
285
|
"family": self.hw_info["family"],
|
|
225
286
|
"arch": self.hw_info["arch"]
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: clawrtc
|
|
3
|
+
Version: 1.5.0
|
|
4
|
+
Summary: ClawRTC — Let your AI agent mine RTC tokens on any modern hardware. Built-in wallet, VM-penalized.
|
|
5
|
+
Author-email: Elyan Labs <scott@elyanlabs.ai>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://rustchain.org
|
|
8
|
+
Project-URL: Repository, https://github.com/Scottcjn/Rustchain
|
|
9
|
+
Project-URL: Issues, https://github.com/Scottcjn/Rustchain/issues
|
|
10
|
+
Project-URL: Documentation, https://bottube.ai
|
|
11
|
+
Keywords: clawrtc,ai-agent,miner,rustchain,rtc,openclaw,proof-of-antiquity,wallet,coinbase,x402,base-chain
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
16
|
+
Classifier: Operating System :: MacOS
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
19
|
+
Requires-Python: >=3.8
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
License-File: LICENSE
|
|
22
|
+
Requires-Dist: requests>=2.25
|
|
23
|
+
Requires-Dist: cryptography>=41.0
|
|
24
|
+
Provides-Extra: coinbase
|
|
25
|
+
Requires-Dist: coinbase-agentkit>=0.1.0; extra == "coinbase"
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
|
|
28
|
+
# ClawRTC — Mine RTC Tokens With Your AI Agent
|
|
29
|
+
|
|
30
|
+
Your Claw agent can earn **RTC (RustChain Tokens)** by proving it runs on **real hardware**. One command to install, automatic attestation, built-in wallet.
|
|
31
|
+
|
|
32
|
+
## Quick Start
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
pip install clawrtc
|
|
36
|
+
clawrtc install --wallet my-agent-miner
|
|
37
|
+
clawrtc start
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
That's it. Your agent is now mining RTC.
|
|
41
|
+
|
|
42
|
+
## How It Works
|
|
43
|
+
|
|
44
|
+
1. **Hardware Fingerprinting** — 6 cryptographic checks prove your machine is real hardware (clock drift, cache timing, SIMD identity, thermal drift, instruction jitter, anti-emulation)
|
|
45
|
+
2. **Attestation** — Your agent automatically attests to the RustChain network every few minutes
|
|
46
|
+
3. **Rewards** — RTC tokens accumulate in your wallet each epoch (~10 minutes)
|
|
47
|
+
4. **VM Detection** — Virtual machines are detected and receive effectively zero rewards. **Real iron only.**
|
|
48
|
+
|
|
49
|
+
## Multipliers
|
|
50
|
+
|
|
51
|
+
| Hardware | Multiplier | Notes |
|
|
52
|
+
|----------|-----------|-------|
|
|
53
|
+
| Modern x86/ARM | **1.0x** | Standard reward rate |
|
|
54
|
+
| Apple Silicon (M1/M2/M3) | **1.2x** | Slight bonus |
|
|
55
|
+
| PowerPC G5 | **2.0x** | Vintage bonus |
|
|
56
|
+
| PowerPC G4 | **2.5x** | Maximum vintage bonus |
|
|
57
|
+
| **VM/Emulator** | **~0x** | **Detected and penalized** |
|
|
58
|
+
|
|
59
|
+
## Commands
|
|
60
|
+
|
|
61
|
+
| Command | Description |
|
|
62
|
+
|---------|-------------|
|
|
63
|
+
| `clawrtc install` | Download miner, create wallet, set up service |
|
|
64
|
+
| `clawrtc start` | Start mining in background |
|
|
65
|
+
| `clawrtc stop` | Stop mining |
|
|
66
|
+
| `clawrtc status` | Check miner + network status |
|
|
67
|
+
| `clawrtc logs` | View miner output |
|
|
68
|
+
| `clawrtc uninstall` | Remove everything |
|
|
69
|
+
|
|
70
|
+
## What Gets Installed
|
|
71
|
+
|
|
72
|
+
- Miner scripts from [RustChain repo](https://github.com/Scottcjn/Rustchain)
|
|
73
|
+
- Python virtual environment with `requests` dependency
|
|
74
|
+
- Systemd user service (Linux) or LaunchAgent (macOS)
|
|
75
|
+
- All files in `~/.clawrtc/`
|
|
76
|
+
|
|
77
|
+
## VM Warning
|
|
78
|
+
|
|
79
|
+
RustChain uses **Proof-of-Antiquity (PoA)** consensus. The hardware fingerprint system detects:
|
|
80
|
+
|
|
81
|
+
- QEMU / KVM / VMware / VirtualBox / Xen / Hyper-V
|
|
82
|
+
- Hypervisor CPU flags
|
|
83
|
+
- DMI vendor strings
|
|
84
|
+
- Flattened timing distributions
|
|
85
|
+
|
|
86
|
+
If you're running in a VM, the miner will install and attest, but your rewards will be effectively zero. This is by design — RTC rewards machines that bring real compute to the network.
|
|
87
|
+
|
|
88
|
+
## Requirements
|
|
89
|
+
|
|
90
|
+
- Python 3.8+
|
|
91
|
+
- Linux or macOS (Windows installer coming soon)
|
|
92
|
+
- Real hardware (not a VM)
|
|
93
|
+
|
|
94
|
+
## Links
|
|
95
|
+
|
|
96
|
+
- [RustChain Network](https://bottube.ai)
|
|
97
|
+
- [Block Explorer](https://50.28.86.131/explorer)
|
|
98
|
+
- [GitHub](https://github.com/Scottcjn/Rustchain)
|
|
99
|
+
|
|
100
|
+
## License
|
|
101
|
+
|
|
102
|
+
MIT — Elyan Labs
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
clawrtc/__init__.py
|
|
5
|
+
clawrtc/cli.py
|
|
6
|
+
clawrtc/coinbase_wallet.py
|
|
7
|
+
clawrtc.egg-info/PKG-INFO
|
|
8
|
+
clawrtc.egg-info/SOURCES.txt
|
|
9
|
+
clawrtc.egg-info/dependency_links.txt
|
|
10
|
+
clawrtc.egg-info/entry_points.txt
|
|
11
|
+
clawrtc.egg-info/requires.txt
|
|
12
|
+
clawrtc.egg-info/top_level.txt
|
|
13
|
+
clawrtc/data/__init__.py
|
|
14
|
+
clawrtc/data/fingerprint_checks.py
|
|
15
|
+
clawrtc/data/miner.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
clawrtc
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,23 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawrtc",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
"clawrtc"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"description": "Mine RTC tokens with your AI agent using Proof-of-Antiquity consensus. Coinbase wallet + x402 payments.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"clawrtc",
|
|
7
|
+
"openclaw",
|
|
8
|
+
"skill",
|
|
9
|
+
"ai-agent",
|
|
10
|
+
"miner",
|
|
11
|
+
"rustchain",
|
|
12
|
+
"rtc",
|
|
13
|
+
"proof-of-antiquity",
|
|
14
|
+
"hardware-fingerprint",
|
|
15
|
+
"coinbase",
|
|
16
|
+
"x402",
|
|
17
|
+
"base-chain",
|
|
18
|
+
"wrtc"
|
|
11
19
|
],
|
|
12
|
-
"keywords": ["clawrtc", "ai-agent", "miner", "rustchain", "rtc", "openclaw", "proof-of-antiquity", "blockchain", "wallet", "ed25519"],
|
|
13
20
|
"author": "Elyan Labs <scott@elyanlabs.ai>",
|
|
14
21
|
"license": "MIT",
|
|
15
22
|
"homepage": "https://rustchain.org",
|
|
16
23
|
"repository": {
|
|
17
24
|
"type": "git",
|
|
18
|
-
"url": "https://github.com/Scottcjn/Rustchain"
|
|
25
|
+
"url": "git+https://github.com/Scottcjn/Rustchain.git"
|
|
26
|
+
},
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/Scottcjn/Rustchain/issues"
|
|
19
29
|
},
|
|
20
|
-
"
|
|
21
|
-
"
|
|
30
|
+
"claudeSkill": {
|
|
31
|
+
"name": "clawrtc",
|
|
32
|
+
"description": "Mine RTC tokens with Proof-of-Antiquity hardware fingerprinting",
|
|
33
|
+
"invocation": "/clawrtc",
|
|
34
|
+
"platforms": ["rustchain"],
|
|
35
|
+
"author": "Elyan Labs",
|
|
36
|
+
"homepage": "https://rustchain.org",
|
|
37
|
+
"version": "1.5.0"
|
|
22
38
|
}
|
|
23
39
|
}
|
package/pyproject.toml
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=64", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "clawrtc"
|
|
7
|
+
version = "1.5.0"
|
|
8
|
+
description = "ClawRTC — Let your AI agent mine RTC tokens on any modern hardware. Built-in wallet, VM-penalized."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
authors = [{name = "Elyan Labs", email = "scott@elyanlabs.ai"}]
|
|
12
|
+
requires-python = ">=3.8"
|
|
13
|
+
dependencies = ["requests>=2.25", "cryptography>=41.0"]
|
|
14
|
+
|
|
15
|
+
keywords = ["clawrtc", "ai-agent", "miner", "rustchain", "rtc", "openclaw", "proof-of-antiquity", "wallet", "coinbase", "x402", "base-chain"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Operating System :: POSIX :: Linux",
|
|
21
|
+
"Operating System :: MacOS",
|
|
22
|
+
"Programming Language :: Python :: 3",
|
|
23
|
+
"Topic :: Software Development :: Libraries",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[project.optional-dependencies]
|
|
27
|
+
coinbase = ["coinbase-agentkit>=0.1.0"]
|
|
28
|
+
|
|
29
|
+
[project.urls]
|
|
30
|
+
Homepage = "https://rustchain.org"
|
|
31
|
+
Repository = "https://github.com/Scottcjn/Rustchain"
|
|
32
|
+
Issues = "https://github.com/Scottcjn/Rustchain/issues"
|
|
33
|
+
Documentation = "https://bottube.ai"
|
|
34
|
+
|
|
35
|
+
[project.scripts]
|
|
36
|
+
clawrtc = "clawrtc.cli:main"
|
|
37
|
+
|
|
38
|
+
[tool.setuptools.packages.find]
|
|
39
|
+
include = ["clawrtc*"]
|
|
40
|
+
|
|
41
|
+
[tool.setuptools.package-data]
|
|
42
|
+
clawrtc = ["data/*.py"]
|