@artblocks/abx-cli 0.1.0-alpha.9 → 0.2.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.
Files changed (201) hide show
  1. package/CHANGELOG.md +429 -0
  2. package/assets/renderer-scaffold/README.md +44 -13
  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 +132 -0
  16. package/dist/capabilities.d.ts.map +1 -0
  17. package/dist/capabilities.js +175 -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 +483 -0
  22. package/dist/commands/auth.js.map +1 -0
  23. package/dist/commands/contract.d.ts +19 -0
  24. package/dist/commands/contract.d.ts.map +1 -0
  25. package/dist/commands/contract.js +171 -0
  26. package/dist/commands/contract.js.map +1 -0
  27. package/dist/commands/deploy.d.ts +296 -0
  28. package/dist/commands/deploy.d.ts.map +1 -0
  29. package/dist/commands/deploy.js +5756 -0
  30. package/dist/commands/deploy.js.map +1 -0
  31. package/dist/commands/feedback.d.ts +7 -0
  32. package/dist/commands/feedback.d.ts.map +1 -0
  33. package/dist/commands/feedback.js +154 -0
  34. package/dist/commands/feedback.js.map +1 -0
  35. package/dist/commands/maintenance.d.ts +4 -0
  36. package/dist/commands/maintenance.d.ts.map +1 -0
  37. package/dist/commands/maintenance.js +114 -0
  38. package/dist/commands/maintenance.js.map +1 -0
  39. package/dist/commands/project.d.ts +458 -0
  40. package/dist/commands/project.d.ts.map +1 -0
  41. package/dist/commands/project.js +1837 -0
  42. package/dist/commands/project.js.map +1 -0
  43. package/dist/commands/reads.d.ts +85 -0
  44. package/dist/commands/reads.d.ts.map +1 -0
  45. package/dist/commands/reads.js +881 -0
  46. package/dist/commands/reads.js.map +1 -0
  47. package/dist/commands/scaffold.d.ts +89 -0
  48. package/dist/commands/scaffold.d.ts.map +1 -0
  49. package/dist/commands/scaffold.js +741 -0
  50. package/dist/commands/scaffold.js.map +1 -0
  51. package/dist/commands/service.d.ts +67 -0
  52. package/dist/commands/service.d.ts.map +1 -0
  53. package/dist/commands/service.js +761 -0
  54. package/dist/commands/service.js.map +1 -0
  55. package/dist/commands/storage.d.ts +51 -0
  56. package/dist/commands/storage.d.ts.map +1 -0
  57. package/dist/commands/storage.js +399 -0
  58. package/dist/commands/storage.js.map +1 -0
  59. package/dist/commands/submit-app.d.ts +102 -0
  60. package/dist/commands/submit-app.d.ts.map +1 -0
  61. package/dist/commands/submit-app.js +638 -0
  62. package/dist/commands/submit-app.js.map +1 -0
  63. package/dist/config.d.ts +94 -2
  64. package/dist/config.d.ts.map +1 -1
  65. package/dist/config.js +332 -12
  66. package/dist/config.js.map +1 -1
  67. package/dist/conformance.d.ts +31 -0
  68. package/dist/conformance.d.ts.map +1 -0
  69. package/dist/conformance.js +400 -0
  70. package/dist/conformance.js.map +1 -0
  71. package/dist/contract-read-error.d.ts +5 -0
  72. package/dist/contract-read-error.d.ts.map +1 -0
  73. package/dist/contract-read-error.js +37 -0
  74. package/dist/contract-read-error.js.map +1 -0
  75. package/dist/creator-agent.d.ts +49 -0
  76. package/dist/creator-agent.d.ts.map +1 -0
  77. package/dist/creator-agent.js +363 -0
  78. package/dist/creator-agent.js.map +1 -0
  79. package/dist/creator-keyring.d.ts +26 -0
  80. package/dist/creator-keyring.d.ts.map +1 -0
  81. package/dist/creator-keyring.js +57 -0
  82. package/dist/creator-keyring.js.map +1 -0
  83. package/dist/creator-signer.d.ts +52 -0
  84. package/dist/creator-signer.d.ts.map +1 -0
  85. package/dist/creator-signer.js +267 -0
  86. package/dist/creator-signer.js.map +1 -0
  87. package/dist/deploy-plan.d.ts +218 -0
  88. package/dist/deploy-plan.d.ts.map +1 -0
  89. package/dist/deploy-plan.js +20 -0
  90. package/dist/deploy-plan.js.map +1 -0
  91. package/dist/deps.d.ts +6 -39
  92. package/dist/deps.d.ts.map +1 -1
  93. package/dist/deps.js +4 -68
  94. package/dist/deps.js.map +1 -1
  95. package/dist/errors.d.ts +22 -0
  96. package/dist/errors.d.ts.map +1 -0
  97. package/dist/errors.js +32 -0
  98. package/dist/errors.js.map +1 -0
  99. package/dist/flag-allowlists.d.ts +53 -0
  100. package/dist/flag-allowlists.d.ts.map +1 -0
  101. package/dist/flag-allowlists.js +188 -0
  102. package/dist/flag-allowlists.js.map +1 -0
  103. package/dist/flags.d.ts +53 -0
  104. package/dist/flags.d.ts.map +1 -1
  105. package/dist/flags.js +151 -1
  106. package/dist/flags.js.map +1 -1
  107. package/dist/jsonout.d.ts +37 -0
  108. package/dist/jsonout.d.ts.map +1 -0
  109. package/dist/jsonout.js +79 -0
  110. package/dist/jsonout.js.map +1 -0
  111. package/dist/kind.d.ts +57 -0
  112. package/dist/kind.d.ts.map +1 -0
  113. package/dist/kind.js +122 -0
  114. package/dist/kind.js.map +1 -0
  115. package/dist/main.js +859 -5374
  116. package/dist/main.js.map +1 -1
  117. package/dist/mintpage.d.ts +17 -2
  118. package/dist/mintpage.d.ts.map +1 -1
  119. package/dist/mintpage.js +241 -54
  120. package/dist/mintpage.js.map +1 -1
  121. package/dist/output.d.ts +184 -0
  122. package/dist/output.d.ts.map +1 -0
  123. package/dist/output.js +774 -0
  124. package/dist/output.js.map +1 -0
  125. package/dist/ownerops.d.ts +463 -59
  126. package/dist/ownerops.d.ts.map +1 -1
  127. package/dist/ownerops.js +2329 -366
  128. package/dist/ownerops.js.map +1 -1
  129. package/dist/preview.d.ts +23 -5
  130. package/dist/preview.d.ts.map +1 -1
  131. package/dist/preview.js +95 -43
  132. package/dist/preview.js.map +1 -1
  133. package/dist/provision.d.ts +3 -13
  134. package/dist/provision.d.ts.map +1 -1
  135. package/dist/provision.js +19 -21
  136. package/dist/provision.js.map +1 -1
  137. package/dist/remote.d.ts +116 -9
  138. package/dist/remote.d.ts.map +1 -1
  139. package/dist/remote.js +371 -14
  140. package/dist/remote.js.map +1 -1
  141. package/dist/riskgate.d.ts +101 -0
  142. package/dist/riskgate.d.ts.map +1 -0
  143. package/dist/riskgate.js +343 -0
  144. package/dist/riskgate.js.map +1 -0
  145. package/dist/scaffold.d.ts +12 -0
  146. package/dist/scaffold.d.ts.map +1 -0
  147. package/dist/scaffold.js +56 -0
  148. package/dist/scaffold.js.map +1 -0
  149. package/dist/schema.d.ts +36 -1
  150. package/dist/schema.d.ts.map +1 -1
  151. package/dist/schema.js +121 -26
  152. package/dist/schema.js.map +1 -1
  153. package/dist/script-chunks.d.ts +8 -0
  154. package/dist/script-chunks.d.ts.map +1 -0
  155. package/dist/script-chunks.js +35 -0
  156. package/dist/script-chunks.js.map +1 -0
  157. package/dist/served.d.ts +30 -0
  158. package/dist/served.d.ts.map +1 -0
  159. package/dist/served.js +112 -0
  160. package/dist/served.js.map +1 -0
  161. package/dist/signer.d.ts +20 -1
  162. package/dist/signer.d.ts.map +1 -1
  163. package/dist/signer.js +110 -18
  164. package/dist/signer.js.map +1 -1
  165. package/dist/update-check.d.ts +60 -9
  166. package/dist/update-check.d.ts.map +1 -1
  167. package/dist/update-check.js +105 -18
  168. package/dist/update-check.js.map +1 -1
  169. package/package.json +17 -12
  170. package/skill/SKILL.md +213 -354
  171. package/skill/agents/openai.yaml +4 -0
  172. package/skill/reference/capabilities.md +195 -0
  173. package/skill/reference/code.md +236 -0
  174. package/skill/reference/creator-token.md +94 -0
  175. package/skill/reference/deploy.md +191 -0
  176. package/skill/reference/diagnose.md +178 -0
  177. package/skill/reference/hosting.md +191 -102
  178. package/skill/reference/operate.md +237 -0
  179. package/skill/reference/services.md +173 -0
  180. package/skill/reference/setup.md +221 -42
  181. package/assets/renderer-scaffold/src/interfaces/IAbxFieldRenderer.sol +0 -32
  182. package/assets/renderer-scaffold/src/interfaces/IAbxParams.sol +0 -26
  183. package/dist/inspect.d.ts +0 -48
  184. package/dist/inspect.d.ts.map +0 -1
  185. package/dist/inspect.js +0 -184
  186. package/dist/inspect.js.map +0 -1
  187. package/dist/migrate.d.ts +0 -65
  188. package/dist/migrate.d.ts.map +0 -1
  189. package/dist/migrate.js +0 -180
  190. package/dist/migrate.js.map +0 -1
  191. package/dist/onchain-uri.d.ts +0 -97
  192. package/dist/onchain-uri.d.ts.map +0 -1
  193. package/dist/onchain-uri.js +0 -243
  194. package/dist/onchain-uri.js.map +0 -1
  195. package/dist/upload.d.ts +0 -28
  196. package/dist/upload.d.ts.map +0 -1
  197. package/dist/upload.js +0 -41
  198. package/dist/upload.js.map +0 -1
  199. package/skill/reference/code-projects.md +0 -246
  200. package/skill/reference/operating.md +0 -118
  201. package/skill/reference/troubleshooting.md +0 -28
