@artblocks/abx-sdk 0.1.0-alpha.0 → 0.1.0-alpha.10

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 (103) hide show
  1. package/README.md +131 -0
  2. package/dist/abi/generated.d.ts +585 -12
  3. package/dist/abi/generated.d.ts.map +1 -1
  4. package/dist/abi/generated.js +16 -16
  5. package/dist/abi/generated.js.map +1 -1
  6. package/dist/abi/index.d.ts +209 -12
  7. package/dist/abi/index.d.ts.map +1 -1
  8. package/dist/anchors.d.ts +150 -0
  9. package/dist/anchors.d.ts.map +1 -0
  10. package/dist/anchors.js +290 -0
  11. package/dist/anchors.js.map +1 -0
  12. package/dist/chains.d.ts +34 -9
  13. package/dist/chains.d.ts.map +1 -1
  14. package/dist/chains.js +45 -18
  15. package/dist/chains.js.map +1 -1
  16. package/dist/chunks.d.ts +53 -23
  17. package/dist/chunks.d.ts.map +1 -1
  18. package/dist/chunks.js +68 -6
  19. package/dist/chunks.js.map +1 -1
  20. package/dist/clients.d.ts +23 -11
  21. package/dist/clients.d.ts.map +1 -1
  22. package/dist/clients.js +17 -18
  23. package/dist/clients.js.map +1 -1
  24. package/dist/creator-token.d.ts +65 -0
  25. package/dist/creator-token.d.ts.map +1 -0
  26. package/dist/creator-token.js +93 -0
  27. package/dist/creator-token.js.map +1 -0
  28. package/dist/deploy.d.ts +24 -10
  29. package/dist/deploy.d.ts.map +1 -1
  30. package/dist/deploy.js +62 -87
  31. package/dist/deploy.js.map +1 -1
  32. package/dist/deployments.d.ts.map +1 -1
  33. package/dist/deployments.js +38 -22
  34. package/dist/deployments.js.map +1 -1
  35. package/dist/deps.d.ts +38 -0
  36. package/dist/deps.d.ts.map +1 -1
  37. package/dist/deps.js +70 -1
  38. package/dist/deps.js.map +1 -1
  39. package/dist/env.d.ts +11 -0
  40. package/dist/env.d.ts.map +1 -1
  41. package/dist/env.js +42 -2
  42. package/dist/env.js.map +1 -1
  43. package/dist/errors.d.ts +63 -0
  44. package/dist/errors.d.ts.map +1 -0
  45. package/dist/errors.js +85 -0
  46. package/dist/errors.js.map +1 -0
  47. package/dist/execute.d.ts +115 -0
  48. package/dist/execute.d.ts.map +1 -0
  49. package/dist/execute.js +142 -0
  50. package/dist/execute.js.map +1 -0
  51. package/dist/index.d.ts +13 -2
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +13 -2
  54. package/dist/index.js.map +1 -1
  55. package/dist/inspect.d.ts +48 -0
  56. package/dist/inspect.d.ts.map +1 -0
  57. package/dist/inspect.js +290 -0
  58. package/dist/inspect.js.map +1 -0
  59. package/dist/migrate.d.ts +41 -0
  60. package/dist/migrate.d.ts.map +1 -0
  61. package/dist/migrate.js +140 -0
  62. package/dist/migrate.js.map +1 -0
  63. package/dist/node.d.ts +13 -0
  64. package/dist/node.d.ts.map +1 -0
  65. package/dist/node.js +13 -0
  66. package/dist/node.js.map +1 -0
  67. package/dist/onchain-uri.d.ts +96 -0
  68. package/dist/onchain-uri.d.ts.map +1 -0
  69. package/dist/onchain-uri.js +231 -0
  70. package/dist/onchain-uri.js.map +1 -0
  71. package/dist/ops.d.ts +113 -5
  72. package/dist/ops.d.ts.map +1 -1
  73. package/dist/ops.js +172 -13
  74. package/dist/ops.js.map +1 -1
  75. package/dist/reconstruct.d.ts +20 -1
  76. package/dist/reconstruct.d.ts.map +1 -1
  77. package/dist/reconstruct.js +124 -50
  78. package/dist/reconstruct.js.map +1 -1
  79. package/dist/resume.d.ts +96 -0
  80. package/dist/resume.d.ts.map +1 -0
  81. package/dist/resume.js +95 -0
  82. package/dist/resume.js.map +1 -0
  83. package/dist/service.d.ts +369 -0
  84. package/dist/service.d.ts.map +1 -0
  85. package/dist/service.js +376 -0
  86. package/dist/service.js.map +1 -0
  87. package/dist/staging.d.ts +95 -0
  88. package/dist/staging.d.ts.map +1 -0
  89. package/dist/staging.js +57 -0
  90. package/dist/staging.js.map +1 -0
  91. package/dist/tokendata.d.ts +62 -2
  92. package/dist/tokendata.d.ts.map +1 -1
  93. package/dist/tokendata.js +60 -16
  94. package/dist/tokendata.js.map +1 -1
  95. package/dist/tokens.d.ts +55 -0
  96. package/dist/tokens.d.ts.map +1 -0
  97. package/dist/tokens.js +152 -0
  98. package/dist/tokens.js.map +1 -0
  99. package/dist/util.d.ts +59 -0
  100. package/dist/util.d.ts.map +1 -0
  101. package/dist/util.js +89 -0
  102. package/dist/util.js.map +1 -0
  103. package/package.json +10 -2
