@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/dist/commands/deploy.js
CHANGED
|
@@ -21,7 +21,7 @@ import { DEFAULT_PORT, contentHash, generateContent, resolveBaseUrl, startTokenA
|
|
|
21
21
|
import { encodeFunctionData, getAddress, toHex, zeroAddress } from 'viem';
|
|
22
22
|
import { CHAIN, explorerBase, assertTurboFundsForUpload, backendResolution, collectContentLocators, ensureArweaveIdentityForUpload, factoryAddress, faucetHint, localIndexer, loopbackBaseUrl, noteArweavePlan, noteStorageReadiness, rendererAddress, seriesFactoryAddress, oneOfOneEditionFactoryAddress, editionFactoryAddress, editionCodeFactoryAddress, storageOptions, storageOverrides, storageSignerChoice, } from '../config.js';
|
|
23
23
|
import { parseDepFlag } from '../deps.js';
|
|
24
|
-
import {
|
|
24
|
+
import { isDryRun, parseSaltFlag, refuseStrayFlags, warnSignWithoutFor } from '../flags.js';
|
|
25
25
|
import { isEditionContract } from '../kind.js';
|
|
26
26
|
import { jsonSafe, withJson } from '../jsonout.js';
|
|
27
27
|
import { planOnChainScript } from '../script-chunks.js';
|
|
@@ -886,12 +886,12 @@ export async function cmdDeployBody(flags, serveAfter, emit) {
|
|
|
886
886
|
}
|
|
887
887
|
step('Stage on-chain image');
|
|
888
888
|
if (dryRun) {
|
|
889
|
-
info(previewImageStaging(flags.image, parseCompress(flags.compress)
|
|
889
|
+
info(await previewImageStaging(flags.image, parseCompress(flags.compress)));
|
|
890
890
|
}
|
|
891
891
|
else if (lane === 'send') {
|
|
892
892
|
// hot lane: the env key stages now (deployer-independent — the manifest doesn't depend
|
|
893
893
|
// on the clone address), then the deploy below bakes in the reader field.
|
|
894
|
-
const { field, note } = await stageImageField(flags.image, parseCompress(flags.compress), envStagingSender()
|
|
894
|
+
const { field, note } = await stageImageField(flags.image, parseCompress(flags.compress), envStagingSender());
|
|
895
895
|
bakedImage = field;
|
|
896
896
|
info(note);
|
|
897
897
|
}
|
|
@@ -1082,7 +1082,7 @@ export async function cmdDeployBody(flags, serveAfter, emit) {
|
|
|
1082
1082
|
try {
|
|
1083
1083
|
const signer = await session.connect();
|
|
1084
1084
|
// Stage on-chain through the session (sets bakedImage, which buildForDeployer reads below).
|
|
1085
|
-
const { field, note } = await stageImageField(flags.image, parseCompress(flags.compress), sessionStagingSender(session)
|
|
1085
|
+
const { field, note } = await stageImageField(flags.image, parseCompress(flags.compress), sessionStagingSender(session));
|
|
1086
1086
|
bakedImage = field;
|
|
1087
1087
|
info(note);
|
|
1088
1088
|
const { clone: predicted, params, salt, contentNote } = await buildForDeployer(signer);
|
|
@@ -1276,10 +1276,9 @@ export async function cmdDeployBody(flags, serveAfter, emit) {
|
|
|
1276
1276
|
// own function rather than threaded into `cmdDeployBody` with `if (copies)` branches throughout —
|
|
1277
1277
|
// so the 721 lane, above, stays provably byte-identical whether or not editions exist.
|
|
1278
1278
|
//
|
|
1279
|
-
//
|
|
1280
|
-
//
|
|
1281
|
-
//
|
|
1282
|
-
// half-build it. Every other custody/signing combination the 1/1 lane supports works identically.
|
|
1279
|
+
// `--onchain-image` (chunk-store staging) works in the hot and wallet lanes. The cold/unsigned lane
|
|
1280
|
+
// is refused because each staged chunk transaction feeds the next; it cannot produce one independent
|
|
1281
|
+
// offline bundle. Every other custody/signing combination the 1/1 lane supports works identically.
|
|
1283
1282
|
// (`DEPLOY_EDITION_FLAGS` — the allowlist this function's `refuseStrayFlags` checks against — is
|
|
1284
1283
|
// declared further down, alongside `DEPLOY_FLAGS`/`DEPLOY_SERIES_FLAGS`/`DEPLOY_CODE_FLAGS`: it
|
|
1285
1284
|
// spreads `DEPLOY_FLAGS`, so it must come AFTER that declaration at module scope, same reason
|
|
@@ -1410,7 +1409,7 @@ export async function cmdDeployOneOfOneEditionBody(flags, emit) {
|
|
|
1410
1409
|
// connect, so the connecting wallet pays for and owns every chunk write. `stageNow` is the hot-lane
|
|
1411
1410
|
// (and dry-run) path; the session branch below calls the same helper with a session-backed sender.
|
|
1412
1411
|
const stageOnChainImage = async (sender) => {
|
|
1413
|
-
const { field, note } = await stageImageField(flags.image, parseCompress(flags.compress), sender
|
|
1412
|
+
const { field, note } = await stageImageField(flags.image, parseCompress(flags.compress), sender);
|
|
1414
1413
|
bakedImage = field;
|
|
1415
1414
|
info(note);
|
|
1416
1415
|
};
|
|
@@ -1419,7 +1418,7 @@ export async function cmdDeployOneOfOneEditionBody(flags, emit) {
|
|
|
1419
1418
|
throw new Error('--onchain-image needs --image <path> (the bytes to put on-chain)');
|
|
1420
1419
|
step('Stage on-chain image');
|
|
1421
1420
|
if (dryRun)
|
|
1422
|
-
info(previewImageStaging(flags.image, parseCompress(flags.compress)
|
|
1421
|
+
info(await previewImageStaging(flags.image, parseCompress(flags.compress)));
|
|
1423
1422
|
else if (lane === 'send')
|
|
1424
1423
|
await stageOnChainImage(envStagingSender());
|
|
1425
1424
|
// lane === 'sign' → staged inside the wallet session further down.
|
|
@@ -1868,7 +1867,7 @@ export async function cmdDeploySeriesBody(flags, emit) {
|
|
|
1868
1867
|
const buildImageFields = async (stage) => {
|
|
1869
1868
|
// --onchain-image: stage every token's bytes into ONE shared chunk store, each a `reader` field.
|
|
1870
1869
|
if (onchainImage) {
|
|
1871
|
-
const { fields } = await stageImageFieldsBatch(tokenPaths.map((s) => s.path), compress, stage, flags['chunk-store']
|
|
1870
|
+
const { fields } = await stageImageFieldsBatch(tokenPaths.map((s) => s.path), compress, stage, flags['chunk-store']);
|
|
1872
1871
|
tokenFields = tokenPaths.map(({ tokenId }, i) => tokenFieldOf(tokenId, fields[i]));
|
|
1873
1872
|
return;
|
|
1874
1873
|
}
|
|
@@ -2053,7 +2052,7 @@ export async function cmdDeploySeriesBody(flags, emit) {
|
|
|
2053
2052
|
}
|
|
2054
2053
|
if (onchainImage) {
|
|
2055
2054
|
for (const { tokenId, name: fname, path } of tokenPaths) {
|
|
2056
|
-
info(`token ${tokenId} ← ${fname}: ${previewImageStaging(path, compress
|
|
2055
|
+
info(`token ${tokenId} ← ${fname}: ${await previewImageStaging(path, compress)}`);
|
|
2057
2056
|
}
|
|
2058
2057
|
}
|
|
2059
2058
|
info(`approvals ${approvals} wallet approval(s)`); // B2 — TX signatures only
|
|
@@ -2238,11 +2237,10 @@ export async function cmdDeploySeriesBody(flags, emit) {
|
|
|
2238
2237
|
// `cmdDeploySeriesBody`, kept as its OWN function for the same reason `cmdDeployOneOfOneEditionBody`
|
|
2239
2238
|
// is (byte-identical 721 lane — see that function's module note).
|
|
2240
2239
|
//
|
|
2241
|
-
//
|
|
2242
|
-
//
|
|
2243
|
-
//
|
|
2244
|
-
//
|
|
2245
|
-
// fallback already works correctly, just at O(N) upload calls instead of O(1). Tracked as a follow-up.
|
|
2240
|
+
// Custody matches the 721 Series lane: off-chain per-file uploads, O(1) uniform-extension directory
|
|
2241
|
+
// templates under `--onchain-uri`, inline SVG, hosted resolution, and `--onchain-image` chunk staging.
|
|
2242
|
+
// The last uses hot or wallet signing; cold/unsigned staging is refused because each chunk feeds the
|
|
2243
|
+
// next transaction.
|
|
2246
2244
|
// (`DEPLOY_SERIES_EDITION_FLAGS` is declared further down, beside `DEPLOY_EDITION_FLAGS` — see that
|
|
2247
2245
|
// const's own note on why.)
|
|
2248
2246
|
export async function cmdDeployEditionImageBody(flags, emit) {
|
|
@@ -2390,7 +2388,7 @@ export async function cmdDeployEditionImageBody(flags, emit) {
|
|
|
2390
2388
|
// already deployed. Same per-id predicate either way (`guardOnChainSize` runs again during staging).
|
|
2391
2389
|
if (onchainImage && dryRun) {
|
|
2392
2390
|
for (const { name, path } of tokenPaths)
|
|
2393
|
-
guardOnChainSize(statSync(path).size, name
|
|
2391
|
+
await guardOnChainSize(statSync(path).size, name);
|
|
2394
2392
|
}
|
|
2395
2393
|
// Say WHICH backend holds the bytes, exactly as the 1/1 lane does. Both Series lanes resolved a
|
|
2396
2394
|
// backend and never named it, so a creator asking for "images on IPFS" had no way to confirm from
|
|
@@ -2426,7 +2424,7 @@ export async function cmdDeployEditionImageBody(flags, emit) {
|
|
|
2426
2424
|
// field pointing at its manifest. Ported from the 721 Series twin — the edition lane refused this
|
|
2427
2425
|
// outright before (B28), though nothing on-chain prevented it.
|
|
2428
2426
|
if (onchainImage) {
|
|
2429
|
-
const { fields } = await stageImageFieldsBatch(tokenPaths.map((s) => s.path), compress, stage, flags['chunk-store']
|
|
2427
|
+
const { fields } = await stageImageFieldsBatch(tokenPaths.map((s) => s.path), compress, stage, flags['chunk-store']);
|
|
2430
2428
|
tokenPaths.forEach(({ tokenId }, i) => tokenFields.push(tokenFieldOf(tokenId, fields[i])));
|
|
2431
2429
|
if (seriesTraitsOnchain)
|
|
2432
2430
|
for (const [tokenId, attrs] of seriesTraits)
|
|
@@ -2947,7 +2945,7 @@ export const SHARED_DEPLOY_FLAGS = [
|
|
|
2947
2945
|
// A 1/1 `abx deploy` accepts these (see `abx help deploy`). Anything else warns (typo'd/unsupported).
|
|
2948
2946
|
export const DEPLOY_FLAGS = new Set([
|
|
2949
2947
|
'image', 'name', 'symbol', 'type', 'description', 'description-onchain', 'external-url', 'traits', 'traits-onchain', 'attributes',
|
|
2950
|
-
'onchain-uri', 'onchain-image', 'compress', '
|
|
2948
|
+
'onchain-uri', 'onchain-image', 'compress', 'royalty-bps', 'royalty-cap', 'burnable', 'no-mint',
|
|
2951
2949
|
...AUTHORSHIP_DEPLOY_FIELDS.map(([flag]) => flag),
|
|
2952
2950
|
...SHARED_DEPLOY_FLAGS,
|
|
2953
2951
|
]);
|
|
@@ -2955,7 +2953,7 @@ export const DEPLOY_FLAGS = new Set([
|
|
|
2955
2953
|
export const DEPLOY_SERIES_FLAGS = new Set([
|
|
2956
2954
|
'dir', 'count', 'name', 'symbol', 'description', 'external-url', 'royalty-bps', 'royalty-cap', 'burnable', 'attributes', 'traits-onchain',
|
|
2957
2955
|
'no-mint', 'mint-all', 'mint-count', 'unpaused', 'minter', 'primary-payee',
|
|
2958
|
-
'onchain-uri', 'onchain-image', 'compress', '
|
|
2956
|
+
'onchain-uri', 'onchain-image', 'compress', 'chunk-store',
|
|
2959
2957
|
...AUTHORSHIP_DEPLOY_FIELDS.map(([flag]) => flag),
|
|
2960
2958
|
...SHARED_DEPLOY_FLAGS,
|
|
2961
2959
|
]);
|
|
@@ -4151,21 +4149,19 @@ export async function cmdDeployCodeBody(flags, emit) {
|
|
|
4151
4149
|
}
|
|
4152
4150
|
// ── deploy-code --copies: EditionCode ─────────────────────────────────────────────────────────────
|
|
4153
4151
|
// A generative/code drop as copies — the full generative stack (on-chain script, PostParams, a
|
|
4154
|
-
// mint-time seed)
|
|
4152
|
+
// mint-time seed), plus renderer-only and script+renderer projects. Kept as its own
|
|
4155
4153
|
// function for the same byte-identical-721-lane reason as the other two edition bodies.
|
|
4156
4154
|
//
|
|
4157
|
-
//
|
|
4155
|
+
// Current limits, each refused in code rather than silently ignored:
|
|
4158
4156
|
// • `--code-dir` (directory-build code drops) — not ported; use `--script`.
|
|
4159
|
-
// • `--
|
|
4160
|
-
//
|
|
4161
|
-
// • `--image-renderer` / `--attributes-renderer` / `--image-base` (the in-chain-Solidity-renderer and
|
|
4162
|
-
// deterministic-off-chain-thumbnail lanes) — not ported.
|
|
4157
|
+
// • `--image-base` (deterministic off-chain thumbnails) — not ported because the effects runner
|
|
4158
|
+
// does not yet publish a still per edition id. Solidity image/attributes renderers DO work.
|
|
4163
4159
|
// • `--no-delegation` — refused outright: EditionCode has no TokenOwner-leg delegation to opt out
|
|
4164
4160
|
// of (its auth leg generalizes to "any holder", per the parity plan's ConfigurableParams note).
|
|
4165
4161
|
// • `--resume` — refused (see the `isEditionContract` guard in `cmdDeployCodeBody`'s own --resume
|
|
4166
4162
|
// handling): the SDK's resume.ts assumes the 721 mint/supply shape throughout.
|
|
4167
|
-
//
|
|
4168
|
-
//
|
|
4163
|
+
// Dependencies, renderer-only projects, schemas, seed controls, mint timing, royalties, identity
|
|
4164
|
+
// fields, and --721c→1155C work here too.
|
|
4169
4165
|
export const DEPLOY_CODE_EDITION_FLAGS = new Set([
|
|
4170
4166
|
'script', 'name', 'symbol', 'description', 'external-url', 'description-onchain',
|
|
4171
4167
|
...AUTHORSHIP_DEPLOY_FIELDS.map(([flag]) => flag),
|