package/CHANGELOG.md ADDED
@@ -0,0 +1,429 @@
1
+ # @artblocks/abx-cli
2
+
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7947ba9: Drop-in for read-only consumers. Hosts that serve stored images should adopt `storedImageType`.
8
+
9
+ On-chain raster images now display correctly. Stored `image` bytes are labelled with the new reserved
10
+ `abx_image_type` field, and fall back to `image/svg+xml` when it is unset. Before this change, a JPEG
11
+ or PNG staged with `--onchain-image` was served as SVG, which browsers show as a broken image.
12
+
13
+ - SDK: `METADATA_FIELD.imageType`, `storedImageType`, `isDeclarableImageType`, and
14
+ `DEFAULT_STORED_IMAGE_TYPE`. `isCurrentRenderer` now requires renderer spec v12, and the
15
+ canonical renderer address points at the v12 build.
16
+ - CLI: `deploy --onchain-image`, `deploy-series --onchain-image`, and `set-field --field image --file`
17
+ declare a raster's type from its file extension. They refuse formats browsers don't draw, such as
18
+ TIFF, PSD, video, and files without an extension, before anything is staged.
19
+ - Token API: the image route, the `/data/image` route, and the `artifacts` manifest serve the
20
+ declared type.
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies [7947ba9]
25
+ - @artblocks/abx-sdk@0.2.0
26
+ - @artblocks/abx-token-api@0.2.0
27
+ - @artblocks/abx-indexer@0.1.1
28
+ - @artblocks/abx-storage@0.1.1
29
+
30
+ ## 0.1.0
31
+
32
+ ### Minor Changes
33
+
34
+ - 21e3d6c: Drop-in for existing v2 integrations; new deployments use the canonical v3 contracts.
35
+ Record the synchronized v3 factory generation and testnet deployments, retain full v2 service
36
+ compatibility (including already-assigned v2 sale minters), and update the renderer scaffold to
37
+ `abx-contracts` 3.0.0.
38
+ - 22abce8: Generalize the creator-wallet sponsorship lane to direct zero-value contract creation and
39
+ receipt-dependent on-chain image staging. Add `abx deploy-contract` for exact Foundry artifact or
40
+ initcode deployment through any signing lane.
41
+ - ea57f7a: Add provider-neutral remote interface discovery, the ABX Creators account API client, and the Base
42
+ Sepolia creator-wallet `--sponsor` signing lane. A provider catalog may advertise its account and
43
+ wallet interfaces at a separate HTTPS origin without changing existing same-origin remotes.
44
+
45
+ ### Patch Changes
46
+
47
+ - f9d7a44: Clarify fully on-chain image deployment tradeoffs and make static-project verification report
48
+ `onChainUri.chainComplete` as not applicable instead of false.
49
+ - d50cecd: Classify env-key signing risk from the shared chain registry so newly supported testnets, including
50
+ Robinhood Chain Testnet, work in bounded autonomous smoke tests without being mistaken for mainnet.
51
+ The contributor smoke runner now pins one testnet, gives the worker a fresh small-funded wallet,
52
+ copies only the requested hosted-provider credential, and records evidence without per-transaction
53
+ prompts. Remote discovery accepts `remote list`, and on-chain image planning now calls out the
54
+ single-transaction inline-SVG alternative when it applies.
55
+ - 90bde50: Document the supported creator-wallet sponsorship lane in hook, mint, and transfer command help.
56
+ - 70d2761: Make release-candidate automation fail closed: accept the documented hot-signing flag for code
57
+ editions, simulate purchase dry-runs as the configured hot signer, and return a failed exit status
58
+ when any requested render fails.
59
+ - b8f2876: Keep sponsored deploy guidance consistent: an ABX creator wallet no longer receives a faucet warning when its native balance is intentionally zero.
60
+ - 56973c4: Preserve `maxInvocations` as an exact uint256 value instead of narrowing it through a JavaScript
61
+ number. Reuse an existing hosted-service credential on login and add self-service API-key listing
62
+ and revocation for accounts at their active-key limit.
63
+ - 0a9ed51: Reuse Privy creator-wallet grants across sponsored CLI commands through the native operating-system credential store.
64
+ - c324a8f: Make sponsored deployment previews resolve the existing ABX creator wallet without provisioning external state, so the preview and real send use the same owner, mint recipient, and deterministic salt.
65
+ - 2290b0a: Recover ambiguous creator-wallet submissions through the existing operation status instead of replaying them. Sponsored sends now keep polling safely when the provider response is temporarily unknown and surface the operation ID if reconciliation cannot complete.
66
+ - ee24497: Add machine-readable `--json` output to `contracturi` and `add`. Collection metadata reads now emit
67
+ the resolved document alone, while registration reports identify the target surface, chain and
68
+ address, scan floor, lifecycle status, and whether remote catch-up is complete or still backfilling.
69
+ - 8ccbede: Enable Robinhood Chain production as beta after canonical deployment, paired-testnet qualification,
70
+ and managed-service validation. Surface the same real-funds warning and testnet-first gate used for
71
+ other production beta networks.
72
+ - d925eb1: Breaking only for SDK callers that directly prepared an unsupported sponsored `to: null` request;
73
+ drop-in for existing hot, wallet, and unsigned deployments. Route sponsored custom-contract
74
+ deployments through ABX's existing keyless CREATE2 proxy, expose the exact signer-bound salt and
75
+ predicted address, verify code after confirmation, and document the proxy constructor-caller boundary.
76
+ - e89896a: Reject deterministic deploy salts reserved to a different signer before authorization or broadcast.
77
+ - 8f35dae: Prepare package metadata, release notes, and public-facing source comments for the initial public
78
+ source release.
79
+ - 719b9fe: Make the bundled skill read network and sponsorship support from CLI capabilities and the live
80
+ service descriptor instead of a hardcoded network list. Refresh public documentation references in
81
+ the published packages.
82
+ - f9ba363: Clarify edition live-supply caps, intentional ERC-721 self-transfer hook callbacks, and OP Stack
83
+ seed-source behavior in the bundled ABX skill.
84
+ - c2400a7: Stage Robinhood Chain and its testnet as disabled qualification targets, keep the network registry
85
+ focused on the current roadmap, and stop sale inspection from turning RPC read failures into false
86
+ zero-state results.
87
+ - cf2708c: Allow the beta creator-wallet sponsorship lane on Base mainnet when the live provider and account explicitly advertise eligibility, while retaining Base Sepolia as the recommended first run.
88
+ - b6f941d: Preserve authorship fields in exact deploy replay commands, keep deferred-mint staging narration
89
+ accurate, and distinguish chain-resident image bytes from independently hash-verified content.
90
+ - 3d7fe3c: Record the verified canonical Robinhood Chain Testnet deployment and enable the network for
91
+ experimental qualification with explicit CLI and agent guidance.
92
+ - 66cf489: Mark the qualified creator-wallet sponsorship lane as supported while preserving Base mainnet's protocol-beta warnings.
93
+ - 1294757: Make available ABX updates a clear pre-deployment recommendation in the CLI and bundled agent skill,
94
+ including the matching skill refresh and compatibility expectations for existing projects.
95
+ - ddb2e0b: Refuse irreversible URI locks when the current token or collection base uses `abx.io`. Clarify that
96
+ managed resolver URLs must remain mutable unless a creator-controlled domain is routed and verified.
97
+ - 5164922: Teach the bundled agent skill to prefer live-advertised gas sponsorship for eligible operations while
98
+ keeping hot-key, browser-wallet, and unsigned signing as first-class choices.
99
+ - 4512962: Enable Base production as beta, add a keyless read fallback, and surface production risk and paired-testnet guidance in the CLI, agent skill, and public docs.
100
+ - 76cfc6a: Follow each remote service interface's advertised origin so provider catalogs can separate token data from account and control APIs.
101
+ - 04c0919: Remove ABX's artificial 3,000,000-gas ceiling from sponsored transactions. Sponsored calls now use
102
+ the network estimate and remain subject to the active chain and provider sponsorship policy.
103
+ - Updated dependencies [21e3d6c]
104
+ - Updated dependencies [22abce8]
105
+ - Updated dependencies [4d5e2b1]
106
+ - Updated dependencies [56973c4]
107
+ - Updated dependencies [2290b0a]
108
+ - Updated dependencies [b9197bc]
109
+ - Updated dependencies [8ccbede]
110
+ - Updated dependencies [d925eb1]
111
+ - Updated dependencies [ea57f7a]
112
+ - Updated dependencies [3ddba71]
113
+ - Updated dependencies [8f35dae]
114
+ - Updated dependencies [719b9fe]
115
+ - Updated dependencies [9065128]
116
+ - Updated dependencies [c2400a7]
117
+ - Updated dependencies [3d7fe3c]
118
+ - Updated dependencies [7b462e2]
119
+ - Updated dependencies [ddb2e0b]
120
+ - Updated dependencies [4512962]
121
+ - Updated dependencies [76cfc6a]
122
+ - Updated dependencies [5522192]
123
+ - @artblocks/abx-sdk@0.1.0
124
+ - @artblocks/abx-token-api@0.1.0
125
+ - @artblocks/abx-indexer@0.1.0
126
+ - @artblocks/abx-storage@0.1.0
127
+
128
+ ## 0.1.0-alpha.71
129
+
130
+ ### Patch Changes
131
+
132
+ - 0a9ed51: Reuse Privy creator-wallet grants across sponsored CLI commands through the native operating-system credential store.
133
+
134
+ ## 0.1.0-alpha.70
135
+
136
+ ### Patch Changes
137
+
138
+ - 1294757: Make available ABX updates a clear pre-deployment recommendation in the CLI and bundled agent skill,
139
+ including the matching skill refresh and compatibility expectations for existing projects.
140
+
141
+ ## 0.1.0-alpha.69
142
+
143
+ ### Patch Changes
144
+
145
+ - 719b9fe: Make the bundled skill read network and sponsorship support from CLI capabilities and the live
146
+ service descriptor instead of a hardcoded network list. Refresh public documentation references in
147
+ the published packages.
148
+ - Updated dependencies [719b9fe]
149
+ - @artblocks/abx-indexer@0.1.0-alpha.50
150
+ - @artblocks/abx-sdk@0.1.0-alpha.49
151
+ - @artblocks/abx-token-api@0.1.0-alpha.52
152
+ - @artblocks/abx-storage@0.1.0-alpha.49
153
+
154
+ ## 0.1.0-alpha.68
155
+
156
+ ### Patch Changes
157
+
158
+ - Updated dependencies [4d5e2b1]
159
+ - @artblocks/abx-sdk@0.1.0-alpha.48
160
+ - @artblocks/abx-token-api@0.1.0-alpha.51
161
+ - @artblocks/abx-indexer@0.1.0-alpha.49
162
+ - @artblocks/abx-storage@0.1.0-alpha.48
163
+
164
+ ## 0.1.0-alpha.67
165
+
166
+ ### Patch Changes
167
+
168
+ - 56973c4: Preserve `maxInvocations` as an exact uint256 value instead of narrowing it through a JavaScript
169
+ number. Reuse an existing hosted-service credential on login and add self-service API-key listing
170
+ and revocation for accounts at their active-key limit.
171
+ - Updated dependencies [56973c4]
172
+ - @artblocks/abx-sdk@0.1.0-alpha.47
173
+ - @artblocks/abx-indexer@0.1.0-alpha.48
174
+ - @artblocks/abx-storage@0.1.0-alpha.47
175
+ - @artblocks/abx-token-api@0.1.0-alpha.50
176
+
177
+ ## 0.1.0-alpha.66
178
+
179
+ ### Patch Changes
180
+
181
+ - ddb2e0b: Refuse irreversible URI locks when the current token or collection base uses `abx.io`. Clarify that
182
+ managed resolver URLs must remain mutable unless a creator-controlled domain is routed and verified.
183
+ - 76cfc6a: Follow each remote service interface's advertised origin so provider catalogs can separate token data from account and control APIs.
184
+ - Updated dependencies [ddb2e0b]
185
+ - Updated dependencies [76cfc6a]
186
+ - @artblocks/abx-sdk@0.1.0-alpha.46
187
+ - @artblocks/abx-indexer@0.1.0-alpha.47
188
+ - @artblocks/abx-storage@0.1.0-alpha.46
189
+ - @artblocks/abx-token-api@0.1.0-alpha.49
190
+
191
+ ## 0.1.0-alpha.65
192
+
193
+ ### Patch Changes
194
+
195
+ - 66cf489: Mark the qualified creator-wallet sponsorship lane as supported while preserving Base mainnet's protocol-beta warnings.
196
+
197
+ ## 0.1.0-alpha.64
198
+
199
+ ### Patch Changes
200
+
201
+ - 90bde50: Document the supported creator-wallet sponsorship lane in hook, mint, and transfer command help.
202
+
203
+ ## 0.1.0-alpha.63
204
+
205
+ ### Patch Changes
206
+
207
+ - d925eb1: Breaking only for SDK callers that directly prepared an unsupported sponsored `to: null` request;
208
+ drop-in for existing hot, wallet, and unsigned deployments. Route sponsored custom-contract
209
+ deployments through ABX's existing keyless CREATE2 proxy, expose the exact signer-bound salt and
210
+ predicted address, verify code after confirmation, and document the proxy constructor-caller boundary.
211
+ - Updated dependencies [d925eb1]
212
+ - @artblocks/abx-sdk@0.1.0-alpha.45
213
+ - @artblocks/abx-indexer@0.1.0-alpha.46
214
+ - @artblocks/abx-storage@0.1.0-alpha.45
215
+ - @artblocks/abx-token-api@0.1.0-alpha.48
216
+
217
+ ## 0.1.0-alpha.62
218
+
219
+ ### Minor Changes
220
+
221
+ - 22abce8: Generalize the creator-wallet sponsorship lane to direct zero-value contract creation and
222
+ receipt-dependent on-chain image staging. Add `abx deploy-contract` for exact Foundry artifact or
223
+ initcode deployment through any signing lane.
224
+
225
+ ### Patch Changes
226
+
227
+ - Updated dependencies [22abce8]
228
+ - @artblocks/abx-sdk@0.1.0-alpha.44
229
+ - @artblocks/abx-indexer@0.1.0-alpha.45
230
+ - @artblocks/abx-storage@0.1.0-alpha.44
231
+ - @artblocks/abx-token-api@0.1.0-alpha.47
232
+
233
+ ## 0.1.0-alpha.61
234
+
235
+ ### Patch Changes
236
+
237
+ - 04c0919: Remove ABX's artificial 3,000,000-gas ceiling from sponsored transactions. Sponsored calls now use
238
+ the network estimate and remain subject to the active chain and provider sponsorship policy.
239
+
240
+ ## 0.1.0-alpha.60
241
+
242
+ ### Patch Changes
243
+
244
+ - 2290b0a: Recover ambiguous creator-wallet submissions through the existing operation status instead of replaying them. Sponsored sends now keep polling safely when the provider response is temporarily unknown and surface the operation ID if reconciliation cannot complete.
245
+ - Updated dependencies [2290b0a]
246
+ - @artblocks/abx-sdk@0.1.0-alpha.43
247
+ - @artblocks/abx-indexer@0.1.0-alpha.44
248
+ - @artblocks/abx-storage@0.1.0-alpha.43
249
+ - @artblocks/abx-token-api@0.1.0-alpha.46
250
+
251
+ ## 0.1.0-alpha.59
252
+
253
+ ### Patch Changes
254
+
255
+ - c324a8f: Make sponsored deployment previews resolve the existing ABX creator wallet without provisioning external state, so the preview and real send use the same owner, mint recipient, and deterministic salt.
256
+
257
+ ## 0.1.0-alpha.58
258
+
259
+ ### Patch Changes
260
+
261
+ - b8f2876: Keep sponsored deploy guidance consistent: an ABX creator wallet no longer receives a faucet warning when its native balance is intentionally zero.
262
+ - e89896a: Reject deterministic deploy salts reserved to a different signer before authorization or broadcast.
263
+ - cf2708c: Allow the beta creator-wallet sponsorship lane on Base mainnet when the live provider and account explicitly advertise eligibility, while retaining Base Sepolia as the recommended first run.
264
+
265
+ ## 0.1.0-alpha.57
266
+
267
+ ### Patch Changes
268
+
269
+ - 5164922: Teach the bundled agent skill to prefer live-advertised gas sponsorship for eligible operations while
270
+ keeping hot-key, browser-wallet, and unsigned signing as first-class choices.
271
+
272
+ ## 0.1.0-alpha.56
273
+
274
+ ### Minor Changes
275
+
276
+ - ea57f7a: Add provider-neutral remote interface discovery, the ABX Creators account API client, and the Base
277
+ Sepolia creator-wallet `--sponsor` signing lane. A provider catalog may advertise its account and
278
+ wallet interfaces at a separate HTTPS origin without changing existing same-origin remotes.
279
+
280
+ ### Patch Changes
281
+
282
+ - f9ba363: Clarify edition live-supply caps, intentional ERC-721 self-transfer hook callbacks, and OP Stack
283
+ seed-source behavior in the bundled ABX skill.
284
+ - Updated dependencies [ea57f7a]
285
+ - @artblocks/abx-sdk@0.1.0-alpha.42
286
+ - @artblocks/abx-indexer@0.1.0-alpha.43
287
+ - @artblocks/abx-storage@0.1.0-alpha.42
288
+ - @artblocks/abx-token-api@0.1.0-alpha.45
289
+
290
+ ## 0.1.0-alpha.55
291
+
292
+ ### Patch Changes
293
+
294
+ - 8ccbede: Enable Robinhood Chain production as beta after canonical deployment, paired-testnet qualification,
295
+ and managed-service validation. Surface the same real-funds warning and testnet-first gate used for
296
+ other production beta networks.
297
+ - Updated dependencies [8ccbede]
298
+ - @artblocks/abx-sdk@0.1.0-alpha.41
299
+ - @artblocks/abx-indexer@0.1.0-alpha.42
300
+ - @artblocks/abx-storage@0.1.0-alpha.41
301
+ - @artblocks/abx-token-api@0.1.0-alpha.44
302
+
303
+ ## 0.1.0-alpha.54
304
+
305
+ ### Patch Changes
306
+
307
+ - f9d7a44: Clarify fully on-chain image deployment tradeoffs and make static-project verification report
308
+ `onChainUri.chainComplete` as not applicable instead of false.
309
+ - ee24497: Add machine-readable `--json` output to `contracturi` and `add`. Collection metadata reads now emit
310
+ the resolved document alone, while registration reports identify the target surface, chain and
311
+ address, scan floor, lifecycle status, and whether remote catch-up is complete or still backfilling.
312
+ - Updated dependencies [b9197bc]
313
+ - @artblocks/abx-sdk@0.1.0-alpha.40
314
+ - @artblocks/abx-indexer@0.1.0-alpha.41
315
+ - @artblocks/abx-storage@0.1.0-alpha.40
316
+ - @artblocks/abx-token-api@0.1.0-alpha.43
317
+
318
+ ## 0.1.0-alpha.53
319
+
320
+ ### Patch Changes
321
+
322
+ - d50cecd: Classify env-key signing risk from the shared chain registry so newly supported testnets, including
323
+ Robinhood Chain Testnet, work in bounded autonomous smoke tests without being mistaken for mainnet.
324
+ The contributor smoke runner now pins one testnet, gives the worker a fresh small-funded wallet,
325
+ copies only the requested hosted-provider credential, and records evidence without per-transaction
326
+ prompts. Remote discovery accepts `remote list`, and on-chain image planning now calls out the
327
+ single-transaction inline-SVG alternative when it applies.
328
+
329
+ ## 0.1.0-alpha.52
330
+
331
+ ### Patch Changes
332
+
333
+ - 3d7fe3c: Record the verified canonical Robinhood Chain Testnet deployment and enable the network for
334
+ experimental qualification with explicit CLI and agent guidance.
335
+ - Updated dependencies [3d7fe3c]
336
+ - Updated dependencies [7b462e2]
337
+ - @artblocks/abx-sdk@0.1.0-alpha.39
338
+ - @artblocks/abx-indexer@0.1.0-alpha.40
339
+ - @artblocks/abx-storage@0.1.0-alpha.39
340
+ - @artblocks/abx-token-api@0.1.0-alpha.42
341
+
342
+ ## 0.1.0-alpha.51
343
+
344
+ ### Patch Changes
345
+
346
+ - c2400a7: Stage Robinhood Chain and its testnet as disabled qualification targets, keep the network registry
347
+ focused on the current roadmap, and stop sale inspection from turning RPC read failures into false
348
+ zero-state results.
349
+ - Updated dependencies [c2400a7]
350
+ - @artblocks/abx-sdk@0.1.0-alpha.38
351
+ - @artblocks/abx-indexer@0.1.0-alpha.39
352
+ - @artblocks/abx-storage@0.1.0-alpha.38
353
+ - @artblocks/abx-token-api@0.1.0-alpha.41
354
+
355
+ ## 0.1.0-alpha.50
356
+
357
+ ### Patch Changes
358
+
359
+ - 4512962: Enable Base production as beta, add a keyless read fallback, and surface production risk and paired-testnet guidance in the CLI, agent skill, and public docs.
360
+ - Updated dependencies [4512962]
361
+ - @artblocks/abx-sdk@0.1.0-alpha.37
362
+ - @artblocks/abx-indexer@0.1.0-alpha.38
363
+ - @artblocks/abx-storage@0.1.0-alpha.37
364
+ - @artblocks/abx-token-api@0.1.0-alpha.40
365
+
366
+ ## 0.1.0-alpha.49
367
+
368
+ ### Patch Changes
369
+
370
+ - Updated dependencies [5522192]
371
+ - @artblocks/abx-sdk@0.1.0-alpha.36
372
+ - @artblocks/abx-indexer@0.1.0-alpha.37
373
+ - @artblocks/abx-storage@0.1.0-alpha.36
374
+ - @artblocks/abx-token-api@0.1.0-alpha.39
375
+
376
+ ## 0.1.0-alpha.48
377
+
378
+ ### Patch Changes
379
+
380
+ - 70d2761: Make release-candidate automation fail closed: accept the documented hot-signing flag for code
381
+ editions, simulate purchase dry-runs as the configured hot signer, and return a failed exit status
382
+ when any requested render fails.
383
+
384
+ ## 0.1.0-alpha.46
385
+
386
+ ### Patch Changes
387
+
388
+ - b6f941d: Preserve authorship fields in exact deploy replay commands, keep deferred-mint staging narration
389
+ accurate, and distinguish chain-resident image bytes from independently hash-verified content.
390
+
391
+ ## 0.1.0-alpha.45
392
+
393
+ ### Minor Changes
394
+
395
+ - 21e3d6c: Drop-in for existing v2 integrations; new deployments use the v3 production-candidate contracts.
396
+ Record the synchronized v3 factory generation and testnet deployments, retain full v2 service
397
+ compatibility (including already-assigned v2 sale minters), and update the renderer scaffold to
398
+ `abx-contracts` 3.0.0.
399
+
400
+ ### Patch Changes
401
+
402
+ - Updated dependencies [21e3d6c]
403
+ - @artblocks/abx-sdk@0.1.0-alpha.35
404
+ - @artblocks/abx-token-api@0.1.0-alpha.38
405
+ - @artblocks/abx-indexer@0.1.0-alpha.36
406
+ - @artblocks/abx-storage@0.1.0-alpha.35
407
+
408
+ ## 0.1.0-alpha.44
409
+
410
+ ### Patch Changes
411
+
412
+ - Updated dependencies [3ddba71]
413
+ - Updated dependencies [9065128]
414
+ - @artblocks/abx-sdk@0.1.0-alpha.34
415
+ - @artblocks/abx-token-api@0.1.0-alpha.37
416
+ - @artblocks/abx-storage@0.1.0-alpha.34
417
+ - @artblocks/abx-indexer@0.1.0-alpha.35
418
+
419
+ ## 0.1.0-alpha.43
420
+
421
+ ### Patch Changes
422
+
423
+ - 9242a05: Prepare package metadata, release notes, and public-facing source comments for the initial public
424
+ source release.
425
+ - Updated dependencies [9242a05]
426
+ - @artblocks/abx-indexer@0.1.0-alpha.34
427
+ - @artblocks/abx-sdk@0.1.0-alpha.33
428
+ - @artblocks/abx-storage@0.1.0-alpha.33
429
+ - @artblocks/abx-token-api@0.1.0-alpha.36
@@ -1,26 +1,33 @@
1
- # ABX in-chain renderer scaffold
1
+ # ABX Solidity extension workspace
2
2
 
