@artblocks/abx-sdk 0.1.0-alpha.20 → 0.1.0-alpha.22
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 +2222 -0
- package/dist/anchors.d.ts +54 -1
- package/dist/anchors.d.ts.map +1 -1
- package/dist/anchors.js +106 -56
- package/dist/anchors.js.map +1 -1
- package/dist/deployments.d.ts +51 -0
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +51 -4
- package/dist/deployments.js.map +1 -1
- package/dist/execute.d.ts +8 -5
- package/dist/execute.d.ts.map +1 -1
- package/dist/execute.js +23 -6
- package/dist/execute.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/migrate.d.ts.map +1 -1
- package/dist/migrate.js +3 -1
- package/dist/migrate.js.map +1 -1
- package/dist/onchain-uri.d.ts.map +1 -1
- package/dist/onchain-uri.js +5 -1
- package/dist/onchain-uri.js.map +1 -1
- package/dist/policy.d.ts +58 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +36 -0
- package/dist/policy.js.map +1 -0
- package/dist/reconstruct.d.ts +2 -0
- package/dist/reconstruct.d.ts.map +1 -1
- package/dist/reconstruct.js +58 -8
- package/dist/reconstruct.js.map +1 -1
- package/dist/service.d.ts +18 -0
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js.map +1 -1
- package/dist/spine.d.ts +16 -0
- package/dist/spine.d.ts.map +1 -1
- package/dist/spine.js +0 -0
- package/dist/spine.js.map +1 -1
- package/dist/tokens.d.ts +33 -7
- package/dist/tokens.d.ts.map +1 -1
- package/dist/tokens.js +24 -3
- package/dist/tokens.js.map +1 -1
- package/dist/types.d.ts +55 -8
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/types.d.ts
CHANGED
|
@@ -79,15 +79,39 @@ export interface SpineEvent {
|
|
|
79
79
|
export interface TokenState {
|
|
80
80
|
tokenId: string;
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
82
|
+
* Does a token exist at this id **right now** — the one question a consumer is actually asking.
|
|
83
|
+
*
|
|
84
|
+
* - `'unminted'` — ERC-721: a valid id never issued (the deployed-but-unminted state a resolver
|
|
85
|
+
* serves warming metadata for). Valid state, not a gap.
|
|
86
|
+
* - `'live'` — a token exists: a 721 with a holder, or an edition id with `supply > 0`.
|
|
87
|
+
* - `'burned'` — **terminal, and ERC-721 only.** The id was issued and destroyed, the contract
|
|
88
|
+
* disowns it (`tokenURI` reverts `NonexistentToken`), and it can never come back: ABX mints from
|
|
89
|
+
* a monotonic `nextTokenId`, so no mint path can reissue that id. This is the word a consumer
|
|
90
|
+
* may act on irreversibly — drop it from a gallery, answer `410 Gone`.
|
|
91
|
+
* - `'no-live-copies'` — **ERC-1155 editions only, and never terminal.** Zero live copies of this
|
|
92
|
+
* id right now: never minted, or every copy burned, or minted and fully burned twice over. It
|
|
93
|
+
* makes no claim about history *because the two have no different consequence* — the id can mint
|
|
94
|
+
* again either way, so anything that treats it as gone forever is wrong. `supply`/`holders`
|
|
95
|
+
* carry the numbers; the event log carries the history.
|
|
96
|
+
*
|
|
97
|
+
* **Why `'burned'` is not shared across the standards**, though the first draft of this enum shared
|
|
98
|
+
* it: the correct response to destruction differs by standard, so one word covering both put every
|
|
99
|
+
* consumer one forgotten branch away from serving `410 Gone` for an edition id that can mint again.
|
|
100
|
+
* abx-services caught that in review — our own migration note told them to map the shared word
|
|
101
|
+
* straight onto their `410` sites. Splitting the word moves the rule out of prose that must be
|
|
102
|
+
* remembered and into the type: **`lifecycle === 'burned'` is safe to treat as permanent on either
|
|
103
|
+
* standard, with no carve-out**, which is the only version of this rule that survives a refactor.
|
|
104
|
+
*
|
|
105
|
+
* It replaced a `minted: boolean` that latched `true` at mint and was never recomputed on the 721
|
|
106
|
+
* lane, so a burned token reconstructed as live, held by `0x0` — every consumer asking "does this
|
|
107
|
+
* exist" got `true` forever (abx-services, 2026-08-20, `docs/23`). "Was it ever issued" is
|
|
108
|
+
* `lifecycle !== 'unminted'` on a 721; on an edition, ask the log.
|
|
87
109
|
*/
|
|
88
|
-
|
|
89
|
-
/** 721 only — the current holder
|
|
90
|
-
*
|
|
110
|
+
lifecycle: 'unminted' | 'live' | 'burned' | 'no-live-copies';
|
|
111
|
+
/** 721 only — the current holder; `null` when `'unminted'` or `'burned'` (a destroyed token has
|
|
112
|
+
* no holder — the zero address is never written here, so this field never has to be read as a
|
|
113
|
+
* sentinel). Always `null` for an edition (an id can have many concurrent holders; see
|
|
114
|
+
* {@link holders}). */
|
|
91
115
|
owner: Address | null;
|
|
92
116
|
tokenURI: string | null;
|
|
93
117
|
fields: MetadataField[];
|
|
@@ -150,6 +174,29 @@ export interface ProjectState {
|
|
|
150
174
|
receiver: Address;
|
|
151
175
|
bps: number;
|
|
152
176
|
} | null;
|
|
177
|
+
/**
|
|
178
|
+
* The royalty **ceiling** — owner-set at deploy, reduce-only forever after, folded from
|
|
179
|
+
* `MaxRoyaltyBpsUpdated` (last-writer-wins, so a later `reduceMaxRoyaltyBps` beats the deploy-time
|
|
180
|
+
* value). Tri-state, and the third state carries weight: `null` means **the spine never stated
|
|
181
|
+
* one** — an implementation with no `maxRoyaltyBps()` at all — which is a different fact from a
|
|
182
|
+
* collection that published a ceiling of 1000. Never report a default for a ceiling the contract
|
|
183
|
+
* never published.
|
|
184
|
+
*
|
|
185
|
+
* Deliberately NOT nested inside {@link royalty}: clearing the royalty to `(0x0, 0)` sets that
|
|
186
|
+
* field to `null`, and the ceiling survives that on chain — nesting would drop a still-binding
|
|
187
|
+
* fact. Present them together in any readout, though: a rate without its ceiling is half the fact
|
|
188
|
+
* (a ceiling above the live rate means the owner can raise the rate unilaterally, and a buyer
|
|
189
|
+
* cannot see that from a listing — so reducing the cap to the current rate is what turns "5%
|
|
190
|
+
* today" into a promise).
|
|
191
|
+
*/
|
|
192
|
+
maxRoyaltyBps?: number | null;
|
|
193
|
+
/**
|
|
194
|
+
* Did this collection opt into burning (`BurnConfigured`, emitted once at deploy and fixed
|
|
195
|
+
* thereafter)? Tri-state on the same rule as {@link maxRoyaltyBps}: `null` = the spine never
|
|
196
|
+
* stated it, which is not `false`. An implementation predating the opt-in has no `burn`
|
|
197
|
+
* entrypoint at all; a collection with `burnable: false` has one that refuses.
|
|
198
|
+
*/
|
|
199
|
+
burnable?: boolean | null;
|
|
153
200
|
tokenURIRenderer: Address | null;
|
|
154
201
|
tokenURILocked: boolean | null;
|
|
155
202
|
contractURIRenderer: Address | null;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,OAAO,EAAE,GAAG,EAAC,MAAM,MAAM,CAAC;AAEvC,sFAAsF;AACtF,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,GAAG,CAAC;IACR,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,GAAG,CAAC;CACZ;AAED,2FAA2F;AAC3F,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,GAAG,CAAC;IACX,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,6FAA6F;AAC7F,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,C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AI,CAAC;IAC/B;;;;yEAIqE;IACrE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,mFAAmF;IACnF,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,6FAA6F;IAC7F,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAG9B,gDAAgD;IAChD,cAAc,CAAC,EAAE,UAAU,EAAE,CAAC;IAC9B,uFAAuF;IACvF,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,iFAAiF;IACjF,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC/B;8FAC0F;IAC1F,gBAAgB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAClC,+EAA+E;IAC/E,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,oFAAoF;IACpF,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC5B,oFAAoF;IACpF,YAAY,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAExC,UAAU,EAAE,aAAa,EAAE,CAAC;IAC5B,MAAM,EAAE,UAAU,EAAE,CAAC;IAGrB,MAAM,EAAE,UAAU,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@artblocks/abx-sdk",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.22",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ABX SDK (Layer 2) — the neutral, low-level library that turns protocol operations into typed function calls. No provider, no chain, no UX baked in.",
|
|
6
6
|
"type": "module",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"dist",
|
|
25
|
+
"CHANGELOG.md",
|
|
25
26
|
"LICENSE"
|
|
26
27
|
],
|
|
27
28
|
"sideEffects": false,
|