@artblocks/abx-cli 0.1.0-alpha.9 → 0.2.0
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 +429 -0
- package/assets/renderer-scaffold/README.md +44 -13
- 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 +132 -0
- package/dist/capabilities.d.ts.map +1 -0
- package/dist/capabilities.js +175 -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 +483 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/contract.d.ts +19 -0
- package/dist/commands/contract.d.ts.map +1 -0
- package/dist/commands/contract.js +171 -0
- package/dist/commands/contract.js.map +1 -0
- package/dist/commands/deploy.d.ts +296 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +5756 -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 +154 -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 +1837 -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 +741 -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 +761 -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 +400 -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 +49 -0
- package/dist/creator-agent.d.ts.map +1 -0
- package/dist/creator-agent.js +363 -0
- package/dist/creator-agent.js.map +1 -0
- package/dist/creator-keyring.d.ts +26 -0
- package/dist/creator-keyring.d.ts.map +1 -0
- package/dist/creator-keyring.js +57 -0
- package/dist/creator-keyring.js.map +1 -0
- package/dist/creator-signer.d.ts +52 -0
- package/dist/creator-signer.d.ts.map +1 -0
- package/dist/creator-signer.js +267 -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 +188 -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 +859 -5374
- 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 +463 -59
- package/dist/ownerops.d.ts.map +1 -1
- package/dist/ownerops.js +2329 -366
- 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 +116 -9
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +371 -14
- 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 +343 -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 +20 -1
- package/dist/signer.d.ts.map +1 -1
- package/dist/signer.js +110 -18
- package/dist/signer.js.map +1 -1
- package/dist/update-check.d.ts +60 -9
- package/dist/update-check.d.ts.map +1 -1
- package/dist/update-check.js +105 -18
- package/dist/update-check.js.map +1 -1
- package/package.json +17 -12
- package/skill/SKILL.md +213 -354
- package/skill/agents/openai.yaml +4 -0
- package/skill/reference/capabilities.md +195 -0
- package/skill/reference/code.md +236 -0
- package/skill/reference/creator-token.md +94 -0
- package/skill/reference/deploy.md +191 -0
- package/skill/reference/diagnose.md +178 -0
- package/skill/reference/hosting.md +191 -102
- package/skill/reference/operate.md +237 -0
- package/skill/reference/services.md +173 -0
- package/skill/reference/setup.md +221 -42
- 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 -118
- package/skill/reference/troubleshooting.md +0 -28
|
@@ -1,149 +1,238 @@
|
|
|
1
|
-
# Hosting
|
|
1
|
+
# Hosting, storage, and remote operation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use this reference when a project needs public resolution, managed remote service, creator-operated
|
|
4
|
+
resolver/effects, storage configuration, render publication, lifecycle monitoring, or migration.
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## Contents
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
- [First decide whether a host exists](#first-decide-whether-a-host-exists)
|
|
9
|
+
- [Choose managed or creator-operated resolution](#choose-managed-or-creator-operated-resolution)
|
|
10
|
+
- [Choose storage independently](#choose-storage-independently)
|
|
11
|
+
- [Operate resolver and effects services](#operate-resolver-and-effects-services)
|
|
12
|
+
- [Use lifecycle states](#use-lifecycle-states)
|
|
13
|
+
- [Migrate without losing canonicity](#migrate-without-losing-canonicity)
|
|
8
14
|
|
|
9
|
-
|
|
10
|
-
|---|---|---|---|
|
|
11
|
-
| **`fs`** (default) | Operator-held, local disk | — | — |
|
|
12
|
-
| **`cloud`** | S3-compatible: AWS S3 / R2 / B2 / MinIO | `--backend cloud --endpoint <url> --bucket <b> --region <r>` (or `ABX_S3_ENDPOINT`/`ABX_S3_BUCKET`/`ABX_S3_REGION`) | `ABX_S3_ACCESS_KEY_ID`, `ABX_S3_SECRET_ACCESS_KEY` |
|
|
13
|
-
| **`ipfs`** | Decentralized (CID) | kubo: `--backend ipfs --mode kubo --api-url http://127.0.0.1:5001 --gateway http://127.0.0.1:8080` · pinata: `--backend ipfs --mode pinata --gateway https://<you>.mypinata.cloud` | `PINATA_JWT` (pinata mode) |
|
|
14
|
-
| **`arweave`** | Pay-once permanent | `--backend arweave` (Turbo default; or `ABX_STORAGE_BACKEND=arweave`) | the Turbo key (auto-managed) |
|
|
15
|
+
## First decide whether a host exists
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
Do not ask “where should we host?” until the public surfaces require a host.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
No ABX resolver is required when:
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
- **`cloud`/`fs`** — durable only while the creator maintains the bucket/disk; centralized, mutable.
|
|
24
|
-
- **Backends are swappable** — the on-chain keccak is the anchor, so bytes are portable: re-upload to the new backend and re-point the `image` field (`abx set-field <addr> --field image …`), then `abx verify` confirms the served bytes still match the on-chain hash. For a hosted-resolver project, `abx migrate` re-pins node-custody images to a durable backend as part of the move (see [operating.md](operating.md)). Re-pointing is an owner-signed tx, so keep the owner wallet secure. Starting on `fs`/`ipfs` and moving to `arweave` later is fine; just don't let an interim backend lapse before the move.
|
|
21
|
+
- static bytes and metadata resolve on-chain;
|
|
22
|
+
- on-chain JSON points at public Arweave/IPFS/cloud media;
|
|
23
|
+
- Solidity field renderers compute every required metadata surface on-chain.
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
A resolver is useful or required when:
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
- metadata must remain operationally editable;
|
|
28
|
+
- a JavaScript/build project needs a hosted live document;
|
|
29
|
+
- marketplace stills/traits are produced by an effects runner;
|
|
30
|
+
- attached artifacts must be enumerated and fetched;
|
|
31
|
+
- large on-chain content needs an HTTP reader in front of endpoint-dependent `eth_call` execution;
|
|
32
|
+
- a project needs indexed status/dashboard/API surfaces.
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- **`--storage-signer eth`** — reuse the **`.env` EVM signing key** as the Turbo identity (`ABX_DEPLOYER_PK`/`SEPOLIA_FUNDED_PK`/`SEPOLIA_WALLET_PK`). Its ETH address holds the credits, so credits funded on that wallet's Turbo balance are spendable. Hot lane (key in `.env`).
|
|
33
|
-
- **`--storage-signer eth` + `--sign`** — the **browser wallet** signs each upload data-item via `personal_sign` (no gas, no funds move; the upload is paid from the wallet's Turbo credits), in the same sign session as the deploy tx. The key never leaves the wallet. *(New; the mechanism matches arbundles' `InjectedEthereumSigner` and is unit-tested at the CLI↔page contract, but the live MetaMask↔Turbo path wants a manual smoke test. If a live upload misbehaves, fall back to `--storage-signer eth` with a key, or fund the managed key.)*
|
|
34
|
-
- **Under 100 KB → free**, permanent, zero setup. The CLI prints this from the file size (in `--dry-run` too).
|
|
35
|
-
- **Over 100 KB → prepaid credits, one-time.** `abx storage balance` shows the funded address + credits; `abx storage topup --usd <n>` returns a Stripe checkout link. A **pre-upload balance guard** stops *before* the deploy if credits are short — printing the address + fund options — so a shortfall never fails mid-deploy after txs already landed. One-time payment, no recurring fee, nothing to re-pin (contrast `cloud`/`ipfs`). Credits are non-refundable.
|
|
36
|
-
- **Credits attach to the IDENTITY, not "you".** With the default `arweave` lane, a top-up funds the CLI-managed Arweave address (derived from the key file) — a *different* identity from the ETH wallet used to sign deploys. So a fresh managed key shows **0 credits even if the creator "funded Turbo before"**: those old credits sit on whatever identity they funded. If they funded their **ETH wallet's** Turbo balance, reach it with `--storage-signer eth` (key) or `--storage-signer eth --sign` (browser). If they hold a funded **Arweave** key, import it via `ARWEAVE_JWK`/`ABX_ARWEAVE_KEY_FILE`.
|
|
37
|
-
- **If the Stripe link fails**, fall back to Turbo's hosted top-up (`https://turbo-topup.com`) and fund the **exact address `abx storage topup` prints** (it accepts a recipient address, so credits still land on the intended identity). Not ideal, but it beats abandoning Arweave for IPFS on a link glitch.
|
|
34
|
+
Storage can be on-chain while resolution is hosted, or external while metadata resolution is
|
|
35
|
+
on-chain. Keep those axes separate.
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
## Choose managed or creator-operated resolution
|
|
40
38
|
|
|
41
|
-
|
|
39
|
+
Both routes implement the same public resolver contract. The token holds a base URI; the operator
|
|
40
|
+
reconstructs canonical state from chain and serves metadata/live/data surfaces.
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
- **"…has already been uploaded to this service!" is SUCCESS, not failure.** Turbo deduplicates identical bytes (same signer + bytes → same data-item id), so re-uploads (a retry, a redeploy, two identical images) return that sentence instead of JSON. The CLI treats it as the existing txid and continues. If you ever see it surface as an error, the toolkit is stale — don't work around it.
|
|
45
|
-
- **Check BOTH balances before concluding "needs funding."** `abx storage balance --backend arweave` prints the managed key's balance **and** the deployer wallet's Turbo balance (Turbo exposes balance-by-address publicly — no key needed). The managed key showing 0 does NOT mean "top up": if the **wallet** has credits, use them (`--storage-signer eth`, or `+ --sign` for a browser wallet). The pre-upload funds guard does this check for you and recommends the wallet lane when it applies — checking only the managed key's 0 and pushing a top-up is the classic wrong turn.
|
|
46
|
-
- **Don't reflexively push a $5 top-up or "switch to IPFS."** Both throw away what the creator chose (their funded wallet credits; permanence). Only top up if *neither* the managed key nor the wallet can cover the bytes — and **back up the managed key first** (`abx storage backup-key --out <path>`), since it will hold the credits you buy. Only suggest IPFS if they ask or Arweave is truly unavailable.
|
|
47
|
-
- **A blind retry re-signs the same bytes → same dedup reply.** Retry only after you've identified and fixed the actual cause.
|
|
48
|
-
- **Gateway swappable, integrity independent.** The on-chain keccak256 is the anchor; `arweave.net` is the default gateway (`--gateway` to override). A gateway issue is a re-point, never a lost asset.
|
|
49
|
-
- **Provider swappable.** `--provider http-bundler --upload-url <bundler>` uses a dep-free token-authed endpoint you run (secret `ARWEAVE_UPLOAD_TOKEN`); funding then means "fund the wallet directly" (only Turbo tracks credits). Default to Turbo unless asked.
|
|
42
|
+
### Managed remote
|
|
50
43
|
|
|
51
|
-
|
|
44
|
+
Use a named remote already configured in the environment rather than standing up duplicate
|
|
45
|
+
infrastructure. Start with:
|
|
52
46
|
|
|
53
|
-
|
|
47
|
+
```bash
|
|
48
|
+
abx remote <name>
|
|
49
|
+
```
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- **`url-template`** is a first-class representation ([spec](../../../../specs/protocol/onchain-metadata.md)); set by hand with `abx set-field <addr> --collection --field image --representation url-template --text "<gateway>/ipfs/<cid>/{id}.png"` then `abx set-renderer <addr>`.
|
|
51
|
+
`abx` is the built-in name for the first-party service at `services.abx.io`; it needs only
|
|
52
|
+
`ABX_SERVICES_API_KEY`, not a remote URL variable. Read [services.md](services.md) for its verified
|
|
53
|
+
OAuth login, manual recovery path, current access model, and provider-feedback path. Other providers
|
|
54
|
+
use their configured name.
|
|
60
55
|
|
|
61
|
-
|
|
56
|
+
This reports the service descriptor, supported chains, rendering policy, authentication status, and
|
|
57
|
+
any interface-specific origins. A remote names a provider catalog, not necessarily one process; an
|
|
58
|
+
advertised account, wallet, or hosting interface may use a different HTTPS origin from its resolver.
|
|
59
|
+
Do not infer provider capability from its hostname or marketing page.
|
|
62
60
|
|
|
63
|
-
|
|
61
|
+
Interpret control-plane failures precisely:
|
|
64
62
|
|
|
65
|
-
-
|
|
66
|
-
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
|
|
63
|
+
- `401` means the supplied token is missing, stale, or invalid; replace the credential.
|
|
64
|
+
- `403` means the credential is recognized but lacks permission for this chain/project; fix provider
|
|
65
|
+
scope rather than rotating keys blindly.
|
|
66
|
+
- a conformance failure means the service contract is incomplete or incompatible; do not register a
|
|
67
|
+
production launch until the failing assertion is understood.
|
|
70
68
|
|
|
71
|
-
|
|
69
|
+
Register or operate a project using `--remote <name>` and monitor with `abx status --remote <name>`.
|
|
70
|
+
If the provider advertises managed rendering, confirm it for the active chain/project. Otherwise the
|
|
71
|
+
creator still owns the effects and storage path.
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
Never invent a provider, auth flow, price, quota, or key source. If no configured provider exists,
|
|
74
|
+
offer the fully supported creator-operated route.
|
|
74
75
|
|
|
75
|
-
|
|
76
|
+
### Creator-operated resolver
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
Use `abx deploy-resolver --provider …` to generate hosting artifacts for the selected platform. The
|
|
79
|
+
creator owns the cloud account, domain, secrets, monitoring, and upgrades. Review the generated
|
|
80
|
+
configuration before deploying it; do not copy repository `.env` wholesale.
|
|
78
81
|
|
|
79
|
-
|
|
82
|
+
The host needs read-only RPC access, storage access where applicable, and a stable public URL. Keep
|
|
83
|
+
signing keys off the resolver. Use the project/state API and on-chain reconstruction instead of a
|
|
84
|
+
private source-of-truth database.
|
|
80
85
|
|
|
81
|
-
|
|
86
|
+
Prefer a creator-controlled domain in the on-chain base URI. Provider-specific hostnames work, but a
|
|
87
|
+
custom domain makes migration a DNS operation rather than a contract operation. Tunnels and localhost
|
|
88
|
+
are preview-only and must never be baked into a launch.
|
|
82
89
|
|
|
83
|
-
|
|
90
|
+
Never lock URI configuration to a provider-owned domain. The pointer can be changed before
|
|
91
|
+
`lock-uri`, but never after it. Lock only a creator-controlled domain whose production route has
|
|
92
|
+
been verified. ABX Services does not currently support custom-domain routing, so an `abx.io` URI
|
|
93
|
+
must remain unlocked; the CLI refuses that lock.
|
|
84
94
|
|
|
85
|
-
|
|
95
|
+
After provisioning:
|
|
86
96
|
|
|
87
|
-
|
|
97
|
+
1. Run health/conformance checks.
|
|
98
|
+
2. Register the contract with its deploy block when known.
|
|
99
|
+
3. Wait for indexing readiness.
|
|
100
|
+
4. Fetch contract and token metadata through the public URL.
|
|
101
|
+
5. Verify byte commitments with `abx verify`.
|
|
102
|
+
6. Mint only after required token-specific surfaces can become ready.
|
|
88
103
|
|
|
89
|
-
|
|
90
|
-
- **Co-located:** runner beside the resolver sharing one backend/volume (no admin token needed — both read/write the same store).
|
|
104
|
+
## Choose storage independently
|
|
91
105
|
|
|
92
|
-
|
|
106
|
+
Storage is stateless configuration selected per command or through environment defaults. Inspect the
|
|
107
|
+
resolved choice with:
|
|
93
108
|
|
|
94
|
-
|
|
109
|
+
```bash
|
|
110
|
+
abx storage show --check
|
|
111
|
+
```
|
|
95
112
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
113
|
+
| Backend | Good for | Operator responsibility |
|
|
114
|
+
|---|---|---|
|
|
115
|
+
| `fs` | local development | disk durability and no public reach by default |
|
|
116
|
+
| `cloud` | mutable/fast public assets | bucket, auth endpoint, public read base/CDN, retention |
|
|
117
|
+
| `ipfs` | content-addressed distribution | pinning and public gateway availability |
|
|
118
|
+
| `arweave` | permanent external custody | upload identity/credits and propagation |
|
|
99
119
|
|
|
100
|
-
|
|
120
|
+
Never silently fall back to `fs` when a selected backend is incomplete. Fix the missing configuration
|
|
121
|
+
or change the plan explicitly.
|
|
101
122
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
123
|
+
### Cloud
|
|
124
|
+
|
|
125
|
+
Separate the authenticated S3/R2 API endpoint used for writes from the public HTTP base used by
|
|
126
|
+
collectors. An R2 S3 endpoint is not a marketplace image URL. `--check` performs a real write/read
|
|
127
|
+
round trip through the public base; require it to pass.
|
|
128
|
+
|
|
129
|
+
### IPFS
|
|
130
|
+
|
|
131
|
+
Pinning success and gateway retrieval are distinct. Use a durable pinning service and public gateway
|
|
132
|
+
for launches. A local kubo node is suitable for development only. The on-chain field may hold the
|
|
133
|
+
bare CID while a collection gateway preference chooses the serving prefix; `abx set-gateway` can
|
|
134
|
+
change that prefix without changing the content.
|
|
135
|
+
|
|
136
|
+
### Arweave
|
|
137
|
+
|
|
138
|
+
`--backend arweave` (the default `turbo` provider) needs the optional
|
|
139
|
+
`@artblocks/abx-storage-arweave` package installed alongside the CLI — it is not part of the
|
|
140
|
+
default install, deliberately, so a default `abx` install stays free of Turbo's browser
|
|
141
|
+
wallet-connector dependency tree. If it is missing, the CLI names the exact install command
|
|
142
|
+
(`npm install @artblocks/abx-storage-arweave`) rather than failing unhelpfully; run that command
|
|
143
|
+
once, then retry. `--provider http-bundler` needs neither this package nor any of its dependencies.
|
|
144
|
+
|
|
145
|
+
The accepted upload and a retrievable gateway object are separate lifecycle states. Use
|
|
146
|
+
`abx storage status <locator> --json`; wait for `ready` instead of uploading duplicates during
|
|
147
|
+
propagation. Upload deduplication is success, not an instruction to top up or switch backends.
|
|
148
|
+
|
|
149
|
+
Turbo credits attach to the signing identity. `abx storage balance` reports the managed identity and
|
|
150
|
+
wallet-related lanes; choose the intended payer before funding. Back up the managed key using the
|
|
151
|
+
dedicated command and never expose the JWK.
|
|
152
|
+
|
|
153
|
+
### Publication bridge
|
|
111
154
|
|
|
112
|
-
|
|
155
|
+
An effects runner stores rendered bytes, then publishes their locator to the resolver. The resolver
|
|
156
|
+
usually redirects to that public object rather than proxying it. Therefore the storage backend must be
|
|
157
|
+
reachable from both the runner and collectors. A local `fs` output from one machine is orphaned when
|
|
158
|
+
the public resolver runs elsewhere.
|
|
113
159
|
|
|
114
|
-
|
|
160
|
+
## Operate resolver and effects services
|
|
115
161
|
|
|
116
|
-
|
|
162
|
+
The resolver handles indexed state and public metadata/live/data routes. The effects service executes
|
|
163
|
+
programs and publishes stills/traits. Deploy them separately so heavy browser work does not destabilize
|
|
164
|
+
metadata reads.
|
|
165
|
+
|
|
166
|
+
For an active JavaScript sale, run continuous effects. For a fixed supply or repair, a one-shot render
|
|
167
|
+
may be sufficient. With an on-chain Solidity image renderer, no effects service is needed for the
|
|
168
|
+
image; do not deploy infrastructure merely because the collection is a code contract.
|
|
169
|
+
|
|
170
|
+
Protect public effects endpoints with the generated token. An unauthenticated force-render endpoint
|
|
171
|
+
can burn compute and storage. Keep resolver admin/effects credentials separate from wallet signing.
|
|
172
|
+
|
|
173
|
+
Verify the operational graph:
|
|
174
|
+
|
|
175
|
+
1. Resolver can reconstruct chain state from its configured RPC.
|
|
176
|
+
2. Effects can load the exact live document for a minted id.
|
|
177
|
+
3. Effects storage produces a publicly retrievable locator.
|
|
178
|
+
4. Resolver publishes or redirects to that locator.
|
|
179
|
+
5. Token metadata exposes the resulting image/attributes.
|
|
180
|
+
6. A PostParam change reaches the watcher and creates the next inputs-hash render.
|
|
181
|
+
|
|
182
|
+
### SQLite maintenance for a long-running node
|
|
183
|
+
|
|
184
|
+
The self-hosted store is one SQLite file. `abx serve` already reclaims freed pages automatically in
|
|
185
|
+
small bounded passes between chain-watch ticks — never inline with a request, so it never adds
|
|
186
|
+
latency to a metadata read. Nothing to schedule for that half.
|
|
187
|
+
|
|
188
|
+
The other half is explicit and never automatic: a store created before this maintenance shipped
|
|
189
|
+
needs a one-time conversion.
|
|
117
190
|
|
|
118
191
|
```bash
|
|
119
|
-
abx
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
abx serve # 4. serve the resolver at the known address (blocks)
|
|
123
|
-
abx mint <address> # 5. issue token #0 once metadata is live
|
|
124
|
-
abx refresh <address> # 6. nudge marketplaces to index it
|
|
192
|
+
abx vacuum # status: auto_vacuum mode, page count, freelist size
|
|
193
|
+
abx vacuum convert # one-time full VACUUM — only when abx vacuum says the store needs it
|
|
194
|
+
abx vacuum incremental [--pages n] # one bounded reclaim pass on demand (not running abx serve? use this)
|
|
125
195
|
```
|
|
126
|
-
Drop `--no-mint` (steps 5–6 collapse) for the express path. Add `--sign` to step 3/5 for the wallet lane. Confirm integrity with `abx verify <address>` (re-hashes served bytes vs the on-chain commitment — no server needed; the `/verify` HTTP route is the same check while serving). `abx index <address>` re-reconstructs from chain; `abx status` lists projects + the active backend.
|
|
127
196
|
|
|
128
|
-
|
|
197
|
+
Run `abx vacuum convert` deliberately, not on a schedule: it rewrites the entire file and can briefly
|
|
198
|
+
need up to ~2x its on-disk size. Check `abx vacuum` first; if it already reports `auto_vacuum:
|
|
199
|
+
incremental`, there is nothing to convert.
|
|
129
200
|
|
|
130
|
-
|
|
131
|
-
- `GET /` — read-only index of served contracts · `GET /t/<chainId>/<address>/0` — ERC-721 metadata · `…/0/image` — the image
|
|
132
|
-
- `GET /c/<chainId>/<address>` — ERC-7572 collection metadata · `GET /api/project/<address>` — full reconstructed state · `GET /d/<chainId>/<address>` — per-contract read-only dashboard (namespaced so one host serves many contracts). No public action buttons anywhere.
|
|
133
|
-
- For IPFS/Arweave the served `image` is the **gateway HTTPS URL** (`https://<gateway>/ipfs/<cid>` / `<gateway>/<txid>`), the form wallets/marketplaces render (raw `ipfs://` doesn't). The on-chain commitment is the **keccak256** (backend-neutral anchor, survives a gateway migration); the CID/txid is just the locator. The locator lives in the **deployer's** local index, so a **remote** resolver emits the gateway URL only once it's bridged (`abx add <clone> --remote`), else `image` falls back to the resolver's own `/…/image` route.
|
|
134
|
-
- `GET /.well-known/abx-service` — the **service descriptor** (public): what the node supports — `interfaces`, `chains`, `auth` (incl. `signupUrl` for humans), `render.attached` (managed rendering). Read it before registering with any remote service.
|
|
135
|
-
- `POST /v1/projects` `{chainId, address, fromBlock?, factory?, description?, externalUrl?, attributes?, contentLocators?}` · `GET /v1/projects` (the projects visible to the token) · `DELETE /v1/projects/<chainId>/<address>` · `POST /v1/projects/<chainId>/<address>/reindex` · `GET /v1/projects/<chainId>/<address>/status` — the **control plane** ([spec](../../../../specs/self-host-toolkit/remote-services.md)): register/forget which contracts the node indexes, bridge off-chain traits + locators; a remote `add`/`forget`. Bearer-gated (`Authorization: Bearer <token>`), 404 code `disabled` when no token is configured. Errors carry a machine `code` (`unauthorized` 401 · `forbidden` 403 · `unsupported_chain` · `not_registered`). Indexing control only — never signing.
|
|
136
|
-
- `GET /api/project/<address>/verify` — bearer-gated too (it triggers outbound fetches). Run from the CLI: `abx verify <addr>` / `abx index <addr> --remote`.
|
|
201
|
+
## Use lifecycle states
|
|
137
202
|
|
|
138
|
-
|
|
203
|
+
Prefer status over retries. Typical nonterminal states include deployment accepted, indexing,
|
|
204
|
+
storage propagating, render queued/running, and remote registration pending. Typical terminal faults
|
|
205
|
+
include authentication/authorization failure, invalid contract/chain, interface mismatch, failed
|
|
206
|
+
transaction, integrity mismatch, and unsupported configuration.
|
|
139
207
|
|
|
140
|
-
|
|
208
|
+
Use:
|
|
141
209
|
|
|
142
|
-
## Docker / droplet
|
|
143
|
-
|
|
144
|
-
The container is **emitted by `deploy-resolver --provider vps`** — it writes `deploy/vps/` with a `Dockerfile` + `docker-compose.yml` + `Caddyfile` + `setup.sh`, self-contained. Don't hand-write a Dockerfile or compose file. Run compose **from that dir**:
|
|
145
210
|
```bash
|
|
146
|
-
|
|
147
|
-
|
|
211
|
+
abx status [address] --watch
|
|
212
|
+
abx status <address> --remote <name> --watch
|
|
213
|
+
abx storage status <locator> --json
|
|
214
|
+
abx verify <address> --json
|
|
148
215
|
```
|
|
149
|
-
|
|
216
|
+
|
|
217
|
+
Wait on nonterminal states using the command's watcher/backoff. Do not wrap the CLI in a second tight
|
|
218
|
+
poller. Do not retry terminal 4xx responses or reverted transactions unchanged. Read
|
|
219
|
+
[diagnose.md](diagnose.md) for the one-transition recovery model.
|
|
220
|
+
|
|
221
|
+
## Migrate without losing canonicity
|
|
222
|
+
|
|
223
|
+
Migration changes a public projection, not canonical on-chain history. Use `abx migrate` to copy and
|
|
224
|
+
compare resolver state without cutting over prematurely.
|
|
225
|
+
|
|
226
|
+
1. Resolve the source and destination descriptors and credentials.
|
|
227
|
+
2. Confirm both support the active chain and contract type.
|
|
228
|
+
3. Reconstruct/register the destination from chain using the deploy block.
|
|
229
|
+
4. Copy only off-chain operator state and published artifact locators that are not derivable from chain.
|
|
230
|
+
5. Verify contract metadata, representative token metadata, fields, attachments, renders, and byte
|
|
231
|
+
commitments on both sides.
|
|
232
|
+
6. Cut over via DNS when using a stable creator domain, or change the on-chain URI pointer only after
|
|
233
|
+
parity is proven.
|
|
234
|
+
7. Re-emit URI/refresh signals as required, then monitor the destination.
|
|
235
|
+
8. Keep the old service until marketplace and collector paths have converged.
|
|
236
|
+
|
|
237
|
+
Never describe resolver migration as moving the NFT. Ownership, parameters, commitments, and canonical
|
|
238
|
+
events remain on-chain; only the serving/indexing projection changes.
|