@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.
Files changed (193) hide show
  1. package/CHANGELOG.md +192 -0
  2. package/assets/renderer-scaffold/README.md +41 -11
  3. package/assets/renderer-scaffold/foundry.toml +5 -0
  4. package/assets/renderer-scaffold/remappings.txt +1 -1
  5. package/assets/renderer-scaffold/script/DeployHooks.s.sol +24 -0
  6. package/assets/renderer-scaffold/script/Preview.s.sol +99 -0
  7. package/assets/renderer-scaffold/src/MyHooks.sol +20 -0
  8. package/assets/renderer-scaffold/src/MyRenderer.sol +4 -4
  9. package/assets/renderer-scaffold/src/MyTraits.sol +2 -2
  10. package/assets/renderer-scaffold/test/MyRenderer.t.sol +60 -3
  11. package/dist/bin.d.ts +26 -0
  12. package/dist/bin.d.ts.map +1 -0
  13. package/dist/bin.js +63 -0
  14. package/dist/bin.js.map +1 -0
  15. package/dist/capabilities.d.ts +126 -0
  16. package/dist/capabilities.d.ts.map +1 -0
  17. package/dist/capabilities.js +168 -0
  18. package/dist/capabilities.js.map +1 -0
  19. package/dist/commands/auth.d.ts +54 -0
  20. package/dist/commands/auth.d.ts.map +1 -0
  21. package/dist/commands/auth.js +447 -0
  22. package/dist/commands/auth.js.map +1 -0
  23. package/dist/commands/deploy.d.ts +293 -0
  24. package/dist/commands/deploy.d.ts.map +1 -0
  25. package/dist/commands/deploy.js +5624 -0
  26. package/dist/commands/deploy.js.map +1 -0
  27. package/dist/commands/feedback.d.ts +7 -0
  28. package/dist/commands/feedback.d.ts.map +1 -0
  29. package/dist/commands/feedback.js +147 -0
  30. package/dist/commands/feedback.js.map +1 -0
  31. package/dist/commands/maintenance.d.ts +4 -0
  32. package/dist/commands/maintenance.d.ts.map +1 -0
  33. package/dist/commands/maintenance.js +114 -0
  34. package/dist/commands/maintenance.js.map +1 -0
  35. package/dist/commands/project.d.ts +458 -0
  36. package/dist/commands/project.d.ts.map +1 -0
  37. package/dist/commands/project.js +1832 -0
  38. package/dist/commands/project.js.map +1 -0
  39. package/dist/commands/reads.d.ts +85 -0
  40. package/dist/commands/reads.d.ts.map +1 -0
  41. package/dist/commands/reads.js +881 -0
  42. package/dist/commands/reads.js.map +1 -0
  43. package/dist/commands/scaffold.d.ts +89 -0
  44. package/dist/commands/scaffold.d.ts.map +1 -0
  45. package/dist/commands/scaffold.js +738 -0
  46. package/dist/commands/scaffold.js.map +1 -0
  47. package/dist/commands/service.d.ts +67 -0
  48. package/dist/commands/service.d.ts.map +1 -0
  49. package/dist/commands/service.js +760 -0
  50. package/dist/commands/service.js.map +1 -0
  51. package/dist/commands/storage.d.ts +51 -0
  52. package/dist/commands/storage.d.ts.map +1 -0
  53. package/dist/commands/storage.js +399 -0
  54. package/dist/commands/storage.js.map +1 -0
  55. package/dist/commands/submit-app.d.ts +102 -0
  56. package/dist/commands/submit-app.d.ts.map +1 -0
  57. package/dist/commands/submit-app.js +638 -0
  58. package/dist/commands/submit-app.js.map +1 -0
  59. package/dist/config.d.ts +94 -2
  60. package/dist/config.d.ts.map +1 -1
  61. package/dist/config.js +332 -12
  62. package/dist/config.js.map +1 -1
  63. package/dist/conformance.d.ts +31 -0
  64. package/dist/conformance.d.ts.map +1 -0
  65. package/dist/conformance.js +390 -0
  66. package/dist/conformance.js.map +1 -0
  67. package/dist/contract-read-error.d.ts +5 -0
  68. package/dist/contract-read-error.d.ts.map +1 -0
  69. package/dist/contract-read-error.js +37 -0
  70. package/dist/contract-read-error.js.map +1 -0
  71. package/dist/creator-agent.d.ts +40 -0
  72. package/dist/creator-agent.d.ts.map +1 -0
  73. package/dist/creator-agent.js +206 -0
  74. package/dist/creator-agent.js.map +1 -0
  75. package/dist/creator-signer.d.ts +33 -0
  76. package/dist/creator-signer.d.ts.map +1 -0
  77. package/dist/creator-signer.js +197 -0
  78. package/dist/creator-signer.js.map +1 -0
  79. package/dist/deploy-plan.d.ts +218 -0
  80. package/dist/deploy-plan.d.ts.map +1 -0
  81. package/dist/deploy-plan.js +20 -0
  82. package/dist/deploy-plan.js.map +1 -0
  83. package/dist/deps.d.ts +6 -39
  84. package/dist/deps.d.ts.map +1 -1
  85. package/dist/deps.js +4 -68
  86. package/dist/deps.js.map +1 -1
  87. package/dist/errors.d.ts +22 -0
  88. package/dist/errors.d.ts.map +1 -0
  89. package/dist/errors.js +32 -0
  90. package/dist/errors.js.map +1 -0
  91. package/dist/flag-allowlists.d.ts +53 -0
  92. package/dist/flag-allowlists.d.ts.map +1 -0
  93. package/dist/flag-allowlists.js +185 -0
  94. package/dist/flag-allowlists.js.map +1 -0
  95. package/dist/flags.d.ts +53 -0
  96. package/dist/flags.d.ts.map +1 -1
  97. package/dist/flags.js +151 -1
  98. package/dist/flags.js.map +1 -1
  99. package/dist/jsonout.d.ts +37 -0
  100. package/dist/jsonout.d.ts.map +1 -0
  101. package/dist/jsonout.js +79 -0
  102. package/dist/jsonout.js.map +1 -0
  103. package/dist/kind.d.ts +57 -0
  104. package/dist/kind.d.ts.map +1 -0
  105. package/dist/kind.js +122 -0
  106. package/dist/kind.js.map +1 -0
  107. package/dist/main.js +837 -5213
  108. package/dist/main.js.map +1 -1
  109. package/dist/mintpage.d.ts +17 -2
  110. package/dist/mintpage.d.ts.map +1 -1
  111. package/dist/mintpage.js +241 -54
  112. package/dist/mintpage.js.map +1 -1
  113. package/dist/output.d.ts +184 -0
  114. package/dist/output.d.ts.map +1 -0
  115. package/dist/output.js +774 -0
  116. package/dist/output.js.map +1 -0
  117. package/dist/ownerops.d.ts +450 -57
  118. package/dist/ownerops.d.ts.map +1 -1
  119. package/dist/ownerops.js +2229 -378
  120. package/dist/ownerops.js.map +1 -1
  121. package/dist/preview.d.ts +23 -5
  122. package/dist/preview.d.ts.map +1 -1
  123. package/dist/preview.js +95 -43
  124. package/dist/preview.js.map +1 -1
  125. package/dist/provision.d.ts +3 -13
  126. package/dist/provision.d.ts.map +1 -1
  127. package/dist/provision.js +19 -21
  128. package/dist/provision.js.map +1 -1
  129. package/dist/remote.d.ts +165 -52
  130. package/dist/remote.d.ts.map +1 -1
  131. package/dist/remote.js +459 -46
  132. package/dist/remote.js.map +1 -1
  133. package/dist/riskgate.d.ts +101 -0
  134. package/dist/riskgate.d.ts.map +1 -0
  135. package/dist/riskgate.js +326 -0
  136. package/dist/riskgate.js.map +1 -0
  137. package/dist/scaffold.d.ts +12 -0
  138. package/dist/scaffold.d.ts.map +1 -0
  139. package/dist/scaffold.js +56 -0
  140. package/dist/scaffold.js.map +1 -0
  141. package/dist/schema.d.ts +36 -1
  142. package/dist/schema.d.ts.map +1 -1
  143. package/dist/schema.js +121 -26
  144. package/dist/schema.js.map +1 -1
  145. package/dist/script-chunks.d.ts +8 -0
  146. package/dist/script-chunks.d.ts.map +1 -0
  147. package/dist/script-chunks.js +35 -0
  148. package/dist/script-chunks.js.map +1 -0
  149. package/dist/served.d.ts +30 -0
  150. package/dist/served.d.ts.map +1 -0
  151. package/dist/served.js +112 -0
  152. package/dist/served.js.map +1 -0
  153. package/dist/signer.d.ts +18 -1
  154. package/dist/signer.d.ts.map +1 -1
  155. package/dist/signer.js +104 -17
  156. package/dist/signer.js.map +1 -1
  157. package/dist/update-check.d.ts +55 -1
  158. package/dist/update-check.d.ts.map +1 -1
  159. package/dist/update-check.js +103 -10
  160. package/dist/update-check.js.map +1 -1
  161. package/package.json +16 -12
  162. package/skill/SKILL.md +194 -347
  163. package/skill/agents/openai.yaml +4 -0
  164. package/skill/reference/capabilities.md +193 -0
  165. package/skill/reference/code.md +234 -0
  166. package/skill/reference/creator-token.md +94 -0
  167. package/skill/reference/deploy.md +177 -0
  168. package/skill/reference/diagnose.md +178 -0
  169. package/skill/reference/hosting.md +188 -93
  170. package/skill/reference/operate.md +232 -0
  171. package/skill/reference/services.md +160 -0
  172. package/skill/reference/setup.md +190 -36
  173. package/assets/renderer-scaffold/src/interfaces/IAbxFieldRenderer.sol +0 -32
  174. package/assets/renderer-scaffold/src/interfaces/IAbxParams.sol +0 -26
  175. package/dist/inspect.d.ts +0 -48
  176. package/dist/inspect.d.ts.map +0 -1
  177. package/dist/inspect.js +0 -184
  178. package/dist/inspect.js.map +0 -1
  179. package/dist/migrate.d.ts +0 -65
  180. package/dist/migrate.d.ts.map +0 -1
  181. package/dist/migrate.js +0 -180
  182. package/dist/migrate.js.map +0 -1
  183. package/dist/onchain-uri.d.ts +0 -97
  184. package/dist/onchain-uri.d.ts.map +0 -1
  185. package/dist/onchain-uri.js +0 -243
  186. package/dist/onchain-uri.js.map +0 -1
  187. package/dist/upload.d.ts +0 -28
  188. package/dist/upload.d.ts.map +0 -1
  189. package/dist/upload.js +0 -41
  190. package/dist/upload.js.map +0 -1
  191. package/skill/reference/code-projects.md +0 -246
  192. package/skill/reference/operating.md +0 -116
  193. package/skill/reference/troubleshooting.md +0 -28
