@artblocks/abx-sdk 0.1.0-alpha.2 → 0.1.0-alpha.21

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 (144) hide show
  1. package/CHANGELOG.md +2203 -0
  2. package/README.md +131 -0
  3. package/dist/abi/generated.d.ts +8502 -129
  4. package/dist/abi/generated.d.ts.map +1 -1
  5. package/dist/abi/generated.js +40 -22
  6. package/dist/abi/generated.js.map +1 -1
  7. package/dist/abi/index.d.ts +2645 -168
  8. package/dist/abi/index.d.ts.map +1 -1
  9. package/dist/abi/index.js +34 -7
  10. package/dist/abi/index.js.map +1 -1
  11. package/dist/anchors.d.ts +319 -0
  12. package/dist/anchors.d.ts.map +1 -0
  13. package/dist/anchors.js +703 -0
  14. package/dist/anchors.js.map +1 -0
  15. package/dist/chains.d.ts +15 -9
  16. package/dist/chains.d.ts.map +1 -1
  17. package/dist/chains.js +19 -15
  18. package/dist/chains.js.map +1 -1
  19. package/dist/chunks.d.ts +53 -23
  20. package/dist/chunks.d.ts.map +1 -1
  21. package/dist/chunks.js +68 -6
  22. package/dist/chunks.js.map +1 -1
  23. package/dist/clients.d.ts +23 -11
  24. package/dist/clients.d.ts.map +1 -1
  25. package/dist/clients.js +17 -18
  26. package/dist/clients.js.map +1 -1
  27. package/dist/create2.d.ts +85 -1
  28. package/dist/create2.d.ts.map +1 -1
  29. package/dist/create2.js +159 -2
  30. package/dist/create2.js.map +1 -1
  31. package/dist/creator-token.d.ts +132 -0
  32. package/dist/creator-token.d.ts.map +1 -0
  33. package/dist/creator-token.js +183 -0
  34. package/dist/creator-token.js.map +1 -0
  35. package/dist/deploy.d.ts +234 -14
  36. package/dist/deploy.d.ts.map +1 -1
  37. package/dist/deploy.js +289 -111
  38. package/dist/deploy.js.map +1 -1
  39. package/dist/deployments.d.ts +63 -0
  40. package/dist/deployments.d.ts.map +1 -1
  41. package/dist/deployments.js +202 -28
  42. package/dist/deployments.js.map +1 -1
  43. package/dist/deps.d.ts +122 -5
  44. package/dist/deps.d.ts.map +1 -1
  45. package/dist/deps.js +248 -6
  46. package/dist/deps.js.map +1 -1
  47. package/dist/env.d.ts.map +1 -1
  48. package/dist/env.js +8 -0
  49. package/dist/env.js.map +1 -1
  50. package/dist/errors.d.ts +94 -0
  51. package/dist/errors.d.ts.map +1 -0
  52. package/dist/errors.js +126 -0
  53. package/dist/errors.js.map +1 -0
  54. package/dist/execute.d.ts +115 -0
  55. package/dist/execute.d.ts.map +1 -0
  56. package/dist/execute.js +142 -0
  57. package/dist/execute.js.map +1 -0
  58. package/dist/gateways.d.ts +79 -0
  59. package/dist/gateways.d.ts.map +1 -0
  60. package/dist/gateways.js +156 -0
  61. package/dist/gateways.js.map +1 -0
  62. package/dist/generator-document.d.ts +58 -0
  63. package/dist/generator-document.d.ts.map +1 -0
  64. package/dist/generator-document.js +124 -0
  65. package/dist/generator-document.js.map +1 -0
  66. package/dist/generator.d.ts +43 -1
  67. package/dist/generator.d.ts.map +1 -1
  68. package/dist/generator.js +29 -0
  69. package/dist/generator.js.map +1 -1
  70. package/dist/index.d.ts +18 -3
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +18 -3
  73. package/dist/index.js.map +1 -1
  74. package/dist/inspect.d.ts +48 -0
  75. package/dist/inspect.d.ts.map +1 -0
  76. package/dist/inspect.js +295 -0
  77. package/dist/inspect.js.map +1 -0
  78. package/dist/migrate.d.ts +41 -0
  79. package/dist/migrate.d.ts.map +1 -0
  80. package/dist/migrate.js +142 -0
  81. package/dist/migrate.js.map +1 -0
  82. package/dist/mime.d.ts +11 -0
  83. package/dist/mime.d.ts.map +1 -0
  84. package/dist/mime.js +40 -0
  85. package/dist/mime.js.map +1 -0
  86. package/dist/node.d.ts +10 -0
  87. package/dist/node.d.ts.map +1 -0
  88. package/dist/node.js +24 -0
  89. package/dist/node.js.map +1 -0
  90. package/dist/onchain-uri.d.ts +110 -0
  91. package/dist/onchain-uri.d.ts.map +1 -0
  92. package/dist/onchain-uri.js +277 -0
  93. package/dist/onchain-uri.js.map +1 -0
  94. package/dist/ops.d.ts +507 -14
  95. package/dist/ops.d.ts.map +1 -1
  96. package/dist/ops.js +848 -32
  97. package/dist/ops.js.map +1 -1
  98. package/dist/policy.d.ts +58 -0
  99. package/dist/policy.d.ts.map +1 -0
  100. package/dist/policy.js +36 -0
  101. package/dist/policy.js.map +1 -0
  102. package/dist/probe.d.ts +29 -0
  103. package/dist/probe.d.ts.map +1 -1
  104. package/dist/probe.js +104 -9
  105. package/dist/probe.js.map +1 -1
  106. package/dist/reconstruct.d.ts +94 -2
  107. package/dist/reconstruct.d.ts.map +1 -1
  108. package/dist/reconstruct.js +432 -97
  109. package/dist/reconstruct.js.map +1 -1
  110. package/dist/resume.d.ts +96 -0
  111. package/dist/resume.d.ts.map +1 -0
  112. package/dist/resume.js +95 -0
  113. package/dist/resume.js.map +1 -0
  114. package/dist/script-chunks.d.ts +24 -0
  115. package/dist/script-chunks.d.ts.map +1 -0
  116. package/dist/script-chunks.js +63 -0
  117. package/dist/script-chunks.js.map +1 -0
  118. package/dist/service.d.ts +206 -9
  119. package/dist/service.d.ts.map +1 -1
  120. package/dist/service.js +228 -18
  121. package/dist/service.js.map +1 -1
  122. package/dist/spine.d.ts +47 -4
  123. package/dist/spine.d.ts.map +1 -1
  124. package/dist/spine.js +0 -0
  125. package/dist/spine.js.map +1 -1
  126. package/dist/staging.d.ts +124 -0
  127. package/dist/staging.d.ts.map +1 -0
  128. package/dist/staging.js +134 -0
  129. package/dist/staging.js.map +1 -0
  130. package/dist/tokendata.d.ts +62 -2
  131. package/dist/tokendata.d.ts.map +1 -1
  132. package/dist/tokendata.js +79 -17
  133. package/dist/tokendata.js.map +1 -1
  134. package/dist/tokens.d.ts +120 -0
  135. package/dist/tokens.d.ts.map +1 -0
  136. package/dist/tokens.js +317 -0
  137. package/dist/tokens.js.map +1 -0
  138. package/dist/types.d.ts +108 -4
  139. package/dist/types.d.ts.map +1 -1
  140. package/dist/util.d.ts +74 -0
  141. package/dist/util.d.ts.map +1 -0
  142. package/dist/util.js +106 -0
  143. package/dist/util.js.map +1 -0
  144. package/package.json +11 -2
