apow-cli 0.12.0 → 0.12.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/.env.example +3 -1
- package/README.md +39 -30
- package/dist/base-funding.js +98 -0
- package/dist/bridge/squid.js +29 -8
- package/dist/bridge/uniswap.js +48 -1
- package/dist/errors.js +5 -1
- package/dist/fund.js +91 -506
- package/dist/funding-plan.js +29 -0
- package/dist/grinder-http.js +10 -9
- package/dist/index.js +53 -59
- package/dist/miner.js +2 -2
- package/dist/preflight.js +7 -17
- package/dist/wallet-recovery.js +52 -0
- package/dist/wallet.js +8 -8
- package/package.json +5 -4
- package/skill.md +92 -68
package/skill.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: apow-mining
|
|
3
|
-
description:
|
|
4
|
-
allowed-tools: Bash(npx --yes apow-cli@0.12.
|
|
3
|
+
description: Set up APoW Easy Mode with one Base ETH deposit, a recoverable encrypted wallet, and remote GPU mining.
|
|
4
|
+
allowed-tools: Bash(npx --yes apow-cli@0.12.3 start --easy) Bash(npx --yes apow-cli@0.12.3 wallet verify-recovery)
|
|
5
5
|
metadata:
|
|
6
6
|
openclaw:
|
|
7
7
|
requires:
|
|
@@ -11,82 +11,106 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
# APoW Mining
|
|
13
13
|
|
|
14
|
-
Use
|
|
14
|
+
Use the official CLI to mine AGENT on Base with a dedicated low-balance wallet.
|
|
15
|
+
SMHL means **Semantic-Mathematical Hybrid Lock**, adapted from
|
|
16
|
+
[MoltCaptcha](https://github.com/MoltCaptcha/MoltCaptcha). APoW checks string
|
|
17
|
+
format on-chain; it does not verify semantic meaning or prove AI authorship.
|
|
15
18
|
|
|
16
|
-
|
|
19
|
+
## Runtime choice
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
Read the [personal assistant profiles](https://apow.io/docs/technical/assistants)
|
|
22
|
+
for Grok Bot, Muse, Instinct, Wajo/Fo, OpenClaw, Hermes, Claude Code, Codex,
|
|
23
|
+
Manus, Cowork, and Perplexity. Check Node 20+, outbound HTTPS, persistent files,
|
|
24
|
+
secure CLI unlock, and the permitted process lifetime before funding.
|
|
19
25
|
|
|
20
|
-
|
|
26
|
+
Default to **Easy Mode**: wallet-paid RPC, mint LLM, and remote GPU grinding.
|
|
27
|
+
A runner is still required to sign and submit transactions. Do not rent a VPS
|
|
28
|
+
or switch to CPU mining by default. The current web app also needs its browser
|
|
29
|
+
tab open; fully managed APoW jobs are [under development](https://apow.io/docs/technical/managed-mining).
|
|
30
|
+
Do not claim that they are already available.
|
|
21
31
|
|
|
22
|
-
|
|
32
|
+
## Scope and approval
|
|
23
33
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
Explain once: one dedicated encrypted wallet, one rig mint within the local
|
|
35
|
+
policy, ETH-to-USDC funding conversion, x402 services, and continuous Base
|
|
36
|
+
mining transactions until stopped. Give the applicable caps and real costs.
|
|
37
|
+
Obtain explicit approval if this scope has not already been approved. Honor
|
|
38
|
+
an existing approval and budget; do not ask again at every routine step.
|
|
39
|
+
Funding does not authorize access to another wallet or automatic top-ups.
|
|
40
|
+
Do not enable sweeps unless the user already configured and approved them.
|
|
27
41
|
|
|
28
42
|
```bash
|
|
29
|
-
npx --yes apow-cli@0.12.
|
|
43
|
+
npx --yes apow-cli@0.12.3 start --easy
|
|
30
44
|
```
|
|
31
45
|
|
|
32
|
-
|
|
33
|
-
the
|
|
34
|
-
phases around that checkpoint:
|
|
35
|
-
|
|
36
|
-
- before funding, it creates an encrypted APoW wallet if needed, configures Easy
|
|
37
|
-
Mode, prints the complete Base address and required balances, then stops;
|
|
38
|
-
- after the user funds that address and confirms funding, rerunning it detects
|
|
39
|
-
an existing rig or mints one within the configured cap, starts continuous
|
|
40
|
-
mining, retries normal transient failures, and keeps signing behind the local
|
|
41
|
-
enforce-mode policy.
|
|
42
|
-
|
|
43
|
-
The user's approval authorizes this Easy Mode invocation; Wallet Protocol v2 remains the sole runtime opsec and signing-policy layer. The user can stop mining with Ctrl+C.
|
|
44
|
-
|
|
45
|
-
## Funding handoff
|
|
46
|
-
|
|
47
|
-
If the CLI pauses because the wallet needs funds:
|
|
48
|
-
|
|
49
|
-
1. Return the complete Base wallet address and the ETH and USDC minimums printed by the CLI.
|
|
50
|
-
2. Tell the user to send those assets to that address on Base.
|
|
51
|
-
3. Stop. Do not move, convert, or source funds for the user.
|
|
52
|
-
4. After the user confirms funding, resume the same Easy Mode flow with the pinned `start --easy` command.
|
|
53
|
-
|
|
54
|
-
Funding is a handoff, not permission to operate another wallet or move assets.
|
|
55
|
-
|
|
56
|
-
## Security boundaries
|
|
46
|
+
Run only this pinned Easy Mode flow and the recovery check below in this skill.
|
|
47
|
+
If the package is unavailable, report it; do not substitute `latest`.
|
|
57
48
|
|
|
58
|
-
|
|
59
|
-
- Never search files, directories, environment variables, shell history, mounted drives, or other machines for wallets or credentials.
|
|
60
|
-
- Never import or operate a main wallet for this skill.
|
|
61
|
-
- Never create a raw-key file or place a raw wallet secret in project configuration.
|
|
62
|
-
- Invoke only the single pinned `start --easy` command in this skill; every other CLI command is out of scope.
|
|
63
|
-
- Never change the signing policy from `enforce`.
|
|
64
|
-
- Never raise the mint, transfer, sweep, or x402 spend caps.
|
|
65
|
-
- Never install or execute an unpinned package version.
|
|
66
|
-
- Never continue if the package version, contract addresses, chain, approval scope, or policy state differs from what the CLI displays.
|
|
49
|
+
## Recover before funding
|
|
67
50
|
|
|
68
|
-
|
|
51
|
+
The user enters a password directly in a trusted terminal, or uses a supported
|
|
52
|
+
secret manager. Never ask for a password, private key, or recovery phrase in chat.
|
|
53
|
+
For headless operation, a secret-manager `KEYSTORE_PASSWORD_CMD` reference must
|
|
54
|
+
be saved in the private runner configuration. A password generated only in
|
|
55
|
+
process memory is not recoverable after a restart. A browser credential vault
|
|
56
|
+
must not be assumed to provide CLI secrets.
|
|
69
57
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- one rig mint to at most `0.01 ETH`;
|
|
75
|
-
- each x402 payment to at most `1 USDC`;
|
|
76
|
-
- aggregate x402 payments to at most `20 USDC` per UTC day;
|
|
77
|
-
- transfers and sweeps to their separately configured destinations and caps.
|
|
78
|
-
|
|
79
|
-
Treat the CLI’s displayed policy as authoritative. If it is less restrictive than these defaults, stop and ask the user to review it.
|
|
80
|
-
|
|
81
|
-
## Failure handling
|
|
82
|
-
|
|
83
|
-
- No wallet: allow `start` to create one encrypted APoW wallet.
|
|
84
|
-
- Password unavailable: pause for direct local entry; do not handle it in chat.
|
|
85
|
-
- Funding needed: use the Base-only handoff above.
|
|
86
|
-
- Policy not in enforce mode: stop.
|
|
87
|
-
- User approval for the scoped Easy Mode command missing: stop.
|
|
88
|
-
- Package version unavailable: stop; do not substitute `latest`.
|
|
89
|
-
- RPC, SMHL, grinder, or transaction failure: report the concise error and let the CLI’s bounded retry behavior handle transient failures.
|
|
90
|
-
- Mining stopped: report whether the user interrupted it or the CLI exited with an error.
|
|
58
|
+
```bash
|
|
59
|
+
npx --yes apow-cli@0.12.3 wallet verify-recovery
|
|
60
|
+
```
|
|
91
61
|
|
|
92
|
-
|
|
62
|
+
The CLI checks a fresh-process unlock of the **same address** before giving
|
|
63
|
+
funding instructions. The user must also keep the encrypted keystore and
|
|
64
|
+
password separately outside the runner. Process verification does not prove
|
|
65
|
+
VM durability or an independent backup. If secure unlock is unavailable, stop
|
|
66
|
+
before funding. Keep an existing locked wallet; do not replace it.
|
|
67
|
+
|
|
68
|
+
## One deposit
|
|
69
|
+
|
|
70
|
+
Ask for **Base ETH only**, using the complete address and live amount printed
|
|
71
|
+
by the CLI. The quote includes the current rig fee, conservative ETH reserve,
|
|
72
|
+
swap gas, and a missing 2 USDC service budget. It is not a fixed USD quote.
|
|
73
|
+
Do not ask the user to buy or send USDC separately. After deposit, rerun the
|
|
74
|
+
same pinned start command: it converts the required ETH, checks landed balances,
|
|
75
|
+
and mints or resumes an existing rig. It stops before a swap that would consume
|
|
76
|
+
the ETH reserve.
|
|
77
|
+
|
|
78
|
+
Solana SOL/USDC funding exists only with a configured Squid integration and a
|
|
79
|
+
verified deposit-address quote. Never send SOL to the Base EOA. That optional
|
|
80
|
+
bridge route requires the separate funding guide and the user's choice of asset;
|
|
81
|
+
this default skill uses the Base ETH handoff.
|
|
82
|
+
|
|
83
|
+
## Run and report
|
|
84
|
+
|
|
85
|
+
Start one runner per wallet. Record its process handle and inspect recent logs.
|
|
86
|
+
Use the assistant profile's supported background mechanism. A background PID
|
|
87
|
+
is not proof of survival after a session or VM ends.
|
|
88
|
+
|
|
89
|
+
Report these states accurately: wallet recovery verified; awaiting ETH; funded;
|
|
90
|
+
rig minted or found; runner active; first confirmed mine. Show a Base transaction
|
|
91
|
+
hash for a confirmed mine. A health check or remote GPU request alone is not a
|
|
92
|
+
mine. Never invent network activity, competing GPU counts, yield, or profitability.
|
|
93
|
+
|
|
94
|
+
Local CPU mining is a separately chosen novelty experiment. Do not enable local
|
|
95
|
+
fallback after remote errors without the user's instruction. A quiet-network
|
|
96
|
+
success does not establish useful performance under competition.
|
|
97
|
+
|
|
98
|
+
## Policy and failure handling
|
|
99
|
+
|
|
100
|
+
Keep the default signing policy in enforce mode. Default ceilings are 0.01 ETH
|
|
101
|
+
per rig mint, 1 USDC per x402 request, and 20 USDC per UTC day. Swaps have their
|
|
102
|
+
own 0.02 ETH ceiling. Lower user-approved limits take precedence. These ceilings
|
|
103
|
+
do not constitute a hard USD cap on gas, swaps, hosting, or exchange-rate changes.
|
|
104
|
+
Never raise caps or disable enforcement to make a task proceed.
|
|
105
|
+
|
|
106
|
+
- Locked wallet or missing durable secret: repair supported local unlock; no replacement wallet.
|
|
107
|
+
- Funding missing: return the single Base ETH quote; resume the same address after deposit.
|
|
108
|
+
- Unsupported runner: report the exact missing capability; use an already approved host, without a new rental.
|
|
109
|
+
- Policy denial: stop and report the requested action and cap.
|
|
110
|
+
- GPU cold startup: allow the CLI's 330-second transport deadline; do not launch duplicate paid requests.
|
|
111
|
+
- Unknown payment/transaction outcome: stop and reconcile before manually resuming.
|
|
112
|
+
- Normal transient failures: let the CLI's bounded retries run; do not silently change mode.
|
|
113
|
+
- User stop: stop the process and report any in-flight transaction or unresolved payment.
|
|
114
|
+
|
|
115
|
+
Keep wallet secrets out of logs, project files, repositories, agent memory, and
|
|
116
|
+
other agents' workspaces. Do not search for credentials or operate a main wallet.
|