3
- A ready-to-build Foundry project for the **fully on-chain Solidity art lane** — the artwork is a
4
- smart contract that computes an SVG (and traits) from the token's `seed` and collector-set
5
- PostParams. No JavaScript, no browser, no bucket, no resolver, no effect runner: once the renderer
6
- is deployed and wired, `tokenURI` — name, image, traits — resolves from chain forever.
3
+ A ready-to-build Foundry project for ABX's actual Solidity extension surfaces. Each role remains a
4
+ separate deployable contract: image/traits rendering, configure-time validation, transfer lifecycle,
5
+ and read-time augmentation. Use only the roles your project needs. There is intentionally no
6
+ "minter hook": minting is an external-minter capability, while the three PostParam hooks are
7
+ configure, transfer and augment.
7
8
 
8
- `abx` does **not** compile or deploy Solidity for you; you build, test, and deploy this project with
9
- Foundry, then hand the deployed address(es) to `abx deploy-code`, which verifies they have code.
9
+ `abx` does **not** compile Solidity for you. Build and test with Foundry, then either deploy with
10
+ Foundry or pass exact compiled creation bytecode to `abx deploy-contract`. Hand the deployed
11
+ address(es) to `abx deploy-code`, which verifies they have code.
10
12
 
11
13
  ## What's here
