@artblocks/abx-cli 0.1.0-alpha.6 → 0.1.0-alpha.60
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 +192 -0
- package/assets/renderer-scaffold/README.md +41 -11
- package/assets/renderer-scaffold/foundry.toml +5 -0
- package/assets/renderer-scaffold/remappings.txt +1 -1
- package/assets/renderer-scaffold/script/DeployHooks.s.sol +24 -0
- package/assets/renderer-scaffold/script/Preview.s.sol +99 -0
- package/assets/renderer-scaffold/src/MyHooks.sol +20 -0
- package/assets/renderer-scaffold/src/MyRenderer.sol +4 -4
- package/assets/renderer-scaffold/src/MyTraits.sol +2 -2
- package/assets/renderer-scaffold/test/MyRenderer.t.sol +60 -3
- package/dist/bin.d.ts +26 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +63 -0
- package/dist/bin.js.map +1 -0
- package/dist/capabilities.d.ts +126 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +168 -0
- package/dist/capabilities.js.map +1 -0
- package/dist/commands/auth.d.ts +54 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +447 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/deploy.d.ts +293 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +5624 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/feedback.d.ts +7 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +147 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/maintenance.d.ts +4 -0
- package/dist/commands/maintenance.d.ts.map +1 -0
- package/dist/commands/maintenance.js +114 -0
- package/dist/commands/maintenance.js.map +1 -0
- package/dist/commands/project.d.ts +458 -0
- package/dist/commands/project.d.ts.map +1 -0
- package/dist/commands/project.js +1832 -0
- package/dist/commands/project.js.map +1 -0
- package/dist/commands/reads.d.ts +85 -0
- package/dist/commands/reads.d.ts.map +1 -0
- package/dist/commands/reads.js +881 -0
- package/dist/commands/reads.js.map +1 -0
- package/dist/commands/scaffold.d.ts +89 -0
- package/dist/commands/scaffold.d.ts.map +1 -0
- package/dist/commands/scaffold.js +738 -0
- package/dist/commands/scaffold.js.map +1 -0
- package/dist/commands/service.d.ts +67 -0
- package/dist/commands/service.d.ts.map +1 -0
- package/dist/commands/service.js +760 -0
- package/dist/commands/service.js.map +1 -0
- package/dist/commands/storage.d.ts +51 -0
- package/dist/commands/storage.d.ts.map +1 -0
- package/dist/commands/storage.js +399 -0
- package/dist/commands/storage.js.map +1 -0
- package/dist/commands/submit-app.d.ts +102 -0
- package/dist/commands/submit-app.d.ts.map +1 -0
- package/dist/commands/submit-app.js +638 -0
- package/dist/commands/submit-app.js.map +1 -0
- package/dist/config.d.ts +94 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +332 -12
- package/dist/config.js.map +1 -1
- package/dist/conformance.d.ts +31 -0
- package/dist/conformance.d.ts.map +1 -0
- package/dist/conformance.js +390 -0
- package/dist/conformance.js.map +1 -0
- package/dist/contract-read-error.d.ts +5 -0
- package/dist/contract-read-error.d.ts.map +1 -0
- package/dist/contract-read-error.js +37 -0
- package/dist/contract-read-error.js.map +1 -0
- package/dist/creator-agent.d.ts +40 -0
- package/dist/creator-agent.d.ts.map +1 -0
- package/dist/creator-agent.js +206 -0
- package/dist/creator-agent.js.map +1 -0
- package/dist/creator-signer.d.ts +33 -0
- package/dist/creator-signer.d.ts.map +1 -0
- package/dist/creator-signer.js +197 -0
- package/dist/creator-signer.js.map +1 -0
- package/dist/deploy-plan.d.ts +218 -0
- package/dist/deploy-plan.d.ts.map +1 -0
- package/dist/deploy-plan.js +20 -0
- package/dist/deploy-plan.js.map +1 -0
- package/dist/deps.d.ts +6 -39
- package/dist/deps.d.ts.map +1 -1
- package/dist/deps.js +4 -68
- package/dist/deps.js.map +1 -1
- package/dist/errors.d.ts +22 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +32 -0
- package/dist/errors.js.map +1 -0
- package/dist/flag-allowlists.d.ts +53 -0
- package/dist/flag-allowlists.d.ts.map +1 -0
- package/dist/flag-allowlists.js +185 -0
- package/dist/flag-allowlists.js.map +1 -0
- package/dist/flags.d.ts +53 -0
- package/dist/flags.d.ts.map +1 -1
- package/dist/flags.js +151 -1
- package/dist/flags.js.map +1 -1
- package/dist/jsonout.d.ts +37 -0
- package/dist/jsonout.d.ts.map +1 -0
- package/dist/jsonout.js +79 -0
- package/dist/jsonout.js.map +1 -0
- package/dist/kind.d.ts +57 -0
- package/dist/kind.d.ts.map +1 -0
- package/dist/kind.js +122 -0
- package/dist/kind.js.map +1 -0
- package/dist/main.js +837 -5213
- package/dist/main.js.map +1 -1
- package/dist/mintpage.d.ts +17 -2
- package/dist/mintpage.d.ts.map +1 -1
- package/dist/mintpage.js +241 -54
- package/dist/mintpage.js.map +1 -1
- package/dist/output.d.ts +184 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +774 -0
- package/dist/output.js.map +1 -0
- package/dist/ownerops.d.ts +450 -57
- package/dist/ownerops.d.ts.map +1 -1
- package/dist/ownerops.js +2229 -378
- package/dist/ownerops.js.map +1 -1
- package/dist/preview.d.ts +23 -5
- package/dist/preview.d.ts.map +1 -1
- package/dist/preview.js +95 -43
- package/dist/preview.js.map +1 -1
- package/dist/provision.d.ts +3 -13
- package/dist/provision.d.ts.map +1 -1
- package/dist/provision.js +19 -21
- package/dist/provision.js.map +1 -1
- package/dist/remote.d.ts +165 -52
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +459 -46
- package/dist/remote.js.map +1 -1
- package/dist/riskgate.d.ts +101 -0
- package/dist/riskgate.d.ts.map +1 -0
- package/dist/riskgate.js +326 -0
- package/dist/riskgate.js.map +1 -0
- package/dist/scaffold.d.ts +12 -0
- package/dist/scaffold.d.ts.map +1 -0
- package/dist/scaffold.js +56 -0
- package/dist/scaffold.js.map +1 -0
- package/dist/schema.d.ts +36 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +121 -26
- package/dist/schema.js.map +1 -1
- package/dist/script-chunks.d.ts +8 -0
- package/dist/script-chunks.d.ts.map +1 -0
- package/dist/script-chunks.js +35 -0
- package/dist/script-chunks.js.map +1 -0
- package/dist/served.d.ts +30 -0
- package/dist/served.d.ts.map +1 -0
- package/dist/served.js +112 -0
- package/dist/served.js.map +1 -0
- package/dist/signer.d.ts +18 -1
- package/dist/signer.d.ts.map +1 -1
- package/dist/signer.js +104 -17
- package/dist/signer.js.map +1 -1
- package/dist/update-check.d.ts +55 -1
- package/dist/update-check.d.ts.map +1 -1
- package/dist/update-check.js +103 -10
- package/dist/update-check.js.map +1 -1
- package/package.json +16 -12
- package/skill/SKILL.md +194 -347
- package/skill/agents/openai.yaml +4 -0
- package/skill/reference/capabilities.md +193 -0
- package/skill/reference/code.md +234 -0
- package/skill/reference/creator-token.md +94 -0
- package/skill/reference/deploy.md +177 -0
- package/skill/reference/diagnose.md +178 -0
- package/skill/reference/hosting.md +188 -93
- package/skill/reference/operate.md +232 -0
- package/skill/reference/services.md +160 -0
- package/skill/reference/setup.md +190 -36
- package/assets/renderer-scaffold/src/interfaces/IAbxFieldRenderer.sol +0 -32
- package/assets/renderer-scaffold/src/interfaces/IAbxParams.sol +0 -26
- package/dist/inspect.d.ts +0 -48
- package/dist/inspect.d.ts.map +0 -1
- package/dist/inspect.js +0 -184
- package/dist/inspect.js.map +0 -1
- package/dist/migrate.d.ts +0 -65
- package/dist/migrate.d.ts.map +0 -1
- package/dist/migrate.js +0 -180
- package/dist/migrate.js.map +0 -1
- package/dist/onchain-uri.d.ts +0 -97
- package/dist/onchain-uri.d.ts.map +0 -1
- package/dist/onchain-uri.js +0 -243
- package/dist/onchain-uri.js.map +0 -1
- package/dist/upload.d.ts +0 -28
- package/dist/upload.d.ts.map +0 -1
- package/dist/upload.js +0 -41
- package/dist/upload.js.map +0 -1
- package/skill/reference/code-projects.md +0 -246
- package/skill/reference/operating.md +0 -116
- package/skill/reference/troubleshooting.md +0 -28
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# First-party services and feedback
|
|
2
|
+
|
|
3
|
+
Use this reference for the public ABX service, API-key login, hosted resolver/rendering, or feedback.
|
|
4
|
+
For provider-independent hosting and migration, also read [hosting.md](hosting.md).
|
|
5
|
+
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
- [First-party service](#first-party-service)
|
|
9
|
+
- [Creator wallet and sponsorship](#creator-wallet-and-sponsorship)
|
|
10
|
+
- [Feedback targets](#feedback-targets)
|
|
11
|
+
|
|
12
|
+
## First-party service
|
|
13
|
+
|
|
14
|
+
The documented endpoints are:
|
|
15
|
+
|
|
16
|
+
- documentation: `https://docs.abx.io`
|
|
17
|
+
- service: `https://services.abx.io`
|
|
18
|
+
- OAuth discovery: `https://services.abx.io/.well-known/oauth-authorization-server`
|
|
19
|
+
- manual signup fallback: `https://services.abx.io/signup`
|
|
20
|
+
|
|
21
|
+
The first-party provider has the built-in remote name `abx`:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
abx remote abx
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
It needs `ABX_SERVICES_API_KEY` in the project's ignored `.env`; it does not need
|
|
28
|
+
`ABX_REMOTE_ABX_URL`. When the key is absent, use:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
abx auth login
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The CLI starts the OAuth device flow and shows a verified browser URL plus a matching short code.
|
|
35
|
+
The human completes name, email, one-time-code verification, and approval in that browser. The CLI
|
|
36
|
+
polls at the provider-declared interval, receives the API key, and writes it directly to ignored
|
|
37
|
+
`.env` without printing it. The browser never receives the key. Do not ask the human to paste an OTP
|
|
38
|
+
or key into chat. `--no-open` leaves the browser handoff as a link; `--force` is required to replace
|
|
39
|
+
an existing local credential, but does not revoke the displaced provider key. For normal rotation,
|
|
40
|
+
run `abx auth logout` and then `abx auth login`; reserve `--force` for recovery. The CLI refuses
|
|
41
|
+
tracked or unignored `.env` files.
|
|
42
|
+
|
|
43
|
+
The issued API key is long-lived and remains valid until it is revoked. Reuse the stored key across
|
|
44
|
+
tasks and agent sessions; do not start a new login merely because a task or conversation ended. If
|
|
45
|
+
`abx remote abx` authenticates successfully, no login is needed.
|
|
46
|
+
|
|
47
|
+
In an agent runner, start `abx auth login --no-open` with a short initial yield or a resumable
|
|
48
|
+
background session. Relay the printed URL and code immediately while that same process keeps polling,
|
|
49
|
+
then resume it after human approval. Do not start another login or add an outer retry loop. If the
|
|
50
|
+
runner cannot yield control while a command waits, ask the human to run the command in their terminal.
|
|
51
|
+
|
|
52
|
+
Logout only for intentional teardown, suspected compromise, deliberate rotation, or to free an
|
|
53
|
+
active-key slot. When revoking, do not only delete the local value:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
abx auth logout # first-party service
|
|
57
|
+
abx auth logout <name> # another OAuth-capable named remote
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Logout discovers the provider's RFC 7009 endpoint, revokes the current key, and only then removes the
|
|
61
|
+
matching `.env` assignment. If the key came from a shell or another environment source, the CLI
|
|
62
|
+
revokes it and tells the human where it still needs to be unset. A repeated logout with no active
|
|
63
|
+
local credential is safe.
|
|
64
|
+
|
|
65
|
+
Use `/signup` only as the manual recovery path. It shows the raw key once, so the human—not the
|
|
66
|
+
agent—must place it in `.env`. An already verified email reuses its account and may receive another
|
|
67
|
+
key, subject to the service's active-key limit. `abx auth logout` revokes an unused current key and
|
|
68
|
+
frees its active-key slot.
|
|
69
|
+
|
|
70
|
+
Availability, pricing, and quotas are service policy rather than protocol guarantees. Confirm current
|
|
71
|
+
terms before making a durable hosting choice and keep the exit route explicit: the same remote-service
|
|
72
|
+
contract supports another provider or a creator-operated resolver/effects deployment.
|
|
73
|
+
|
|
74
|
+
Before depending on hosted behavior, inspect the live descriptor with `abx remote abx`; do not infer
|
|
75
|
+
capabilities from this file. A remote is a provider catalog and may advertise different HTTPS
|
|
76
|
+
origins for token resolution, account operations, and creator wallets. Trust the advertised
|
|
77
|
+
interface endpoint, not a guessed hostname. Use `--remote abx` on commands that accept a managed
|
|
78
|
+
resolver and verify the resulting public surfaces as described in [hosting.md](hosting.md).
|
|
79
|
+
|
|
80
|
+
## Creator wallet and sponsorship
|
|
81
|
+
|
|
82
|
+
An account with a verified email can use one persistent ABX creator wallet. The
|
|
83
|
+
`ABX_SERVICES_API_KEY` identifies the account but cannot sign. `--sponsor` discovers the provider's
|
|
84
|
+
`abx-creator-wallet/v1` endpoint, provisions or reuses the wallet, starts a Privy device authorization,
|
|
85
|
+
and asks the human to match one code before an agent may
|
|
86
|
+
sign the exact transaction group. Tokens and signing material stay in memory for that command and
|
|
87
|
+
are discarded afterward.
|
|
88
|
+
|
|
89
|
+
This is a beta on Base Sepolia and, when explicitly advertised, Base mainnet. Treat the live
|
|
90
|
+
descriptor and account capabilities as the authority: documentation describes the lane, but does
|
|
91
|
+
not guarantee that sponsorship is active for a particular account, chain, or moment. When the
|
|
92
|
+
creator has not selected another signer, prefer this lane for an eligible Base Sepolia operation.
|
|
93
|
+
On Base mainnet, recommend it only after the exact flow succeeds on Base Sepolia and repeat the
|
|
94
|
+
production-network warning before confirmation. Before using it:
|
|
95
|
+
|
|
96
|
+
1. run `abx auth login` if the account has no API key;
|
|
97
|
+
2. inspect `abx capabilities --json` and the command help;
|
|
98
|
+
3. run the same command with `--dry-run --json`;
|
|
99
|
+
4. summarize the network, creator-wallet address, transaction group, zero value, permanent choices,
|
|
100
|
+
and beta status;
|
|
101
|
+
5. after approval, repeat with `--sponsor`.
|
|
102
|
+
|
|
103
|
+
The initial lane accepts zero-value factory/contract calls up to the provider policy and a hard
|
|
104
|
+
3,000,000-gas transaction ceiling. It does not support direct CREATE or staged `--onchain-image`
|
|
105
|
+
writes. Never add retries around a sponsored write. An `unknown` outcome means the provider may have
|
|
106
|
+
submitted it: preserve the operation ID and reconcile status before any new send.
|
|
107
|
+
|
|
108
|
+
Sponsorship is optional service policy, not protocol support. `--send`, `--sign`, and `--unsigned`
|
|
109
|
+
remain first-class bring-your-own alternatives. Honor an explicit choice of any of them. If the
|
|
110
|
+
provider does not advertise the chain, the account is ineligible, or the transaction group exceeds
|
|
111
|
+
policy, select one of those lanes rather than refusing the underlying operation. Do not use
|
|
112
|
+
sponsorship on a production network unless the live descriptor, account capabilities, and command
|
|
113
|
+
all explicitly support it. Never infer Base mainnet eligibility merely because the CLI recognizes
|
|
114
|
+
the lane.
|
|
115
|
+
|
|
116
|
+
## Feedback targets
|
|
117
|
+
|
|
118
|
+
`abx feedback` has two deliberately separate targets:
|
|
119
|
+
|
|
120
|
+
| Intent | Command | Recipient |
|
|
121
|
+
|---|---|---|
|
|
122
|
+
| ABX protocol, contracts, CLI, SDK, skill, or docs | `abx feedback` | core ABX team |
|
|
123
|
+
| A remote provider's resolver, rendering, auth, or operations | `abx feedback --remote <name>` | that provider |
|
|
124
|
+
|
|
125
|
+
For first-party hosted-service feedback use `--remote abx`. A third-party remote can advertise the
|
|
126
|
+
optional `abx-service-feedback/v1` interface and operate its own feedback store. Never send
|
|
127
|
+
provider-specific incidents through core feedback merely because both first-party targets currently
|
|
128
|
+
share infrastructure.
|
|
129
|
+
|
|
130
|
+
Discovery and report previews are public. Submission (`--yes`) and `--mine` require the same key
|
|
131
|
+
created by `abx auth login`; login once rather than creating a separate feedback credential. Run the
|
|
132
|
+
command without report flags to inspect its live schema and instructions. To report, provide the
|
|
133
|
+
required structured flags; use `--detail-file` or `--context-file` rather than fragile shell quoting
|
|
134
|
+
for longer content. The CLI shows the exact destination and payload first. Review and redact the
|
|
135
|
+
preview with the human, then repeat with `--yes` only after explicit approval.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# Preview core feedback; nothing is sent.
|
|
139
|
+
abx feedback --area cli --kind bug --summary "Concise summary" --detail-file report.md
|
|
140
|
+
|
|
141
|
+
# After the human approves this exact preview.
|
|
142
|
+
abx feedback --area cli --kind bug --summary "Concise summary" --detail-file report.md --yes
|
|
143
|
+
|
|
144
|
+
# Provider-specific preview.
|
|
145
|
+
abx feedback --remote abx --component rendering --kind bug --summary "Concise summary"
|
|
146
|
+
|
|
147
|
+
# Review reports previously submitted with the current key.
|
|
148
|
+
abx feedback --mine
|
|
149
|
+
abx feedback --remote abx --mine
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Do not attach `.env`, credentials, wallet/session URLs, full transcripts, or unrelated source files.
|
|
153
|
+
Prefer the smallest reproduction and relevant version/chain/address context. The API key authenticates
|
|
154
|
+
the reporter; hosted-service entitlement is evaluated separately. It never grants transaction-signing
|
|
155
|
+
authority.
|
|
156
|
+
|
|
157
|
+
Use the CLI instead of hand-written HTTP or retry loops. The device flow already handles pending,
|
|
158
|
+
slow-down, and transient polling responses until its fixed expiry. Treat `401` as missing/invalid credentials,
|
|
159
|
+
`403` as recognized credentials without the required entitlement, and schema/interface errors as a
|
|
160
|
+
request or provider-contract mismatch. Read [diagnose.md](diagnose.md) and make one state transition.
|
package/skill/reference/setup.md
CHANGED
|
@@ -1,36 +1,190 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
|
|
36
|
-
|
|
1
|
+
# Setup and safety
|
|
2
|
+
|
|
3
|
+
Use this reference when installing ABX, selecting a binary or signer, configuring a new environment,
|
|
4
|
+
or preparing a real transaction.
|
|
5
|
+
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
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)
|
|
14
|
+
|
|
15
|
+
## Resolve the tool before the project
|
|
16
|
+
|
|
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:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
abx version
|
|
22
|
+
abx doctor
|
|
23
|
+
abx capabilities --json
|
|
24
|
+
abx skill install
|
|
25
|
+
```
|
|
26
|
+
|
|
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.
|
|
30
|
+
|
|
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.
|
|
37
|
+
|
|
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:
|
|
48
|
+
|
|
49
|
+
- `ABX_DEPLOYER_PK` and any wallet key;
|
|
50
|
+
- credential-bearing `ABX_RPC_URLS*` values;
|
|
51
|
+
- `PINATA_JWT`, S3/R2 keys, `ABX_SERVICES_API_KEY`, other remote-provider tokens, effects/admin
|
|
52
|
+
tokens;
|
|
53
|
+
- Arweave JWK contents and browser signing-session URLs.
|
|
54
|
+
|
|
55
|
+
Use `abx doctor`, `abx remote <name>`, `abx storage show --check`, and redacted CLI errors. If a tool
|
|
56
|
+
ever emits an unredacted credential-bearing endpoint, stop, rotate the credential, and report the
|
|
57
|
+
output bug without repeating the secret.
|
|
58
|
+
|
|
59
|
+
## Select the chain explicitly through the environment
|
|
60
|
+
|
|
61
|
+
Read the full `chains` array from `abx capabilities --json`. Base Sepolia is the default; Sepolia is
|
|
62
|
+
also supported. Robinhood Chain Testnet is experimental, production deployments on Base and
|
|
63
|
+
Robinhood Chain are beta, and Ethereum is disabled. There is deliberately no
|
|
64
|
+
`--chain` flag because silently ignoring a wrong-chain request could spend on the wrong network.
|
|
65
|
+
|
|
66
|
+
Choose a production chain by intended collector base, then measured cost. Base fits projects aimed at
|
|
67
|
+
Base users; Robinhood Chain fits projects intentionally aimed at that network. Run the exact flow on
|
|
68
|
+
the paired testnet and compare the CLI dry-run gas report before deciding. Large onchain payloads
|
|
69
|
+
amplify transaction cost on either network, so weigh onchain permanence against Arweave, IPFS, or
|
|
70
|
+
cloud custody rather than assuming one chain makes storage cheap.
|
|
71
|
+
|
|
72
|
+
Before any transaction on an `experimental` or `beta` network, name the network and support level,
|
|
73
|
+
explain what the transaction or transaction group will do, and state the relevant contract,
|
|
74
|
+
configuration, and real-funds risks. Production beta support is prerelease software without an
|
|
75
|
+
independent third-party audit; bugs, misconfiguration, and nondeterministic agent behavior may cause
|
|
76
|
+
permanent loss. Link to the open source, use-at-your-own-risk implementation at
|
|
77
|
+
https://github.com/ArtBlocks/abx. Qualify the same flow on the paired testnet before production.
|
|
78
|
+
|
|
79
|
+
Use per-chain RPC variables when operating more than one chain. `abx doctor` checks chain identity,
|
|
80
|
+
wide-range `eth_getLogs`, archival reach, and nonce coherence. Put a healthy archive endpoint first:
|
|
81
|
+
fallback transports rotate on errors, not on a successful but pruned empty log response.
|
|
82
|
+
|
|
83
|
+
The local projection and managed Arweave identity remain in `.abx-self-host/` unless
|
|
84
|
+
`ABX_DATA_DIR` overrides it. That runtime directory is separate from the renamed `abx` skill and is
|
|
85
|
+
not being renamed. Back up the managed Arweave key with `abx storage backup-key`; never print it.
|
|
86
|
+
|
|
87
|
+
Every WRITE command (`deploy*`, `add`, `index`, `mint`, `set-*`, …) resolves `.abx-self-host`
|
|
88
|
+
strictly relative to the current directory — it never searches upward, so it never creates a
|
|
89
|
+
project's state somewhere unexpected. A handful of READ commands (`status`, `state`, `verify`,
|
|
90
|
+
`doctor`, `capabilities`, `tokens`, `tokenuri`, `contracturi`, `inspect`, `minter show`) DO search
|
|
91
|
+
upward, git-style, for an already-existing `.abx-self-host` if the current directory doesn't have
|
|
92
|
+
one of its own — bounded at the home directory, a `.git` root, or the filesystem root. Practical
|
|
93
|
+
consequence: `cd`-ing into a project's `contracts/` subdirectory before `abx status` still finds
|
|
94
|
+
that project; the same `cd` before `abx add`/`abx deploy*` creates a NEW, empty node right there
|
|
95
|
+
instead. If a status/verify/etc. answer looks emptier than expected, or a write seems to have
|
|
96
|
+
landed in the wrong place, run bare `abx status` — its `data: <path>` line names the exact
|
|
97
|
+
directory that answered, including a note when it was found by searching upward — or set
|
|
98
|
+
`ABX_DATA_DIR` explicitly rather than guessing. See [Local data
|
|
99
|
+
directory](https://docs.abx.io/docs/using-abx/self-hosting#local-data-directory) for the full rule.
|
|
100
|
+
|
|
101
|
+
## Choose one signing lane
|
|
102
|
+
|
|
103
|
+
Every write uses one of four lanes:
|
|
104
|
+
|
|
105
|
+
| Lane | Select | Use when |
|
|
106
|
+
|---|---|---|
|
|
107
|
+
| Sponsored | `--sponsor` | The live remote advertises sponsorship for this chain and command |
|
|
108
|
+
| Hot | `--send` or default | An environment key may sign unattended |
|
|
109
|
+
| Wallet | `--sign --for 0x…` | A human approves in their browser wallet |
|
|
110
|
+
| Cold | `--unsigned --for 0x…` | A multisig/offline signer needs prepared transactions |
|
|
111
|
+
|
|
112
|
+
Honor an explicit creator choice. Otherwise run `abx capabilities --json`, the command help, and
|
|
113
|
+
`abx remote abx`. Prefer `--sponsor` when the provider advertises the active chain, the command and
|
|
114
|
+
transaction group are eligible, and sponsorship is enabled—especially on a testnet, where it removes
|
|
115
|
+
wallet and faucet setup. Sponsorship is provider policy, not protocol support: if it is unavailable,
|
|
116
|
+
paused, or ineligible, fall back to the appropriate bring-your-own lane rather than treating the ABX
|
|
117
|
+
operation as unsupported.
|
|
118
|
+
|
|
119
|
+
Select the lane before the JSON dry run. The signer can affect ownership, salts, and predicted
|
|
120
|
+
addresses. If the lane changes, rerun the dry run and summarize the revised plan before execution.
|
|
121
|
+
|
|
122
|
+
Run `abx doctor --for <address>` before a wallet or cold operation. On the wallet lane, give the
|
|
123
|
+
human the locally generated signing page; never request or handle their key. On the cold lane, verify
|
|
124
|
+
chain, sender, target, calldata, value, and ordering before handing transactions over.
|
|
125
|
+
|
|
126
|
+
`--onchain-image` staging cannot use the cold lane because each chunk transaction depends on the
|
|
127
|
+
receipt of the preceding transaction. Use hot or wallet signing. Do not split staging into a homemade
|
|
128
|
+
offline sequence.
|
|
129
|
+
|
|
130
|
+
`ABX_DEPLOYER_PK` may be written with or without a `0x` prefix — the CLI and SDK normalize it. Foundry's
|
|
131
|
+
`vm.envUint` does not: a custom forge script that reads the same `.env` needs the `0x` form.
|
|
132
|
+
|
|
133
|
+
For any one EOA, run one write command at a time. ABX obtains pending and latest nonces once, takes the
|
|
134
|
+
safe maximum, increments locally, waits for newly deployed code when a following transaction targets
|
|
135
|
+
it, and throws typed reversion errors. Starting concurrent processes bypasses that serialization.
|
|
136
|
+
|
|
137
|
+
## Prepare without mutating
|
|
138
|
+
|
|
139
|
+
Use command help and dry runs, not guessed syntax:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
abx help deploy-code
|
|
143
|
+
abx deploy-code … --dry-run --json
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
A dry run may read contracts, probe endpoints, analyze files, or verify an address, but it does not
|
|
147
|
+
send or store. Address prediction is meaningful only when the salt and deployer are pinned. Use
|
|
148
|
+
`abx predict` when another contract or resolver must know the collection address before deployment.
|
|
149
|
+
|
|
150
|
+
Before any real send, confirm:
|
|
151
|
+
|
|
152
|
+
- active chain and deploying/owning address;
|
|
153
|
+
- contract family and edition arithmetic;
|
|
154
|
+
- name, symbol, royalties and royalty ceiling;
|
|
155
|
+
- deploy-time options such as burnability and creator-token enrollment;
|
|
156
|
+
- custody, public resolution, image/animation/trait surfaces;
|
|
157
|
+
- mint amount, value, transaction count, and expected gas;
|
|
158
|
+
- every irreversible lock or authority transfer.
|
|
159
|
+
|
|
160
|
+
Do not make a real send merely because a dry run exited successfully. The dry run is the plan; the
|
|
161
|
+
human confirmation authorizes execution.
|
|
162
|
+
|
|
163
|
+
## New environment checklist
|
|
164
|
+
|
|
165
|
+
1. Install Node 22.13+ and the desired CLI version.
|
|
166
|
+
2. Install the co-versioned skill with `abx skill install`, then restart the agent.
|
|
167
|
+
3. Select the testnet using `ABX_CHAIN` if not using Base Sepolia.
|
|
168
|
+
4. Add RPC and storage configuration outside the transcript. If the live first-party remote
|
|
169
|
+
advertises sponsorship for the chosen chain and command, recommend it before asking the creator
|
|
170
|
+
to configure a signer. Otherwise configure one of the bring-your-own lanes. For first-party hosted
|
|
171
|
+
services, run `abx auth login --no-open` in a short-yield or resumable session: immediately hand
|
|
172
|
+
its verified browser URL and matching code to the human, then resume that same polling process.
|
|
173
|
+
Let the CLI store `ABX_SERVICES_API_KEY` in ignored `.env` without printing it. Never ask for the
|
|
174
|
+
email OTP or key in chat, start duplicate login sessions, or add standing login instructions to
|
|
175
|
+
`AGENTS.md`/`CLAUDE.md`. The key is long-lived: reuse it across tasks and agent sessions. Run
|
|
176
|
+
`abx auth logout` only for intentional teardown, compromise, rotation, or an unused-key cleanup.
|
|
177
|
+
5. Run `abx doctor` and resolve every red check relevant to the chosen lane.
|
|
178
|
+
6. Run `abx storage show --check` when bytes will leave the local disk.
|
|
179
|
+
7. Run `abx remote <name>` before relying on a configured managed service.
|
|
180
|
+
8. Run command help, then a JSON dry run.
|
|
181
|
+
9. Confirm the plan and only then execute.
|
|
182
|
+
|
|
183
|
+
For an eligible first-party account on Base Sepolia, `--sponsor` replaces the local private key and
|
|
184
|
+
faucet balance with an account-bound creator wallet plus one ephemeral Privy authorization per CLI
|
|
185
|
+
transaction group. Base mainnet can use the same beta lane only when the live descriptor and account
|
|
186
|
+
capabilities explicitly advertise chain `8453`; qualify the exact flow on Base Sepolia first, name
|
|
187
|
+
the production risk, and do not infer availability from the CLI flag alone. Read
|
|
188
|
+
[services.md](services.md) before using it. Sponsorship is zero-value and never a reason to skip the
|
|
189
|
+
dry run or transaction summary. Bring-your-own signing remains available even when sponsorship is
|
|
190
|
+
advertised.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity ^0.8.20;
|
|
3
|
-
|
|
4
|
-
/// @title IAbxFieldRenderer — the contract your in-chain art implements
|
|
5
|
-
/// @notice A field renderer returns ONE metadata field's value, COMPUTED from chain state
|
|
6
|
-
/// (the token's seed + PostParams, its owner, anything readable on-chain). The ABX
|
|
7
|
-
/// metadata renderer staticcalls it to build `tokenURI` — e.g. an `image` renderer's
|
|
8
|
-
/// SVG becomes `data:image/svg+xml;base64,…`. Deploy your renderer, then wire it with
|
|
9
|
-
/// `abx deploy-code --image-renderer <address> [--attributes-renderer <address>] --onchain-uri`.
|
|
10
|
-
///
|
|
11
|
-
/// @dev THE FIVE INVARIANTS (a reverting or malformed renderer bricks the WHOLE tokenURI —
|
|
12
|
-
/// the metadata renderer staticcalls you with NO try/catch):
|
|
13
|
-
/// 1. NEVER revert for ANY (token, tokenId, field) — including the collection surface
|
|
14
|
-
/// `tokenId == type(uint256).max` (used by `contractURI`). Return a neutral value.
|
|
15
|
-
/// 2. Return the correct `contentType` (`image/svg+xml` for an image; `application/json`
|
|
16
|
-
/// for an `attributes` array).
|
|
17
|
-
/// 3. Guard `field`: revert only a truly unsupported field (a deploy-time miswiring), but
|
|
18
|
-
/// still never revert on the fields you DO render.
|
|
19
|
-
/// 4. `view` + deterministic: same chain state → same bytes.
|
|
20
|
-
/// 5. Bounded output: keep it small (a few hundred bytes of SVG) so `tokenURI` stays a
|
|
21
|
-
/// cheap single eth_call. `forge test` the never-revert cases before you wire it.
|
|
22
|
-
interface IAbxFieldRenderer {
|
|
23
|
-
/// @param token the ABX collection contract (read its params via {IAbxParams}).
|
|
24
|
-
/// @param tokenId the token, or `type(uint256).max` for the collection surface.
|
|
25
|
-
/// @param field which field to compute (e.g. `"image"`, `"attributes"`).
|
|
26
|
-
/// @return contentType MIME of `data` (e.g. `image/svg+xml`, `application/json`).
|
|
27
|
-
/// @return data the field's finished bytes.
|
|
28
|
-
function render(address token, uint256 tokenId, bytes32 field)
|
|
29
|
-
external
|
|
30
|
-
view
|
|
31
|
-
returns (string memory contentType, bytes memory data);
|
|
32
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MIT
|
|
2
|
-
pragma solidity ^0.8.20;
|
|
3
|
-
|
|
4
|
-
/// @title IAbxParams — read the token's on-chain params (seed + collector PostParams)
|
|
5
|
-
/// @notice Your renderer reads live state through this. Each value is a `bytes32`; `isSet` tells
|
|
6
|
-
/// you whether it exists (fall back to a default if not — see invariant #1). `valueIsHash`
|
|
7
|
-
/// is true when the on-chain value is a keccak commitment to off-chain bytes (a literal
|
|
8
|
-
/// scalar param like a `seed` or a `HexColor` palette is NOT a hash — check `!valueIsHash`).
|
|
9
|
-
///
|
|
10
|
-
/// The tokenData merge rule: a token-scope value overrides the contract-scope one. The
|
|
11
|
-
/// common pattern is `tokenParam` first, then `contractParam` as a fallback (see the
|
|
12
|
-
/// `_param` helper in MyRenderer.sol).
|
|
13
|
-
interface IAbxParams {
|
|
14
|
-
/// Returns the token-scope param: its bytes32 `value`, `valueIsHash` (true if it commits to
|
|
15
|
-
/// off-chain bytes — a literal scalar like a seed/HexColor is false), and `isSet` (does it exist).
|
|
16
|
-
function tokenParam(uint256 tokenId, bytes32 key)
|
|
17
|
-
external
|
|
18
|
-
view
|
|
19
|
-
returns (bytes32 value, bool valueIsHash, bool isSet);
|
|
20
|
-
|
|
21
|
-
/// @notice The contract-scope (collection-wide) value — the fallback when a token has none.
|
|
22
|
-
function contractParam(bytes32 key)
|
|
23
|
-
external
|
|
24
|
-
view
|
|
25
|
-
returns (bytes32 value, bool valueIsHash, bool isSet);
|
|
26
|
-
}
|
package/dist/inspect.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `abx inspect <script.js>` — static analysis of a generative script, BEFORE picking a lane.
|
|
3
|
-
*
|
|
4
|
-
* The membrane fix behind this: an agent (or creator) should DERIVE the deployment lane from what
|
|
5
|
-
* the script actually needs — are there traits? are they reproducible on-chain? how big is the
|
|
6
|
-
* assembled document (does a single `tokenURI` eth_call even fit)? — instead of guessing "fully
|
|
7
|
-
* on-chain!" and walking it back. This module is the pure analysis; `cmdInspect` formats it.
|
|
8
|
-
*
|
|
9
|
-
* Static only — it never executes the script (that's the resolver/runner's job, and executing
|
|
10
|
-
* untrusted art in the CLI would be a footgun). Everything here is regex/heuristic over the source.
|
|
11
|
-
*/
|
|
12
|
-
export type TraitFeasibility = 'none' | 'exact-likely' | 'careful' | 'infeasible' | 'unknown';
|
|
13
|
-
export interface ScriptAnalysis {
|
|
14
|
-
bytes: number;
|
|
15
|
-
estChunks: number;
|
|
16
|
-
traits: {
|
|
17
|
-
present: boolean;
|
|
18
|
-
keys: string[];
|
|
19
|
-
};
|
|
20
|
-
paramHints: string[];
|
|
21
|
-
prng: {
|
|
22
|
-
seeded: boolean;
|
|
23
|
-
usesBareRandom: boolean;
|
|
24
|
-
usesMathRandom: boolean;
|
|
25
|
-
usesNoise: boolean;
|
|
26
|
-
};
|
|
27
|
-
depHints: string[];
|
|
28
|
-
looksP5: boolean;
|
|
29
|
-
feasibility: {
|
|
30
|
-
verdict: TraitFeasibility;
|
|
31
|
-
reason: string;
|
|
32
|
-
};
|
|
33
|
-
doc: {
|
|
34
|
-
estBytes: number;
|
|
35
|
-
deps: string[];
|
|
36
|
-
fitsSingleCall: boolean;
|
|
37
|
-
unknownDepSizes: boolean;
|
|
38
|
-
};
|
|
39
|
-
runtime: {
|
|
40
|
-
readsTokenData: boolean;
|
|
41
|
-
reportsTraits: boolean;
|
|
42
|
-
wrongGlobal: string | null;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
export declare function analyzeScript(source: string, declaredDeps?: string[]): ScriptAnalysis;
|
|
46
|
-
/** A one-line lane recommendation derived from the analysis (the decision-tree output). */
|
|
47
|
-
export declare function recommendLane(a: ScriptAnalysis): string;
|
|
48
|
-
//# sourceMappingURL=inspect.d.ts.map
|
package/dist/inspect.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../src/inspect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAgBH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,cAAc,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC;AAE9F,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAA;KAAC,CAAC;IAC3C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,IAAI,EAAE;QAAC,MAAM,EAAE,OAAO,CAAC;QAAC,cAAc,EAAE,OAAO,CAAC;QAAC,cAAc,EAAE,OAAO,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAC,CAAC;IAC9F,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE;QAAC,OAAO,EAAE,gBAAgB,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,CAAC;IACzD,GAAG,EAAE;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,EAAE,CAAC;QAAC,cAAc,EAAE,OAAO,CAAC;QAAC,eAAe,EAAE,OAAO,CAAA;KAAC,CAAC;IAM3F,OAAO,EAAE;QAAC,cAAc,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,OAAO,CAAC;QAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;KAAC,CAAC;CACxF;AAsDD,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,GAAE,MAAM,EAAO,GAAG,cAAc,CAqEzF;AAED,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,CAAC,EAAE,cAAc,GAAG,MAAM,CA0BvD"}
|