@@ -1,35 +1,196 @@
1
+ import { readEnv } from './util.js';
1
2
  /**
2
3
  * The cross-chain-identical set — CREATE2 (keyless proxy + `AbxSalts`), so these addresses are the
3
4
  * SAME on every chain. Factory addresses list their EIP-1167 implementation; the implementations are
4
5
  * identical cross-chain too (a factory does exactly one CREATE at nonce 1 from its own — identical —
5
- * address). The renderer is spec v3 (artifacts manifest + authorship/rights contractURI fields).
6
- * SeriesCode's delegatecalled write-path libraries are also CREATE2-deterministic and identical
7
- * everywhere: AbxParamsLib 0x7DAa26bADD99812a77384B461b6375e0c04F2865,
8
- * AbxCodeLib 0xCd12078E81A3BDEACdcd57AE390f4D59F832766B.
6
+ * address). The renderer is **spec v11** — the version `isCurrentRenderer` gates on, and the reason a
7
+ * behind-spec renderer is treated as stale rather than merely older: each bump changed what the
8
+ * document actually contains (v5 escaped the provenance note, v6 changed rendered output for hostile
9
+ * input, v7 renamed the `artist` collection field to `creator`, v8 retired the `abx_params` block and
10
+ * narrowed provenance to the route a field took rather than a claim about its destination, v9 stopped
11
+ * duplicating a computed image into `artifacts`, which changes what the document contains, v10 added
12
+ * four reserved keys neither plane emitted, and v11 moved `ipfs`/`arweave` out of the fallback set:
13
+ * a v10 renderer serves the placeholder SVG for chain state a v11 renderer resolves).
14
+ *
15
+ * The delegatecalled write-path libraries are CREATE2-deterministic and identical everywhere too —
16
+ * that is a property of CREATE2, not a lucky accident, and linking a library does not cost the
17
+ * linking factory its own deterministic address (see `create2.ts`'s write-path-library note, which
18
+ * explains what IS a real trap here). They are deployed EXPLICITLY at `AbxSalts.METADATA_LIB` /
19
+ * `.PARAMS_LIB` / `.CODE_LIB` / `.EDITION_LIB` (`abx.lib.metadata.v1` / `abx.lib.params.v1` /
20
+ * `abx.lib.code.v1` / `abx.lib.edition.v1`) by
21
+ * `DeployLibraries.s.sol` and by the SDK's own bootstrap — not by forge's automatic linking, which
22
+ * routes through the same proxy but at its own salt of zero. So every library address below is
23
+ * recomputable from (proxy, salt, creation bytecode) alone: `predictMetadataLib()` /
24
+ * `predictParamsLib()` / `predictCodeLib()` / `predictEditionLib()`.
25
+ *
26
+ * NO SUPERSEDED ADDRESS IS EVER LIVE STATE IN THIS FILE, deliberately — and the rule is narrower and
27
+ * more useful than "no old addresses anywhere", which is what it used to say while the entries below
28
+ * carried `replaces 0x…` notes. The hazard was never provenance; it is a stale address sitting where
29
+ * something might *bind* it, because several superseded contracts still have code on chain and a
30
+ * factory bound to an un-manifested library is the exact failure this file exists to prevent. So:
31
+ *
32
+ * · The live record ({@link CANONICAL} + the per-chain blocks) holds only what is current. A
33
+ * superseded address may appear beside it as a `replaces 0x…` note, which is prose, and inside
34
+ * {@link ANCHOR_GENERATIONS}, which is typed to hold nothing but the six FACTORY anchors — never
35
+ * a library, renderer, minter or seed source, the entries where a wrong bind would do damage.
36
+ * · {@link ANCHOR_GENERATIONS} is **provenance, never trust.** It answers "was this deployed by an
37
+ * ABX factory, and which generation" — it must never widen an allowlist or feed
38
+ * `verifyCanonical`. One retired generation predates the V-01/V-02 remediation; a trust set that
39
+ * accepted it would be accepting known-vulnerable implementations.
40
+ *
41
+ * Git still has the full history, and remains the place to look for anything not named here.
9
42
  */