12
14
 
13
15
  - `src/MyRenderer.sol` — the **image** renderer: seed → geometry, a `palette` HexColor PostParam →
14
- tint. **Fork the geometry/palette math for your own art.**
16
+ tint. **Fork the geometry/palette math for your own work.**
15
17
  - `src/MyTraits.sol` — the **attributes** renderer: reads the *same* seed math so traits agree with
16
18
  the image by construction.
17
- - `src/interfaces/` — the two ABX interfaces you implement/read (`IAbxFieldRenderer`, `IAbxParams`).
18
- Read `IAbxFieldRenderer.sol` first: it documents **the five invariants** (above all, `render()`
19
- must NEVER revert — a revert bricks the whole `tokenURI`, including the collection surface
20
- `tokenId == type(uint256).max`).
19
+ - `src/MyHooks.sol` — small wrappers around one reference implementation for each PostParam hook
20
+ role. Fork a role independently; do not merge their authority just because they share a workspace.
21
+ - `abx-contracts~3.0.0` — the exact-pinned canonical interfaces, 721/1155 fixed-price minters,
22
+ reference hooks, token implementations and real-clone test harness. The scaffold carries no
23
+ hand-copied ABX interface.
21
24
  - `test/MyRenderer.t.sol` — proves `render()` never reverts (incl. no-seed, no-palette, the
22
25
  collection surface, and a fuzz over every seed/tokenId) and that image ↔ traits stay coherent.
