@artblocks/abx-token-api 0.1.0-alpha.5 → 0.1.0-alpha.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +155 -0
- package/dist/code.d.ts +33 -12
- package/dist/code.d.ts.map +1 -1
- package/dist/code.js +68 -56
- package/dist/code.js.map +1 -1
- package/dist/{art.d.ts → content.d.ts} +5 -5
- package/dist/content.d.ts.map +1 -0
- package/dist/{art.js → content.js} +6 -6
- package/dist/content.js.map +1 -0
- package/dist/control-plane.d.ts +24 -13
- package/dist/control-plane.d.ts.map +1 -1
- package/dist/control-plane.js +289 -43
- package/dist/control-plane.js.map +1 -1
- package/dist/dashboard.d.ts.map +1 -1
- package/dist/dashboard.js +55 -8
- package/dist/dashboard.js.map +1 -1
- package/dist/deps.d.ts +28 -110
- package/dist/deps.d.ts.map +1 -1
- package/dist/deps.js +34 -184
- package/dist/deps.js.map +1 -1
- package/dist/index.d.ts +8 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -11
- package/dist/index.js.map +1 -1
- package/dist/metadata.d.ts +87 -4
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +343 -105
- package/dist/metadata.js.map +1 -1
- package/dist/resolve.d.ts +0 -2
- package/dist/resolve.d.ts.map +1 -1
- package/dist/resolve.js +0 -5
- package/dist/resolve.js.map +1 -1
- package/dist/server.d.ts +4 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +257 -70
- package/dist/server.js.map +1 -1
- package/dist/watcher.d.ts +1 -1
- package/dist/watcher.d.ts.map +1 -1
- package/dist/watcher.js +137 -8
- package/dist/watcher.js.map +1 -1
- package/package.json +9 -8
- package/dist/abxjs.d.ts +0 -13
- package/dist/abxjs.d.ts.map +0 -1
- package/dist/abxjs.js +0 -49
- package/dist/abxjs.js.map +0 -1
- package/dist/art.d.ts.map +0 -1
- package/dist/art.js.map +0 -1
- package/dist/inline.d.ts +0 -19
- package/dist/inline.d.ts.map +0 -1
- package/dist/inline.js +0 -23
- package/dist/inline.js.map +0 -1
package/dist/dashboard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { explorerUrl } from '@artblocks/abx-sdk';
|
|
1
|
+
import { editionCapOf, explorerUrl } from '@artblocks/abx-sdk';
|
|
2
2
|
/** Wrap page content in the shared, dependency-free HTML shell. */
|
|
3
3
|
function page(title, baseUrl, body) {
|
|
4
4
|
return `<!doctype html>
|
|
@@ -54,10 +54,11 @@ function renderProject(s, baseUrl, chainId) {
|
|
|
54
54
|
const canonical = s.isCanonical
|
|
55
55
|
? `<span class="badge ok">✓ canonical — factory-verified</span>`
|
|
56
56
|
: `<span class="badge warn">discovery only — unverified</span>`;
|
|
57
|
+
const isEdition = s.contractType === '1of1-edition' || s.contractType === 'edition' || s.contractType === 'edition-code';
|
|
57
58
|
return `
|
|
58
59
|
<section class="grid" data-address="${esc(s.address)}">
|
|
59
|
-
<div class="
|
|
60
|
-
<div class="
|
|
60
|
+
<div class="work-col">
|
|
61
|
+
<div class="work">${img ? `<img src="${esc(img)}" alt="token image"/>` : 'no token'}</div>
|
|
61
62
|
<div class="links">
|
|
62
63
|
<a href="${baseUrl}/t/${chainId}/${s.address}/${tok?.tokenId ?? '0'}" target="_blank">tokenURI JSON →</a>
|
|
63
64
|
<a href="${baseUrl}/c/${chainId}/${s.address}" target="_blank">contractURI JSON →</a>
|
|
@@ -72,9 +73,9 @@ function renderProject(s, baseUrl, chainId) {
|
|
|
72
73
|
</div>
|
|
73
74
|
|
|
74
75
|
<div class="facts">
|
|
75
|
-
${fact('Token #0', tok
|
|
76
|
-
${fact('Owner', tok?.
|
|
77
|
-
${fact('Royalty',
|
|
76
|
+
${fact('Token #0', tokenBadge(tok))}
|
|
77
|
+
${isEdition ? supplyFacts(tok) : fact('Owner', tok?.lifecycle === 'live' && tok.owner ? linkAddr(tok.owner, chainId) : s.owner ? `${linkAddr(s.owner, chainId)} <span class="muted">(admin)</span>` : '—')}
|
|
78
|
+
${fact('Royalty', royaltyFact(s))}
|
|
78
79
|
${fact('ABX core version', s.abxVersion !== null ? `v${s.abxVersion}` : '—')}
|
|
79
80
|
${fact('Implementation', s.implementation ? linkAddr(s.implementation, chainId) : '—')}
|
|
80
81
|
</div>
|
|
@@ -135,6 +136,52 @@ function eventRow(e, chainId) {
|
|
|
135
136
|
function fact(label, value) {
|
|
136
137
|
return `<div class="f"><span class="fl">${esc(label)}</span><span class="fv">${value}</span></div>`;
|
|
137
138
|
}
|
|
139
|
+
/** An edition has many concurrent holders per id, not a single owner — the per-token dashboard
|
|
140
|
+
* fact swaps `Owner` for the copies-in-circulation figure ("12 / 100", or "12 (open)" when
|
|
141
|
+
* uncapped) and the live holder count. Both fold straight from TransferSingle/TransferBatch
|
|
142
|
+
* (`reconstruct.ts`), so an unminted id (no `tok`, or one the fold has never touched) reads "0".
|
|
143
|
+
*
|
|
144
|
+
* The cap goes through {@link editionCapOf} rather than truthiness on `maxSupply`, which was wrong
|
|
145
|
+
* in both directions: it called every `--copies N` id "open" (the fold carried no cap for an id
|
|
146
|
+
* that inherits the collection default — the default shape), and a `'0'` string is truthy, so an
|
|
147
|
+
* id deliberately closed would have read "12 / 0" instead of saying closed. */
|
|
148
|
+
/** Token #0's lifecycle as a badge. A burned token gets its own — it used to render "minted", which
|
|
149
|
+
* is how a destroyed token looked exactly like a live one on the operator's own dashboard. */
|
|
150
|
+
function tokenBadge(tok) {
|
|
151
|
+
if (tok?.lifecycle === 'live')
|
|
152
|
+
return '<span class="badge ok">minted</span>';
|
|
153
|
+
if (tok?.lifecycle === 'burned')
|
|
154
|
+
return '<span class="badge warn">burned</span>';
|
|
155
|
+
// An edition id at zero is not "not yet minted" — it may have been minted and fully burned, and it
|
|
156
|
+
// can mint again. Saying "no live copies" is the only claim the state actually supports.
|
|
157
|
+
if (tok?.lifecycle === 'no-live-copies')
|
|
158
|
+
return '<span class="badge warn">no live copies</span>';
|
|
159
|
+
return '<span class="badge warn">not yet minted</span>';
|
|
160
|
+
}
|
|
161
|
+
/** The royalty rate WITH its ceiling. Shown as a pair because the rate alone is half the fact: the
|
|
162
|
+
* owner can raise it to the ceiling unilaterally, and reducing the ceiling to the current rate is
|
|
163
|
+
* what makes a rate a promise. `null` ceiling ⇒ the contract publishes none; say so rather than
|
|
164
|
+
* quoting a default it never committed to. */
|
|
165
|
+
function royaltyFact(s) {
|
|
166
|
+
if (!s.royalty)
|
|
167
|
+
return 'none';
|
|
168
|
+
const rate = `${(s.royalty.bps / 100).toFixed(2)}% → ${shorten(s.royalty.receiver)}`;
|
|
169
|
+
if (s.maxRoyaltyBps == null)
|
|
170
|
+
return `${rate} <span class="muted">(ceiling not published)</span>`;
|
|
171
|
+
const headroom = s.maxRoyaltyBps > s.royalty.bps;
|
|
172
|
+
return `${rate} <span class="muted">(ceiling ${(s.maxRoyaltyBps / 100).toFixed(2)}%${headroom ? ', raisable to it' : ' — locked to the rate'})</span>`;
|
|
173
|
+
}
|
|
174
|
+
function supplyFacts(tok) {
|
|
175
|
+
const supply = tok?.supply ?? '0';
|
|
176
|
+
const cap = tok ? editionCapOf(tok) : null;
|
|
177
|
+
const holders = tok?.holders ? Object.keys(tok.holders).length : 0;
|
|
178
|
+
const copies = cap?.kind === 'capped'
|
|
179
|
+
? `${esc(supply)} / ${esc(cap.cap)}`
|
|
180
|
+
: cap?.kind === 'closed'
|
|
181
|
+
? `${esc(supply)} (closed — no more can be minted)`
|
|
182
|
+
: `${esc(supply)} (open)`;
|
|
183
|
+
return `${fact('Supply', copies)}${fact('Holders', String(holders))}`;
|
|
184
|
+
}
|
|
138
185
|
function linkAddr(a, chainId) {
|
|
139
186
|
return `<a href="${explorerUrl(chainId)}/address/${a}" target="_blank">${shorten(a)} ↗</a>`;
|
|
140
187
|
}
|
|
@@ -186,8 +233,8 @@ h1{font-size:40px;line-height:1.1;letter-spacing:-.02em;margin-bottom:16px}
|
|
|
186
233
|
.intro p{color:var(--dim);max-width:680px;font-size:17px}
|
|
187
234
|
.intro strong{color:var(--ink)}
|
|
188
235
|
.grid{display:grid;grid-template-columns:340px 1fr;gap:32px;margin-bottom:40px}
|
|
189
|
-
.
|
|
190
|
-
.
|
|
236
|
+
.work{aspect-ratio:1;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--card)}
|
|
237
|
+
.work img{width:100%;height:100%;display:block}
|
|
191
238
|
.links{display:flex;flex-direction:column;gap:6px;margin-top:14px;font-size:13px;font-family:var(--mono)}
|
|
192
239
|
h2{font-size:26px;letter-spacing:-.01em}h2 .sym{color:var(--faint);font-size:16px;font-family:var(--mono)}
|
|
193
240
|
.chip-row{display:flex;gap:10px;align-items:center;margin:12px 0 20px;flex-wrap:wrap}
|
package/dist/dashboard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../src/dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,WAAW,EAAqC,MAAM,oBAAoB,CAAC;AAEjG,mEAAmE;AACnE,SAAS,IAAI,CAAC,KAAa,EAAE,OAAe,EAAE,IAAY;IACxD,OAAO;;;;SAIA,GAAG,CAAC,KAAK,CAAC;SACV,GAAG;;;;kCAIsB,GAAG,CAAC,OAAO,CAAC;;QAEtC,IAAI;;;;eAIG,CAAC;AAChB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,OAAqB,EAAE,OAAe,EAAE,OAAe;IACrF,OAAO,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,OAAO,QAAQ,EAAE,OAAO,EAAE;;;UAGzD,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,cAAc,CAAC;sDACS,OAAO;;IAEzD,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,C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AC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,OAAO,CAAC,GAAW;IAC1B,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IACjE,IAAI,IAAI,GAAG,EAAE;QAAE,OAAO,GAAG,IAAI,OAAO,CAAC;IACrC,IAAI,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,OAAO,CAAC;IACxD,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC;AAC3C,CAAC;AAED,SAAS,GAAG,CAAC,CAAS;IACpB,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,EAAC,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC;AAC3H,CAAC;AAED,gGAAgG;AAChG,4FAA4F;AAC5F,MAAM,WAAW,GAAG;;;;;WAKT,CAAC;AAEZ,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEX,CAAC"}
|
package/dist/deps.d.ts
CHANGED
|
@@ -1,123 +1,41 @@
|
|
|
1
|
-
import { type Address, type DependencyInfo, type ProjectState, type PublicClient } from '@artblocks/abx-sdk';
|
|
1
|
+
import { activeRegistry, dependencyScriptTags as sdkDependencyScriptTags, DEPENDENCY_REGISTRY_ABI, registryDepUrl, resolveRegistryDep as sdkResolveRegistryDep, URL_BUDGET_BYTES, type Address, type DependencyInfo, type ProjectState, type PublicClient, type RegistryResolution } from '@artblocks/abx-sdk';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
3
|
+
* The resolver-only half of the dependency-registry lane: the query-string size budget and the
|
|
4
|
+
* directory-serving observability surface that `GET /api/deps/:chainId/:addr` reports.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* The registry-resolution vocabulary itself — `DEPENDENCY_REGISTRY_ABI`, `activeRegistry`,
|
|
7
|
+
* `resolveRegistryDep`, `registryDepUrl`, `dependencyScriptTags`, `URL_BUDGET_BYTES` — lives in
|
|
8
|
+
* `@artblocks/abx-sdk` (src/deps.ts): it is chain-read and
|
|
9
|
+
* string-assembly logic with no resolver-specific behavior, so a third-party provider or the
|
|
10
|
+
* CLI's offline preview can now share the identical resolution order instead of reimplementing
|
|
11
|
+
* it. This module re-exports that family below, PRE-WIRED with `nodeInflate`
|
|
12
|
+
* (`@artblocks/abx-sdk/node`) — the SDK core takes decompression as an injected `inflate` rather
|
|
13
|
+
* than importing `node:zlib` directly (it has to stay reachable from a browser bundle), and this
|
|
14
|
+
* resolver runs on Node, so the wiring happens once, here, rather than at every call site.
|
|
8
15
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* This module also owns the query-string size budget for URL-carried tokenData (~8KB
|
|
16
|
-
* request-line caps at gateway front-ends). It applies only to the directory 302 fallback
|
|
17
|
-
* — the primary inline-injection path carries tokenData inside the document. Over-budget
|
|
18
|
-
* redirects are still served IN FULL (never silently drop params), but warn loudly — once
|
|
19
|
-
* per project per process, then debug.
|
|
16
|
+
* What stays here: `depStatusReport`'s per-dep status assembly (a read-only dry run of the same
|
|
17
|
+
* resolution the generator document uses, sharing its cache), the query-string budget check +
|
|
18
|
+
* flag (`checkUrlBudget`/`urlBudgetStatus`), and which directory-serving path a live view
|
|
19
|
+
* actually took (`recordDirectoryServe`) — all resolver-serving observability, not resolution
|
|
20
|
+
* rules, so they don't belong in the neutral layer.
|
|
20
21
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
readonly type: "bytes32";
|
|
29
|
-
}];
|
|
30
|
-
readonly outputs: readonly [{
|
|
31
|
-
readonly name: "nameAndVersion";
|
|
32
|
-
readonly type: "string";
|
|
33
|
-
}, {
|
|
34
|
-
readonly name: "licenseType";
|
|
35
|
-
readonly type: "string";
|
|
36
|
-
}, {
|
|
37
|
-
readonly name: "preferredCDN";
|
|
38
|
-
readonly type: "string";
|
|
39
|
-
}, {
|
|
40
|
-
readonly name: "additionalCDNCount";
|
|
41
|
-
readonly type: "uint24";
|
|
42
|
-
}, {
|
|
43
|
-
readonly name: "preferredRepository";
|
|
44
|
-
readonly type: "string";
|
|
45
|
-
}, {
|
|
46
|
-
readonly name: "additionalRepositoryCount";
|
|
47
|
-
readonly type: "uint24";
|
|
48
|
-
}, {
|
|
49
|
-
readonly name: "dependencyWebsite";
|
|
50
|
-
readonly type: "string";
|
|
51
|
-
}, {
|
|
52
|
-
readonly name: "availableOnChain";
|
|
53
|
-
readonly type: "bool";
|
|
54
|
-
}, {
|
|
55
|
-
readonly name: "scriptCount";
|
|
56
|
-
readonly type: "uint24";
|
|
57
|
-
}];
|
|
58
|
-
}, {
|
|
59
|
-
readonly type: "function";
|
|
60
|
-
readonly name: "getDependencyScript";
|
|
61
|
-
readonly stateMutability: "view";
|
|
62
|
-
readonly inputs: readonly [{
|
|
63
|
-
readonly name: "dependencyNameAndVersion";
|
|
64
|
-
readonly type: "bytes32";
|
|
65
|
-
}, {
|
|
66
|
-
readonly name: "index";
|
|
67
|
-
readonly type: "uint256";
|
|
68
|
-
}];
|
|
69
|
-
readonly outputs: readonly [{
|
|
70
|
-
readonly type: "string";
|
|
71
|
-
}];
|
|
72
|
-
}];
|
|
73
|
-
/** What a registry ref resolved to: on-chain bytes (gunzipped, inline-ready JS) or a CDN URL. */
|
|
74
|
-
export type RegistryResolution = {
|
|
75
|
-
kind: 'onchain';
|
|
76
|
-
script: string;
|
|
77
|
-
} | {
|
|
78
|
-
kind: 'cdn';
|
|
79
|
-
url: string;
|
|
80
|
-
};
|
|
81
|
-
/** Reset all in-process dependency state (cache + budget flags + serve modes) — for tests. */
|
|
22
|
+
export { DEPENDENCY_REGISTRY_ABI, activeRegistry, registryDepUrl, URL_BUDGET_BYTES, type RegistryResolution };
|
|
23
|
+
/** `resolveRegistryDep`, pre-wired with `nodeInflate` — same signature callers here always used. */
|
|
24
|
+
export declare function resolveRegistryDep(client: PublicClient, registry: Address, dep: DependencyInfo): ReturnType<typeof sdkResolveRegistryDep>;
|
|
25
|
+
/** `dependencyScriptTags`, pre-wired with `nodeInflate` — same signature callers here always used. */
|
|
26
|
+
export declare function dependencyScriptTags(client: PublicClient, state: ProjectState): ReturnType<typeof sdkDependencyScriptTags>;
|
|
27
|
+
/** Reset all in-process dependency state (the SDK's registry-resolution cache + this module's
|
|
28
|
+
* budget flags + serve modes) — for tests. */
|
|
82
29
|
export declare function resetDependencyResolutionState(): void;
|
|
83
|
-
/** The collection's registry pointer, if set to a real address (zero/undefined ⇒ none). */
|
|
84
|
-
export declare function activeRegistry(state: ProjectState): Address | null;
|
|
85
|
-
/**
|
|
86
|
-
* Resolve one `name@version` ref through the collection's registry. Returns the resolution
|
|
87
|
-
* (or null when the registry couldn't answer — caller falls back to the built-in map) plus
|
|
88
|
-
* whether it was served from cache. Never throws; a fresh failure logs ONE warn (the
|
|
89
|
-
* negative cache rate-limits it) naming the dep and why.
|
|
90
|
-
*/
|
|
91
|
-
export declare function resolveRegistryDep(client: PublicClient, registry: Address, dep: DependencyInfo): Promise<{
|
|
92
|
-
resolution: RegistryResolution | null;
|
|
93
|
-
cached: boolean;
|
|
94
|
-
error?: string;
|
|
95
|
-
}>;
|
|
96
|
-
/**
|
|
97
|
-
* Resolve a `name@version` registry ref to a CDN URL — the built-in reference convention,
|
|
98
|
-
* the LAST-resort rung of the resolution order (the soft registry pointer stays
|
|
99
|
-
* non-validating). Known runtimes get their real dist paths; anything else is best-effort npm.
|
|
100
|
-
*/
|
|
101
|
-
export declare function registryDepUrl(ref: string): string | null;
|
|
102
|
-
/**
|
|
103
|
-
* The ordered dependency `<script>` tags for the generator document, each dep resolved per
|
|
104
|
-
* the Consumers table: registry on-chain bytes → registry preferredCDN → built-in map;
|
|
105
|
-
* `onchain`-resolution refs read their SSTORE2 data contract directly (never a registry).
|
|
106
|
-
* Never throws — an unresolvable dep is skipped (after the warn) and the document assembles.
|
|
107
|
-
*/
|
|
108
|
-
export declare function dependencyScriptTags(client: PublicClient, state: ProjectState): Promise<string[]>;
|
|
109
30
|
export type DirectoryServeMode = 'inline-injection' | 'redirect-fallback';
|
|
110
31
|
/** Record which directory serving path a live-view request actually took. */
|
|
111
32
|
export declare function recordDirectoryServe(address: string, mode: DirectoryServeMode): void;
|
|
112
|
-
/** Gateway front-ends commonly cap request lines near 8KB — the spec's URL budget. It
|
|
113
|
-
* applies to URL-carried `?abx=` payloads (the 302 fallback); resolver inline serving
|
|
114
|
-
* injects tokenData into the document and is unaffected. */
|
|
115
|
-
export declare const URL_BUDGET_BYTES = 8192;
|
|
116
33
|
/**
|
|
117
34
|
* Measure a URL-carried `?abx=` payload (the directory 302 fallback) against the ~8KB
|
|
118
|
-
* budget. The FULL URL is always served —
|
|
119
|
-
* breach visible: a loud structured warn on the
|
|
120
|
-
* process, debug-level after. Inline-injection
|
|
35
|
+
* budget ({@link URL_BUDGET_BYTES}, from `@artblocks/abx-sdk`). The FULL URL is always served —
|
|
36
|
+
* params are never dropped — this only makes the breach visible: a loud structured warn on the
|
|
37
|
+
* first over-budget redirect per project per process, debug-level after. Inline-injection
|
|
38
|
+
* serving never routes through here.
|
|
121
39
|
*/
|
|
122
40
|
export declare function checkUrlBudget(address: string, tokenId: string, redirectUrl: string): void;
|
|
123
41
|
/** The project's URL-budget status (directory projects) — surfaced by /api/deps. */
|
package/dist/deps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../src/deps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../src/deps.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAEd,oBAAoB,IAAI,uBAAuB,EAC/C,uBAAuB,EACvB,cAAc,EAEd,kBAAkB,IAAI,qBAAqB,EAC3C,gBAAgB,EAChB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAG5B;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAC,uBAAuB,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,kBAAkB,EAAC,CAAC;AAE5G,oGAAoG;AACpG,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,OAAO,EACjB,GAAG,EAAE,cAAc,GAClB,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAE1C;AAED,sGAAsG;AACtG,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAE1H;AAED;+CAC+C;AAC/C,wBAAgB,8BAA8B,IAAI,IAAI,CAIrD;AAID,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GAAG,mBAAmB,CAAC;AAM1E,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAEpF;AAQD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI,CAgB1F;AAED,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAIA;AAID,MAAM,MAAM,WAAW,GAAG,kBAAkB,GAAG,cAAc,GAAG,aAAa,GAAG,gBAAgB,GAAG,YAAY,CAAC;AAEhH,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC;IACnC,WAAW,EAAE,WAAW,CAAC;IACzB,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAsDjH"}
|
package/dist/deps.js
CHANGED
|
@@ -1,188 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { codeField } from '@artblocks/abx-sdk';
|
|
4
|
-
import { escapeInlineScript } from './inline.js';
|
|
1
|
+
import { activeRegistry, codeField, dependencyScriptTags as sdkDependencyScriptTags, DEPENDENCY_REGISTRY_ABI, registryDepUrl, resetRegistryDependencyCache, resolveRegistryDep as sdkResolveRegistryDep, URL_BUDGET_BYTES, } from '@artblocks/abx-sdk';
|
|
2
|
+
import { nodeInflate } from '@artblocks/abx-sdk/node';
|
|
5
3
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* The resolver-only half of the dependency-registry lane: the query-string size budget and the
|
|
5
|
+
* directory-serving observability surface that `GET /api/deps/:chainId/:addr` reports.
|
|
8
6
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* The registry-resolution vocabulary itself — `DEPENDENCY_REGISTRY_ABI`, `activeRegistry`,
|
|
8
|
+
* `resolveRegistryDep`, `registryDepUrl`, `dependencyScriptTags`, `URL_BUDGET_BYTES` — lives in
|
|
9
|
+
* `@artblocks/abx-sdk` (src/deps.ts): it is chain-read and
|
|
10
|
+
* string-assembly logic with no resolver-specific behavior, so a third-party provider or the
|
|
11
|
+
* CLI's offline preview can now share the identical resolution order instead of reimplementing
|
|
12
|
+
* it. This module re-exports that family below, PRE-WIRED with `nodeInflate`
|
|
13
|
+
* (`@artblocks/abx-sdk/node`) — the SDK core takes decompression as an injected `inflate` rather
|
|
14
|
+
* than importing `node:zlib` directly (it has to stay reachable from a browser bundle), and this
|
|
15
|
+
* resolver runs on Node, so the wiring happens once, here, rather than at every call site.
|
|
11
16
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* This module also owns the query-string size budget for URL-carried tokenData (~8KB
|
|
19
|
-
* request-line caps at gateway front-ends). It applies only to the directory 302 fallback
|
|
20
|
-
* — the primary inline-injection path carries tokenData inside the document. Over-budget
|
|
21
|
-
* redirects are still served IN FULL (never silently drop params), but warn loudly — once
|
|
22
|
-
* per project per process, then debug.
|
|
17
|
+
* What stays here: `depStatusReport`'s per-dep status assembly (a read-only dry run of the same
|
|
18
|
+
* resolution the generator document uses, sharing its cache), the query-string budget check +
|
|
19
|
+
* flag (`checkUrlBudget`/`urlBudgetStatus`), and which directory-serving path a live view
|
|
20
|
+
* actually took (`recordDirectoryServe`) — all resolver-serving observability, not resolution
|
|
21
|
+
* rules, so they don't belong in the neutral layer.
|
|
23
22
|
*/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
{ name: 'additionalCDNCount', type: 'uint24' },
|
|
36
|
-
{ name: 'preferredRepository', type: 'string' },
|
|
37
|
-
{ name: 'additionalRepositoryCount', type: 'uint24' },
|
|
38
|
-
{ name: 'dependencyWebsite', type: 'string' },
|
|
39
|
-
{ name: 'availableOnChain', type: 'bool' },
|
|
40
|
-
{ name: 'scriptCount', type: 'uint24' },
|
|
41
|
-
],
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
type: 'function',
|
|
45
|
-
name: 'getDependencyScript',
|
|
46
|
-
stateMutability: 'view',
|
|
47
|
-
inputs: [
|
|
48
|
-
{ name: 'dependencyNameAndVersion', type: 'bytes32' },
|
|
49
|
-
{ name: 'index', type: 'uint256' },
|
|
50
|
-
],
|
|
51
|
-
outputs: [{ type: 'string' }],
|
|
52
|
-
},
|
|
53
|
-
];
|
|
54
|
-
// Resolved registry entries are effectively immutable (admin-gated writes), so an in-process
|
|
55
|
-
// cache is safe; the TTL only guards admin updates. Failures negative-cache briefly so a dead
|
|
56
|
-
// registry doesn't cost an eth_call (and a warn) per request.
|
|
57
|
-
const CACHE_TTL_MS = 60 * 60 * 1000; // 1h
|
|
58
|
-
const NEGATIVE_TTL_MS = 60 * 1000; // 1min
|
|
59
|
-
const registryCache = new Map();
|
|
60
|
-
/** Reset all in-process dependency state (cache + budget flags + serve modes) — for tests. */
|
|
23
|
+
export { DEPENDENCY_REGISTRY_ABI, activeRegistry, registryDepUrl, URL_BUDGET_BYTES };
|
|
24
|
+
/** `resolveRegistryDep`, pre-wired with `nodeInflate` — same signature callers here always used. */
|
|
25
|
+
export function resolveRegistryDep(client, registry, dep) {
|
|
26
|
+
return sdkResolveRegistryDep(client, registry, dep, { inflate: nodeInflate });
|
|
27
|
+
}
|
|
28
|
+
/** `dependencyScriptTags`, pre-wired with `nodeInflate` — same signature callers here always used. */
|
|
29
|
+
export function dependencyScriptTags(client, state) {
|
|
30
|
+
return sdkDependencyScriptTags(client, state, { inflate: nodeInflate });
|
|
31
|
+
}
|
|
32
|
+
/** Reset all in-process dependency state (the SDK's registry-resolution cache + this module's
|
|
33
|
+
* budget flags + serve modes) — for tests. */
|
|
61
34
|
export function resetDependencyResolutionState() {
|
|
62
|
-
|
|
35
|
+
resetRegistryDependencyCache();
|
|
63
36
|
budgetFlags.clear();
|
|
64
37
|
directoryServeModes.clear();
|
|
65
38
|
}
|
|
66
|
-
/** The collection's registry pointer, if set to a real address (zero/undefined ⇒ none). */
|
|
67
|
-
export function activeRegistry(state) {
|
|
68
|
-
const registry = state.dependencies?.registry ?? null;
|
|
69
|
-
if (!registry || /^0x0{40}$/i.test(registry))
|
|
70
|
-
return null;
|
|
71
|
-
return registry;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Resolve one `name@version` ref through the collection's registry. Returns the resolution
|
|
75
|
-
* (or null when the registry couldn't answer — caller falls back to the built-in map) plus
|
|
76
|
-
* whether it was served from cache. Never throws; a fresh failure logs ONE warn (the
|
|
77
|
-
* negative cache rate-limits it) naming the dep and why.
|
|
78
|
-
*/
|
|
79
|
-
export async function resolveRegistryDep(client, registry, dep) {
|
|
80
|
-
const key = `${registry.toLowerCase()}|${dep.refDecoded}`;
|
|
81
|
-
const hit = registryCache.get(key);
|
|
82
|
-
if (hit && hit.expiresAt > Date.now()) {
|
|
83
|
-
return { resolution: hit.value, cached: true, error: hit.error };
|
|
84
|
-
}
|
|
85
|
-
try {
|
|
86
|
-
// nameAndVersion rides as readable-ASCII bytes32 — the raw evented ref, right-padded.
|
|
87
|
-
const ref = padHex(dep.ref, { size: 32, dir: 'right' });
|
|
88
|
-
const details = (await client.readContract({
|
|
89
|
-
address: registry,
|
|
90
|
-
abi: DEPENDENCY_REGISTRY_ABI,
|
|
91
|
-
functionName: 'getDependencyDetails',
|
|
92
|
-
args: [ref],
|
|
93
|
-
}));
|
|
94
|
-
const [nameAndVersion, , preferredCDN, , , , , availableOnChain, scriptCount] = details;
|
|
95
|
-
if (availableOnChain && scriptCount > 0) {
|
|
96
|
-
// Per-chunk reads; the concatenated chunk strings form one base64(gzip(script)) stream.
|
|
97
|
-
const chunks = (await Promise.all(Array.from({ length: Number(scriptCount) }, (_, i) => client.readContract({
|
|
98
|
-
address: registry,
|
|
99
|
-
abi: DEPENDENCY_REGISTRY_ABI,
|
|
100
|
-
functionName: 'getDependencyScript',
|
|
101
|
-
args: [ref, BigInt(i)],
|
|
102
|
-
}))));
|
|
103
|
-
const script = gunzipSync(Buffer.from(chunks.join(''), 'base64')).toString('utf8');
|
|
104
|
-
const value = { kind: 'onchain', script };
|
|
105
|
-
registryCache.set(key, { value, expiresAt: Date.now() + CACHE_TTL_MS });
|
|
106
|
-
return { resolution: value, cached: false };
|
|
107
|
-
}
|
|
108
|
-
if (preferredCDN) {
|
|
109
|
-
const value = { kind: 'cdn', url: preferredCDN };
|
|
110
|
-
registryCache.set(key, { value, expiresAt: Date.now() + CACHE_TTL_MS });
|
|
111
|
-
return { resolution: value, cached: false };
|
|
112
|
-
}
|
|
113
|
-
// An empty struct back means the entry simply isn't registered.
|
|
114
|
-
const why = nameAndVersion
|
|
115
|
-
? 'registered but has neither on-chain bytes nor a preferredCDN'
|
|
116
|
-
: 'not registered in the registry';
|
|
117
|
-
return failResolution(key, dep, registry, why);
|
|
118
|
-
}
|
|
119
|
-
catch (err) {
|
|
120
|
-
return failResolution(key, dep, registry, `registry read failed: ${err.message}`);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
/** Negative-cache a failed resolution + one warn (per negative-TTL window). Never throws. */
|
|
124
|
-
function failResolution(key, dep, registry, why) {
|
|
125
|
-
registryCache.set(key, { value: null, error: why, expiresAt: Date.now() + NEGATIVE_TTL_MS });
|
|
126
|
-
console.warn(`[deps] registry resolution failed for ${dep.refDecoded} via ${registry}: ${why} — falling back to the built-in CDN map`);
|
|
127
|
-
return { resolution: null, cached: false, error: why };
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Resolve a `name@version` registry ref to a CDN URL — the built-in reference convention,
|
|
131
|
-
* the LAST-resort rung of the resolution order (the soft registry pointer stays
|
|
132
|
-
* non-validating). Known runtimes get their real dist paths; anything else is best-effort npm.
|
|
133
|
-
*/
|
|
134
|
-
export function registryDepUrl(ref) {
|
|
135
|
-
const at = ref.lastIndexOf('@');
|
|
136
|
-
if (at <= 0)
|
|
137
|
-
return null;
|
|
138
|
-
const name = ref.slice(0, at);
|
|
139
|
-
const version = ref.slice(at + 1);
|
|
140
|
-
const known = {
|
|
141
|
-
p5js: `https://cdn.jsdelivr.net/npm/p5@${version}/lib/p5.min.js`,
|
|
142
|
-
p5: `https://cdn.jsdelivr.net/npm/p5@${version}/lib/p5.min.js`,
|
|
143
|
-
threejs: `https://cdn.jsdelivr.net/npm/three@${version}/build/three.min.js`,
|
|
144
|
-
three: `https://cdn.jsdelivr.net/npm/three@${version}/build/three.min.js`,
|
|
145
|
-
tonejs: `https://cdn.jsdelivr.net/npm/tone@${version}/build/Tone.js`,
|
|
146
|
-
};
|
|
147
|
-
return known[name] ?? `https://cdn.jsdelivr.net/npm/${name}@${version}`;
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* The ordered dependency `<script>` tags for the generator document, each dep resolved per
|
|
151
|
-
* the Consumers table: registry on-chain bytes → registry preferredCDN → built-in map;
|
|
152
|
-
* `onchain`-resolution refs read their SSTORE2 data contract directly (never a registry).
|
|
153
|
-
* Never throws — an unresolvable dep is skipped (after the warn) and the document assembles.
|
|
154
|
-
*/
|
|
155
|
-
export async function dependencyScriptTags(client, state) {
|
|
156
|
-
const registry = activeRegistry(state);
|
|
157
|
-
const tags = [];
|
|
158
|
-
for (const dep of state.dependencies?.list ?? []) {
|
|
159
|
-
if (dep.resolution === 'registry') {
|
|
160
|
-
if (registry) {
|
|
161
|
-
const { resolution } = await resolveRegistryDep(client, registry, dep);
|
|
162
|
-
if (resolution?.kind === 'onchain') {
|
|
163
|
-
tags.push(`<script>${escapeInlineScript(resolution.script)}</script>`);
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
if (resolution?.kind === 'cdn') {
|
|
167
|
-
tags.push(`<script src="${resolution.url}"></script>`);
|
|
168
|
-
continue;
|
|
169
|
-
}
|
|
170
|
-
// fell through — resolveRegistryDep already warned; last resort below
|
|
171
|
-
}
|
|
172
|
-
const url = registryDepUrl(dep.refDecoded);
|
|
173
|
-
if (url)
|
|
174
|
-
tags.push(`<script src="${url}"></script>`);
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
// on-chain dep: an SSTORE2 data contract holding the JS (code = 0x00 ‖ content)
|
|
178
|
-
const bytecode = await client.getCode({ address: dep.refDecoded });
|
|
179
|
-
if (bytecode && bytecode.length > 4) {
|
|
180
|
-
tags.push(`<script>${escapeInlineScript(Buffer.from(bytecode.slice(4), 'hex').toString('utf8'))}</script>`);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return tags;
|
|
185
|
-
}
|
|
186
39
|
// The last directory serve outcome per project (in-process): inline injection is the
|
|
187
40
|
// primary; a redirect only happens when the entry-document fetch failed. /api/deps reports it.
|
|
188
41
|
const directoryServeModes = new Map();
|
|
@@ -191,18 +44,15 @@ export function recordDirectoryServe(address, mode) {
|
|
|
191
44
|
directoryServeModes.set(address.toLowerCase(), { mode, at: new Date().toISOString() });
|
|
192
45
|
}
|
|
193
46
|
// ── the query-string size budget (URL-carried tokenData lanes only) ──────────────
|
|
194
|
-
/** Gateway front-ends commonly cap request lines near 8KB — the spec's URL budget. It
|
|
195
|
-
* applies to URL-carried `?abx=` payloads (the 302 fallback); resolver inline serving
|
|
196
|
-
* injects tokenData into the document and is unaffected. */
|
|
197
|
-
export const URL_BUDGET_BYTES = 8192;
|
|
198
47
|
// Per-project over-budget observations (in-process). First breach warns loudly; repeats
|
|
199
48
|
// drop to debug so a hot token doesn't spam the log once the fact is known.
|
|
200
49
|
const budgetFlags = new Map();
|
|
201
50
|
/**
|
|
202
51
|
* Measure a URL-carried `?abx=` payload (the directory 302 fallback) against the ~8KB
|
|
203
|
-
* budget. The FULL URL is always served —
|
|
204
|
-
* breach visible: a loud structured warn on the
|
|
205
|
-
* process, debug-level after. Inline-injection
|
|
52
|
+
* budget ({@link URL_BUDGET_BYTES}, from `@artblocks/abx-sdk`). The FULL URL is always served —
|
|
53
|
+
* params are never dropped — this only makes the breach visible: a loud structured warn on the
|
|
54
|
+
* first over-budget redirect per project per process, debug-level after. Inline-injection
|
|
55
|
+
* serving never routes through here.
|
|
206
56
|
*/
|
|
207
57
|
export function checkUrlBudget(address, tokenId, redirectUrl) {
|
|
208
58
|
const bytes = Buffer.byteLength(redirectUrl, 'utf8');
|
package/dist/deps.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deps.js","sourceRoot":"","sources":["../src/deps.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"deps.js","sourceRoot":"","sources":["../src/deps.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,SAAS,EACT,oBAAoB,IAAI,uBAAuB,EAC/C,uBAAuB,EACvB,cAAc,EACd,4BAA4B,EAC5B,kBAAkB,IAAI,qBAAqB,EAC3C,gBAAgB,GAMjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAC,uBAAuB,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAA0B,CAAC;AAE5G,oGAAoG;AACpG,MAAM,UAAU,kBAAkB,CAChC,MAAoB,EACpB,QAAiB,EACjB,GAAmB;IAEnB,OAAO,qBAAqB,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,EAA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C,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACnE,OAAO;QACL,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,QAAQ;QACR,MAAM,EAAE,KAAK,CAAC,YAAY,EAAE,MAAM,IAAI,KAAK;QAC3C,IAAI;QACJ,GAAG,CAAC,SAAS;YACX,CAAC,CAAC;gBACE,+EAA+E;gBAC/E,iFAAiF;gBACjF,gBAAgB,EAAE,EAAC,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,IAAI,kBAAkB,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAC;gBAC5H,SAAS,EAAE,eAAe,CAAC,KAAK,CAAC,OAAO,CAAC;aAC1C;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @artblocks/abx-token-api — Layer 3 reference token API + byte-custody server.
|
|
3
3
|
*
|
|
4
|
-
* Serves standard ERC-721 / ERC-
|
|
5
|
-
* API, and a demo dashboard — all from
|
|
6
|
-
* URIs point here, so this node is the resolver;
|
|
4
|
+
* Serves standard token metadata (ERC-721 tokenURI / ERC-1155 editions' uri), ERC-7572
|
|
5
|
+
* collection metadata, the token image, a JSON state API, and a demo dashboard — all from
|
|
6
|
+
* the reconstructed projection. The on-chain URIs point here, so this node is the resolver;
|
|
7
|
+
* switching nodes is a repoint.
|
|
7
8
|
*/
|
|
8
9
|
export { createTokenApiServer, startTokenApiServer, resolveBaseUrl, resolveContent, verifyProject, DEFAULT_PORT, type ServerOptions, } from './server.js';
|
|
9
|
-
export { buildTokenMetadata, buildContractMetadata, tokenImageUrl, type DisplayMeta, type FieldProvenance } from './metadata.js';
|
|
10
|
-
export { currentRenderArtifact,
|
|
11
|
-
export { ABX_JS } from '
|
|
12
|
-
export { escapeInlineScript, escapeInlineJson } from './inline.js';
|
|
10
|
+
export { buildTokenMetadata, buildContractMetadata, tokenArtifacts, tokenImageUrl, type DisplayMeta, type FieldProvenance, type ArtifactEntry, type EffectArtifactStatus, type TokenArtifactsResult, type PlaneAccess, type PlaneArtifactRow, } from './metadata.js';
|
|
11
|
+
export { currentRenderArtifact, liveViewEnabled } from './code.js';
|
|
12
|
+
export { ABX_JS, buildGeneratorDocument, escapeInlineJson, escapeInlineScript, injectTokenDataIntoHtml } from '@artblocks/abx-sdk';
|
|
13
13
|
export { depStatusReport, dependencyScriptTags, resolveRegistryDep, registryDepUrl, activeRegistry, urlBudgetStatus, URL_BUDGET_BYTES, DEPENDENCY_REGISTRY_ABI, type DepStatus, type DirectoryServeMode, type RegistryResolution, type ResolvedVia, } from './deps.js';
|
|
14
14
|
export { startChainWatcher, notifyEffects, watchIntervalMs, DEFAULT_WATCH_INTERVAL_MS, type WatcherOptions, type WatcherStatus } from './watcher.js';
|
|
15
|
-
export {
|
|
15
|
+
export { generateContent, contentHash, fallbackImageSvg, IMAGE_MEDIA_TYPE } from './content.js';
|
|
16
16
|
export { renderDashboard } from './dashboard.js';
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,aAAa,EACb,YAAY,EACZ,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,gBAAgB,GACtB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAC,qBAAqB,EAAE,eAAe,EAAC,MAAM,WAAW,CAAC;AAMjE,OAAO,EAAC,MAAM,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,uBAAuB,EAAC,MAAM,oBAAoB,CAAC;AACjI,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,WAAW,GACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAC,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,yBAAyB,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAC,MAAM,cAAc,CAAC;AACnJ,OAAO,EAAC,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC9F,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC"}
|