@@ -0,0 +1,293 @@
1
+ import { SelfHostIndexer } from '@artblocks/abx-indexer';
2
+ import { type Address, type OnChainFieldInput, type OpenSeaAttribute, type ProjectState, type PublicClient, type SeriesTokenFieldInput, type SetupLegsCore, type PreparedTx } from '@artblocks/abx-sdk';
3
+ import { type Hex } from 'viem';
4
+ import { type StorageOverrides } from '../config.js';
5
+ import { type Flags } from '../flags.js';
6
+ import { type Lane } from '../signer.js';
7
+ export declare const DIMENSIONS: Record<string, {
8
+ label: string;
9
+ aliases: string[];
10
+ }>;
11
+ export declare function resolveDimension(type: string): string;
12
+ /** Parse `--copies <N|open>` into the `editionSize` InitParams field (`0n` = open/uncapped). Throws
13
+ * with a pointed message on anything else — a bare `--copies` (no value), a non-integer, or the
14
+ * literal `0` (which already has an on-chain meaning — "open" says the same thing without the
15
+ * ambiguity of "did they mean zero copies, or unlimited?"). */
16
+ export declare function parseCopies(raw: string | undefined): bigint;
17
+ /** `--copies 1` is legal — a single-copy ERC-1155 edition — but it is almost never what a creator
18
+ * actually wants (the plain 721 lane makes a simpler, more marketplace-familiar token for exactly
19
+ * one copy). Advisory only; never refused — `--copies` exists precisely so nobody has to reach for
20
+ * a different flag to get an edition. */
21
+ export declare function copiesOneNote(cmd: string): string;
22
+ /** A non-negative-integer flag (`--mint-amount`, …) — the shared parse + bound-check so every
23
+ * edition flag that takes "a count" reports the same, plain-language rejection. */
24
+ export declare function parseNonNegativeIntFlag(raw: string, flag: string): bigint;
25
+ /**
26
+ * A `--dry-run` computes the deterministic deploy address, which is a pure function of
27
+ * (factory, salt, deployer) — so it needs a deployer even though it signs nothing. Resolve the
28
+ * address from the selected lane: the account-bound creator wallet for `--sponsor`, otherwise
29
+ * `--for` or the env key. Fail EARLY rather than printing a plan for a different eventual signer.
30
+ */
31
+ /**
32
+ * A dry run only checks whether a factory address is CONFIGURED, not whether it has code on this
33
+ * chain — and the manifest always has an address, so a chain where the trust anchor isn't deployed
34
+ * (a private/local chain, or a wrong-network RPC) sailed past this and died inside
35
+ * `predictDeterministicAddress` with a raw `returned no data ("0x")` and a list of ABI hypotheses.
36
+ * The real deploy and `abx predict` both explain that case; a preview of the same deploy must too.
37
+ * Returns false when the caller should stop (message already printed).
38
+ */
39
+ export declare function previewFactoryLive(client: PublicClient, factory: Address, label: string): Promise<boolean>;
40
+ /**
41
+ * Placeholder-identity guard, shared by ALL THREE deploy commands. `name`/`symbol` are written
42
+ * on-chain as the public collection identity and are effectively permanent, so a real deploy must
43
+ * never bake a tool default silently: warn in a preview, HARD-STOP a real send unless `--yes`.
44
+ *
45
+ * It was duplicated per command, and `deploy-series` simply never got a copy — its default
46
+ * "ABX Series"/"ABXS" went on-chain with at most a warning, while the skill promises the CLI
47
+ * refuses demo defaults. (deploy-code's copy even said "mirror deploy/deploy-series", which made
48
+ * the gap look closed.) One predicate now, like `loopbackBaseUrl()`, so a fourth command can't drift.
49
+ */
50
+ export declare function assertRealIdentity(flags: Flags, o: {
51
+ name: string;
52
+ symbol: string;
53
+ dryRun: boolean;
54
+ }): void;
55
+ export declare function resolvePreviewDeployer(flags: Flags, lane: Lane, required?: boolean): Promise<Address | null>;
56
+ export declare function warnUnfunded(publicClient: PublicClient, address: Address, lane: Lane): Promise<void>;
57
+ export declare function shArg(v: string): string;
58
+ export declare function deployCommandLine(flags: Flags, salt: string): string;
59
+ export declare function deploySeriesCommandLine(flags: Flags, salt: string): string;
60
+ export declare function deployCodeCommandLine(flags: Flags, salt: string): string;
61
+ export declare const imageKeccakField: (value: Hex) => OnChainFieldInput;
62
+ export declare const imageInlineField: (svg: string) => OnChainFieldInput;
63
+ /** An `image` field pointing at an off-chain URL (the renderer emits it verbatim). */
64
+ export declare const imageUrlField: (url: string) => OnChainFieldInput;
65
+ /** An `image` field as a `url-template` — `{id}` is substituted with the tokenId at render, so ONE
66
+ * (collection-scope) field addresses a whole pinned directory / Arweave manifest. */
67
+ export declare const imageUrlTemplateField: (template: string) => OnChainFieldInput;
68
+ /**
69
+ * An `image` field carrying a CONTENT-ADDRESSED identity — the bare CID / txid, with the serving
70
+ * gateway supplied at read time from the collection's `abx_gateway_*` preference (renderer spec v11).
71
+ *
72
+ * This replaces what `--onchain-uri --backend ipfs|arweave` used to write. That path stored the
73
+ * backend's gateway HTTPS URL as a `url` field, which looked identical in a marketplace and was
74
+ * wrong in two ways that only showed up later: the creator's chosen gateway host was welded into a
75
+ * value they might have locked, so a dead gateway became a dead token rather than a repoint; and
76
+ * `abx_provenance` reported `source: url` for bytes that live on IPFS, so the chain stopped saying
77
+ * where the work actually was. The CID is identity and the gateway is a preference — one field each.
78
+ *
79
+ * `{id}` in the value still substitutes at read (the O(1) directory pattern), so a collection-scope
80
+ * `ipfs` field addresses a whole pinned folder exactly as `url-template` does for a plain CDN.
81
+ */
82
+ export declare const imageContentAddressedField: (network: "ipfs" | "arweave", contentId: string) => OnChainFieldInput;
83
+ export declare const looksLikeSvg: (s: string) => boolean;
84
+ /**
85
+ * Does the IMAGE itself end up on-chain for this deploy? Two ways it can:
86
+ * • `--onchain-image` — the bytes are staged in the chunk store and read back via a `reader` field.
87
+ * • `--onchain-uri` with an SVG — v1 inlines SVG directly as a data: URI (raster cannot be).
88
+ * Anything else falls through to keccak256 custody, and the on-chain renderer serves its PLACEHOLDER
89
+ * image. This distinction is the difference between a token that is durable and one that only looks
90
+ * durable, so it must be computed from the actual file — never inferred from the flag alone (the
91
+ * success banner used to claim "fully on-chain, no hosting needed" for a keccak-anchored raster).
92
+ */
93
+ /**
94
+ * Will `tokenURI` resolve to the creator's REAL image, with nothing to keep running?
95
+ *
96
+ * Three ways yes, and they are not the same promise: the bytes are on-chain
97
+ * ({@link imageEndsUpOnChain}), or they sit at a durable public URL that the on-chain JSON points at
98
+ * (a direct-URL backend — the "no server" pattern). Only `fs` custody under `--onchain-uri` fails,
99
+ * because the renderer then holds a hash and nothing can serve it. Keep this separate from
100
+ * "fully on-chain": conflating them is what let a keccak-anchored raster ship under a permanence
101
+ * banner it did not earn.
102
+ */
103
+ export declare function imageResolvesWithoutServer(flags: Flags, onchainImage: boolean): boolean;
104
+ export declare function imageEndsUpOnChain(flags: Flags, onchainImage: boolean): boolean;
105
+ /** A browser wallet reached through an open sign session, used as the Turbo (Arweave) upload
106
+ * identity so the wallet's own credits pay — `signMessage` returns the `0x` EIP-191 signature. */
107
+ export type RemoteEthUpload = {
108
+ address: Address;
109
+ signMessage: (message: Uint8Array) => Promise<string>;
110
+ };
111
+ export declare function prepareContent(imagePath: string | undefined, clone: Address, overrides: StorageOverrides, store?: boolean, // false for --dry-run: compute the hash but don't custody bytes
112
+ onChain?: boolean, // true (--onchain-uri): put the image ON-CHAIN (inline SVG) so it self-resolves
113
+ remoteEth?: RemoteEthUpload, // wallet-lane Turbo uploads: sign+pay with the connected browser wallet
114
+ walletAddr?: string, // the deployer wallet — checked for existing Turbo credits if the managed key is short
115
+ gatewayFlags?: Flags): Promise<{
116
+ tokenFields: OnChainFieldInput[];
117
+ contentNote: string;
118
+ }>;
119
+ /**
120
+ * Real OpenSea traits supplied by the creator, from `--attributes <file.json>` (canonical array or
121
+ * `{name: value}` map) and/or `--traits "Background=Blue; Edition=3"` (quick inline form). These are
122
+ * the marketplace trait array — NOT a place for protocol facts. Empty when neither flag is given.
123
+ */
124
+ export declare function parseDeployTraits(flags: Flags): OpenSeaAttribute[];
125
+ /** Encode creator traits as the on-chain `attributes` field (inline JSON bytes) — for `--traits-onchain`. */
126
+ export declare const attributesInlineField: (attrs: OpenSeaAttribute[]) => OnChainFieldInput;
127
+ /**
128
+ * Warn when IPFS/Arweave custody is pointed at a LOCAL gateway.
129
+ *
130
+ * Two distinct problems ride on one flag, and the warning names the one that actually applies. The
131
+ * bytes are pinned only to a node on this machine, so nothing off it can retrieve them — that is the
132
+ * real damage and it survives any later `set-gateway`. It ALSO used to weld that localhost host into
133
+ * the on-chain value; since the field holds a bare CID it no longer does (the serving prefix is the
134
+ * collection's preference), so promising "the served URL resolves only on THIS machine" would now be
135
+ * false and would point the creator at the wrong repair.
136
+ */
137
+ export declare function localGatewayWarning(flags: Flags): string | null;
138
+ /** A readout line for an optional creator text field — states exactly what's written (and where),
139
+ * or that NOTHING is, so the deploy never silently invents one. */
140
+ export declare function describeDeployField(label: string, value: string | undefined, onchain: boolean): string;
141
+ /** Readout lines for whichever authorship/rights fields a deploy will write (always on-chain,
142
+ * inline collection fields). Empty when none are set — so the readout stays quiet by default. */
143
+ export declare function authorshipReadout(flags: Flags): string[];
144
+ /** A readout line for creator traits — the exact traits written (and where), or that none are. */
145
+ export declare function describeTraits(traits: OpenSeaAttribute[], onchain: boolean): string;
146
+ export declare function cmdDeploy(flags: Flags, serveAfter: boolean): Promise<void>;
147
+ export declare function cmdDeployBody(flags: Flags, serveAfter: boolean, emit: (p: Record<string, unknown>) => void): Promise<void>;
148
+ export declare function cmdDeployOneOfOneEditionBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
149
+ export declare const tokenFieldOf: (tokenId: number, f: OnChainFieldInput) => SeriesTokenFieldInput;
150
+ export declare function cmdDeploySeries(flags: Flags): Promise<void>;
151
+ export declare function cmdDeploySeriesBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
152
+ export declare function cmdDeployEditionImageBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
153
+ /**
154
+ * The deterministic part of a projection: everything that is a pure function of the chain.
155
+ * Deliberately EXCLUDES `reconstructedAt`, `rpcUrl` and `toBlock` — a timestamp, the endpoint that
156
+ * happened to answer, and the head at scan time all legitimately differ between two replays, so
157
+ * folding them in would make the rebuild proof fail for reasons that aren't about correctness.
158
+ */
159
+ export declare function projectionFingerprint(s: ProjectState): string;
160
+ /**
161
+ * Print the reconstructed spine — the point being that this list IS the database. Rendered inside
162
+ * the index step (no header of its own: "Index it — replay the event spine" immediately followed by
163
+ * a separate "The event spine" step read as a stutter).
164
+ */
165
+ export declare function walkthroughSpine(state: ProjectState): void;
166
+ /**
167
+ * [4] The claim, demonstrated: delete the local projection and rebuild it from the chain.
168
+ *
169
+ * This is the one step that can't be faked by good output — it drops the projection for real
170
+ * (registration kept), confirms it's gone, replays from the deploy block, and compares a
171
+ * fingerprint of everything chain-derived. If ABX's premise is wrong, this step fails loudly.
172
+ */
173
+ export declare function walkthroughRebuild(indexer: SelfHostIndexer, address: Address, before: ProjectState): Promise<void>;
174
+ /**
175
+ * [5] Read the token back the way a marketplace would.
176
+ *
177
+ * Which is genuinely a different act per lane, so it reads from the real source in each case rather
178
+ * than always going through the local server:
179
+ * • fully on-chain → call `tokenURI(0)` on the contract. That IS what a marketplace does, and on
180
+ * this lane the whole answer (content included) comes back from the chain with nothing else running.
181
+ * • off-chain custody → fetch the resolver, because that's what the baked URI points at.
182
+ * Reading the on-chain lane over HTTP would have quietly implied the local server was load-bearing
183
+ * when it isn't — the opposite of the lesson.
184
+ */
185
+ export declare function walkthroughReadBack(state: ProjectState, baseUrl: string, onChainUri: boolean): Promise<void>;
186
+ /** Every flag `deploy-code` recognizes — so an unsupported/typo'd one warns instead of silently
187
+ * no-opping. Keep in lockstep with the flags read below + the storageOverrides/lane helpers. */
188
+ export declare const DEPLOY_CODE_FLAGS: Set<string>;
189
+ export declare const SHARED_DEPLOY_FLAGS: string[];
190
+ export declare const DEPLOY_FLAGS: Set<string>;
191
+ export declare const DEPLOY_SERIES_FLAGS: Set<string>;
192
+ export declare const DEPLOY_EDITION_FLAGS: Set<string>;
193
+ export declare const DEPLOY_SERIES_EDITION_FLAGS: Set<string>;
194
+ /** One leg of a code-project setup multicall — enough to (a) estimate its own gas conservatively,
195
+ * (b) label an indivisible-leg refusal, and (c) let a batch rebuild `prepareCodeSetup`'s own
196
+ * labeling args after a leg group gets split. `calls` carries more than one entry only for a leg
197
+ * that must always land in the SAME transaction as its siblings (the dependency group, the
198
+ * on-chain-URI group) — see resume.ts's `planCoreLegs` for why those two ride as one atomic unit
199
+ * apiece; every other leg (a script chunk, a param schema, a reserve mint) is exactly one call. */
200
+ export interface SetupLeg {
201
+ calls: Hex[];
202
+ gas: number;
203
+ label: string;
204
+ kind: 'chunk' | 'schema' | 'deps' | 'uri' | 'mint';
205
+ chunkBytes?: number[];
206
+ schemaKey?: string;
207
+ }
208
+ export declare const chunkSetupLeg: (index: number, hex: Hex, data: Hex) => SetupLeg;
209
+ export declare const schemaSetupLeg: (key: string, data: Hex) => SetupLeg;
210
+ export declare const depsSetupLeg: (calls: Hex[]) => SetupLeg;
211
+ export declare const uriSetupLeg: (calls: Hex[]) => SetupLeg;
212
+ export declare const mintSetupLeg: (data: Hex) => SetupLeg;
213
+ /** `SetupLegsCore` (resume.ts's id-agnostic four leg groups, shared by both 721 and EditionCode) →
214
+ * the gas-batching shape above — schemas individually (resume diffs them per-key too), deps and
215
+ * on-chain-URI as one atomic leg apiece (resume diffs them as one group too — see resume.ts's
216
+ * `planCoreLegs`). Mints are NOT included here: their shape differs by lane (721 whole-total vs
217
+ * EditionCode per-id vs a `--resume` shortfall) — every caller builds its own mint legs. */
218
+ export declare function coreSetupLegs(legs: SetupLegsCore): {
219
+ chunks: SetupLeg[];
220
+ config: SetupLeg[];
221
+ };
222
+ /**
223
+ * Split three ordered leg groups into gas-bounded batches — chunks, then config, then mints, NEVER
224
+ * mixed (see the module note above). Refuses BEFORE building anything if a single leg's own gas
225
+ * estimate alone exceeds the binding `eth_estimateGas` ceiling: batching only helps when the problem
226
+ * is too MANY legs, not one leg too big, and that case must never reach a raw "gas limit too high".
227
+ * Deterministic in the legs' `.gas` values alone (never their `.calls`), so calling this once early
228
+ * (to size `approvals`, before an owner is even known) and again later with the real calldata
229
+ * produces the IDENTICAL batch shape both times — no drift between what's previewed and what's sent.
230
+ */
231
+ export declare function planCodeSetupBatches(groups: {
232
+ chunks: SetupLeg[];
233
+ config: SetupLeg[];
234
+ mints: SetupLeg[];
235
+ }): SetupLeg[][];
236
+ /** Turn ordered setup-leg batches into the actual `prepareCodeSetup` transactions — rebuilding each
237
+ * batch's chunk/schema/dependency/on-chain-URI labeling from its OWN legs, since a batch born from
238
+ * the split may carry only part of a group (see {@link planCodeSetupBatches}). */
239
+ export declare function codeSetupTxsFromBatches(batches: SetupLeg[][], args: {
240
+ contract: Address;
241
+ chainId: number;
242
+ deps: string[];
243
+ }): PreparedTx[];
244
+ export declare function cmdDeployCode(flags: Flags): Promise<void>;
245
+ export declare function cmdDeployCodeBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
246
+ export declare const DEPLOY_CODE_EDITION_FLAGS: Set<string>;
247
+ export declare function cmdDeployEditionCodeBody(flags: Flags, emit: (p: Record<string, unknown>) => void): Promise<void>;
248
+ /**
249
+ * Resolve `--721c` into the InitParams `transferValidator`. Absent → `zeroAddress`: a plain
250
+ * ERC-721 (or, on an edition deploy, a plain ERC-1155), byte-for-byte the pre-721C deploy — no
251
+ * prompts, no output, no mention of 721C. `--721c` / `--721c recommended` → the per-chain
252
+ * recommended validator (refused, naming the chains that have one, when the manifest has no
253
+ * entry); `--721c 0x…` → checksum-validated AND pre-checked for code on this chain (the factory
254
+ * would revert `InvalidTransferValidator()` — surface it before any upload/staging/gas). When
255
+ * enrolling, prints the one plain statement of what enforcement means — once, adapted to the
256
+ * chosen validator.
257
+ *
258
+ * `standard` picks only the WORDING (`ERC-721C` vs `ERC-1155C`) — the flag, the value grammar, and
259
+ * the resolved validator address are identical either way (the SAME `InitParams.transferValidator`
260
+ * opt-in per the parity plan's locked decision 3: 1155C ships with the same UX as 721C). Editions
261
+ * pass `'1155C'`; every 721 call site keeps the default, so their output is unchanged.
262
+ */
263
+ export declare function resolveTransferValidatorFlag(flags: Flags, publicClient: PublicClient, dryRun: boolean, standard?: '721C' | '1155C'): Promise<Address>;
264
+ /**
265
+ * Resolve the three-way seed decision into the InitParams `seedSource`, for both code lanes:
266
+ *
267
+ * - `--no-seed` → `zeroAddress`. No mint-time seed at all.
268
+ * - nothing, or `canonical` → the canonical `AbxSeedSource` via `ensureSeedSource` (manifest →
269
+ * self-heal to the deterministic address → CREATE2-deploy it). This
270
+ * is today's behaviour, byte-for-byte, and stays the default.
271
+ * - `--seed-source 0x…` → the creator's own `IAbxSeedSource`, **probed first**.
272
+ *
273
+ * The flag exists because we tell creators, in the docs and in this command's own help, that the fix
274
+ * for "the canonical seed isn't strong enough for my raffle" is to point `seedSource` at a
275
+ * commit-reveal / VRF-backed source of their own. Until now the only route was an `ABX_SEED_SOURCE`
276
+ * env var checked for nothing but code length, which made a first-class promise out of a
277
+ * side entrance.
278
+ *
279
+ * **Everything that isn't the canonical singleton gets probed**, including an address that arrived
280
+ * via `ABX_SEED_SOURCE` — so the env lane keeps working and stops being the unchecked one. The
281
+ * comparison is against the deterministic canonical address rather than "did a flag say so", because
282
+ * that is the actual question (is this our audited bytecode, or someone's contract we know nothing
283
+ * about?). A dry run tolerates an unreachable RPC and says the check is deferred; a real deploy
284
+ * refuses to bake a seed source it couldn't verify.
285
+ *
286
+ * The probe here runs with **no `from`**, unlike the owner op's (which calls as the token). That is
287
+ * not an oversight: the clone's address is a function of the CREATE2 salt, which isn't reserved yet
288
+ * at this point, so a source that gates on `msg.sender` could not have been told about this token in
289
+ * the first place. A gated/commit-reveal source is a deploy-then-`abx set-seed-source` flow by
290
+ * construction, and the `reverted` refusal says exactly that.
291
+ */
292
+ export declare function resolveSeedSourceFlag(flags: Flags, publicClient: PublicClient, dryRun: boolean, chainId: number): Promise<Address>;
293
+ //# sourceMappingURL=deploy.d.ts.map
@@ -0,0 +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;AAEtB,OAAO,EAEL,KAAK,KAAK,EAMX,MAAM,aAAa,CAAC;AAgErB,OAAO,EAA6C,KAAK,IAAI,EAAkB,MAAM,cAAc,CAAC;AA2BpG,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAC,CAGzE,CAAC;AACF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOrD;AAQD;;;gEAGgE;AAChE,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAQ3D;AAED;;;0CAG0C;AAC1C,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjD;AAED;oFACoF;AACpF,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAGzE;AAED;;;;;GAKG;AACH;;;;;;;GAOG;AAC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