23
- - `script/Deploy.s.sol` — deploys both renderers and prints the addresses + the next command.
26
+ - `script/Deploy.s.sol` deploys renderers; `script/DeployHooks.s.sol` deploys the three hook examples
27
+ after a token address exists.
28
+ - `script/Preview.s.sol` — a **local preview**, not a test: runs `render()` with representative
29
+ inputs and writes the actual output to `preview-out/` so you can look at it (open the `.svg` in a
30
+ browser). `forge test` proves render() behaves; this script is the only way to see what it drew.
24
31
 
25
32
  ## Build, test, deploy
26
33
 
@@ -29,10 +36,23 @@ forge soldeer install # fetch solady + forge-std (pinned in foundry.tom
29
36
  forge build
30
37
  forge test # MUST pass — especially the never-revert cases
31
38
 
39
+ # look at what the renderer actually produces (writes preview-out/image.svg + attributes.json):
40
+ forge script script/Preview.s.sol
41
+ # override the representative token id / seed / palette without editing the script:
42
+ PREVIEW_TOKEN_ID=42 PREVIEW_SEED=0x00...abc PREVIEW_PALETTE=0x00...ff3366 forge script script/Preview.s.sol
43
+
32
44
  # deploy to your testnet, then copy the printed addresses:
33
45
  forge script script/Deploy.s.sol --rpc-url <your-rpc-url> --private-key <key> --broadcast