@@ -0,0 +1,376 @@
1
+ /**
2
+ * The remote-service client — the SDK's one HTTP surface, speaking the provider-neutral
3
+ * control plane pinned by specs/self-host-toolkit/remote-services.md. A client is bound to an
4
+ * endpoint + an injected bearer token, never to a brand: the reference CLI, the effects runner,
5
+ * and any hosted agent drive a self-hosted node and a managed provider through this same class.
6
+ *
7
+ * The token authorizes index/metadata control only — never on-chain signing. No env reads here;
8
+ * credential resolution is the caller's concern (the CLI's named-remote convention lives in
9
+ * packages/cli/src/remote.ts).
10
+ */
11
+ import { linearBackoffDelay, sleep } from './util.js';
12
+ export const WELL_KNOWN_SERVICE_PATH = '/.well-known/abx-service';
13
+ /**
14
+ * Versioned interface ids a service declares in its descriptor. Versions ride these ids
15
+ * (they track the `/v1` path prefix); the descriptor has no separate format version.
16
+ *
17
+ * There are exactly two, and they are **all-or-nothing**: declaring one asserts every route it names
18
+ * answers per the spec. The artifact-registry routes ride {@link CONTROL_PLANE_INTERFACE} rather
19
+ * than an id of their own — once referenced output is locator-only, accepting a registration is a
20
+ * database insert, so a separate capability flag would describe a distinction that doesn't exist.
21
+ * A service that won't take a given caller's artifacts refuses on the credential (`403`), which is
22
+ * the honest axis: interfaces describe wire grammar, tokens describe permission.
23
+ */
24
+ export const TOKEN_API_INTERFACE = 'abx-token-api/v1';
25
+ export const CONTROL_PLANE_INTERFACE = 'abx-control-plane/v1';
26
+ /**
27
+ * Why this locator can't be accepted for a referenced artifact, or `null` if it passes.
28
+ *
29
+ * A locator is a **reachability** claim, not a durability one: it must resolve for a third party
30
+ * with no producer credentials and no private-network assumption. The protocol deliberately has
31
+ * **no preference among schemes** — `https://` (S3/R2, a producer's own public base, a chosen
32
+ * IPFS/Arweave gateway), `ipfs://` and `ar://` are peers, because derived output is re-creatable and
33
+ * a producer with an opinion about which gateway serves its art is making an operational call the
34
+ * protocol has no standing to override.
35
+ *
36
+ * Reachability can't be *proved* without fetching, and fetching a third-party URL while handling an
37
+ * authed write is byte custody through the back door plus an SSRF surface. So this checks the two
38
+ * things that are decidable from the string alone and are always wrong:
39
+ * - a private / loopback host — resolvable only from the producer's own network;
40
+ * - a presigned, expiring URL — resolvable now, dead later, which is the worst failure shape
41
+ * (it passes every check at publish time and rots silently).
42
+ */
43
+ export function locatorRejectionReason(locator) {
44
+ const trimmed = locator.trim();
45
+ if (!/^(https?|ipfs|ar):/i.test(trimmed)) {
46
+ return `unsupported scheme — use https://, ipfs:// or ar://`;
47
+ }
48
+ if (/^https?:/i.test(trimmed)) {
49
+ let url;
50
+ try {
51
+ url = new URL(trimmed);
52
+ }
53
+ catch {
54
+ return 'not a parseable URL';
55
+ }
56
+ const host = url.hostname.toLowerCase().replace(/^\[|\]$/g, '');
57
+ const privateHost = host === 'localhost' ||
58
+ host.endsWith('.localhost') ||
59
+ host === '::1' ||
60
+ host === '0.0.0.0' ||
61
+ /^127\./.test(host) ||
62
+ /^10\./.test(host) ||
63
+ /^192\.168\./.test(host) ||
64
+ /^172\.(1[6-9]|2\d|3[01])\./.test(host) ||
65
+ /^169\.254\./.test(host) ||
66
+ /^f[cd][0-9a-f]{2}:/.test(host);
67
+ if (privateHost) {
68
+ return `'${url.hostname}' is a loopback/private host — a locator must resolve for anyone, not just from the producer's network`;
69
+ }
70
+ const q = url.searchParams;
71
+ if (q.has('X-Amz-Signature') || q.has('Signature') || q.has('X-Goog-Signature') || q.has('sig') || q.has('Expires') || q.has('X-Amz-Expires')) {
72
+ return 'looks like a presigned/expiring URL — it would resolve now and rot later; publish a durable public URL instead';
73
+ }
74
+ }
75
+ return null;
76
+ }
77
+ /** Statuses a caller can stop waiting on — see {@link AbxServiceClient.awaitIndexed}. */
78
+ export const TERMINAL_INDEX_STATUSES = ['live', 'failed'];
79
+ /** The one message per class. Fixed strings — an upstream error is never interpolated, because a
80
+ * keyed RPC URL *is* a credential and upstream messages routinely embed one. */
81
+ const INDEX_ERROR_MESSAGES = {
82
+ rpc_unavailable: 'upstream RPC unavailable; will retry',
83
+ rpc_rate_limited: 'upstream RPC rate-limited; will retry',
84
+ not_abx_contract: 'address emits no ABX event spine on this chain',
85
+ internal: 'indexing failed; see the service operator’s logs',
86
+ };
87
+ /** Map a catch-up failure to its wire form. Sniffs the underlying error's shape only to CHOOSE a
88
+ * class — nothing from it reaches the returned message. */
89
+ export function classifyIndexError(err) {
90
+ const raw = err instanceof Error ? `${err.name} ${err.message}` : String(err);
91
+ const text = raw.toLowerCase();
92
+ let cls = 'internal';
93
+ if (/rate.?limit|too many requests|\b429\b|quota|exceeded .*(?:compute|cu)|throttl/.test(text)) {
94
+ cls = 'rpc_rate_limited';
95
+ }
96
+ else if (/timeout|timed out|econnrefused|econnreset|enotfound|eai_again|socket hang up|fetch failed|network|502|503|504|http request failed/.test(text)) {
97
+ cls = 'rpc_unavailable';
98
+ }
99
+ return { class: cls, message: INDEX_ERROR_MESSAGES[cls] };
100
+ }
101
+ /** Narrow a register response to the deferred-catch-up branch. */
102
+ export function isAccepted(r) {
103
+ return r.accepted === true;
104
+ }
105
+ /**
106
+ * How far along a BACKFILL is, from a status read — `null` when there is no meaningful ratio.
107
+ *
108
+ * Deliberately `null` for anything but `backfilling`, because `toBlock` measures two different things
109
+ * depending on the state. During an initial sync it advances monotonically, so `toBlock` vs head IS
110
+ * progress. Once a project is `live` it only moves when that project has *events* — so a perfectly
111
+ * current project on a busy chain sits at a tiny fraction of head, and rendering that as "3%" reads
112
+ * as broken when nothing is wrong. Same reason the reference measures staleness against its watcher's
113
+ * watermark rather than a project's `toBlock`.
114
+ */
115
+ export function indexProgress(s) {
116
+ if (s.status !== 'backfilling')
117
+ return null;
118
+ if (!s.headBlock || !s.toBlock)
119
+ return null;
120
+ try {
121
+ const from = BigInt(s.fromBlock);
122
+ const to = BigInt(s.toBlock);
123
+ const head = BigInt(s.headBlock);
124
+ if (head <= from || to < from)
125
+ return null;
126
+ const total = head - from;
127
+ const done = (to > head ? head : to) - from;
128
+ return { done, total, percent: Number((done * 100n) / total) };
129
+ }
130
+ catch {
131
+ return null;
132
+ }
133
+ }
134
+ /** A non-2xx control-plane response (or an unreachable service, after retries). `code` is the
135
+ * spec's machine code when the service sent one — key behavior off it, never off `message`. */
136
+ export class AbxServiceError extends Error {
137
+ status;
138
+ code;
139
+ url;
140
+ /** The failure CLASS when the service volunteered one (a credential-free hint about *why* — an
141
+ * exhausted RPC reads very differently from a broken service). Optional on the wire. */
142
+ class;
143
+ constructor(message, opts) {
144
+ super(message);
145
+ this.name = 'AbxServiceError';
146
+ this.status = opts.status;
147
+ this.code = opts.code;
148
+ this.url = opts.url;
149
+ this.class = opts.class;
150
+ }
151
+ }
152
+ /** Waiting for a project to reach a terminal status ran out of time. The registration is durable —
153
+ * this is "still working", never "the add failed". */
154
+ export class AbxIndexTimeoutError extends Error {
155
+ last;
156
+ constructor(message, last) {
157
+ super(message);
158
+ this.name = 'AbxIndexTimeoutError';
159
+ this.last = last;
160
+ }
161
+ }
162
+ /**
163
+ * Retry discipline (shared with the effects runner's read lane): a hosted node can cold-start or
164
+ * briefly 502, so network errors / 5xx / 429 get 4 attempts with linear backoff — but a genuine
165
+ * 4xx is an answer, not weather, and throws immediately with the parsed `{error, code}` body.
166
+ */
167
+ const ATTEMPTS = 4;
168
+ /** The descriptor is a cheap PUBLIC read used to decide whether a URL is even a service — usually
169
+ * interactively, often against a typo. Grinding the full ladder there just makes a wrong URL take
170
+ * five seconds to say so, so it gets one retry for a blip and no more. */
171
+ const DESCRIPTOR_ATTEMPTS = 2;
172
+ export class AbxServiceClient {
173
+ baseUrl;
174
+ token;
175
+ timeoutMs;
176
+ retryDelayMs;
177
+ constructor(opts) {
178
+ this.baseUrl = opts.baseUrl.replace(/\/+$/, '');
179
+ this.token = opts.token;
180
+ this.timeoutMs = opts.timeoutMs ?? 30_000;
181
+ this.retryDelayMs = opts.retryDelayMs ?? 750;
182
+ }
183
+ /** The public service descriptor — no auth, safe to fetch before trusting a provider. */
184
+ async descriptor() {
185
+ return (await this.request('GET', WELL_KNOWN_SERVICE_PATH, undefined, { attempts: DESCRIPTOR_ATTEMPTS }));
186
+ }
187
+ /**
188
+ * Register + index a project (the HTTP form of `abx add`; a re-POST is the nudge). Returns the
189
+ * completed summary (HTTP 200) or the accepted-and-still-working shape (HTTP 202) — narrow with
190
+ * {@link isAccepted}, and follow a 202 with {@link awaitIndexed}.
191
+ *
192
+ * A timed-out register is NOT retried blind. A conforming service persists the registration before
193
+ * it starts catching up, so a timeout usually means "it's in there, still working" — and re-POSTing
194
+ * would kick off a *second* full reconstruct against the RPC that was already too slow to answer.
195
+ * So we ask the status route whether it landed, and if it did we return the async shape instead.
196
+ */
197
+ async registerProject(body) {
198
+ const landed = async () => {
199
+ const st = await this.projectStatus(body.chainId, body.address).catch(() => null);
200
+ if (!st)
201
+ return undefined; // not there (or the service is truly unreachable) — keep retrying
202
+ return { ok: true, accepted: true, project: { address: body.address, status: st.status } };
203
+ };
204
+ const { status, body: out } = await this.requestWithStatus('POST', '/v1/projects', body, { onTimeout: landed });
205
+ return normalizeRegisterResult(status, out, body.address);
206
+ }
207
+ /**
208
+ * Poll a project's status until it reaches a terminal lifecycle state (`live` or `failed`) — the
209
+ * one implementation of the wait loop, so the CLI, the effects runner, and any hosted agent all
210
+ * behave identically against any provider. `stale` keeps polling: it means lagging, not caught up.
211
+ */
212
+ async awaitIndexed(chainId, address, opts = {}) {
213
+ const timeoutMs = opts.timeoutMs ?? 300_000;
214
+ const intervalMs = opts.intervalMs ?? 3_000;
215
+ const deadline = Date.now() + timeoutMs;
216
+ let last;
217
+ for (;;) {
218
+ last = await this.projectStatus(chainId, address);
219
+ opts.onProgress?.(last);
220
+ if (TERMINAL_INDEX_STATUSES.includes(last.status))
221
+ return last;
222
+ if (Date.now() + intervalMs > deadline) {
223
+ throw new AbxIndexTimeoutError(`${address} was still '${last.status}' after ${Math.round(timeoutMs / 1000)}s — the registration is durable and the service keeps working; check back with \`abx status ${address} --remote\``, last);
224
+ }
225
+ await sleep(intervalMs);
226
+ }
227
+ }
228
+ /** The projects this token may see. */
229
+ async listProjects() {
230
+ const out = (await this.request('GET', '/v1/projects'));
231
+ return out.projects ?? [];
232
+ }
233
+ /** Deregister (remote `abx forget`). `not_registered` means "already gone" — reported, not
234
+ * thrown — but `disabled` still throws: a node that can't accept removals hasn't removed it. */
235
+ async removeProject(chainId, address) {
236
+ try {
237
+ await this.request('DELETE', `/v1/projects/${chainId}/${address}`);
238
+ return { removed: true };
239
+ }
240
+ catch (err) {
241
+ if (err instanceof AbxServiceError && err.code === 'not_registered')
242
+ return { removed: false };
243
+ throw err;
244
+ }
245
+ }
246
+ /** Nudge a re-index. Answers in the same two shapes as {@link registerProject} — a full replay is
247
+ * the *most* likely call to outlive one HTTP request. */
248
+ async reindexProject(chainId, address) {
249
+ const { status, body } = await this.requestWithStatus('POST', `/v1/projects/${chainId}/${address}/reindex`, undefined, {
250
+ onTimeout: async () => {
251
+ const st = await this.projectStatus(chainId, address).catch(() => null);
252
+ return st ? { ok: true, accepted: true, project: { address, status: st.status } } : undefined;
253
+ },
254
+ });
255
+ return normalizeRegisterResult(status, body, address);
256
+ }
257
+ /** Indexing freshness for one project. */
258
+ async projectStatus(chainId, address) {
259
+ return (await this.request('GET', `/v1/projects/${chainId}/${address}/status`));
260
+ }
261
+ /** Publish a render output so a resolver that doesn't share the producer's disk can serve it. */
262
+ async publishEffectArtifact(body) {
263
+ return (await this.request('POST', '/v1/effect-artifacts', body));
264
+ }
265
+ /** Report a run's transient state for the artifact key it is producing. */
266
+ async reportEffectStatus(body) {
267
+ await this.request('POST', '/v1/effect-status', body);
268
+ }
269
+ async request(method, path, body, opts) {
270
+ return (await this.requestWithStatus(method, path, body, opts)).body;
271
+ }
272
+ async requestWithStatus(method, path, body, opts) {
273
+ const attempts = opts?.attempts ?? ATTEMPTS;
274
+ const url = this.baseUrl + path;
275
+ const headers = {};
276
+ if (this.token)
277
+ headers['authorization'] = `Bearer ${this.token}`;
278
+ if (body !== undefined)
279
+ headers['content-type'] = 'application/json';
280
+ let lastFailure = '';
281
+ let lastStatus = 0;
282
+ let lastCode;
283
+ let lastClass;
284
+ for (let attempt = 1; attempt <= attempts; attempt++) {
285
+ let resp;
286
+ try {
287
+ resp = await fetch(url, {
288
+ method,
289
+ headers,
290
+ body: body !== undefined ? JSON.stringify(body) : undefined,
291
+ signal: AbortSignal.timeout(this.timeoutMs),
292
+ });
293
+ }
294
+ catch (err) {
295
+ lastFailure = err.message;
296
+ lastStatus = 0;
297
+ // "We waited the full timeout" and "nothing is listening" are different failures, and for a
298
+ // mutating POST the difference decides whether retrying is safe: the request may still be
299
+ // running on the service. Let the caller check before we hammer it again.
300
+ if (opts?.onTimeout && err.name === 'TimeoutError') {
301
+ const resolved = await opts.onTimeout();
302
+ if (resolved !== undefined)
303
+ return { status: 202, body: resolved };
304
+ }
305
+ if (attempt < attempts)
306
+ await sleep(linearBackoffDelay(attempt, this.retryDelayMs));
307
+ continue;
308
+ }
309
+ if (resp.ok) {
310
+ const text = await resp.text();
311
+ return { status: resp.status, body: text ? JSON.parse(text) : {} };
312
+ }
313
+ if (resp.status >= 500 || resp.status === 429) {
314
+ // Retryable — but KEEP the service's own words. A 5xx body carries the actual cause (an
315
+ // exhausted RPC, a misconfigured node); discarding it left the caller with a bare status and
316
+ // nothing to act on, which is the worst kind of error.
317
+ const said = await bodyMessage(resp);
318
+ lastStatus = resp.status;
319
+ lastCode = said.code;
320
+ lastClass = said.class;
321
+ lastFailure = said.error ? `${resp.status} ${said.error}` : `${resp.status} ${resp.statusText}`;
322
+ if (attempt < attempts)
323
+ await sleep(linearBackoffDelay(attempt, this.retryDelayMs));
324
+ continue;
325
+ }
326
+ // A genuine 4xx is an answer, not weather — surface the service's own words + code.
327
+ const detail = await bodyMessage(resp);
328
+ throw new AbxServiceError(`${method} ${url}: ${resp.status} ${detail.error ?? resp.statusText}`, {
329
+ status: resp.status,
330
+ code: detail.code,
331
+ class: detail.class,
332
+ url,
333
+ });
334
+ }
335
+ // Retries exhausted. Distinguish "nothing answered" from "it answered, badly" — a 500 is not
336
+ // unreachable, and saying so sends the caller looking for a network problem that isn't there.
337
+ const summary = lastStatus
338
+ ? `service failed after ${attempts} attempt(s) — last response ${lastFailure}`
339
+ : `nothing responded after ${attempts} attempt(s) (${lastFailure})`;
340
+ throw new AbxServiceError(`${method} ${url}: ${summary}`, { status: lastStatus, code: lastCode, class: lastClass, url });
341
+ }
342
+ }
343
+ /** Normalize a register/reindex response: the HTTP status is the authoritative discriminator, and
344
+ * the `accepted` flag is derived from it so callers switch on one field even against a service that
345
+ * doesn't send it. */
346
+ function normalizeRegisterResult(status, out, fallbackAddress) {
347
+ if (status === 202) {
348
+ const r = out;
349
+ return {
350
+ ok: r.ok ?? true,
351
+ accepted: true,
352
+ project: {
353
+ address: r.project?.address ?? fallbackAddress,
354
+ name: r.project?.name ?? null,
355
+ status: r.project?.status ?? 'backfilling',
356
+ },
357
+ };
358
+ }
359
+ return { ...out, accepted: false };
360
+ }
361
+ /** The service's own `{error, code, class?}` from a non-2xx body (never throws — a body may be
362
+ * empty/HTML). `class` is the optional credential-free failure hint. */
363
+ async function bodyMessage(resp) {
364
+ try {
365
+ const parsed = (await resp.json());
366
+ return {
367
+ error: parsed.error,
368
+ code: parsed.code,
369
+ class: parsed.class,
370
+ };
371
+ }
372
+ catch {
373
+ return {};
374
+ }
375
+ }
376
+ //# sourceMappingURL=service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAC,kBAAkB,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,CAAC;IACJ,CAAC;IACD,OAAO,EAAC,GAAI,GAA8B,EAAE,QAAQ,EAAE,KAAK,EAAC,CAAC;AAC/D,CAAC;AASD;yEACyE;AACzE,KAAK,UAAU,WAAW,CAAC,IAAc;IACvC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAoD,CAAC;QACtF,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,IAAI,EAAE,MAAM,CAAC,IAAoC;YACjD,KAAK,EAAE,MAAM,CAAC,KAAoC;SACnD,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
@@ -0,0 +1,95 @@
1
+ import type { Address, Hex, PublicClient } from 'viem';
2
+ import { type ChunkStoreEvent, type ContentTxPlan } from './chunks.js';
3
+ import type { SendTx } from './execute.js';
4
+ /**
5
+ * Content staging — putting a field's bytes on-chain behind the shared multi-chunk store/reader
6
+ * (`AbxChunkStore`), the SDK-native counterpart of {@link ChunkStoreEvent}'s bootstrap: this module
7
+ * layers the *content* side (plan → resolve a store → write chunks → encode the `reader` value) on
8
+ * top of `chunks.ts`'s primitives (`planChunks`/`planContentTxs`/`stageContent`/`ensureChunkStore`)
9
+ * and `token.ts`'s `encodeReader`, so an integrator gets ONE call instead of hand-wiring all four —
10
+ * the same reasoning `ensureChunkStore`'s own doc comment gives for the store half.
11
+ *
12
+ * `gzip` is deliberately NOT performed here: it's a Node-only transform (`node:zlib`), and this
13
+ * module is reachable from the browser bundle (browser-bundle.test.ts) like the rest of the SDK
14
+ * core. Callers that support `compress: 'gzip'` (the CLI) gzip the bytes themselves and hand the
15
+ * already-compressed result in as `content` — see {@link planStagedContent}.
16
+ */
17
+ /** How staged content is compressed before chunking. `fastlz` is per-chunk and pure-JS
18
+ * ({@link planChunks} does it right here); `gzip` compresses the WHOLE content off-chain (the
19
+ * caller's job — see the module doc) and decodes off-chain too, hence the `reader-gzip`
20
+ * representation rather than `reader`. */
21
+ export type Compress = 'none' | 'fastlz' | 'gzip';
22
+ export declare const ONCHAIN_IMAGE_SOFT_LIMIT: number;
23
+ export declare const ONCHAIN_PROJECT_SOFT_LIMIT: number;
24
+ /** Whether `bytesLen` is past the point where on-chain storage stops being the cost-sane choice —
25
+ * the pure predicate behind the CLI's large-file warning (kept here so the SDK and the CLI can't
26
+ * disagree about the threshold). */
27
+ export declare function exceedsOnchainSoftLimit(bytesLen: number): boolean;
28
+ /** The plan for staging one piece of content: how it chunks, how it compresses, and the
29
+ * transaction shape ({@link planContentTxs}) that staging it will take. */
30
+ export interface ContentPlan {
31
+ content: Uint8Array;
32
+ fastlz: boolean;
33
+ chunks: number;
34
+ stagedBytes: number;
35
+ plan: ContentTxPlan;
36
+ representation: string;
37
+ }
38
+ /**
39
+ * Pure staging plan for a piece of content — chunk count + transaction shape — with NO chain
40
+ * writes, no signer, no `ensureChunkStore`. Shared by {@link stageFieldContent} (which then
41
+ * actually stages) and a dry-run preview, so the count a human is told up front is the same one
42
+ * real staging produces. `content` must already be in its final pre-chunking form — gzipped when
43
+ * `compress === 'gzip'` (see the module doc for why that step isn't here). `chunkSize` defaults to
44
+ * {@link planChunks}'s default (currently 22 KB), so e.g. a 2.8 KB SVG is 1 chunk.
45
+ */
46
+ export declare function planStagedContent(content: Uint8Array, compress: Compress): ContentPlan;
47
+ /** Progress from {@link stageFieldContent}, so a caller can narrate without the SDK printing
48
+ * anything itself (mirrors {@link ChunkStoreEvent} / `AnchorEvent`'s vocabulary). `chunk-store`
49
+ * simply forwards `ensureChunkStore`'s own event — staging always resolves one. */
50
+ export type StagingEvent = {
51
+ kind: 'chunk-store';
52
+ event: ChunkStoreEvent;
53
+ } | {
54
+ kind: 'planned';
55
+ field: string;
56
+ store: Address;
57
+ contentPlan: ContentPlan;
58
+ } | {
59
+ kind: 'staged';
60
+ field: string;
61
+ manifest: Address;
62
+ txHashes: Hex[];
63
+ };
64
+ export interface StageFieldContentArgs {
65
+ /** Content bytes, already in their final pre-chunking form (gzipped by the caller when
66
+ * `compress === 'gzip'` — see the module doc). */
67
+ content: Uint8Array;
68
+ compress: Compress;
69
+ /** The metadata field this content is destined for — narration only (e.g. `'image'`). */
70
+ field: string;
71
+ send: SendTx;
72
+ publicClient: PublicClient;
73
+ chainId: number;
74
+ /** Pre-resolved store (batch staging reuses one across files); else resolve/deploy via
75
+ * {@link ensureChunkStore}. */
76
+ store?: Address;
77
+ onEvent?: (e: StagingEvent) => void;
78
+ }
79
+ /**
80
+ * Put `content` on-chain as SSTORE2 chunks behind the shared reader, and return the field's
81
+ * `(representation, value)`. `fastlz` compresses per chunk (reader decodes on read → stays
82
+ * on-chain renderable); `gzip` compresses the whole content (off-chain decode → the
83
+ * `reader-gzip` representation, not on-chain renderable).
84
+ *
85
+ * Staging is one atomic `writeContent` (content fits a single tx's gas) or gas-bounded chunk-write
86
+ * `multicall`s plus a final manifest write — {@link stageContent} picks. These store writes use
87
+ * `send` (typically the env key on the hot lane, or the connected wallet on the wallet lane) — the
88
+ * data contracts are ownerless, so any funded signer may write them; the caller signs the field-set
89
+ * that references the manifest separately.
90
+ */
91
+ export declare function stageFieldContent(args: StageFieldContentArgs): Promise<{
92
+ value: Hex;
93
+ representation: string;
94
+ }>;
95
+ //# sourceMappingURL=staging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staging.d.ts","sourceRoot":"","sources":["../src/staging.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAE,GAAG,EAAE,YAAY,EAAC,MAAM,MAAM,CAAC;AACrD,OAAO,EAA6D,KAAK,eAAe,EAAE,KAAK,aAAa,EAAC,MAAM,aAAa,CAAC;AAGjI,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEzC;;;;;;;;;;;;GAYG;AAEH;;;2CAG2C;AAC3C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAA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AAI,CAAC;CACrC;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC;IAAC,KAAK,EAAE,GAAG,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAC,CAAC,CAalH"}
@@ -0,0 +1,57 @@
1
+ import { ensureChunkStore, planChunks, planContentTxs, stageContent } from './chunks.js';
2
+ import { encodeReader } from './token.js';
3
+ import { METADATA_REPRESENTATION as R } from './spine.js';
4
+ // On-chain image storage costs ~200 gas/byte (SSTORE2 code deposit) + per-chunk tx overhead, so it
5
+ // is cost-effective ONLY for tiny art. Past these soft limits, off-chain (Arweave pay-once, or a
6
+ // hosted resolver + IPFS) is FAR cheaper — on-chain's remaining edge is self-resolution, not cost.
7
+ // Per-file limit ≈ one 22 KB storage chunk; project limit caps the whole collection's gas.
8
+ export const ONCHAIN_IMAGE_SOFT_LIMIT = 24 * 1024; // per file
9
+ export const ONCHAIN_PROJECT_SOFT_LIMIT = 256 * 1024; // whole collection
10
+ /** Whether `bytesLen` is past the point where on-chain storage stops being the cost-sane choice —
11
+ * the pure predicate behind the CLI's large-file warning (kept here so the SDK and the CLI can't
12
+ * disagree about the threshold). */
13
+ export function exceedsOnchainSoftLimit(bytesLen) {
14
+ return bytesLen > ONCHAIN_IMAGE_SOFT_LIMIT;
15
+ }
16
+ /**
17
+ * Pure staging plan for a piece of content — chunk count + transaction shape — with NO chain
18
+ * writes, no signer, no `ensureChunkStore`. Shared by {@link stageFieldContent} (which then
19
+ * actually stages) and a dry-run preview, so the count a human is told up front is the same one
20
+ * real staging produces. `content` must already be in its final pre-chunking form — gzipped when
21
+ * `compress === 'gzip'` (see the module doc for why that step isn't here). `chunkSize` defaults to
22
+ * {@link planChunks}'s default (currently 22 KB), so e.g. a 2.8 KB SVG is 1 chunk.
23
+ */
24
+ export function planStagedContent(content, compress) {
25
+ const fastlz = compress === 'fastlz';
26
+ const planned = planChunks(content, { fastlz });
27
+ const plan = planContentTxs(planned);
28
+ const representation = compress === 'gzip' ? R.readerGzip : R.reader;
29
+ const stagedBytes = planned.reduce((n, c) => n + c.data.length, 0);
30
+ return { content, fastlz, chunks: planned.length, stagedBytes, plan, representation };
31
+ }
32
+ /**
33
+ * Put `content` on-chain as SSTORE2 chunks behind the shared reader, and return the field's
34
+ * `(representation, value)`. `fastlz` compresses per chunk (reader decodes on read → stays
35
+ * on-chain renderable); `gzip` compresses the whole content (off-chain decode → the
36
+ * `reader-gzip` representation, not on-chain renderable).
37
+ *
38
+ * Staging is one atomic `writeContent` (content fits a single tx's gas) or gas-bounded chunk-write
39
+ * `multicall`s plus a final manifest write — {@link stageContent} picks. These store writes use
40
+ * `send` (typically the env key on the hot lane, or the connected wallet on the wallet lane) — the
41
+ * data contracts are ownerless, so any funded signer may write them; the caller signs the field-set
42
+ * that references the manifest separately.
43
+ */
44
+ export async function stageFieldContent(args) {
45
+ const notify = args.onEvent ?? (() => { });
46
+ const p = planStagedContent(args.content, args.compress);
47
+ const resolvedStore = args.store ??
48
+ (await ensureChunkStore(args.publicClient, args.send, {
49
+ chainId: args.chainId,
50
+ onEvent: (e) => notify({ kind: 'chunk-store', event: e }),
51
+ }));
52
+ notify({ kind: 'planned', field: args.field, store: resolvedStore, contentPlan: p });
53
+ const { manifest, txHashes } = await stageContent(args.send, { store: resolvedStore, content: p.content, fastlz: p.fastlz, chainId: args.chainId });
54
+ notify({ kind: 'staged', field: args.field, manifest, txHashes });
55
+ return { value: encodeReader(resolvedStore, manifest), representation: p.representation };
56
+ }
57
+ //# sourceMappingURL=staging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"staging.js","sourceRoot":"","sources":["../src/staging.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAA2C,MAAM,aAAa,CAAC;AACjI,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,uBAAuB,IAA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,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACzD,MAAM,aAAa,GACjB,IAAI,CAAC,KAAK;QACV,CAAC,MAAM,gBAAgB,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE;YACpD,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EAAC,CAAC;SACxD,CAAC,CAAC,CAAC;IACN,MAAM,CAAC,EAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,EAAC,CAAC,CAAC;IACnF,MAAM,EAAC,QAAQ,EAAE,QAAQ,EAAC,GAAG,MAAM,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,EAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAC,CAAC,CAAC;IAChJ,MAAM,CAAC,EAAC,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAC,CAAC,CAAC;IAChE,OAAO,EAAC,KAAK,EAAE,YAAY,CAAC,aAAa,EAAE,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,cAAc,EAAC,CAAC;AAC1F,CAAC"}
@@ -1,5 +1,24 @@
1
- import { type Hex, type PublicClient } from 'viem';
2
- import type { MetadataField, ProjectState, TokenState } from './types.js';
1
+ import { type Address, type Hex, type PublicClient } from 'viem';
2
+ import type { MetadataField, ParamSchema, ParamValue, ProjectState, TokenState } from './types.js';
3
+ /**
4
+ * The canonical `tokenData` assembly — the off-chain serializer the spec names as
5
+ * authoritative (`specs/protocol/code-projects.md`). One flat object: the reserved
6
+ * coordinates + every param (contract ∪ token scope, token wins) + the augment hook's
7
+ * entries (augment wins per key), every value its canonical string (`chainId` alone is
8
+ * a number). The serialization is canonical because it is *hashed*: an effect's
9
+ * `inputsHash` commits to it, so this exact byte shape is what makes render outputs
10
+ * addressable and self-invalidating.
11
+ *
12
+ * Decode rules: a schema'd param decodes per its type (`Select` → the option string,
13
+ * `DecimalRange` ÷ 1e10, …); a schema-less literal stays the raw `bytes32` hex (a
14
+ * schema is what buys a human decode — `seed` is the canonical example); a data-backed
15
+ * value reads its blob (`String` → UTF-8, `Bytes`/schema-less → base64).
16
+ */
17
+ /** The tokenData coordinates — never enumerable as params (the on-chain params store excludes
18
+ * `seed` from its key lists, and the generator/renderer skip the other three defensively).
19
+ * Exported because every off-chain surface that enumerates params must exclude exactly this
20
+ * set: two lists that have to agree are one list. */
21
+ export declare const RESERVED_TOKEN_DATA_KEYS: ReadonlySet<string>;
3
22
  export interface TokenDataResult {
4
23
  /** The flat object (values are canonical strings; `chainId` is a number). */
5
24
  data: Record<string, string | number>;
@@ -47,4 +66,45 @@ export declare function contentDigestOf(state: ProjectState): Hex | null;
47
66
  * resolver) agree on where a run's artifacts live, over any storage backend.