10
43
  const CANONICAL = {
11
- factory: '0xB9eEE39DB7D03E0b94CE403F69E928e2a5F134Ca', // impl 0xf1F0893897CC19e75d829fa550a5228c5119cA39
12
- seriesFactory: '0x9d97C00100351682e6625961e033b6F43E60639A', // impl 0x58D8b9F7ABa3043734cBeBfaa9c46875070E16ed
13
- seriesCodeFactory: '0x77f61Ead461f368dbF3788EeFe9693bA5a73Bd87', // impl 0xfd2034B6af517AD019f0dD7b007F07eF358D4053
14
- renderer: '0x837A5cF907E7a6727B08acfE2A865F2bD5C50b1D', // spec v3
15
- chunkStore: '0x03d3a962602093a937B96ee9C0b5C54cec3e701E',
16
- fixedPriceMinter: '0xd970A2c936FFbb2130c2e4Ddf4245FF92465fEA5',
17
- seedSource: '0x53eDFD2047e00C133378DEb430183DEE285E652e',
44
+ // ── The 2026-08-14 greenfield redeploy ──────────────────────────────────────────────────────
45
+ //
46
+ // Every address below was cut from one source tree, after four internal rounds of security audit,
47
+ // an independent external audit, a post-deploy verification review, and the `artist` → `creator`
48
+ // rename. Nothing here descends from an earlier generation: the prior addresses are gone from this
49
+ // file on purpose, because keeping a lineage of superseded deployments in the manifest is how a
50
+ // stale address gets copied forward by mistake. Git has the history; this file records what is live.
51
+ //
52
+ // It took two passes on the same day, and the second one is worth knowing about because it is the
53
+ // shape a redeploy usually has. The first moved everything: externalizing the metadata field store
54
+ // into `AbxMetadataLib` changed all six token implementations, and the renderer's `abx_params`
55
+ // removal took it to spec v8. The second closed the two findings of the post-deploy review
56
+ // (`reviews/2026-08/`) — both source-only, with runtime bodies measured byte-identical before and
57
+ // after — so it moved exactly the five factories whose implementations compose the two mixins that
58
+ // changed. The third moved ONE address: the renderer, to spec v9, for the audit's A-03 (a computed
59
+ // image was being emitted twice in the same document). Nothing links the renderer — tokens hold its
60
+ // address as init state — so no factory or implementation moved with it.
61
+ //
62
+ // The fourth widened `IAbxConfigureHook.onParamConfigured` with `dataLength` + `dataBlobAddress`
63
+ // (so a creator's own hook can police blob size instead of the protocol capping every project) and
64
+ // took `ConfigurableParams` to extension v3. That reaches further than the renderer bump did but
65
+ // still not everywhere: `AbxParamsLib` changed, `AbxEditionLib` moved because it LINKS it, the four
66
+ // token types composing `ConfigurableParams` moved with their factories, and the generator moved on
67
+ // a metadata-only change (its pointers were pinned this time, so it reused them rather than writing
68
+ // fresh ones).
69
+ //
70
+ // The sixth is the smallest yet, and its shape is the point. Renderer spec v11 finished the
71
+ // `ipfs` / `arweave` projection — the two representations that are content-addressed, the two the
72
+ // protocol tells creators to prefer, and the two the renderer could not serve, so
73
+ // `--onchain-uri --backend ipfs` had to bake a gateway HOST into a `url` field and report
74
+ // `source: url` for bytes that live on IPFS. The generator moved with it, because the collection's
75
+ // gateway preference now lives in two reserved metadata fields (`abx_gateway_ipfs` /
76
+ // `abx_gateway_arweave`) that both singletons read, superseding the code-only `display.gateway`
77
+ // param. NOTHING ELSE MOVED: the preference is stored in the field store, which already has an
78
+ // owner-gated setter, an event, the ERC-4906 ping and a per-field freeze on all six token kinds,
79
+ // so no token implementation, factory, or `initialize` ABI changed. The design first called for
80
+ // `preferredIPFSGateway()` getters on every token (the Art Blocks V3 Flex shape); that measured
81
+ // 909 bytes of runtime code against `SeriesCode`'s 862 bytes of EIP-170 headroom, so it would have
82
+ // cost a twelve-address redeploy AND not fit.
83
+ //
84
+ // The fifth closed the audit-hygiene brief: the last V-01-shaped duplicate (the edition mint-cap
85
+ // check, live in TWO copies — the mixin's for the two image editions, the library's for
86
+ // `EditionCode`), plus the `uri()` ladder and creator-token enrollment whose mixin bodies were dead
87
+ // while each token carried its own copy of the passthrough. And renderer spec v10, which finally
88
+ // projects four reserved keys the spec had always listed and nothing on chain emitted. So the three
89
+ // edition factories and the renderer moved. `AbxEditionLib` did NOT — the brief predicted it would,
90
+ // but the pass only DELETED duplicates and added nothing to the library, so its bytecode is
91
+ // unchanged.
92
+ //
93
+ // Across all five passes the two ERC-721 image types and their factory, `AbxMetadataLib`,
94
+ // `AbxCodeLib`, `AbxEditionLib`, the chunk store, the seed source and both minters never moved,
95
+ // because their compile inputs never changed. That asymmetry is the system working: a CREATE2
96
+ // address is a function of the initcode, so "what moved" is a precise answer, not a judgement call.
97
+ //
98
+ // Two properties hold for every entry, and both are checked rather than assumed:
99
+ // 1. Identical on Sepolia and Base Sepolia — CREATE2 through the keyless proxy at the canonical
100
+ // salts in `AbxSalts.sol` / `ABX_SALT`. Only `generator` differs per chain (its constructor
101
+ // bakes chain-specific immutables), which is why it lives in the per-chain blocks below.
102
+ // 2. Recomputable from this build alone — `predictFactory()`, `predictRenderer()`,
103
+ // `predictSeriesCodeFactory()` and friends reproduce every one of them, and the write-path
104
+ // libraries are now deployed EXPLICITLY by `DeployLibraries.s.sol` at named salts rather
105
+ // than by forge's automatic linking at salt zero.
106
+ //
107
+ // Implementations are noted inline because a factory's implementation is the code a clone runs;
108
+ // `abxVersion()` reads 2 on all six, and `specVersion()` reads 11 on the renderer.
109
+ factory: '0x2824F4b4b4301dB2FcA10b2D80D45b4d463Ba57E', // impl 0x58b5CA27C76c0a1FA00b6ebe28d55d3A98eB1425 — 2026-08-20 batch (burn + royalty cap); replaces 0x0dC57f8E8C4BC3CceBAE30871a556D305d468Ccb
110
+ seriesFactory: '0x685B4DfC835b6854590B5437C79D62BB7D52698b', // impl 0x1A8d16407247E801bf15e3c6Dbf2000673Ff474d — 2026-08-20 batch; replaces 0x2Fd169820442E717256680e4492a372a2b979cdf
111
+ seriesCodeFactory: '0xdDA5174A868A8e099E159E67569900a4F936CFFe', // impl 0xdaEF4B7068c07E380068895aCb48a210cdA30297 — 2026-08-20 batch (+ params write-shell extraction); replaces 0xD12274482B114Cce6E90C85207678fAEF3f40667
112
+ oneOfOneEditionFactory: '0x6ecc7fAd2186965BaECD0Aa215b00239a3459ddF', // impl 0xCbD54eb6781F7A430C974fcbe125B48d4dF1f415 — 2026-08-20 batch; replaces 0x41e0203DA7f88b376602D9ce6D7833fD223b3a64
113
+ editionFactory: '0xB6a8f051B08A8d6Fb0B6DA53BD23006CE2da31b7', // impl 0x90A674bce7540eBae92CAa3Ea77ccE1b7eb15f61 — 2026-08-20 batch; replaces 0x1ef75Fc5421d46b8c2609f8CE303B9C662DdDfAe
114
+ editionCodeFactory: '0x9441Cc75318E20Ae6237EDb213b4C3019d756Bf0', // impl 0x68E57D289288dcAf31256d91c64583254bBb6601 — 2026-08-20 batch (+ params write-shell extraction); replaces 0x07389a7eB3F876D87661630512b3Ac87C65266a4
115
+ renderer: '0x85C1aE1F076d808fF7c1729F21B85038Fa16105E', // spec v11 (ipfs/arweave projected through the collection's preferred gateway) — replaces the v10 0xF194c6826f33eB7a4b46356A176e1eF78c81dA2c
116
+ chunkStore: '0x1Ca63a4ADEeF5e722ADA25b892BA40E3b2bcB905', // moved: `read()` is now allocate-once (L-02)
117
+ seedSource: '0xD01d4eDc17F8b4493A43A5e70DCD9813FB1b9A0A',
118
+ fixedPriceMinter: '0x1E321A12386cF6BEe49d1270A5EC54DecA88db48',
119
+ fixedPriceMinter1155: '0x8FcC37dCb00A02367838Fa5B37347dCEec060981',
120
+ // The delegatecalled write-path libraries. Every one of the six token implementations links
121
+ // `AbxMetadataLib` — the on-chain metadata field store is external as of this generation, which is
122
+ // what bought the two code types their EIP-170 headroom (and is why the two ERC-721 image
123
+ // factories, which linked NOTHING before, link one now). On top of that: `AbxParamsLib` +
124
+ // `AbxCodeLib` for the two code types, `AbxEditionLib` for all three ERC-1155 types (and
125
+ // `AbxEditionLib` itself links `AbxParamsLib`, which is why it is deployed after it).
126
+ // Recomputable via `predictMetadataLib()` / `predictParamsLib()` / `predictCodeLib()` /
127
+ // `predictEditionLib()`.
128
+ metadataLib: '0x02b819Bb9065cAf0c598A5CB2f5D37A4eb07460f',
129
+ paramsLib: '0x396848cD90aDAbE1F463Cb825ed6507A026dC833', // 2026-08-20 batch (write-shell extraction + burn/cap front doors); replaces 0x69e068EB4F82b53c5548BdF6548c797ea9428496
130
+ codeLib: '0x8dF597246C851E2DF264C8a322c07657395415fc', // unchanged bytecode ⇒ same address as the prior generation
131
+ editionLib: '0x7c7D213383D6FC3F1e26A0cB3Ad554c1Aa0011dA', // 2026-08-20 batch (links the new AbxParamsLib); replaces 0x3F159245beB9f226175Fa9Bf522acaD6300C9e63
18
132
  };
