@artblocks/abx-cli 0.1.0 → 0.3.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 +43 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +35 -15
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/project.js +3 -3
- package/dist/mintpage.d.ts.map +1 -1
- package/dist/mintpage.js +2 -0
- package/dist/mintpage.js.map +1 -1
- package/dist/ownerops.d.ts +13 -2
- package/dist/ownerops.d.ts.map +1 -1
- package/dist/ownerops.js +122 -16
- package/dist/ownerops.js.map +1 -1
- package/package.json +6 -6
- package/skill/SKILL.md +3 -1
- package/skill/reference/deploy.md +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @artblocks/abx-cli
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1cd7c8c: Drop-in for existing consumers; Arbitrum Sepolia is a new opt-in network.
|
|
8
|
+
|
|
9
|
+
Add experimental Arbitrum Sepolia support and stage Arbitrum production metadata for its later canonical deployment.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [1cd7c8c]
|
|
14
|
+
- @artblocks/abx-sdk@0.3.0
|
|
15
|
+
- @artblocks/abx-indexer@0.1.2
|
|
16
|
+
- @artblocks/abx-storage@0.1.2
|
|
17
|
+
- @artblocks/abx-token-api@0.2.1
|
|
18
|
+
|
|
19
|
+
## 0.2.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- 7947ba9: Drop-in for read-only consumers. Hosts that serve stored images should adopt `storedImageType`.
|
|
24
|
+
|
|
25
|
+
On-chain raster images now display correctly. Stored `image` bytes are labelled with the new reserved
|
|
26
|
+
`abx_image_type` field, and fall back to `image/svg+xml` when it is unset. Before this change, a JPEG
|
|
27
|
+
or PNG staged with `--onchain-image` was served as SVG, which browsers show as a broken image.
|
|
28
|
+
|
|
29
|
+
- SDK: `METADATA_FIELD.imageType`, `storedImageType`, `isDeclarableImageType`, and
|
|
30
|
+
`DEFAULT_STORED_IMAGE_TYPE`. `isCurrentRenderer` now requires renderer spec v12, and the
|
|
31
|
+
canonical renderer address points at the v12 build.
|
|
32
|
+
- CLI: `deploy --onchain-image`, `deploy-series --onchain-image`, and `set-field --field image --file`
|
|
33
|
+
declare a raster's type from its file extension. They refuse formats browsers don't draw, such as
|
|
34
|
+
TIFF, PSD, video, and files without an extension, before anything is staged.
|
|
35
|
+
- Token API: the image route, the `/data/image` route, and the `artifacts` manifest serve the
|
|
36
|
+
declared type.
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [7947ba9]
|
|
41
|
+
- @artblocks/abx-sdk@0.2.0
|
|
42
|
+
- @artblocks/abx-token-api@0.2.0
|
|
43
|
+
- @artblocks/abx-indexer@0.1.1
|
|
44
|
+
- @artblocks/abx-storage@0.1.1
|
|
45
|
+
|
|
3
46
|
## 0.1.0
|
|
4
47
|
|
|
5
48
|
### Minor Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/commands/deploy.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACvD,OAAO,EACL,KAAK,OAAO,EAMZ,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,YAAY,EAMjB,KAAK,qBAAqB,EAE1B,KAAK,aAAa,EAMlB,KAAK,UAAU,EAoDhB,MAAM,oBAAoB,CAAC;AAY5B,OAAO,EAAC,KAAK,GAAG,EAAqD,MAAM,MAAM,CAAC;AAClF,OAAO,EAGL,KAAK,gBAAgB,EAmBtB,MAAM,cAAc,CAAC;A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,GAAE,MAAM,GAAG,OAAgB,GAClC,OAAO,CAAC,OAAO,CAAC,CAmClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,OAAO,CAAC,CAoDlB"}
|
package/dist/commands/deploy.js
CHANGED
|
@@ -27,7 +27,7 @@ import { jsonSafe, withJson } from '../jsonout.js';
|
|
|
27
27
|
import { planOnChainScript } from '../script-chunks.js';
|
|
28
28
|
import { bold, c, dim, ensureFactory, ensureRenderer, ensureSeedSource, ensureSeriesCodeFactory, ensureSeriesFactory, ensureOneOfOneEditionFactory, ensureEditionFactory, ensureEditionCodeFactory, g, info, keepAlive, ok, p, portInUse, printServing, registerAndIndexLocally, reindexAfterDeploy, step, warn as printWarn, } from '../output.js';
|
|
29
29
|
import { DEPLOY_PLAN_SCHEMA_VERSION, stripAnsiForPlan, } from '../deploy-plan.js';
|
|
30
|
-
import { parseRoyaltyBps, AUTHORSHIP_DEPLOY_FIELDS, ONCHAIN_PROJECT_SOFT_LIMIT, ONCHAIN_READ_WARN_BYTES, tokenUriGasEstimate, authorshipContractFields, gatewayContractFields, servingGateway, computeContentPlan, envStagingSender, parseCompress, parseSeedSourceValue, canonicalSeedSource, refuseUnusableSeedSource, parseTransferValidatorValue, guardOnChainSize, previewImageStaging, refusePrewrappedImage, sessionStagingSender, stageImageField, stageImageFieldsBatch, } from '../ownerops.js';
|
|
30
|
+
import { parseRoyaltyBps, AUTHORSHIP_DEPLOY_FIELDS, ONCHAIN_PROJECT_SOFT_LIMIT, ONCHAIN_READ_WARN_BYTES, tokenUriGasEstimate, authorshipContractFields, gatewayContractFields, servingGateway, computeContentPlan, envStagingSender, parseCompress, parseSeedSourceValue, canonicalSeedSource, refuseUnusableSeedSource, parseTransferValidatorValue, guardOnChainSize, previewImageStaging, refusePrewrappedImage, sessionStagingSender, stageImageField, stageImageFieldsBatch, storedImageTypeFor, } from '../ownerops.js';
|
|
31
31
|
import { canonicalLabel } from '../remote.js';
|
|
32
32
|
import { assertLaneCanSign, confirmSend, gatedSend, laneFromFlags } from '../riskgate.js';
|
|
33
33
|
import { describeSchema, editionSchemaAdvisory, parseSchemaSpecs } from '../schema.js';
|
|
@@ -957,8 +957,8 @@ export async function cmdDeployBody(flags, serveAfter, emit) {
|
|
|
957
957
|
else if (lane === 'send') {
|
|
958
958
|
// hot lane: the env key stages now (deployer-independent — the manifest doesn't depend
|
|
959
959
|
// on the clone address), then the deploy below bakes in the reader field.
|
|
960
|
-
const {
|
|
961
|
-
bakedImage =
|
|
960
|
+
const { fields, note } = await stageImageField(flags.image, parseCompress(flags.compress), envStagingSender());
|
|
961
|
+
bakedImage = fields;
|
|
962
962
|
info(note);
|
|
963
963
|
}
|
|
964
964
|
else {
|
|
@@ -979,6 +979,7 @@ export async function cmdDeployBody(flags, serveAfter, emit) {
|
|
|
979
979
|
const approvals = onchainImage
|
|
980
980
|
? (() => {
|
|
981
981
|
const bytes = readFileSync(resolvePath(flags.image));
|
|
982
|
+
storedImageTypeFor(bytes, resolvePath(flags.image)); // refuse an unstorable file before any session opens
|
|
982
983
|
const compress = parseCompress(flags.compress);
|
|
983
984
|
const contentPlan = computeContentPlan(bytes, compress);
|
|
984
985
|
planImageFile = {
|
|
@@ -1023,7 +1024,7 @@ export async function cmdDeployBody(flags, serveAfter, emit) {
|
|
|
1023
1024
|
// dry run staging is skipped (bakedImage undefined), so don't fall through to the inline
|
|
1024
1025
|
// path — that would mislabel a reader deploy as INLINE. Note the reader path instead.
|
|
1025
1026
|
const { tokenFields, contentNote } = bakedImage
|
|
1026
|
-
? { tokenFields: [bakedImage], contentNote: 'content: image staged ON-CHAIN via reader (self-resolving, no custody)' }
|
|
1027
|
+
? { tokenFields: [...bakedImage], contentNote: 'content: image staged ON-CHAIN via reader (self-resolving, no custody)' }
|
|
1027
1028
|
: onchainImage
|
|
1028
1029
|
? { tokenFields: [], contentNote: 'content: image would be staged ON-CHAIN via reader (chunk store) — dry run skips the staging write' }
|
|
1029
1030
|
: await prepareContent(flags.image, clone, storageOverrides(flags), !dryRun, onChainUri, uploadRemoteEth, deployer, flags);
|
|
@@ -1196,8 +1197,8 @@ export async function cmdDeployBody(flags, serveAfter, emit) {
|
|
|
1196
1197
|
const signer = await session.connect();
|
|
1197
1198
|
deployerAddr = signer;
|
|
1198
1199
|
// Stage on-chain through the session (sets bakedImage, which buildForDeployer reads below).
|
|
1199
|
-
const {
|
|
1200
|
-
bakedImage =
|
|
1200
|
+
const { fields, note } = await stageImageField(flags.image, parseCompress(flags.compress), sessionStagingSender(session));
|
|
1201
|
+
bakedImage = fields;
|
|
1201
1202
|
info(note);
|
|
1202
1203
|
const { clone: predicted, params, salt, contentNote } = await buildForDeployer(signer);
|
|
1203
1204
|
info(contentNote);
|
|
@@ -1222,8 +1223,8 @@ export async function cmdDeployBody(flags, serveAfter, emit) {
|
|
|
1222
1223
|
throw new Error(`The ABX creator wallet ${session.address} is not the required signer ${flags.for}.`);
|
|
1223
1224
|
}
|
|
1224
1225
|
deployerAddr = session.address;
|
|
1225
|
-
const {
|
|
1226
|
-
bakedImage =
|
|
1226
|
+
const { fields, note } = await stageImageField(flags.image, parseCompress(flags.compress), sessionStagingSender(session));
|
|
1227
|
+
bakedImage = fields;
|
|
1227
1228
|
info(note);
|
|
1228
1229
|
const { clone: predicted, params, salt, contentNote } = await buildForDeployer(session.address);
|
|
1229
1230
|
info(contentNote);
|
|
@@ -1580,8 +1581,8 @@ export async function cmdDeployOneOfOneEditionBody(flags, emit) {
|
|
|
1580
1581
|
// connect, so the connecting wallet pays for and owns every chunk write. `stageNow` is the hot-lane
|
|
1581
1582
|
// (and dry-run) path; the session branch below calls the same helper with a session-backed sender.
|
|
1582
1583
|
const stageOnChainImage = async (sender) => {
|
|
1583
|
-
const {
|
|
1584
|
-
bakedImage =
|
|
1584
|
+
const { fields, note } = await stageImageField(flags.image, parseCompress(flags.compress), sender);
|
|
1585
|
+
bakedImage = fields;
|
|
1585
1586
|
info(note);
|
|
1586
1587
|
};
|
|
1587
1588
|
if (onchainImage) {
|
|
@@ -1613,6 +1614,7 @@ export async function cmdDeployOneOfOneEditionBody(flags, emit) {
|
|
|
1613
1614
|
const approvals = onchainImage
|
|
1614
1615
|
? (() => {
|
|
1615
1616
|
const bytes = readFileSync(resolvePath(flags.image));
|
|
1617
|
+
storedImageTypeFor(bytes, resolvePath(flags.image)); // refuse an unstorable file before any session opens
|
|
1616
1618
|
const compress = parseCompress(flags.compress);
|
|
1617
1619
|
const contentPlan = computeContentPlan(bytes, compress);
|
|
1618
1620
|
planImageFile = {
|
|
@@ -1636,7 +1638,7 @@ export async function cmdDeployOneOfOneEditionBody(flags, emit) {
|
|
|
1636
1638
|
assertSaltGuardForDeployer(explicitSalt, deployer);
|
|
1637
1639
|
const clone = await predictClone(publicClient, { factory, salt });
|
|
1638
1640
|
const { tokenFields, contentNote } = bakedImage
|
|
1639
|
-
? { tokenFields: [bakedImage], contentNote: 'content: image staged ON-CHAIN via reader (self-resolving, no custody)' }
|
|
1641
|
+
? { tokenFields: [...bakedImage], contentNote: 'content: image staged ON-CHAIN via reader (self-resolving, no custody)' }
|
|
1640
1642
|
: onchainImage
|
|
1641
1643
|
? { tokenFields: [], contentNote: 'content: image would be staged ON-CHAIN via reader (chunk store) — dry run skips the staging write' }
|
|
1642
1644
|
: await prepareContent(flags.image, clone, storageOverrides(flags), !dryRun, onChainUri, undefined, undefined, flags);
|
|
@@ -2087,6 +2089,11 @@ export async function cmdDeploySeriesBody(flags, emit) {
|
|
|
2087
2089
|
// wallet-lane session `total` below, computed once so preview/confirm text and the real
|
|
2088
2090
|
// session can never disagree. TX signatures only — see the 1/1's `approvals` for the same note
|
|
2089
2091
|
// on why an Arweave message signature doesn't add to this count.
|
|
2092
|
+
// Settle every file's `abx_image_type` now, so an unstorable file is refused on the dry run and
|
|
2093
|
+
// before the first staging tx rather than midway through the batch.
|
|
2094
|
+
if (onchainImage)
|
|
2095
|
+
for (const { path } of tokenPaths)
|
|
2096
|
+
storedImageTypeFor(readFileSync(path), path);
|
|
2090
2097
|
const approvals = onchainImage
|
|
2091
2098
|
? tokenPaths.reduce((n, { path }) => {
|
|
2092
2099
|
const plan = computeContentPlan(readFileSync(path), compress).plan;
|
|
@@ -2128,8 +2135,11 @@ export async function cmdDeploySeriesBody(flags, emit) {
|
|
|
2128
2135
|
const buildImageFields = async (stage) => {
|
|
2129
2136
|
// --onchain-image: stage every token's bytes into ONE shared chunk store, each a `reader` field.
|
|
2130
2137
|
if (onchainImage) {
|
|
2131
|
-
const { fields } = await stageImageFieldsBatch(tokenPaths.map((s) => s.path), compress, stage, flags['chunk-store']);
|
|
2132
|
-
tokenFields = tokenPaths.
|
|
2138
|
+
const { fields, typeFields } = await stageImageFieldsBatch(tokenPaths.map((s) => s.path), compress, stage, flags['chunk-store']);
|
|
2139
|
+
tokenFields = tokenPaths.flatMap(({ tokenId }, i) => {
|
|
2140
|
+
const typeField = typeFields[i];
|
|
2141
|
+
return typeField ? [tokenFieldOf(tokenId, fields[i]), tokenFieldOf(tokenId, typeField)] : [tokenFieldOf(tokenId, fields[i])];
|
|
2142
|
+
});
|
|
2133
2143
|
return;
|
|
2134
2144
|
}
|
|
2135
2145
|
// --onchain-uri + durable backend: image lives off-chain (ipfs/arweave); JSON renders on-chain.
|
|
@@ -2747,6 +2757,11 @@ export async function cmdDeployEditionImageBody(flags, emit) {
|
|
|
2747
2757
|
// Wallet-signature count for THIS deploy — parity with the 721 Series twin, which prints it and
|
|
2748
2758
|
// whose count the skill promises "every preview" shows. Same per-id chunk math as that twin, so the
|
|
2749
2759
|
// preview, the confirm text, and the wallet session's `total` can never disagree.
|
|
2760
|
+
// Settle every file's `abx_image_type` now, so an unstorable file is refused on the dry run and
|
|
2761
|
+
// before the first staging tx rather than midway through the batch.
|
|
2762
|
+
if (onchainImage)
|
|
2763
|
+
for (const { path } of tokenPaths)
|
|
2764
|
+
storedImageTypeFor(readFileSync(path), path);
|
|
2750
2765
|
const approvals = onchainImage
|
|
2751
2766
|
? tokenPaths.reduce((n, { path }) => {
|
|
2752
2767
|
const plan = computeContentPlan(readFileSync(path), compress).plan;
|
|
@@ -2763,8 +2778,13 @@ export async function cmdDeployEditionImageBody(flags, emit) {
|
|
|
2763
2778
|
// field pointing at its manifest. Ported from the 721 Series twin — the edition lane refused this
|
|
2764
2779
|
// outright before the edition parity work, though nothing on-chain prevented it.
|
|
2765
2780
|
if (onchainImage) {
|
|
2766
|
-
const { fields } = await stageImageFieldsBatch(tokenPaths.map((s) => s.path), compress, stage, flags['chunk-store']);
|
|
2767
|
-
tokenPaths.forEach(({ tokenId }, i) =>
|
|
2781
|
+
const { fields, typeFields } = await stageImageFieldsBatch(tokenPaths.map((s) => s.path), compress, stage, flags['chunk-store']);
|
|
2782
|
+
tokenPaths.forEach(({ tokenId }, i) => {
|
|
2783
|
+
tokenFields.push(tokenFieldOf(tokenId, fields[i]));
|
|
2784
|
+
const typeField = typeFields[i];
|
|
2785
|
+
if (typeField)
|
|
2786
|
+
tokenFields.push(tokenFieldOf(tokenId, typeField));
|
|
2787
|
+
});
|
|
2768
2788
|
if (seriesTraitsOnchain)
|
|
2769
2789
|
for (const [tokenId, attrs] of seriesTraits)
|
|
2770
2790
|
tokenFields.push(tokenFieldOf(tokenId, attributesInlineField(attrs)));
|