48
67
  */
49
68
  export declare function renderArtifactKey(chainId: number, address: string, tokenId: string, hash: Hex, outputKey?: string, effectKey?: string): Hex;
69
+ /**
70
+ * The **bound** effect outputs — `specs/protocol/effects.md → Bound vs referenced`. An output is
71
+ * bound iff a binding stitches its *content* into the metadata JSON, which is what decides who holds
72
+ * its bytes:
73
+ *
74
+ * - **bound** (`render/traits` → `attributes`): the serving node holds the content, capped at
75
+ * {@link BOUND_ARTIFACT_MAX_BYTES} and servable only at the current settled `inputsHash`. A
76
+ * locator here cannot work — the content is assembled into `tokenURI`, so a locator would put a
77
+ * third-party fetch on the hottest read the resolver serves.
78
+ * - **referenced** (everything else — `render/image` projects a *URL*, a `video`/`model` only
79
+ * appears in the manifest): the PRODUCER holds the bytes and the node stores a locator. Holding
80
+ * these bytes buys a node no capability (it redirects either way) and costs it an object store.
81
+ *
82
+ * This is the wire rule for `POST /v1/effect-artifacts` in both directions: bytes for a referenced
83
+ * output and a locator for a bound one are each a `400`. Growing this set is an interface change —
84
+ * every serving node must be able to stitch a bound output's content.
85
+ */
86
+ export declare const BOUND_EFFECT_OUTPUTS: ReadonlySet<string>;
87
+ /** The cap a serving node MUST accept per bound output and MUST refuse above (~100× a real traits
88
+ * payload — generous for JSON, far too small to become blob storage). */
89
+ export declare const BOUND_ARTIFACT_MAX_BYTES: number;
90
+ /** Is `{effectKey}/{outputKey}` a bound output — content the serving node must hold and stitch?
91
+ * Unknown effects answer `false`: an output a node can't stitch is referenced by definition, since
92
+ * bytes it can't stitch are bytes it could only redirect to. */
93
+ export declare function isBoundOutput(effectKey: string, outputKey: string): boolean;
94
+ /** One param's canonical decode, with the blob's SIZE alongside. */
95
+ export interface DecodedParam {
96
+ /** The canonical string — what tokenData carries for this key. */
97
+ value: string;
98
+ /** A data-backed param's full content length in bytes; `null` for a literal, and for a blob
99
+ * that didn't read (the value degraded to the hash). Callers that bound inline content —
100
+ * the off-chain resolver's `abx_params`, mirroring the on-chain renderer's inline ceiling —
101
+ * measure THIS, the same length the chain measures. */
102
+ contentBytes: number | null;
103
+ }
104
+ /**
105
+ * The canonical per-param decode — the one implementation every off-chain surface shares
106
+ * (tokenData assembly here, `abx_params` in the resolver), so a value reads the same
107
+ * everywhere and stays byte-parallel with the on-chain generator and renderer.
108
+ */
109
+ export declare function decodeParam(client: PublicClient | null, token: Address, tokenId: string, p: ParamValue, tokenScope: boolean, schema: ParamSchema | undefined): Promise<DecodedParam>;
50
110
  //# sourceMappingURL=tokendata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tokendata.d.ts","sourceRoot":"","sources":["../src/tokendata.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,GAAG,EACR,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAGd,OAAO,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