133
+ /**
134
+ * Every anchor generation, newest first. `[0]` is current (no `retired` date).
135
+ *
136
+ * The addresses are *referenced* from {@link CANONICAL} rather than re-typed, so the current
137
+ * generation cannot drift from the live record — there is one literal per address in this file. When
138
+ * a batch retires this generation, its six literals move into a new entry below (the only place a
139
+ * superseded anchor is allowed to appear), it gains a `retired` date, and the new batch takes the
140
+ * live record. See {@link AnchorGeneration} for why the core version is the identity.
141
+ */
142
+ export const ANCHOR_GENERATIONS = [
143
+ {
144
+ coreVersion: 2,
145
+ deployed: '2026-08-20',
146
+ factories: {
147
+ factory: CANONICAL.factory,
148
+ seriesFactory: CANONICAL.seriesFactory,
149
+ seriesCodeFactory: CANONICAL.seriesCodeFactory,
150
+ oneOfOneEditionFactory: CANONICAL.oneOfOneEditionFactory,
151
+ editionFactory: CANONICAL.editionFactory,
152
+ editionCodeFactory: CANONICAL.editionCodeFactory,
153
+ },
154
+ // Honest about the one thing this label cannot carry: `CORE_VERSION` did not move for the
155
+ // 2026-08-20 batch, so core v2 spans two implementation surfaces — the 2026-08-14 remediation
156
+ // and this one, which added opt-in burn + the reduce-only royalty ceiling to the CORE base (burn
157
+ // is not an extension, so no extension version moved either). Until the next batch bumps it,
158
+ // those two capabilities are detected by their getters (`burnable()` / `maxRoyaltyBps()`), not by
159
+ // the version — which is exactly the hole a consumer has to paper over by hand, and the reason
160
+ // the bump is now a checklist step rather than a thing to remember.
161
+ note: 'burn + reduce-only royalty cap; params write-shell extraction. Core v2 also covers the 2026-08-14 remediation generation, which is not enumerated (testnet, pre-launch).',
162
+ },
163
+ ];
164
+ /** The generation currently stamping clones — {@link ANCHOR_GENERATIONS}`[0]`, by construction. */
165
+ export function currentAnchorGeneration() {
166
+ return ANCHOR_GENERATIONS[0];
167
+ }
19
168
  export const DEPLOYMENTS = {
20
- // Sepolia (testnet) — CANONICAL infra + its own generator. Generator wired to AB's Sepolia
21
- // dependency registry; default gateways ipfs.io / arweave.net.
169
+ // Sepolia (testnet). Generator wired to Art Blocks' Sepolia DependencyRegistryV0
170
+ // (0x5Fcc415BCFb164C5F826B5305274749BeB684e9b); SSTORE2 asset pointers
171
+ // abxJsPointer 0xe34D9e7054c85E5dCfAFBD0c1E8ff48E206ebBf7,
172
+ // gunzipScriptPointer 0xC8739F87eDE0278532ACE0f51936b4A3fA8d5C55.
22
173
  11155111: {
23
174
  ...CANONICAL,
24
- generator: '0x819D26830E1FbD1a3b383EcA1C24bc2770000910',
175
+ // Replaces 0xf099C8fc301340dE2C4D1D2b76fcA05D852dF14A: the directory branch reads the
176
+ // collection's `abx_gateway_*` field instead of the `display.gateway` param. Redeployed with the
177
+ // pointers above PINNED, so only the generator moved — the assets did not have to be rewritten.
178
+ generator: '0xb7104ADfa6fb5615E46e2a681A2Ff043B08fADB5',
25
179
  },
26
- // Base Sepolia (testnet) — same CANONICAL infra; its own generator (no AB DependencyRegistry on
27
- // this chain, so deployed with defaultDependencyRegistry = address(0); collections point at
28
- // their own). Runtime asset pointers (SSTORE2): abxJsPointer 0x4525c352EFaeb3F3124399706Ec33B95f2230410,
29
- // gunzipScriptPointer 0xa8Bc1339781deEbeb1eC949cD0641eb53D1044a6.
180
+ // Base Sepolia (testnet). No Art Blocks DependencyRegistry on this chain, so the generator is
181
+ // deployed with defaultDependencyRegistry = address(0) — collections point at their own. SSTORE2
182
+ // asset pointers: abxJsPointer 0xF5c9CE4486574c962fA61EdB297845085B6736Ab,
183
+ // gunzipScriptPointer 0xB162Fa1B55b9Ad6e1c211c02f4c3f60c87036f03. Recorded here because they are
184
+ // the ONLY way to re-run `DeployAbxGenerator` idempotently — without them the script writes fresh
185
+ // pointers, which moves the generator's CREATE2 address and quietly deploys a second one. (That is
186
+ // exactly what happened in the 2026-08-14 pass: the pointers were not pinned, so this generation's
187
+ // generator is a fresh deploy at a fresh address rather than a reuse of the prior one.)
30
188
  84532: {
31
189
  ...CANONICAL,
32
- generator: '0x229337CA6A442b266BD43B7C70F0f24A2E378cB2',
190
+ // Replaces 0x05bd052dAf464bda2d21c48F8f228Ec435cB89Ab — same v11 gateway-field change as Sepolia,
191
+ // and this time the pointers WERE pinned (see the 2026-08-14 note above for what happens when
192
+ // they are not).
193
+ generator: '0x2C1B7Cf6c54E4ACbcB54FCC395f7Af88eb4fc8CE',
33
194
  },
34
195
  };
