apow-cli 0.11.6 → 0.11.8
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/README.md +4 -4
- package/dist/miner.js +6 -3
- package/package.json +1 -1
- package/skill.md +2 -2
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ npx apow-cli
|
|
|
28
28
|
> **v0.8.0+: Bring your own RPC or use auto-pay.** You need a Base RPC endpoint. Two options:
|
|
29
29
|
>
|
|
30
30
|
> 1. **Bring your own** (free): Get a free RPC URL from [Alchemy](https://www.alchemy.com/), [QuickNode](https://www.quicknode.com/), or any Base RPC provider. Set `RPC_URL` in your `.env`.
|
|
31
|
-
> 2. **QuickNode x402** (paid, zero setup): Set `USE_X402=true` in your `.env`. Your mining wallet pays
|
|
31
|
+
> 2. **QuickNode x402** (paid, zero setup): Set `USE_X402=true` in your `.env`. Your mining wallet pays for RPC usage via the [x402 payment protocol](https://www.x402.org/). Start with at least 2.00 USDC on Base and add more for headroom. No API key or account needed.
|
|
32
32
|
>
|
|
33
33
|
> Run `apow setup` to configure interactively.
|
|
34
34
|
|
|
@@ -71,16 +71,16 @@ Each wallet gets one rig, each rig mines independently. More wallets = more chan
|
|
|
71
71
|
If you prefer to do it yourself:
|
|
72
72
|
|
|
73
73
|
```bash
|
|
74
|
-
npx apow-cli start # guided happy path: setup ->
|
|
74
|
+
npx apow-cli start # guided happy path: setup -> funding checks -> mint -> mine
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
If you want to control each step manually, the older
|
|
77
|
+
If you want to control each step manually, the older step-by-step flow is still supported below.
|
|
78
78
|
|
|
79
79
|
## Commands
|
|
80
80
|
|
|
81
81
|
| Command | Description |
|
|
82
82
|
|---------|-------------|
|
|
83
|
-
| `apow start` | Guided happy path: setup ->
|
|
83
|
+
| `apow start` | Guided happy path: setup -> funding checks -> mint -> mine |
|
|
84
84
|
| `apow setup` | Agent-first setup wizard: Easy Mode (x402 everywhere) or Advanced Mode |
|
|
85
85
|
| `apow fund` | Fund your wallet: bridge from Solana/Ethereum or send on Base, auto-split ETH+USDC |
|
|
86
86
|
| `apow wallet new` | Generate a new mining wallet, plus optional encrypted JSON keystore backup |
|
package/dist/miner.js
CHANGED
|
@@ -261,6 +261,9 @@ async function grindNonce(challengeNumber, target, minerAddress, onProgress) {
|
|
|
261
261
|
nonce += 1n;
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
+
function toBigInt(value) {
|
|
265
|
+
return typeof value === "bigint" ? value : BigInt(value);
|
|
266
|
+
}
|
|
264
267
|
async function showStartupBanner(tokenId) {
|
|
265
268
|
const { account } = (0, wallet_1.requireWallet)();
|
|
266
269
|
const [ethBalance, totalMines, totalMinted, mineableSupply, eraInterval, hashpowerRaw, rarityRaw] = await Promise.all([
|
|
@@ -314,9 +317,9 @@ async function showStartupBanner(tokenId) {
|
|
|
314
317
|
]);
|
|
315
318
|
console.log("");
|
|
316
319
|
return {
|
|
317
|
-
mineableSupply,
|
|
318
|
-
eraInterval,
|
|
319
|
-
hashpower: hashpowerRaw,
|
|
320
|
+
mineableSupply: toBigInt(mineableSupply),
|
|
321
|
+
eraInterval: toBigInt(eraInterval),
|
|
322
|
+
hashpower: toBigInt(hashpowerRaw),
|
|
320
323
|
};
|
|
321
324
|
}
|
|
322
325
|
async function startMining(tokenId) {
|
package/package.json
CHANGED
package/skill.md
CHANGED
|
@@ -30,7 +30,7 @@ on Base. Everything else you handle yourself.
|
|
|
30
30
|
|
|
31
31
|
**Via npm (recommended):**
|
|
32
32
|
```bash
|
|
33
|
-
npx apow-cli start # zero-config happy path: setup ->
|
|
33
|
+
npx apow-cli start # zero-config happy path: setup -> funding checks -> mint -> mine
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
**Via source:**
|
|
@@ -48,7 +48,7 @@ If you're an AI agent, you can skip the wizard and write the `.env` directly.
|
|
|
48
48
|
```bash
|
|
49
49
|
# 1. Generate a wallet
|
|
50
50
|
npx apow-cli wallet new
|
|
51
|
-
# Captures address + private key from output (
|
|
51
|
+
# Captures address + private key from output (and can save a plaintext import helper plus encrypted keystore)
|
|
52
52
|
|
|
53
53
|
# 2. Write .env directly — Easy Mode equivalent
|
|
54
54
|
# Contract addresses are built-in defaults — no need to specify them
|