46
+
47
+ # optional PostParam hooks, deployed separately after the token exists:
48
+ forge script script/DeployHooks.s.sol --sig "run(address,uint256)" <token> 1024 \
49
+ --rpc-url <your-rpc-url> --private-key <key> --broadcast
34
50
  ```
35
51
 
52
+ `script/Preview.s.sol`'s gas numbers are a local-EVM sanity check, not a production gas measurement —
53
+ see the disclaimer in that file. For real gas numbers, deploy (above) and read `tokenURI` on the
54
+ actual chain you're targeting.
55
+
36
56
  ## Wire it into a drop
37
57
 
38
58
  ```bash
@@ -44,6 +64,17 @@ abx deploy-code \
44
64
  --name "Your Collection" --symbol SYM [--max N] --sign --for <your wallet>
45
65
  ```
46
66
 
67
+ Then, only if using the hook examples:
68
+
69
+ ```bash
70
+ abx set-param-hooks <token> --configure <configure> --augment <augment> --transfer <transfer>
71
+ ```
72
+
73
+ The transfer hook is a veto surface and also runs on mint. The reference counts only real
74
+ non-zero-to-non-zero moves and pins `msg.sender` to the token. On ERC-1155 it counts copies moved per
75
+ id; it never pretends a multi-copy id has one current owner. Freeze the selected hook addresses with
76
+ `abx lock-param-hooks` when the project is ready to make that authority immutable.
77
+
47
78
  - `--onchain-uri` (no `--script`/`--code-dir`) is the in-chain lane — a small Solidity SVG is a
48
79
  great fit for an on-chain `tokenURI` (unlike a 200KB JS bundle).
49
80
  - `--schema palette:HexColor:TokenOwner` declares the collector param your renderer reads. **Omit it
@@ -9,7 +9,12 @@ evm_version = "paris" # broad multi-chain compatibility (no PUSH0/cancun
9
9
  optimizer = true
10
10
  optimizer_runs = 1_000_000 # a renderer is deployed once and called forever → optimize runtime
11
11
 
12
+ # script/Preview.s.sol writes rendered output here for human inspection (vm.writeFileBinary).
13
+ # Foundry denies filesystem writes by default; this is the narrowest grant that lets it work.
14
+ fs_permissions = [{ access = "read-write", path = "./preview-out" }]
15
+
12
16
  # Dependencies are fetched with soldeer (`forge soldeer install`), pinned here.
13
17
  [dependencies]
18
+ abx-contracts = "3.0.0"
14
19
  solady = "0.1.26"
15
20
  forge-std = "1.16.1"
@@ -1,3 +1,3 @@
1
1
  solady/=dependencies/solady-0.1.26/src/
2
2
  forge-std/=dependencies/forge-std-1.16.1/src/
3
- abx/=src/interfaces/
3
+ abx-contracts/=dependencies/abx-contracts-3.0.0/
@@ -0,0 +1,24 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity 0.8.28;
3
+
4
+ import {Script, console2} from "forge-std/Script.sol";
5
+ import {MyConfigureHook, MyTransferHook, MyAugmentHook} from "../src/MyHooks.sol";
6
+
7
+ /// Deploy only the hook roles this project needs. TOKEN must already be deployed because every
8
+ /// write-time hook is pinned to its caller; this avoids a reusable hook accidentally trusting any
9
+ /// contract that knows its selector.
10
+ contract DeployHooks is Script {
11
+ function run(address token, uint256 maxDataLength) external {
12
+ vm.startBroadcast();
13
+ MyConfigureHook configure = new MyConfigureHook(token, maxDataLength);
14
+ MyTransferHook transfer = new MyTransferHook(token);
15
+ MyAugmentHook augment = new MyAugmentHook(transfer);
16
+ vm.stopBroadcast();
17
+ console2.log("configure hook:", address(configure));
18
+ console2.log("augment hook :", address(augment));
19
+ console2.log("transfer hook :", address(transfer));
20
+ console2.log(
21
+ "Next: abx set-param-hooks <token> --configure <configure> --augment <augment> --transfer <transfer>"
22
+ );
23
+ }
24
+ }
@@ -0,0 +1,99 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.20;
3
+
4
+ import {Script, console2} from "forge-std/Script.sol";
5
+ import {IAbxFieldRenderer} from "abx-contracts/src/uri/IAbxFieldRenderer.sol";
6
+ import {MyRenderer} from "../src/MyRenderer.sol";
7
+ import {MyTraits} from "../src/MyTraits.sol";
8
+ import {MockParams} from "../test/MyRenderer.t.sol";
9
+
10
+ /// @notice A human-inspection harness, not a test. `forge test` is what proves render() behaves
11
+ /// (never reverts, traits agree with the image, etc) — this script exists ONLY because
12
+ /// assertions don't let a person actually LOOK at the SVG/JSON a renderer produces. It
13
+ /// calls the exact same `IAbxFieldRenderer.render(token, tokenId, field)` interface the
14
+ /// deployed ABX token calls at read time, against a `MockParams` standing in for the
15
+ /// token (the same stand-in `test/MyRenderer.t.sol` uses), and writes the raw output to
16
+ /// disk so it can be opened in a browser or editor.
17
+ ///
18
+ /// GAS DISCLAIMER — read before trusting any number this script prints: a local
19
+ /// `forge script` run executes against an in-memory EVM with no real chain's calldata
20
+ /// pricing, contract-size/warm-storage state, or congestion. The gas this script reports
21
+ /// (and even a real `--broadcast` dry run) is NOT a production gas measurement. If you
22
+ /// need real numbers, deploy with `script/Deploy.s.sol` and read `tokenURI` on the actual
23
+ /// chain you're targeting.
24
+ ///
25
+ /// Usage (from this scaffold's directory, after `forge soldeer install`):
26
+ /// forge script script/Preview.s.sol
27
+ /// Every input has a representative default and is overridable via env vars, so you can preview
28
+ /// a specific token without editing this file:
29
+ /// PREVIEW_TOKEN_ID=42 PREVIEW_SEED=0x00112233445566778899aabbccddeeff00112233445566778899aabbccddee \
30
+ /// PREVIEW_PALETTE=0xff3366 forge script script/Preview.s.sol
31
+ /// Set PREVIEW_TOKEN_ID to `115792089237316195423570985008687907853269984665640564039457584007913129639935`
32
+ /// (type(uint256).max) to preview the collection surface (contractURI) instead of a token.
33
+ /// Output lands in `preview-out/` at the repo root of this scaffold — open `preview-out/image.svg`
34
+ /// in a browser, `preview-out/attributes.json` in an editor.
35
+ contract Preview is Script {
36
+ function run() external {
37
+ uint256 tokenId = vm.envOr("PREVIEW_TOKEN_ID", uint256(7));
38
+ bytes32 seed = vm.envOr("PREVIEW_SEED", bytes32(uint256(0x1234)));
39
+ // `palette` is a HexColor PostParam: the RGB value packed into the low 3 bytes.
40
+ bytes32 palette = vm.envOr("PREVIEW_PALETTE", bytes32(uint256(0xff3366)));
41
+
42
+ // vm.writeFileBinary does not create parent directories; make sure ours exists.
43
+ vm.createDir("preview-out", true);
44
+
45
+ MyRenderer image = new MyRenderer();
46
+ MyTraits traits = new MyTraits();
47
+ MockParams params = new MockParams();
48
+ params.setToken(tokenId, "seed", seed);
49
+ params.setToken(tokenId, "palette", palette);
50
+
51
+ console2.log("== NOT a gas measurement (see script comment) ==");
52
+ console2.log("== preview inputs ==");
53
+ console2.log("tokenId:", tokenId);
54
+ console2.log("seed :", vm.toString(seed));
55
+ console2.log("palette:", vm.toString(palette));
56
+
57
+ _renderAndDump(image, address(params), tokenId, "image", "image", "preview-out/image");
58
+ _renderAndDump(traits, address(params), tokenId, "attributes", "attributes", "preview-out/attributes");
59
+ }
60
+
61
+ /// @dev Runs the ACTUAL renderer interface — the same call the resolver/on-chain metadata
62
+ /// renderer makes — and surfaces a revert instead of swallowing it, so a miswired field
63
+ /// or a broken invariant shows up here instead of silently bricking `tokenURI` later.
64
+ function _renderAndDump(
65
+ IAbxFieldRenderer renderer,
66
+ address token,
67
+ uint256 tokenId,
68
+ bytes32 field,
69
+ string memory fieldLabel,
70
+ string memory pathNoExt
71
+ ) private {
72
+ console2.log(string.concat("== field: ", fieldLabel, " =="));
73
+ try renderer.render(token, tokenId, field) returns (string memory contentType, bytes memory data) {
74
+ string memory path = string.concat(pathNoExt, ".", _extFor(contentType));
75
+ vm.writeFileBinary(path, data);
76
+ console2.log("contentType:", contentType);
77
+ console2.log("bytes :", data.length);
78
+ console2.log("written to :", path);
79
+ } catch Error(string memory reason) {
80
+ console2.log("REVERTED:", reason);
81
+ } catch Panic(uint256 code) {
82
+ console2.log("REVERTED, panic code:", code);
83
+ } catch (bytes memory lowLevelData) {
84
+ // A custom error (e.g. MyRenderer.UnsupportedField) has no ABI-decoded reason string —
85
+ // this is the raw revert data, selector first, so you can tell which error fired.
86
+ console2.log("REVERTED, raw data:", vm.toString(lowLevelData));
87
+ }
88
+ }
89
+
90
+ /// @dev Extension purely for local viewing convenience — not part of the on-chain contract.
91
+ function _extFor(string memory contentType) private pure returns (string memory) {
92
+ bytes32 ct = keccak256(bytes(contentType));
93
+ if (ct == keccak256("image/svg+xml")) return "svg";
94
+ if (ct == keccak256("application/json")) return "json";
95
+ if (ct == keccak256("text/html")) return "html";
96
+ if (ct == keccak256("text/plain")) return "txt";
97
+ return "bin";
98
+ }
99
+ }