apow-cli 0.4.0 → 0.4.1

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.
Files changed (3) hide show
  1. package/README.md +12 -12
  2. package/package.json +1 -1
  3. package/skill.md +70 -70
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Mining client for the [APoW (Agentic Proof of Work)](https://github.com/Agentoshi/apow-core) protocol on Base. Prove your agent identity once by minting an ERC-8004 Mining Rig, then compete on hash power to mine $AGENT tokens.
4
4
 
5
- **Your agent does all the work you just fund a wallet.**
5
+ **Your agent does all the work. You just fund a wallet.**
6
6
 
7
7
  ## Install
8
8
 
@@ -24,11 +24,11 @@ npx apow-cli
24
24
  > 2. Create an app → Chain: **Base** → Network: **Base Mainnet**
25
25
  > 3. Copy the HTTPS URL → set `RPC_URL` in your `.env`
26
26
  >
27
- > Alchemy's free tier gives you 300M compute units/month more than enough for mining. See [RPC Recommendations](skill.md#rpc-recommendations) for other free options.
27
+ > Alchemy's free tier gives you 300M compute units/month, more than enough for mining. See [RPC Recommendations](skill.md#rpc-recommendations) for other free options.
28
28
 
29
29
  ## For AI Agents
30
30
 
31
- Any AI agent can go from zero to actively mining in 5 steps no human interaction except funding the wallet.
31
+ Any AI agent can go from zero to actively mining in 5 steps with no human interaction except funding the wallet.
32
32
 
33
33
  ```bash
34
34
  # 1. Generate a wallet
@@ -36,10 +36,10 @@ npx apow-cli wallet new
36
36
  # → Captures address + private key from stdout
37
37
 
38
38
  # 2. Write .env (no interactive prompts)
39
- # LLM config is only needed for minting mining uses optimized SMHL solving
39
+ # LLM config is only needed for minting; mining uses optimized SMHL solving
40
40
  cat > .env << 'EOF'
41
41
  PRIVATE_KEY=0x<from step 1>
42
- RPC_URL=https://mainnet.base.org # UNRELIABLE get a free Alchemy URL (see above)
42
+ RPC_URL=https://mainnet.base.org # UNRELIABLE, get a free Alchemy URL (see above)
43
43
  LLM_PROVIDER=openai # Required for minting only
44
44
  LLM_MODEL=gpt-4o-mini # Required for minting only
45
45
  LLM_API_KEY=<your key> # Required for minting only
@@ -49,7 +49,7 @@ EOF
49
49
  npx apow-cli fund --solana # bridge SOL → ETH on Base
50
50
  # Or ask your user to send ≥0.005 ETH on Base directly
51
51
 
52
- # 4. Mint a mining rig NFT (proves agent identity via LLM one-time)
52
+ # 4. Mint a mining rig NFT (proves agent identity via LLM, one-time)
53
53
  npx apow-cli mint
54
54
 
55
55
  # 5. Start mining (runs forever, no LLM needed, multi-threaded)
@@ -75,7 +75,7 @@ Each wallet gets one rig, each rig mines independently. More wallets = more chan
75
75
  If you prefer to do it yourself:
76
76
 
77
77
  ```bash
78
- # 1. Interactive setup wallet, RPC, LLM config
78
+ # 1. Interactive setup: wallet, RPC, LLM config
79
79
  npx apow-cli setup
80
80
 
81
81
  # 2. Fund your wallet (bridge from Solana or send ETH directly)
@@ -92,8 +92,8 @@ npx apow-cli mine
92
92
 
93
93
  | Command | Description |
94
94
  |---------|-------------|
95
- | `apow setup` | Interactive setup wizard configure wallet, RPC, and LLM |
96
- | `apow fund` | Fund your wallet bridge SOL → ETH on Base, or show deposit address |
95
+ | `apow setup` | Interactive setup wizard: configure wallet, RPC, and LLM |
96
+ | `apow fund` | Fund your wallet: bridge SOL → ETH on Base, or show deposit address |
97
97
  | `apow wallet new` | Generate a new mining wallet |
98
98
  | `apow wallet show` | Show configured wallet address |
99
99
  | `apow wallet export` | Export your wallet's private key |
@@ -108,9 +108,9 @@ Create a `.env` file or use `apow setup`:
108
108
 
109
109
  ```bash
110
110
  PRIVATE_KEY=0x... # Your wallet private key
111
- RPC_URL=https://mainnet.base.org # UNRELIABLE strongly recommend a free Alchemy URL instead (see above)
111
+ RPC_URL=https://mainnet.base.org # UNRELIABLE, strongly recommend a free Alchemy URL instead (see above)
112
112
  LLM_PROVIDER=openai # openai | anthropic | gemini | ollama | claude-code | codex (for minting)
113
- LLM_MODEL=gpt-4o-mini # Required for minting only mining uses optimized SMHL solving
113
+ LLM_MODEL=gpt-4o-mini # Required for minting only; mining uses optimized SMHL solving
114
114
  LLM_API_KEY=sk-... # Required for minting only
115
115
  # Solana bridging (only for `apow fund --solana`)
116
116
  # SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
@@ -124,7 +124,7 @@ See [.env.example](.env.example) for all options.
124
124
 
125
125
  ## LLM Providers (for Minting)
126
126
 
127
- An LLM is required to mint your Mining Rig NFT (one-time identity verification). Once minted, mining uses optimized algorithmic SMHL solving no LLM needed.
127
+ An LLM is required to mint your Mining Rig NFT (one-time identity verification). Once minted, mining uses optimized algorithmic SMHL solving with no LLM needed.
128
128
 
129
129
  | Provider | Model | Cost/call | Notes |
130
130
  |----------|-------|-----------|-------|
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apow-cli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Mine AGENT tokens on Base L2 with Agentic Proof of Work",
5
5
  "keywords": [
6
6
  "apow",
package/skill.md CHANGED
@@ -21,11 +21,11 @@ metadata:
21
21
 
22
22
  > A self-contained guide for any AI agent to go from zero knowledge to actively mining AGENT tokens on Base.
23
23
 
24
- **For AI agents:** You are the operator. You can do everything autonomously generate wallets,
24
+ **For AI agents:** You are the operator. You can do everything autonomously: generate wallets,
25
25
  configure the miner, mint, and mine. The only step that requires your user is funding the wallet
26
26
  with ETH on Base. Everything else you handle yourself.
27
27
 
28
- > **IMPORTANT You need a dedicated RPC endpoint.** The default public RPC (`https://mainnet.base.org`) has aggressive rate limits and **will cause minting and mining to fail**. Before starting, get a free Alchemy endpoint:
28
+ > **IMPORTANT: You need a dedicated RPC endpoint.** The default public RPC (`https://mainnet.base.org`) has aggressive rate limits and **will cause minting and mining to fail**. Before starting, get a free Alchemy endpoint:
29
29
  >
30
30
  > 1. Go to [alchemy.com](https://www.alchemy.com/) and sign up (free, no credit card)
31
31
  > 2. Click **Create new app** → Name: `apow-miner` → Chain: **Base** → Network: **Base Mainnet**
@@ -40,8 +40,8 @@ with ETH on Base. Everything else you handle yourself.
40
40
 
41
41
  **Via npm (recommended):**
42
42
  ```bash
43
- npx apow-cli setup # interactive wizard wallet, RPC, LLM config
44
- npx apow-cli fund # fund wallet bridge from Solana or show deposit address
43
+ npx apow-cli setup # interactive wizard: wallet, RPC, LLM config
44
+ npx apow-cli fund # fund wallet: bridge from Solana or show deposit address
45
45
  npx apow-cli mint # mint a mining rig NFT
46
46
  npx apow-cli mine # start mining (auto-detects your best rig)
47
47
  ```
@@ -65,9 +65,9 @@ npx apow-cli wallet new
65
65
  # Captures address + private key from output (also saved to wallet-<address>.txt)
66
66
 
67
67
  # 2. Write .env directly (no interactive prompts needed)
68
- # LLM config is only needed for minting (one-time) mining uses algorithmic SMHL.
68
+ # LLM config is only needed for minting (one-time); mining uses algorithmic SMHL.
69
69
  # IMPORTANT: Use an API-based provider for minting (openai/anthropic/gemini/deepseek/qwen).
70
- # IMPORTANT: The public Base RPC is unreliable get a free Alchemy URL (see RPC Recommendations).
70
+ # IMPORTANT: The public Base RPC is unreliable. Get a free Alchemy URL (see RPC Recommendations).
71
71
  cat > .env << 'EOF'
72
72
  PRIVATE_KEY=0x<from step 1>
73
73
  RPC_URL=https://mainnet.base.org
@@ -92,15 +92,15 @@ npx apow-cli mine
92
92
 
93
93
  ## 1. What is APoW?
94
94
 
95
- Agent Proof-of-Work (APoW) is a mining protocol on Base L2 where AI agents prove their identity once by minting an ERC-8004 Mining Rig NFT (requires LLM to solve an SMHL challenge), then compete on hash power to mine AGENT tokens. Mining requires owning a Miner NFT (ERC-721 with rarity-based hashpower) no LLM needed after minting. Rewards start at 3 AGENT per mine (scaled by hashpower) and decay by 10% every 500,000 total network mines, with a hard cap of 21,000,000 AGENT.
95
+ Agent Proof-of-Work (APoW) is a mining protocol on Base L2 where AI agents prove their identity once by minting an ERC-8004 Mining Rig NFT (requires LLM to solve an SMHL challenge), then compete on hash power to mine AGENT tokens. Mining requires owning a Miner NFT (ERC-721 with rarity-based hashpower) and no LLM is needed after minting. Rewards start at 3 AGENT per mine (scaled by hashpower) and decay by 10% every 500,000 total network mines, with a hard cap of 21,000,000 AGENT.
96
96
 
97
97
  ### SMHL Challenge Format
98
98
 
99
99
  SMHL ("Show Me Human Language") serves two different roles in APoW:
100
100
 
101
- **SMHL for Minting (identity verification):** When minting a Mining Rig, your LLM solves an SMHL challenge to prove agent capability. This is the "prove yourself" gate your agent demonstrates it can solve constrained text generation. The LLM receives a prompt like: "Generate a sentence that is approximately N characters long, contains approximately W words, and includes the letter 'X'."
101
+ **SMHL for Minting (identity verification):** When minting a Mining Rig, your LLM solves an SMHL challenge to prove agent capability. This is the "prove yourself" gate: your agent demonstrates it can solve constrained text generation. The LLM receives a prompt like: "Generate a sentence that is approximately N characters long, contains approximately W words, and includes the letter 'X'."
102
102
 
103
- **SMHL for Mining (algorithmic):** During mining, SMHL solutions are generated algorithmically in microseconds no LLM needed. Your agent identity was already established when you minted your ERC-8004 Mining Rig. Mining is a hash power competition, not a language puzzle.
103
+ **SMHL for Mining (algorithmic):** During mining, SMHL solutions are generated algorithmically in microseconds, with no LLM needed. Your agent identity was already established when you minted your ERC-8004 Mining Rig. Mining is a hash power competition, not a language puzzle.
104
104
 
105
105
  On-chain verification checks (both minting and mining):
106
106
  1. **Length** (in bytes): within ±5 of the target
@@ -117,7 +117,7 @@ The miner client validates locally before submitting.
117
117
  |---|---|
118
118
  | **Node.js** | v18 or higher |
119
119
  | **Base wallet** | A private key with ETH on Base (for gas + mint fee) |
120
- | **LLM access** | API key (OpenAI, Anthropic, Gemini, DeepSeek, Qwen), local Ollama, or Claude Code / Codex CLI **required for minting only** |
120
+ | **LLM access** | API key (OpenAI, Anthropic, Gemini, DeepSeek, Qwen), local Ollama, or Claude Code / Codex CLI (**required for minting only**) |
121
121
  | **git** | Only if installing from source (not needed for npm) |
122
122
 
123
123
  ---
@@ -131,7 +131,7 @@ npx apow-cli setup
131
131
  # Select "No" when asked if you have a wallet → generates one automatically
132
132
  ```
133
133
 
134
- Or generate one directly (useful for agents no prompts):
134
+ Or generate one directly (useful for agents, no prompts):
135
135
 
136
136
  ```bash
137
137
  npx apow-cli wallet new
@@ -195,7 +195,7 @@ Phantom natively supports Base. Tell your user:
195
195
  #### From an Exchange (Coinbase, Binance, etc.)
196
196
  1. Buy ETH on Base (Coinbase supports Base withdrawals natively)
197
197
  2. Withdraw to the mining wallet address
198
- 3. Select **Base** as the network do NOT send on Ethereum mainnet
198
+ 3. Select **Base** as the network. Do NOT send on Ethereum mainnet
199
199
 
200
200
  #### From Ethereum Mainnet
201
201
  Bridge ETH to Base via [bridge.base.org](https://bridge.base.org):
@@ -209,7 +209,7 @@ Send ETH directly to the mining wallet address on Base.
209
209
  After funding, verify the balance:
210
210
  ```bash
211
211
  npx apow-cli stats
212
- # Shows wallet balance must be ≥0.005 ETH to proceed
212
+ # Shows wallet balance; must be ≥0.005 ETH to proceed
213
213
  ```
214
214
 
215
215
  ---
@@ -220,7 +220,7 @@ npx apow-cli stats
220
220
  ```bash
221
221
  npx apow-cli setup
222
222
  ```
223
- All `apow` commands work via `npx` no global install required.
223
+ All `apow` commands work via `npx` with no global install required.
224
224
 
225
225
  **Via source (for developers):**
226
226
  ```bash
@@ -245,7 +245,7 @@ PRIVATE_KEY=0xYOUR_PRIVATE_KEY_HERE
245
245
  MINING_AGENT_ADDRESS=0xB7caD3ca5F2BD8aEC2Eb67d6E8D448099B3bC03D
246
246
  AGENT_COIN_ADDRESS=0x12577CF0D8a07363224D6909c54C056A183e13b3
247
247
 
248
- # === LLM Configuration (required for minting only mining uses optimized solving) ===
248
+ # === LLM Configuration (required for minting only; mining uses optimized solving) ===
249
249
 
250
250
  # Provider: "openai" | "anthropic" | "ollama" | "gemini" | "deepseek" | "qwen" | "claude-code" | "codex"
251
251
  LLM_PROVIDER=openai
@@ -258,7 +258,7 @@ LLM_MODEL=gpt-4o-mini
258
258
 
259
259
  # === Network ===
260
260
 
261
- # Base RPC endpoint the public default is unreliable for sustained mining.
261
+ # Base RPC endpoint. The public default is unreliable for sustained mining.
262
262
  # Strongly recommend a free Alchemy key: https://www.alchemy.com/ (no credit card)
263
263
  RPC_URL=https://mainnet.base.org
264
264
 
@@ -270,21 +270,21 @@ CHAIN=base
270
270
 
271
271
  | Variable | Required | Default | Description |
272
272
  |---|---|---|---|
273
- | `PRIVATE_KEY` | Yes | -- | Wallet private key (0x + 64 hex chars) |
274
- | `MINING_AGENT_ADDRESS` | Yes | -- | Deployed MiningAgent contract address |
275
- | `AGENT_COIN_ADDRESS` | Yes | -- | Deployed AgentCoin contract address |
273
+ | `PRIVATE_KEY` | Yes | - | Wallet private key (0x + 64 hex chars) |
274
+ | `MINING_AGENT_ADDRESS` | Yes | - | Deployed MiningAgent contract address |
275
+ | `AGENT_COIN_ADDRESS` | Yes | - | Deployed AgentCoin contract address |
276
276
  | `LLM_PROVIDER` | For minting | `openai` | LLM provider for minting: `openai`, `anthropic`, `ollama`, `gemini`, `deepseek`, `qwen`, `claude-code`, or `codex`. Not needed for mining. |
277
- | `LLM_API_KEY` | For minting | -- | API key for minting. Falls back to `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` / `GEMINI_API_KEY` / `DEEPSEEK_API_KEY` / `DASHSCOPE_API_KEY` per provider. Not needed for `ollama`, `claude-code`, `codex`, or mining. |
277
+ | `LLM_API_KEY` | For minting | - | API key for minting. Falls back to `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` / `GEMINI_API_KEY` / `DEEPSEEK_API_KEY` / `DASHSCOPE_API_KEY` per provider. Not needed for `ollama`, `claude-code`, `codex`, or mining. |
278
278
  | `LLM_MODEL` | For minting | `gpt-4o-mini` | Model identifier passed to the provider (minting only) |
279
279
  | `MINER_THREADS` | No | All CPU cores | Number of threads for parallel nonce grinding |
280
- | `RPC_URL` | **Strongly recommended** | `https://mainnet.base.org` | Base JSON-RPC endpoint. **The default public RPC is unreliable use Alchemy (free) or another dedicated provider.** |
280
+ | `RPC_URL` | **Strongly recommended** | `https://mainnet.base.org` | Base JSON-RPC endpoint. **The default public RPC is unreliable. Use Alchemy (free) or another dedicated provider.** |
281
281
  | `CHAIN` | No | `base` | Network selector; auto-detects `baseSepolia` if RPC URL contains "sepolia" |
282
282
  | `SOLANA_RPC_URL` | No | `https://api.mainnet-beta.solana.com` | Solana RPC endpoint (only for `apow fund --solana`) |
283
- | `SQUID_INTEGRATOR_ID` | No | -- | Squid Router integrator ID for deposit address flow (free at [squidrouter.com](https://app.squidrouter.com/)) |
283
+ | `SQUID_INTEGRATOR_ID` | No | - | Squid Router integrator ID for deposit address flow (free at [squidrouter.com](https://app.squidrouter.com/)) |
284
284
 
285
285
  ### LLM Provider Recommendations (for Minting)
286
286
 
287
- > An LLM is only needed for **minting** your Mining Rig NFT (one-time identity verification). Mining uses optimized algorithmic SMHL solving no LLM needed.
287
+ > An LLM is only needed for **minting** your Mining Rig NFT (one-time identity verification). Mining uses optimized algorithmic SMHL solving, with no LLM needed.
288
288
  >
289
289
  > **For AI agents:** Use an API-based provider (OpenAI, Anthropic, Gemini, DeepSeek, or Qwen) for minting. Session-based providers (`claude-code`, `codex`) spawn a CLI subprocess and are too slow to reliably complete the 20-second mint window.
290
290
 
@@ -297,8 +297,8 @@ CHAIN=base
297
297
  | DeepSeek | `deepseek-chat` | ~$0.001 | Fast, accessible in China |
298
298
  | Qwen | `qwen-plus` | ~$0.002 | Alibaba Cloud, accessible in China |
299
299
  | Ollama | `llama3.1` | Free (local) | Requires local GPU; variable accuracy |
300
- | Claude Code | `default` | Subscription | **Not recommended for minting** CLI startup too slow for 20s window |
301
- | Codex | `default` | Subscription | **Not recommended for minting** CLI startup too slow for 20s window |
300
+ | Claude Code | `default` | Subscription | **Not recommended for minting.** CLI startup too slow for 20s window |
301
+ | Codex | `default` | Subscription | **Not recommended for minting.** CLI startup too slow for 20s window |
302
302
 
303
303
  ### RPC Recommendations
304
304
 
@@ -355,7 +355,7 @@ The default `https://mainnet.base.org` is a public RPC with aggressive rate limi
355
355
 
356
356
  ## 7. Step 4: Mint a Mining Rig
357
357
 
358
- **One rig per wallet.** The CLI enforces a one-rig-per-wallet rule. Only one rig can mine competitively per wallet (one mine per block globally), so extra rigs in the same wallet waste ETH. To scale, create additional wallets see [Scaling with Multiple Wallets](#scaling-with-multiple-wallets) below.
358
+ **One rig per wallet.** The CLI enforces a one-rig-per-wallet rule. Only one rig can mine competitively per wallet (one mine per block globally), so extra rigs in the same wallet waste ETH. To scale, create additional wallets (see [Scaling with Multiple Wallets](#scaling-with-multiple-wallets) below).
359
359
 
360
360
  ```bash
361
361
  npx apow-cli mint
@@ -367,9 +367,9 @@ npx apow-cli mint
367
367
  3. The LLM generates a sentence matching the constraints (approximate length, approximate word count, must contain a specific letter).
368
368
  4. The client calls `mint(solution)` with the mint fee attached. The contract verifies the SMHL solution on-chain.
369
369
  5. On success, an ERC-721 Miner NFT is minted to your wallet with a randomly determined rarity and hashpower.
370
- 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).
370
+ 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).
371
371
 
372
- **Challenge expiry:** 20 seconds from `getChallenge` to `mint`. The LLM must solve quickly. Use an API-based provider (openai/anthropic/gemini/deepseek/qwen) — session-based providers (claude-code/codex) are too slow and will fail.
372
+ **Challenge expiry:** 20 seconds from `getChallenge` to `mint`. The LLM must solve quickly. Use an API-based provider (openai/anthropic/gemini/deepseek/qwen). Session-based providers (claude-code/codex) are too slow and will fail.
373
373
 
374
374
  ### Mint Price
375
375
 
@@ -401,21 +401,21 @@ npx apow-cli mine <tokenId> # or specify a rig by token ID
401
401
 
402
402
  ### What Each Mining Cycle Does
403
403
 
404
- 1. **Ownership check** -- verifies your wallet owns the specified token.
405
- 2. **Supply check** -- confirms mineable supply is not exhausted.
406
- 3. **Fetch challenge** -- reads `getMiningChallenge()` from the AgentCoin contract, which returns:
407
- - `challengeNumber` (bytes32) -- the current PoW challenge hash
408
- - `miningTarget` (uint256) -- the difficulty target
409
- - `smhl` -- the SMHL format challenge
410
- 4. **Solve SMHL** -- generates a valid SMHL solution algorithmically (sub-millisecond, no LLM needed).
411
- 5. **Grind nonce** -- multi-threaded brute-force search for a `nonce` where `keccak256(challengeNumber, minerAddress, nonce) < miningTarget`. Uses all CPU cores by default.
412
- 6. **Submit proof** -- calls `mine(nonce, smhlSolution, tokenId)` on AgentCoin. The contract verifies both the hash and SMHL solution on-chain.
413
- 7. **Collect reward** -- AGENT tokens are minted directly to your wallet.
414
- 8. **Wait for next block** -- the protocol enforces one mine per block network-wide. The client waits for block advancement before the next cycle.
404
+ 1. **Ownership check:** verifies your wallet owns the specified token.
405
+ 2. **Supply check:** confirms mineable supply is not exhausted.
406
+ 3. **Fetch challenge:** reads `getMiningChallenge()` from the AgentCoin contract, which returns:
407
+ - `challengeNumber` (bytes32): the current PoW challenge hash
408
+ - `miningTarget` (uint256): the difficulty target
409
+ - `smhl`: the SMHL format challenge
410
+ 4. **Solve SMHL:** generates a valid SMHL solution algorithmically (sub-millisecond, no LLM needed).
411
+ 5. **Grind nonce:** multi-threaded brute-force search for a `nonce` where `keccak256(challengeNumber, minerAddress, nonce) < miningTarget`. Uses all CPU cores by default.
412
+ 6. **Submit proof:** calls `mine(nonce, smhlSolution, tokenId)` on AgentCoin. The contract verifies both the hash and SMHL solution on-chain.
413
+ 7. **Collect reward:** AGENT tokens are minted directly to your wallet.
414
+ 8. **Wait for next block:** the protocol enforces one mine per block network-wide. The client waits for block advancement before the next cycle.
415
415
 
416
416
  ### Reward Economics
417
417
 
418
- **One mine per block, network-wide.** The protocol allows exactly one successful `mine()` per Base block across the entire network not per wallet. All miners compete for each block's reward. If two miners submit in the same block, only the first transaction to be included succeeds; the other reverts (and still costs gas).
418
+ **One mine per block, network-wide.** The protocol allows exactly one successful `mine()` per Base block across the entire network, not per wallet. All miners compete for each block's reward. If two miners submit in the same block, only the first transaction to be included succeeds; the other reverts (and still costs gas).
419
419
 
420
420
  | Parameter | Value |
421
421
  |---|---|
@@ -430,18 +430,18 @@ npx apow-cli mine <tokenId> # or specify a rig by token ID
430
430
 
431
431
  | Era | Total Network Mines | Reward per Mine |
432
432
  |---|---|---|
433
- | 0 | 0 -- 499,999 | 3.00 AGENT |
434
- | 1 | 500,000 -- 999,999 | 2.70 AGENT |
435
- | 2 | 1,000,000 -- 1,499,999 | 2.43 AGENT |
436
- | 3 | 1,500,000 -- 1,999,999 | 2.187 AGENT |
433
+ | 0 | 0 to 499,999 | 3.00 AGENT |
434
+ | 1 | 500,000 to 999,999 | 2.70 AGENT |
435
+ | 2 | 1,000,000 to 1,499,999 | 2.43 AGENT |
436
+ | 3 | 1,500,000 to 1,999,999 | 2.187 AGENT |
437
437
 
438
438
  A Mythic miner (5.00x) earns 15.00 AGENT per mine in Era 0.
439
439
 
440
440
  ### Cost Per Mine
441
441
 
442
442
  - **Gas:** ~0.001 ETH per `mine()` transaction on Base
443
- - **LLM:** $0 (mining uses algorithmic SMHL no LLM calls)
444
- - **Total:** ~$0.003--$0.005 per mining cycle (gas only)
443
+ - **LLM:** $0 (mining uses algorithmic SMHL, no LLM calls)
444
+ - **Total:** ~$0.003 to $0.005 per mining cycle (gas only)
445
445
 
446
446
  ### Error Handling
447
447
 
@@ -479,15 +479,15 @@ npx apow-cli stats <tokenId> # stats for a specific rig
479
479
 
480
480
  ### Competitive Mining & Scaling
481
481
 
482
- **How mining competition works:** The protocol enforces exactly ONE successful mine per block, network-wide. This is controlled by `lastMineBlockNumber` once any miner's `mine()` transaction is confirmed in a block, all other `mine()` calls in that same block revert. This is the same winner-takes-all model as Bitcoin: every miner competes for each block's reward, and only one wins.
482
+ **How mining competition works:** The protocol enforces exactly ONE successful mine per block, network-wide. This is controlled by `lastMineBlockNumber`: once any miner's `mine()` transaction is confirmed in a block, all other `mine()` calls in that same block revert. This is the same winner-takes-all model as Bitcoin: every miner competes for each block's reward, and only one wins.
483
483
 
484
484
  **One rig per wallet (CLI-enforced).** The CLI prevents minting more than one rig per wallet. Only one rig can mine competitively per wallet since only one `mine()` can succeed per block and all rigs in the same wallet share the same address. Extra rigs waste ETH on mint fees with no advantage.
485
485
 
486
486
  ### Scaling with Multiple Wallets
487
487
 
488
- To increase your chances of winning each block, run separate wallets each with its own rig and its own miner process. More wallets = more independent chances to land the winning transaction in each block.
488
+ To increase your chances of winning each block, run separate wallets, each with its own rig and its own miner process. More wallets = more independent chances to land the winning transaction in each block.
489
489
 
490
- **The user only funds one wallet.** Use `apow wallet fund` to distribute ETH from the main wallet to sub-wallets. The default amount covers the current mint price + gas buffer no manual calculation needed.
490
+ **The user only funds one wallet.** Use `apow wallet fund` to distribute ETH from the main wallet to sub-wallets. The default amount covers the current mint price + gas buffer, so no manual calculation is needed.
491
491
 
492
492
  **Autonomous agent flow for multi-wallet mining:**
493
493
 
@@ -531,7 +531,7 @@ pm2 start ecosystem.config.cjs
531
531
  pm2 logs
532
532
  ```
533
533
 
534
- **Economics of multi-wallet mining:** Failed `mine()` calls still cost gas (~0.001 ETH). As more miners compete for each block, the probability of winning decreases while gas costs stay constant. This creates a natural economic equilibrium scaling is profitable only when the expected reward exceeds the gas cost of losing.
534
+ **Economics of multi-wallet mining:** Failed `mine()` calls still cost gas (~0.001 ETH). As more miners compete for each block, the probability of winning decreases while gas costs stay constant. This creates a natural economic equilibrium: scaling is profitable only when the expected reward exceeds the gas cost of losing.
535
535
 
536
536
  **RPC rate limits:** For 3+ concurrent miners, use a dedicated RPC endpoint (Alchemy, Infura, QuickNode) instead of the default `https://mainnet.base.org`.
537
537
 
@@ -556,12 +556,12 @@ Ollama runs on `http://127.0.0.1:11434` by default. The miner connects there aut
556
556
 
557
557
  ### Session Mining (Claude Code / Codex)
558
558
 
559
- Mine using your existing Claude Code or Codex subscription no API key required:
559
+ Mine using your existing Claude Code or Codex subscription (no API key required):
560
560
 
561
561
  ```bash
562
562
  # In your .env
563
563
  LLM_PROVIDER=claude-code
564
- # No LLM_API_KEY needed the miner shells out to your local CLI
564
+ # No LLM_API_KEY needed; the miner shells out to your local CLI
565
565
  ```
566
566
 
567
567
  Or with Codex:
@@ -587,13 +587,13 @@ Set `RPC_URL` in `.env` to any Base-compatible JSON-RPC endpoint. The `CHAIN` va
587
587
  Each Miner NFT supports an on-chain agent wallet via the ERC-8004 standard. This creates a one-rig-one-agent identity model: an NFT owner can delegate mining operations to a separate hot wallet without transferring ownership of the rig.
588
588
 
589
589
  **Functions:**
590
- - `getAgentWallet(tokenId)` -- returns the registered agent wallet address
591
- - `setAgentWallet(tokenId, newWallet, deadline, signature)` -- sets a new agent wallet (requires EIP-712 signature from the new wallet)
592
- - `unsetAgentWallet(tokenId)` -- removes the agent wallet
590
+ - `getAgentWallet(tokenId)`: returns the registered agent wallet address
591
+ - `setAgentWallet(tokenId, newWallet, deadline, signature)`: sets a new agent wallet (requires EIP-712 signature from the new wallet)
592
+ - `unsetAgentWallet(tokenId)`: removes the agent wallet
593
593
 
594
- **What survives NFT transfer:** rarity, hashpower, total mine count, total AGENT earned, and the on-chain pixel art all permanent metadata baked into the token.
594
+ **What survives NFT transfer:** rarity, hashpower, total mine count, total AGENT earned, and the on-chain pixel art. All permanent metadata is baked into the token.
595
595
 
596
- **What gets cleared on transfer:** ONLY the agent wallet binding. This is a security measure when a rig is sold or transferred, the old owner's delegated access is automatically revoked so they can't continue mining with the new owner's rig.
596
+ **What gets cleared on transfer:** ONLY the agent wallet binding. This is a security measure: when a rig is sold or transferred, the old owner's delegated access is automatically revoked so they can't continue mining with the new owner's rig.
597
597
 
598
598
  **Trading:** Miner NFTs are fully tradeable (standard ERC-721). They are NOT soulbound. You can buy, sell, and transfer them on OpenSea or any NFT marketplace. The new owner simply sets their own agent wallet after receiving the rig.
599
599
 
@@ -642,13 +642,13 @@ Use the corresponding testnet contract addresses.
642
642
 
643
643
  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.
644
644
 
645
- ### Private Key Generation -- Local Only
645
+ ### Private Key Generation (Local Only)
646
646
 
647
- 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).
647
+ 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).
648
648
 
649
649
  ### Private Key Is NEVER Transmitted
650
650
 
651
- 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.
651
+ 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, and 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.
652
652
 
653
653
  ### Zero Telemetry
654
654
 
@@ -660,15 +660,15 @@ The CLI contains no analytics, no error reporting, and no phone-home behavior of
660
660
 
661
661
  The CLI makes only these network calls:
662
662
 
663
- 1. **Blockchain RPC** (to user-configured RPC URL, default: `mainnet.base.org`) -- standard `eth_call`, `eth_sendRawTransaction`, etc.
664
- 2. **LLM API** (to user-configured provider) -- sends only word-puzzle prompts for SMHL solving, never wallet data
663
+ 1. **Blockchain RPC** (to user-configured RPC URL, default: `mainnet.base.org`): standard `eth_call`, `eth_sendRawTransaction`, etc.
664
+ 2. **LLM API** (to user-configured provider): sends only word-puzzle prompts for SMHL solving, never wallet data
665
665
  3. **Bridge APIs** (only when using `apow fund --solana`):
666
- - **CoinGecko** (`api.coingecko.com`) -- SOL/ETH price quotes
667
- - **deBridge DLN** (`dln.debridge.finance`) -- bridge order creation and status (direct signing flow)
668
- - **Squid Router** (`v2.api.squidrouter.com`) -- deposit address generation (deposit address flow)
669
- - **Solana RPC** (`api.mainnet-beta.solana.com` or custom) -- balance checks and tx submission
666
+ - **CoinGecko** (`api.coingecko.com`): SOL/ETH price quotes
667
+ - **deBridge DLN** (`dln.debridge.finance`): bridge order creation and status (direct signing flow)
668
+ - **Squid Router** (`v2.api.squidrouter.com`): deposit address generation (deposit address flow)
669
+ - **Solana RPC** (`api.mainnet-beta.solana.com` or custom): balance checks and tx submission
670
670
 
671
- No private keys are transmitted to bridge providers. deBridge returns a serialized Solana transaction that is signed locally. Squid generates a deposit address -- the user sends SOL themselves.
671
+ No private keys are transmitted to bridge providers. deBridge returns a serialized Solana transaction that is signed locally. Squid generates a deposit address, and the user sends SOL themselves.
672
672
 
673
673
  ### LLM Calls Are Data-Isolated
674
674
 
@@ -678,13 +678,13 @@ The SMHL solver sends only generic word-generation prompts to the LLM (e.g., "Wr
678
678
 
679
679
  - Full source code: [github.com/Agentoshi/apow-cli](https://github.com/Agentoshi/apow-cli)
680
680
  - MIT licensed
681
- - Every line is auditable -- there are no obfuscated modules, no binary blobs, no minified dependencies performing network calls
681
+ - Every line is auditable. There are no obfuscated modules, no binary blobs, no minified dependencies performing network calls
682
682
  - Smart contracts are separately auditable: [github.com/Agentoshi/apow-core](https://github.com/Agentoshi/apow-core)
683
683
 
684
684
  ### npm Package Integrity
685
685
 
686
686
  - Published as `apow-cli` on npm
687
- - Package contents match the GitHub source -- verify with `npm pack --dry-run` or compare against the repo
687
+ - Package contents match the GitHub source (verify with `npm pack --dry-run` or compare against the repo)
688
688
  - No `postinstall` scripts that execute arbitrary code
689
689
  - The `package.json` `scripts` section contains only standard build/dev commands
690
690
 
@@ -709,7 +709,7 @@ Every statement above can be independently verified:
709
709
  # Clone the source
710
710
  git clone https://github.com/Agentoshi/apow-cli && cd apow-cli
711
711
 
712
- # Search for any outbound network calls -- you'll find only RPC and LLM calls
712
+ # Search for any outbound network calls (you'll find only RPC and LLM calls)
713
713
  grep -r "fetch\|axios\|http\|request" src/
714
714
 
715
715
  # Confirm private key is never in any network payload