35
196
  /** The canonical deployment record for a chain (empty if the chain isn't shipped yet). */
@@ -41,28 +202,41 @@ function pick(override, env, manifest) {
41
202
  return (override ?? env ?? manifest);
42
203
  }
43
204
  export function resolveFactory(chainId, override) {
44
- return pick(override, process.env.ABX_FACTORY, getDeployment(chainId).factory);
205
+ return pick(override, readEnv('ABX_FACTORY'), getDeployment(chainId).factory);
45
206
  }
46
207
  export function resolveSeriesFactory(chainId, override) {
47
- return pick(override, process.env.ABX_SERIES_FACTORY, getDeployment(chainId).seriesFactory);
208
+ return pick(override, readEnv('ABX_SERIES_FACTORY'), getDeployment(chainId).seriesFactory);
48
209
  }
49
210
  export function resolveRenderer(chainId, override) {
50
- return pick(override, process.env.ABX_RENDERER, getDeployment(chainId).renderer);
211
+ return pick(override, readEnv('ABX_RENDERER'), getDeployment(chainId).renderer);
51
212
  }
52
213
  export function resolveChunkStore(chainId, override) {
53
- return pick(override, process.env.ABX_CHUNK_STORE, getDeployment(chainId).chunkStore);
214
+ return pick(override, readEnv('ABX_CHUNK_STORE'), getDeployment(chainId).chunkStore);
54
215
  }
