@artblocks/abx-cli 0.1.0-alpha.18 → 0.1.0-alpha.19
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 +66 -0
- package/dist/commands/scaffold.d.ts +14 -0
- package/dist/commands/scaffold.d.ts.map +1 -1
- package/dist/commands/scaffold.js +40 -2
- package/dist/commands/scaffold.js.map +1 -1
- package/dist/commands/service.d.ts.map +1 -1
- package/dist/commands/service.js +46 -0
- package/dist/commands/service.js.map +1 -1
- package/dist/conformance.d.ts +31 -0
- package/dist/conformance.d.ts.map +1 -0
- package/dist/conformance.js +371 -0
- package/dist/conformance.js.map +1 -0
- package/dist/main.js +11 -2
- package/dist/main.js.map +1 -1
- package/dist/mintpage.d.ts +3 -1
- package/dist/mintpage.d.ts.map +1 -1
- package/dist/mintpage.js +15 -9
- package/dist/mintpage.js.map +1 -1
- package/dist/output.d.ts +2 -2
- package/dist/output.js +2 -2
- package/package.json +6 -6
- package/skill/SKILL.md +1 -1
package/dist/mintpage.js
CHANGED
|
@@ -20,10 +20,14 @@
|
|
|
20
20
|
* prints the steps; `vercel` / `next dev` run in the creator's own account/machine — they own that step.
|
|
21
21
|
*/
|
|
22
22
|
import { readSdkVersion } from './update-check.js';
|
|
23
|
-
/** Public, keyless RPCs safe to embed in a public site. Extend as chains are added.
|
|
23
|
+
/** Public, keyless RPCs safe to embed in a public site. Extend as chains are added.
|
|
24
|
+
* base-sepolia is the toolkit's DEFAULT chain — its absence here meant every default-chain
|
|
25
|
+
* deploy needed a manual --rpc just to scaffold its own mint page (integrator-reported). */
|
|
24
26
|
export const PUBLIC_RPC = {
|
|
25
27
|
1: 'https://ethereum-rpc.publicnode.com',
|
|
26
28
|
11155111: 'https://ethereum-sepolia-rpc.publicnode.com',
|
|
29
|
+
8453: 'https://mainnet.base.org',
|
|
30
|
+
84532: 'https://sepolia.base.org',
|
|
27
31
|
};
|
|
28
32
|
const slug = (s) => s
|
|
29
33
|
.toLowerCase()
|
|
@@ -162,7 +166,11 @@ const LIB_META = `// Read a token's image + name from tokenURI(id), directly fro
|
|
|
162
166
|
// failover the CLI/indexer get. Its attached chain metadata is the SDK's own default and is
|
|
163
167
|
// informational only for these plain reads — the WALLET's chain (used for the mint tx) is the one
|
|
164
168
|
// built in ./chain from your real NEXT_PUBLIC_CHAIN_ID/NAME, unaffected by this.
|
|
165
|
-
|
|
169
|
+
//
|
|
170
|
+
// Gateway + data: URI parsing go through the SAME sdk helpers the CLI/indexer use
|
|
171
|
+
// (gatewayUrlFor/resolveGatewayBase, parseDataUri) instead of a hand-rolled 'ipfs://'-slicing body —
|
|
172
|
+
// one implementation of "how to read a locator" instead of this app quietly re-deriving its own.
|
|
173
|
+
import {makePublicClient, gatewayUrlFor, resolveGatewayBase, parseDataUri} from '@artblocks/abx-sdk';
|
|
166
174
|
import {RPC_URL, TOKEN} from './config';
|
|
167
175
|
import {tokenAbi} from './abi';
|
|
168
176
|
|
|
@@ -170,17 +178,15 @@ export const publicClient = makePublicClient({rpcUrls: RPC_URL.split(',').map((u
|
|
|
170
178
|
|
|
171
179
|
export function toGateway(u: string): string {
|
|
172
180
|
if (!u) return '';
|
|
173
|
-
if (u.startsWith('ipfs://')) return '
|
|
174
|
-
if (u.startsWith('ar://')) return '
|
|
181
|
+
if (u.startsWith('ipfs://')) return gatewayUrlFor('ipfs', u.slice(7), resolveGatewayBase('ipfs'));
|
|
182
|
+
if (u.startsWith('ar://')) return gatewayUrlFor('arweave', u.slice(5), resolveGatewayBase('arweave'));
|
|
175
183
|
return u;
|
|
176
184
|
}
|
|
177
185
|
|
|
178
186
|
async function fetchJson(uri: string): Promise<any> {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
const body = uri.slice(comma + 1);
|
|
183
|
-
const text = header.includes('base64') ? atob(body) : decodeURIComponent(body);
|
|
187
|
+
const parsed = parseDataUri(uri);
|
|
188
|
+
if (parsed) {
|
|
189
|
+
const text = parsed.base64 ? atob(parsed.body) : decodeURIComponent(parsed.body);
|
|
184
190
|
return JSON.parse(text);
|
|
185
191
|
}
|
|
186
192
|
const res = await fetch(toGateway(uri));
|
package/dist/mintpage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintpage.js","sourceRoot":"","sources":["../src/mintpage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAsBjD
|
|
1
|
+
{"version":3,"file":"mintpage.js","sourceRoot":"","sources":["../src/mintpage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAsBjD;;6FAE6F;AAC7F,MAAM,CAAC,MAAM,UAAU,GAA2B;IAChD,CAAC,EAAE,qCAAqC;IACxC,QAAQ,EAAE,6CAA6C;IACvD,IAAI,EAAE,0BAA0B;IAChC,KAAK,EAAE,0BAA0B;CAClC,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,CAAS,EAAU,EAAE,CACjC,CAAC;KACE,WAAW,EAAE;KACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;KAC3B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC;AAEtC,iFAAiF;AACjF,gGAAgG;AAChG,kGAAkG;AAClG,uDAAuD;AAEvD,SAAS,WAAW,CAAC,CAAkB;IACrC,OAAO,IAAI,CAAC,SAAS,CACnB;QACE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC,GAAG,OAAO;QACtC,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,EAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAC;QACpE,YAAY,EAAE;YACZ,IAAI,EAAE,SAAS;YACf,KAAK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ACzC,EAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,eAAe,EAAC;YACvD,EAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAC;SACxC;QACD,KAAK,EAAE;YACL,aAAa;YACb,2DAA2D;YAC3D,kGAAkG;SACnG;KACF,CAAC;AACJ,CAAC"}
|
package/dist/output.d.ts
CHANGED
|
@@ -88,8 +88,8 @@ export declare function portInUse(port: number): Promise<boolean>;
|
|
|
88
88
|
* documented first run was the broken path. The same block returned all 9 logs seconds later.
|
|
89
89
|
*
|
|
90
90
|
* We have the one thing that makes this checkable: we just minted, so the spine cannot be empty.
|
|
91
|
-
* So verify instead of trusting — re-scan
|
|
92
|
-
* say so as a FAILURE with the recovery command rather than dressing a zero up as a ✓.
|
|
91
|
+
* So verify instead of trusting — re-scan at a constant delay until events appear, and if they
|
|
92
|
+
* never do, say so as a FAILURE with the recovery command rather than dressing a zero up as a ✓.
|
|
93
93
|
*/
|
|
94
94
|
export declare function reindexAfterDeploy(indexer: SelfHostIndexer, address: Address, opts?: {
|
|
95
95
|
attempts?: number;
|
package/dist/output.js
CHANGED
|
@@ -284,8 +284,8 @@ export async function portInUse(port) {
|
|
|
284
284
|
* documented first run was the broken path. The same block returned all 9 logs seconds later.
|
|
285
285
|
*
|
|
286
286
|
* We have the one thing that makes this checkable: we just minted, so the spine cannot be empty.
|
|
287
|
-
* So verify instead of trusting — re-scan
|
|
288
|
-
* say so as a FAILURE with the recovery command rather than dressing a zero up as a ✓.
|
|
287
|
+
* So verify instead of trusting — re-scan at a constant delay until events appear, and if they
|
|
288
|
+
* never do, say so as a FAILURE with the recovery command rather than dressing a zero up as a ✓.
|
|
289
289
|
*/
|
|
290
290
|
export async function reindexAfterDeploy(indexer, address, opts = {}) {
|
|
291
291
|
const attempts = opts.attempts ?? 6;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artblocks/abx-cli",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.19",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ABX CLI ('abx') — the agentic UX surface of the Self-Host Toolkit (Layer 3). Deploy, index, serve, and demo a self-hosted ABX project end to end. Wraps the SDK; runs a different implementation and the protocol works identically.",
|
|
6
6
|
"type": "module",
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"viem": "^2.21.0",
|
|
42
|
-
"@artblocks/abx-sdk": "0.1.0-alpha.
|
|
43
|
-
"@artblocks/abx-indexer": "0.1.0-alpha.
|
|
44
|
-
"@artblocks/abx-storage": "0.1.0-alpha.
|
|
45
|
-
"@artblocks/abx-token-api": "0.1.0-alpha.
|
|
42
|
+
"@artblocks/abx-sdk": "0.1.0-alpha.11",
|
|
43
|
+
"@artblocks/abx-indexer": "0.1.0-alpha.12",
|
|
44
|
+
"@artblocks/abx-storage": "0.1.0-alpha.11",
|
|
45
|
+
"@artblocks/abx-token-api": "0.1.0-alpha.14"
|
|
46
46
|
},
|
|
47
47
|
"optionalDependencies": {
|
|
48
|
-
"@artblocks/abx-effects": "0.1.0-alpha.
|
|
48
|
+
"@artblocks/abx-effects": "0.1.0-alpha.11"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"playwright": "1.61.1"
|
package/skill/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: abx-self-host
|
|
|
3
3
|
description: Launch and operate a self-hosted ABX NFT end to end with the ABX CLI (`abx`) on testnet — a 1/1 (`abx deploy`), a multi-token Series from a folder of media (`abx deploy-series`), or a generative/code drop (`abx deploy-code`). Covers on-chain vs off-chain metadata, storage custody (local disk, S3/R2, IPFS, Arweave), deploy + mint (now or pre-warmed at a predicted address), rendered thumbnails and on-chain traits for code art, primary sales via the shared fixed-price minter, and owner ops (transfer, refresh, re-point URIs, royalties, lock fields, pause/unpause, supply cap, delegate minting). Use when the user wants to self-host an ABX project, take an image to an NFT on testnet, deploy a collection from a folder of images, launch generative/code art, mint or run a primary sale, refresh a listing, operate a project they launched, choose a storage backend, stand up hosting they own, or point a project at a hosted/managed metadata provider with an API key.
|
|
4
4
|
compatibility: Drives the abx CLI (@artblocks/abx-cli). Co-versioned with it — install/refresh with `abx skill install` so this skill matches the CLI's `abx version`. Requires Node 22.5+.
|
|
5
5
|
metadata:
|
|
6
|
-
version: "0.1.0-alpha.
|
|
6
|
+
version: "0.1.0-alpha.19"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# ABX Self-Host Toolkit (`abx`)
|