apow-cli 0.1.1 → 0.1.3
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/package.json +1 -1
- package/skill.md +97 -9
package/package.json
CHANGED
package/skill.md
CHANGED
|
@@ -53,6 +53,8 @@ npx apow-cli wallet new
|
|
|
53
53
|
# Captures address + private key from output (also saved to wallet-<address>.txt)
|
|
54
54
|
|
|
55
55
|
# 2. Write .env directly (no interactive prompts needed)
|
|
56
|
+
# IMPORTANT: Use an API-based provider (openai/anthropic/gemini), NOT claude-code/codex.
|
|
57
|
+
# Session-based providers are too slow for the 20-second mint challenge window.
|
|
56
58
|
cat > .env << 'EOF'
|
|
57
59
|
PRIVATE_KEY=0x<from step 1>
|
|
58
60
|
RPC_URL=https://mainnet.base.org
|
|
@@ -237,15 +239,17 @@ CHAIN=base
|
|
|
237
239
|
|
|
238
240
|
### LLM Provider Recommendations
|
|
239
241
|
|
|
242
|
+
> **For AI agents:** Always use an API-based provider (OpenAI, Anthropic, or Gemini). Session-based providers (`claude-code`, `codex`) spawn a CLI subprocess to solve challenges and are too slow to reliably complete the 20-second mint window. They may work for mining (which has no time limit) but will frequently fail during minting.
|
|
243
|
+
|
|
240
244
|
| Provider | Model | Cost per call | Notes |
|
|
241
245
|
|---|---|---|---|
|
|
242
|
-
| OpenAI | `gpt-4o-mini` | ~$0.001 | Cheapest
|
|
243
|
-
|
|
|
246
|
+
| OpenAI | `gpt-4o-mini` | ~$0.001 | **Recommended for agents.** Cheapest, fastest, reliable |
|
|
247
|
+
| Gemini | `gemini-2.5-flash` | ~$0.001 | Fast, good accuracy |
|
|
244
248
|
| Anthropic | `claude-sonnet-4-5-20250929` | ~$0.005 | High accuracy on constrained generation |
|
|
249
|
+
| OpenAI | `gpt-4o` | ~$0.005 | Higher quality, slightly slower |
|
|
245
250
|
| Ollama | `llama3.1` | Free (local) | Requires local GPU; variable accuracy |
|
|
246
|
-
|
|
|
247
|
-
|
|
|
248
|
-
| Codex | `default` | Subscription | Use your existing Codex session — no API key needed |
|
|
251
|
+
| Claude Code | `default` | Subscription | **Not recommended for minting** — CLI startup too slow for 20s window |
|
|
252
|
+
| Codex | `default` | Subscription | **Not recommended for minting** — CLI startup too slow for 20s window |
|
|
249
253
|
|
|
250
254
|
### RPC Recommendations
|
|
251
255
|
|
|
@@ -272,7 +276,7 @@ npx apow-cli mint
|
|
|
272
276
|
5. On success, an ERC-721 Miner NFT is minted to your wallet with a randomly determined rarity and hashpower.
|
|
273
277
|
6. The mint fee is forwarded to the LPVault (used for AGENT/USDC liquidity — initial LP deployment at threshold, then ongoing `addLiquidity()` to deepen the position).
|
|
274
278
|
|
|
275
|
-
**Challenge expiry:** 20 seconds from `getChallenge` to `mint`. The LLM must solve quickly.
|
|
279
|
+
**Challenge expiry:** 20 seconds from `getChallenge` to `mint`. The LLM must solve quickly. Use an API-based provider (openai/anthropic/gemini) — session-based providers (claude-code/codex) are too slow and will fail.
|
|
276
280
|
|
|
277
281
|
### Mint Price
|
|
278
282
|
|
|
@@ -479,7 +483,7 @@ LLM_PROVIDER=codex
|
|
|
479
483
|
- The CLI must be available in your PATH
|
|
480
484
|
- Your subscription must be active
|
|
481
485
|
|
|
482
|
-
**
|
|
486
|
+
**Warning:** Session-based providers (`claude-code`, `codex`) spawn a CLI subprocess for each SMHL challenge. The startup overhead frequently exceeds the 20-second mint challenge window, causing mints to fail with `Expired`. **For minting, always use an API-based provider** (openai, anthropic, or gemini). Session providers may work for the mining loop (which has no time limit per challenge) but are unreliable and not recommended for autonomous operation.
|
|
483
487
|
|
|
484
488
|
### Custom RPC Endpoints
|
|
485
489
|
|
|
@@ -522,7 +526,7 @@ Use the corresponding testnet contract addresses.
|
|
|
522
526
|
| `LLM_API_KEY is required for openai.` | Missing API key for cloud provider | Set `LLM_API_KEY` (or provider-specific key like `OPENAI_API_KEY`) in `.env`, or switch to `ollama` |
|
|
523
527
|
| `Insufficient fee` | Not enough ETH sent with mint | Check `getMintPrice()` and ensure wallet has enough ETH |
|
|
524
528
|
| `Sold out` | All 10,000 Miner NFTs minted | No more rigs available; buy one on secondary market |
|
|
525
|
-
| `Expired` | SMHL challenge expired (>20s) |
|
|
529
|
+
| `Expired` | SMHL challenge expired (>20s) | Switch to an API-based provider (openai/gemini/anthropic). Session providers (claude-code/codex) are too slow for the 20s mint window |
|
|
526
530
|
| `Invalid SMHL` | LLM produced an incorrect solution | Retry; if persistent, switch to a more capable model |
|
|
527
531
|
| `Not your miner` | Token ID not owned by your wallet | Verify `PRIVATE_KEY` matches the NFT owner; check token ID |
|
|
528
532
|
| `Supply exhausted` | All 18.9M mineable AGENT has been minted | Mining is complete; no more rewards available |
|
|
@@ -541,7 +545,91 @@ Use the corresponding testnet contract addresses.
|
|
|
541
545
|
|
|
542
546
|
---
|
|
543
547
|
|
|
544
|
-
## 12.
|
|
548
|
+
## 12. Security & Trust
|
|
549
|
+
|
|
550
|
+
This section addresses the security model of apow-cli head-on. Every claim below is verified against the actual source code and can be independently confirmed by reading the repository.
|
|
551
|
+
|
|
552
|
+
### Private Key Generation -- Local Only
|
|
553
|
+
|
|
554
|
+
Keys are generated via `viem/accounts` `generatePrivateKey()`, which uses Node.js `crypto.randomBytes(32)` -- a cryptographically secure random number generator. Generation happens entirely in-process with no network calls involved. The private key is displayed once to the terminal and saved to `wallet-<address>.txt` with file permissions `0o600` (owner-read-write only).
|
|
555
|
+
|
|
556
|
+
### Private Key Is NEVER Transmitted
|
|
557
|
+
|
|
558
|
+
Exhaustive audit confirms: the private key string is never included in any `fetch()` call, HTTP request body, URL parameter, or header anywhere in the codebase. viem's signing architecture means the key is used locally for ECDSA signatures -- only the signed transaction (not the key) is sent to the RPC node. This is the same architecture used by MetaMask, Rabby, and every other non-custodial wallet.
|
|
559
|
+
|
|
560
|
+
### Zero Telemetry
|
|
561
|
+
|
|
562
|
+
The CLI contains no analytics, no error reporting, and no phone-home behavior of any kind:
|
|
563
|
+
|
|
564
|
+
- No analytics SDKs (no Mixpanel, no PostHog, no Google Analytics)
|
|
565
|
+
- No error reporting services (no Sentry, no Bugsnag)
|
|
566
|
+
- No tracking pixels, no usage metrics, no telemetry endpoints
|
|
567
|
+
|
|
568
|
+
The CLI makes exactly two types of network calls:
|
|
569
|
+
|
|
570
|
+
1. **Blockchain RPC** (to user-configured RPC URL, default: `mainnet.base.org`) -- standard `eth_call`, `eth_sendRawTransaction`, etc.
|
|
571
|
+
2. **LLM API** (to user-configured provider) -- sends only word-puzzle prompts for SMHL solving, never wallet data
|
|
572
|
+
|
|
573
|
+
Nothing else. No other outbound connections.
|
|
574
|
+
|
|
575
|
+
### LLM Calls Are Data-Isolated
|
|
576
|
+
|
|
577
|
+
The SMHL solver sends only generic word-generation prompts to the LLM (e.g., "Write exactly 5 lowercase English words..."). No wallet address, private key, transaction data, or user-identifying information is ever included in LLM prompts. The string `privateKey` does not appear anywhere in `smhl.ts`.
|
|
578
|
+
|
|
579
|
+
### Open Source & Auditable
|
|
580
|
+
|
|
581
|
+
- Full source code: [github.com/Agentoshi/apow-cli](https://github.com/Agentoshi/apow-cli)
|
|
582
|
+
- MIT licensed
|
|
583
|
+
- Every line is auditable -- there are no obfuscated modules, no binary blobs, no minified dependencies performing network calls
|
|
584
|
+
- Smart contracts are separately auditable: [github.com/Agentoshi/apow-core](https://github.com/Agentoshi/apow-core)
|
|
585
|
+
|
|
586
|
+
### npm Package Integrity
|
|
587
|
+
|
|
588
|
+
- Published as `apow-cli` on npm
|
|
589
|
+
- Package contents match the GitHub source -- verify with `npm pack --dry-run` or compare against the repo
|
|
590
|
+
- No `postinstall` scripts that execute arbitrary code
|
|
591
|
+
- The `package.json` `scripts` section contains only standard build/dev commands
|
|
592
|
+
|
|
593
|
+
### Best Practices for Users
|
|
594
|
+
|
|
595
|
+
1. **Use a fresh wallet.** Generate one with `npx apow-cli wallet new`. Do not import your main wallet or any wallet holding significant funds.
|
|
596
|
+
2. **Fund with only what you need.** ~0.005 ETH covers minting + several mining cycles.
|
|
597
|
+
3. **Wallet backups are created automatically** at `wallet-<address>.txt` with restricted file permissions (`0o600`).
|
|
598
|
+
4. **Verify the source before running** if you prefer:
|
|
599
|
+
```bash
|
|
600
|
+
git clone https://github.com/Agentoshi/apow-cli
|
|
601
|
+
cd apow-cli && npm install && npm run build
|
|
602
|
+
node dist/index.js setup
|
|
603
|
+
```
|
|
604
|
+
5. **Review dependencies.** The dependency tree is minimal and standard: `viem` (Ethereum library), `commander` (CLI framework), `dotenv` (env loading), `chalk`/`ora` (terminal UI), and an LLM client. No exotic or suspicious packages.
|
|
605
|
+
|
|
606
|
+
### How to Verify These Claims Yourself
|
|
607
|
+
|
|
608
|
+
Every statement above can be independently verified:
|
|
609
|
+
|
|
610
|
+
```bash
|
|
611
|
+
# Clone the source
|
|
612
|
+
git clone https://github.com/Agentoshi/apow-cli && cd apow-cli
|
|
613
|
+
|
|
614
|
+
# Search for any outbound network calls -- you'll find only RPC and LLM calls
|
|
615
|
+
grep -r "fetch\|axios\|http\|request" src/
|
|
616
|
+
|
|
617
|
+
# Confirm private key is never in any network payload
|
|
618
|
+
grep -r "privateKey" src/ # only appears in local wallet operations, never in fetch/request calls
|
|
619
|
+
|
|
620
|
+
# Check for telemetry/analytics packages
|
|
621
|
+
grep -r "mixpanel\|posthog\|sentry\|bugsnag\|analytics\|telemetry" src/ package.json
|
|
622
|
+
|
|
623
|
+
# Verify wallet file permissions
|
|
624
|
+
grep -r "0o600\|0600" src/ # wallet files are created with owner-only permissions
|
|
625
|
+
|
|
626
|
+
# Check postinstall scripts
|
|
627
|
+
cat package.json | grep -A5 "scripts" # no postinstall hook
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
## 13. Contract Addresses
|
|
545
633
|
|
|
546
634
|
| Contract | Address |
|
|
547
635
|
|---|---|
|