55
216
  export function resolveFixedPriceMinter(chainId, override) {
56
- return pick(override, process.env.ABX_FIXED_PRICE_MINTER, getDeployment(chainId).fixedPriceMinter);
217
+ return pick(override, readEnv('ABX_FIXED_PRICE_MINTER'), getDeployment(chainId).fixedPriceMinter);
57
218
  }
58
219
  export function resolveSeriesCodeFactory(chainId, override) {
59
- return pick(override, process.env.ABX_SERIES_CODE_FACTORY, getDeployment(chainId).seriesCodeFactory);
220
+ return pick(override, readEnv('ABX_SERIES_CODE_FACTORY'), getDeployment(chainId).seriesCodeFactory);
60
221
  }
61
222
  export function resolveSeedSource(chainId, override) {
62
- return pick(override, process.env.ABX_SEED_SOURCE, getDeployment(chainId).seedSource);
223
+ return pick(override, readEnv('ABX_SEED_SOURCE'), getDeployment(chainId).seedSource);
224
+ }
225
+ // ERC-1155 editions — same override → env → manifest precedence as every resolver above.
226
+ export function resolveOneOfOneEditionFactory(chainId, override) {
227
+ return pick(override, readEnv('ABX_ONE_OF_ONE_EDITION_FACTORY'), getDeployment(chainId).oneOfOneEditionFactory);
228
+ }
229
+ export function resolveEditionFactory(chainId, override) {
230
+ return pick(override, readEnv('ABX_EDITION_FACTORY'), getDeployment(chainId).editionFactory);
231
+ }
232
+ export function resolveEditionCodeFactory(chainId, override) {
233
+ return pick(override, readEnv('ABX_EDITION_CODE_FACTORY'), getDeployment(chainId).editionCodeFactory);
234
+ }
235
+ export function resolveFixedPriceMinter1155(chainId, override) {
236
+ return pick(override, readEnv('ABX_FIXED_PRICE_MINTER_1155'), getDeployment(chainId).fixedPriceMinter1155);
63
237
  }
64
238
  export function resolveGenerator(chainId, override) {
65
- return pick(override, process.env.ABX_GENERATOR, getDeployment(chainId).generator);
239
+ return pick(override, readEnv('ABX_GENERATOR'), getDeployment(chainId).generator);
66
240
  }
67
241
  /**
68
242
  * The known `name@version` resolution roots per chain — Art Blocks' DependencyRegistryV0
@@ -76,6 +250,6 @@ export const AB_DEPENDENCY_REGISTRY = {
76
250
  11155111: '0x5Fcc415BCFb164C5F826B5305274749BeB684e9b', // Sepolia
77
251
  };
78
252
  export function resolveDependencyRegistry(chainId, override) {
79
- return pick(override, process.env.ABX_DEPENDENCY_REGISTRY, AB_DEPENDENCY_REGISTRY[chainId]);
253
+ return pick(override, readEnv('ABX_DEPENDENCY_REGISTRY'), AB_DEPENDENCY_REGISTRY[chainId]);
80
254
  }
81
255
  //# sourceMappingURL=deployments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deployments.js","sourceRoot":"","sources":["../src/deployments.ts"],"names":[],"mappings":"AAyCA;;;;;;;;GAQG;AACH,MAAM,SAAS,GAAG;IAChB,OAAO,EAAE,4CAA4C,EAAE,kDAAkD;IACzG,aAAa,EAAE,4CAA4C,EAAE,kDAAkD;IAC/G,iBAAiB,EAAE,4CAA4C,EAAE,kDAAkD;IACnH,QAAQ,EAAE,4CAA4C,EAAE,UAAU;IAClE,UAAU,EAAE,4CAA4C;IACxD,gBAAgB,EAAE,4CAA4C;IAC9D,UAAU,EAAE,4CAA4C;CACH,CAA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5E,OAAO,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,6BAA6B,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,oBAAoB,CAAC,CAAC;AAC7G,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,OAAe,EAAE,QAAiB;IACjE,OAAO,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,eAAe,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC;AACpF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAA4B;IAC7D,CAAC,EAAE,4CAA4C,EAAE,UAAU;IAC3D,QAAQ,EAAE,4CAA4C,EAAE,UAAU;CACnE,CAAC;AAEF,MAAM,UAAU,yBAAyB,CAAC,OAAe,EAAE,QAAiB;IAC1E,OAAO,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,yBAAyB,CAAC,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;AAC7F,CAAC"}
package/dist/deps.d.ts CHANGED
@@ -12,9 +12,14 @@
12
12
  *
13
13
  * Also speaks the AB-compatible registry READ interface (`IDependencyRegistryV0`,
14
14
  * specs/protocol/dependency-registry.md): `getDependencyDetails(bytes32)` is the
15
- * load-bearing read behind the CLI's best-effort selection-time check.
15
+ * load-bearing read behind the CLI's best-effort selection-time check, and
16
+ * `getDependencyScript(bytes32, index)` is the resolver's own read for on-chain bytes (see the
17
+ * "resolver's registry-aware serving lane" section below — hoisted from
18
+ * `@artblocks/abx-token-api` in the abx-services integrator ask, because it shares this exact
19
+ * vocabulary end to end).
16
20
  */
