@artblocks/abx-cli 0.1.0-alpha.31 → 0.1.0-alpha.33
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/CHANGELOG.md +196 -0
- package/dist/capabilities.d.ts +94 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +135 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +25 -29
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/scaffold.d.ts +9 -1
- package/dist/commands/scaffold.d.ts.map +1 -1
- package/dist/commands/scaffold.js +59 -12
- package/dist/commands/scaffold.js.map +1 -1
- package/dist/flag-allowlists.d.ts.map +1 -1
- package/dist/flag-allowlists.js +2 -1
- package/dist/flag-allowlists.js.map +1 -1
- package/dist/flags.d.ts +0 -4
- package/dist/flags.d.ts.map +1 -1
- package/dist/flags.js +0 -6
- package/dist/flags.js.map +1 -1
- package/dist/main.js +36 -20
- package/dist/main.js.map +1 -1
- package/dist/ownerops.d.ts +33 -26
- package/dist/ownerops.d.ts.map +1 -1
- package/dist/ownerops.js +85 -56
- package/dist/ownerops.js.map +1 -1
- package/dist/update-check.d.ts +6 -1
- package/dist/update-check.d.ts.map +1 -1
- package/dist/update-check.js +40 -17
- package/dist/update-check.js.map +1 -1
- package/package.json +6 -6
- package/skill/SKILL.md +164 -499
- package/skill/agents/openai.yaml +4 -0
- package/skill/reference/capabilities.md +187 -0
- package/skill/reference/code.md +210 -0
- package/skill/reference/creator-token.md +90 -95
- package/skill/reference/deploy.md +167 -0
- package/skill/reference/diagnose.md +165 -0
- package/skill/reference/hosting.md +144 -126
- package/skill/reference/operate.md +181 -0
- package/skill/reference/setup.md +105 -62
- package/skill/reference/code-projects.md +0 -368
- package/skill/reference/decisions.md +0 -174
- package/skill/reference/operating.md +0 -220
- package/skill/reference/troubleshooting.md +0 -65
package/skill/reference/setup.md
CHANGED
|
@@ -1,87 +1,130 @@
|
|
|
1
|
-
# Setup
|
|
1
|
+
# Setup and safety
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use this reference when installing ABX, selecting a binary or signer, configuring a new environment,
|
|
4
|
+
or preparing a real transaction.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
that section is the required setup. The RPC and troubleshooting material below it is reference you reach
|
|
7
|
-
for when indexing is slow or a resolver will not serve, not something a first launch needs.
|
|
6
|
+
## Contents
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
- [Resolve the tool before the project](#resolve-the-tool-before-the-project)
|
|
9
|
+
- [Never expose secrets](#never-expose-secrets)
|
|
10
|
+
- [Select the chain explicitly through the environment](#select-the-chain-explicitly-through-the-environment)
|
|
11
|
+
- [Choose one signing lane](#choose-one-signing-lane)
|
|
12
|
+
- [Prepare without mutating](#prepare-without-mutating)
|
|
13
|
+
- [New environment checklist](#new-environment-checklist)
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
v22.13.0 / v23.4.0). On anything older the CLI refuses to start and names the fix — do not work around it
|
|
13
|
-
with `NODE_OPTIONS=--experimental-sqlite`, that combination is untested.
|
|
15
|
+
## Resolve the tool before the project
|
|
14
16
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
**Resolve in this order and use the first hit.** Don't jump to a global install; a project-local CLI is pinned in the creator's `package.json` (reproducible, and what `abx skill install` version-locks against), so it wins whenever it exists:
|
|
17
|
+
Inside the ABX source repository run `pnpm abx …`; elsewhere run the installed `abx`. A bare global
|
|
18
|
+
binary inside the repository may be older than the source. Start with:
|
|
18
19
|
|
|
19
20
|
```bash
|
|
20
|
-
|
|
21
|
-
abx
|
|
21
|
+
abx version
|
|
22
|
+
abx doctor
|
|
23
|
+
abx capabilities --json
|
|
24
|
+
abx skill install
|
|
22
25
|
```
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
`abx doctor` reports binary provenance, CLI/skill drift, active chain, RPC health and history reach,
|
|
28
|
+
wallet readiness, canonical factories, storage, and configured remotes without exposing credentials.
|
|
29
|
+
Treat a red check as an actionable setup state, not as permission to improvise a workaround.
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
The shipped skill is named `abx`. `abx skill install` installs it to `.claude/skills/abx` and
|
|
32
|
+
`.agents/skills/abx` by default; `--agent`, `--global`, and `--target` narrow the destination. During
|
|
33
|
+
the rename transition the installer moves a recognized `abx-self-host` folder to
|
|
34
|
+
`.abx-skill-backups/` before installing the new name. It preserves custom bytes rather than deleting
|
|
35
|
+
them. For a custom skills parent, run `abx skill install --target <that-parent>`; do not move or merge
|
|
36
|
+
the old folder manually. Restart the agent after installation.
|
|
28
37
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
38
|
+
ABX requires Node 22.13 or newer. Prefer a project-local npm dependency for reproducible automation;
|
|
39
|
+
use a global install for interactive machine-wide use. Avoid repeated `npx` execution when version
|
|
40
|
+
provenance matters because caches can outlive an upgrade.
|
|
41
|
+
|
|
42
|
+
## Never expose secrets
|
|
43
|
+
|
|
44
|
+
Do not open, search, quote, or print `.env`. Do not echo variables to test whether they exist. Do not
|
|
45
|
+
paste a private key into a command line, generated file, wallet page, bug report, or transcript.
|
|
46
|
+
|
|
47
|
+
Sensitive values include:
|
|
33
48
|
|
|
34
|
-
|
|
49
|
+
- `ABX_DEPLOYER_PK` and any wallet key;
|
|
50
|
+
- credential-bearing `ABX_RPC_URLS*` values;
|
|
51
|
+
- `PINATA_JWT`, S3/R2 keys, remote-provider tokens, effects/admin tokens;
|
|
52
|
+
- Arweave JWK contents and browser signing-session URLs.
|
|
35
53
|
|
|
36
|
-
|
|
54
|
+
Use `abx doctor`, `abx remote <name>`, `abx storage show --check`, and redacted CLI errors. If a tool
|
|
55
|
+
ever emits an unredacted credential-bearing endpoint, stop, rotate the credential, and report the
|
|
56
|
+
output bug without repeating the secret.
|
|
37
57
|
|
|
38
|
-
|
|
39
|
-
- **Signing:** `ABX_DEPLOYER_PK` (the only name read — older `SEPOLIA_FUNDED_PK`/`SEPOLIA_WALLET_PK` are retired, and the CLI's error names them if it finds neither) is needed ONLY for hot/unattended signing. If the creator owns a wallet, prefer **`--sign`** — no key in `.env`. `doctor`'s missing-key ✗ is **not fatal** on the `--sign` path.
|
|
40
|
-
- `ABX_RPC_URLS`, `ABX_PUBLIC_BASE_URL` (remote-resolver custody only), optional `OPENSEA_API_KEY`, plus any backend secret.
|
|
41
|
-
- **One client-side credential grammar: `ABX_REMOTE_<NAME>_URL` + `ABX_REMOTE_<NAME>_TOKEN`** (same normalization as `ABX_RPC_URLS_<CHAIN>`) — a node you run is just the name **`self`** (`deploy-resolver` generates `ABX_REMOTE_SELF_TOKEN` locally; bare `--remote` defaults to it), a managed provider is its own name. `ABX_RESOLVER_ADMIN_TOKEN` is the **resolver's own server-side config** (never read client-side) — a stale copy of it in `.env` with no `ABX_REMOTE_SELF_TOKEN` gets a pointed error naming both vars, and `abx doctor` flags it too. Only `_URL`/`_TOKEN` are read — `ABX_REMOTE_<NAME>_KEY` is ignored (the CLI flags a near-miss name).
|
|
58
|
+
## Select the chain explicitly through the environment
|
|
42
59
|
|
|
43
|
-
|
|
60
|
+
The toolkit supports the chains printed by `abx capabilities`; today those are Base Sepolia by
|
|
61
|
+
default and Ethereum Sepolia via `ABX_CHAIN=sepolia`. There is deliberately no `--chain` flag. The
|
|
62
|
+
CLI refuses it because silently ignoring a wrong-chain request could spend on the wrong network.
|
|
44
63
|
|
|
45
|
-
|
|
64
|
+
Use per-chain RPC variables when operating more than one chain. `abx doctor` checks chain identity,
|
|
65
|
+
wide-range `eth_getLogs`, archival reach, and nonce coherence. Put a healthy archive endpoint first:
|
|
66
|
+
fallback transports rotate on errors, not on a successful but pruned empty log response.
|
|
46
67
|
|
|
68
|
+
The local projection and managed Arweave identity remain in `.abx-self-host/` unless
|
|
69
|
+
`ABX_DATA_DIR` overrides it. That runtime directory is separate from the renamed `abx` skill and is
|
|
70
|
+
not being renamed. Back up the managed Arweave key with `abx storage backup-key`; never print it.
|
|
47
71
|
|
|
48
|
-
##
|
|
72
|
+
## Choose one signing lane
|
|
49
73
|
|
|
50
|
-
|
|
74
|
+
Every write uses one of three lanes:
|
|
51
75
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
76
|
+
| Lane | Select | Use when |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| Hot | `--send` or default | An environment key may sign unattended |
|
|
79
|
+
| Wallet | `--sign --for 0x…` | A human approves in their browser wallet |
|
|
80
|
+
| Cold | `--unsigned --for 0x…` | A multisig/offline signer needs prepared transactions |
|
|
81
|
+
|
|
82
|
+
Run `abx doctor --for <address>` before a wallet or cold operation. On the wallet lane, give the
|
|
83
|
+
human the locally generated signing page; never request or handle their key. On the cold lane, verify
|
|
84
|
+
chain, sender, target, calldata, value, and ordering before handing transactions over.
|
|
85
|
+
|
|
86
|
+
`--onchain-image` staging cannot use the cold lane because each chunk transaction depends on the
|
|
87
|
+
receipt of the preceding transaction. Use hot or wallet signing. Do not split staging into a homemade
|
|
88
|
+
offline sequence.
|
|
56
89
|
|
|
57
|
-
|
|
90
|
+
For any one EOA, run one write command at a time. ABX obtains pending and latest nonces once, takes the
|
|
91
|
+
safe maximum, increments locally, waits for newly deployed code when a following transaction targets
|
|
92
|
+
it, and throws typed reversion errors. Starting concurrent processes bypasses that serialization.
|
|
58
93
|
|
|
59
|
-
|
|
94
|
+
## Prepare without mutating
|
|
60
95
|
|
|
61
|
-
|
|
96
|
+
Use command help and dry runs, not guessed syntax:
|
|
62
97
|
|
|
63
|
-
|
|
98
|
+
```bash
|
|
99
|
+
abx help deploy-code
|
|
100
|
+
abx deploy-code … --dry-run --json
|
|
101
|
+
```
|
|
64
102
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
103
|
+
A dry run may read contracts, probe endpoints, analyze files, or verify an address, but it does not
|
|
104
|
+
send or store. Address prediction is meaningful only when the salt and deployer are pinned. Use
|
|
105
|
+
`abx predict` when another contract or resolver must know the collection address before deployment.
|
|
106
|
+
|
|
107
|
+
Before any real send, confirm:
|
|
108
|
+
|
|
109
|
+
- active chain and deploying/owning address;
|
|
110
|
+
- contract family and edition arithmetic;
|
|
111
|
+
- name, symbol, royalties and royalty ceiling;
|
|
112
|
+
- deploy-time options such as burnability and creator-token enrollment;
|
|
113
|
+
- custody, public resolution, image/animation/trait surfaces;
|
|
114
|
+
- mint amount, value, transaction count, and expected gas;
|
|
115
|
+
- every irreversible lock or authority transfer.
|
|
116
|
+
|
|
117
|
+
Do not make a real send merely because a dry run exited successfully. The dry run is the plan; the
|
|
118
|
+
human confirmation authorizes execution.
|
|
119
|
+
|
|
120
|
+
## New environment checklist
|
|
121
|
+
|
|
122
|
+
1. Install Node 22.13+ and the desired CLI version.
|
|
123
|
+
2. Install the co-versioned skill with `abx skill install`, then restart the agent.
|
|
124
|
+
3. Select the testnet using `ABX_CHAIN` if not using Base Sepolia.
|
|
125
|
+
4. Add RPC, signer, storage, and remote configuration outside the transcript.
|
|
126
|
+
5. Run `abx doctor` and resolve every red check relevant to the chosen lane.
|
|
127
|
+
6. Run `abx storage show --check` when bytes will leave the local disk.
|
|
128
|
+
7. Run `abx remote <name>` before relying on a configured managed service.
|
|
129
|
+
8. Run command help, then a JSON dry run.
|
|
130
|
+
9. Confirm the plan and only then execute.
|