17
- import { type Address, type Hex } from 'viem';
21
+ import { type Address, type Hex, type PublicClient } from 'viem';
22
+ import type { DependencyInfo, ProjectState } from './types.js';
18
23
  /** `IAbxDependencies.Resolution` — index-aligned with the Solidity enum. */
19
24
  export declare const DEP_RESOLUTION: {
20
25
  readonly registry: 0;
@@ -40,9 +45,16 @@ export declare function parseDependencyRef(input: string): ParsedDependencyRef;
40
45
  /** The reverse read: an evented `(resolution, bytes32)` back to its human form (the twin of
41
46
  * the reconstruction fold's decode — registry ⇒ the tag, onchain ⇒ the address). */
42
47
  export declare function decodeDependencyRef(resolution: DepResolution, ref: Hex): string;
43
- /** The load-bearing read of AB's `IDependencyRegistryV0` — the exact upstream signature
44
- * (any registry ABX consumers read from speaks this shape; see the dependency-registry spec). */
45
- export declare const dependencyRegistryReadAbi: readonly [{
48
+ /**
49
+ * The load-bearing reads of AB's `IDependencyRegistryV0` — the exact upstream signatures (any
50
+ * registry ABX consumers read from speaks this shape; see the dependency-registry spec).
51
+ * `getDependencyDetails` backs both the CLI's best-effort selection-time check and the
52
+ * resolver's own resolution; `getDependencyScript` is the resolver-only per-chunk read for a
53
+ * dep whose bytes live on chain. (Merging this hoist: token-api's `DEPENDENCY_REGISTRY_ABI` and
54
+ * this module's prior `dependencyRegistryReadAbi` declared the identical `getDependencyDetails`
55
+ * entry twice — one array now backs both callers.)
56
+ */
57
+ export declare const DEPENDENCY_REGISTRY_ABI: readonly [{
46
58
  readonly type: "function";
47
59
  readonly name: "getDependencyDetails";
48
60
  readonly stateMutability: "view";
@@ -78,6 +90,20 @@ export declare const dependencyRegistryReadAbi: readonly [{
78
90
  readonly name: "scriptCount";
79
91
  readonly type: "uint24";
80
92
  }];
93
+ }, {
94
+ readonly type: "function";
95
+ readonly name: "getDependencyScript";
96
+ readonly stateMutability: "view";
97
+ readonly inputs: readonly [{
98
+ readonly name: "dependencyNameAndVersion";
99
+ readonly type: "bytes32";
100
+ }, {
101
+ readonly name: "index";
102
+ readonly type: "uint256";
103
+ }];
104
+ readonly outputs: readonly [{
105
+ readonly type: "string";
106
+ }];
81
107
  }];
82
108
  /** What the selection-time check cares about from a registry record. */
83
109
  export interface RegistryDependencyDetails {
@@ -106,4 +132,95 @@ export interface DependencyReadClient {
106
132
  * (a revert) or "check unavailable" (RPC down); this stays a pure read.
107
133
  */
108
134
  export declare function readRegistryDependency(client: DependencyReadClient, registry: Address, ref: Hex): Promise<RegistryDependencyDetails | null>;
135
+ /**
136
+ * The registry pointer a deploy with ≥1 Registry-resolution dep should set: an explicit
137
+ * `--dep-registry` wins (validated), else the chain's known AB registry (env-overridable),
138
+ * else none — the caller WARNS and skips the leg (soft pointer; the resolver falls back to
139
+ * its built-in CDN map). Never a blocker.
140
+ */
141
+ export declare function resolveDepRegistryPointer(flagValue: string | undefined, chainId: number): {
142
+ registry: Address | null;
143
+ source: 'flag' | 'default' | 'none';
144
+ };
145
+ /**
146
+ * The dependency legs of the setup multicall: one `setDependency(i, resolution, ref)` per
147
+ * dep in index order, plus the `setDependencyRegistry` leg when a pointer resolved. These
148
+ * ride the SAME atomic setup multicall as script chunks/schemas/mints, in every signing lane.
149
+ */
150
+ export declare function dependencySetupCalls(deps: ParsedDependencyRef[], registry: Address | null): Hex[];
151
+ /** One dep's selection-time verdict (Registry-resolution deps only — OnChain refs never touch a registry). */
152
+ export type DepCheck = {
153
+ dep: string;
154
+ status: 'found';
155
+ details: RegistryDependencyDetails;
156
+ } | {
157
+ dep: string;
158
+ status: 'not-found';
159
+ } | {
160
+ dep: string;
161
+ status: 'skipped';
162
+ };
163
+ /**
164
+ * Best-effort existence/on-chain-ness check of every Registry-resolution dep against the
165
+ * pointer registry. A revert or an empty record ⇒ `not-found` (a warning — the owner may
166
+ * intend a custom registry). A transport failure ⇒ the remaining checks are `skipped` and
167
+ * `rpcOk: false` — one info line, never an error: the deploy proceeds regardless.
168
+ */
169
+ export declare function checkRegistryDeps(client: DependencyReadClient, registry: Address, deps: ParsedDependencyRef[]): Promise<{
170
+ checks: DepCheck[];
171
+ rpcOk: boolean;
172
+ }>;
173
+ /** What a registry ref resolved to: on-chain bytes (decompressed, inline-ready JS) or a CDN URL. */
174
+ export type RegistryResolution = {
175
+ kind: 'onchain';
176
+ script: string;
177
+ } | {
178
+ kind: 'cdn';
179
+ url: string;
180
+ };
181
+ export interface RegistryResolveOptions {
182
+ /** Decompress gzip bytes — required only when the resolved dependency is on-chain bytes
183
+ * (`availableOnChain` with `scriptCount > 0`); a CDN-resolved or unresolved dep never needs
184
+ * it. Omitting it in that case throws {@link InflateRequiredError} naming the fix. */
185
+ inflate?: (bytes: Uint8Array) => Uint8Array;
186
+ }
187
+ /** Reset the in-process registry-resolution cache — for tests. */
188
+ export declare function resetRegistryDependencyCache(): void;
189
+ /** The collection's registry pointer, if set to a real address (zero/undefined ⇒ none). */
190
+ export declare function activeRegistry(state: ProjectState): Address | null;
191
+ /**
192
+ * Resolve one `name@version` ref through the collection's registry. Returns the resolution
193
+ * (or null when the registry couldn't answer — caller falls back to the built-in map) plus
194
+ * whether it was served from cache. Never throws for a resolution failure; a fresh one logs ONE
195
+ * warn (the negative cache rate-limits it) naming the dep and why. DOES throw
196
+ * {@link InflateRequiredError} when the resolution needs decompression and `opts.inflate` is
197
+ * absent — that is a caller-configuration bug, not a resolution outcome.
198
+ */
199
+ export declare function resolveRegistryDep(client: PublicClient, registry: Address, dep: DependencyInfo, opts?: RegistryResolveOptions): Promise<{
200
+ resolution: RegistryResolution | null;
201
+ cached: boolean;
202
+ error?: string;
203
+ }>;
204
+ /**
205
+ * Resolve a `name@version` registry ref to a CDN URL — the built-in reference convention,
206
+ * the LAST-resort rung of the resolution order (the soft registry pointer stays
207
+ * non-validating). Known runtimes get their real dist paths; anything else is best-effort npm.
208
+ */
209
+ export declare function registryDepUrl(ref: string): string | null;
210
+ /**
211
+ * The ordered dependency `<script>` tags for the generator document, each dep resolved per
212
+ * the Consumers table: registry on-chain bytes → registry preferredCDN → built-in map;
213
+ * `onchain`-resolution refs read their SSTORE2 data contract directly (never a registry).
214
+ * Never throws for a resolution failure — an unresolvable dep is skipped (after the warn) and
215
+ * the document assembles. DOES propagate {@link InflateRequiredError} (see
216
+ * {@link resolveRegistryDep}) — a missing `inflate` is a host wiring bug, not a bad dep.
217
+ */
218
+ export declare function dependencyScriptTags(client: PublicClient, state: ProjectState, opts?: RegistryResolveOptions): Promise<string[]>;
219
+ /** The spec's URL-carried tokenData size budget: gateway front-ends commonly cap request lines
220
+ * near 8KB. Applies to URL-carried `?abx=` payloads (a resolver's directory-mode 302 fallback);
221
+ * inline document serving is unaffected. Hoisted alongside the rest of this lane — the
222
+ * budget-tracking/observability surface built on it (`checkUrlBudget`, `urlBudgetStatus`) stays
223
+ * resolver-local (token-api/src/deps.ts), since it's a serving-observability concern rather than
224
+ * a resolution rule. */
225
+ export declare const URL_BUDGET_BYTES = 8192;
109
226
  //# sourceMappingURL=deps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../src/deps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAgB,KAAK,OAAO,EAAE,KAAK,GAAG,EAAC,MAAM,MAAM,CAAC;AAG3D,4EAA4E;AAC5E,eAAO,MAAM,cAAc;;;CAAqC,CAAC;AACjE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEjF,oGAAoG;AACpG,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,aAAa,CAAC;IAC1B,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD;;sFAEsF;AACtF,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,MAAM,GAAG,GAAG,CAahE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,mBAAmB,CAOrE;AAED;qFACqF;AACrF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,GAAG,MAAM,CAE/E;AAID;kGACkG;AAClG,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkB5B,CAAC;AAEX,wEAAwE;AACxE,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,MAAM,CAAC;IACv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