@artblocks/abx-sdk 0.1.0-alpha.2 → 0.1.0-alpha.20
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/README.md +131 -0
- package/dist/abi/generated.d.ts +8502 -129
- package/dist/abi/generated.d.ts.map +1 -1
- package/dist/abi/generated.js +40 -22
- package/dist/abi/generated.js.map +1 -1
- package/dist/abi/index.d.ts +2645 -168
- package/dist/abi/index.d.ts.map +1 -1
- package/dist/abi/index.js +34 -7
- package/dist/abi/index.js.map +1 -1
- package/dist/anchors.d.ts +266 -0
- package/dist/anchors.d.ts.map +1 -0
- package/dist/anchors.js +653 -0
- package/dist/anchors.js.map +1 -0
- package/dist/chains.d.ts +15 -9
- package/dist/chains.d.ts.map +1 -1
- package/dist/chains.js +19 -15
- package/dist/chains.js.map +1 -1
- package/dist/chunks.d.ts +53 -23
- package/dist/chunks.d.ts.map +1 -1
- package/dist/chunks.js +68 -6
- package/dist/chunks.js.map +1 -1
- package/dist/clients.d.ts +23 -11
- package/dist/clients.d.ts.map +1 -1
- package/dist/clients.js +17 -18
- package/dist/clients.js.map +1 -1
- package/dist/create2.d.ts +85 -1
- package/dist/create2.d.ts.map +1 -1
- package/dist/create2.js +159 -2
- package/dist/create2.js.map +1 -1
- package/dist/creator-token.d.ts +132 -0
- package/dist/creator-token.d.ts.map +1 -0
- package/dist/creator-token.js +183 -0
- package/dist/creator-token.js.map +1 -0
- package/dist/deploy.d.ts +234 -14
- package/dist/deploy.d.ts.map +1 -1
- package/dist/deploy.js +289 -111
- package/dist/deploy.js.map +1 -1
- package/dist/deployments.d.ts +12 -0
- package/dist/deployments.d.ts.map +1 -1
- package/dist/deployments.js +155 -28
- package/dist/deployments.js.map +1 -1
- package/dist/deps.d.ts +122 -5
- package/dist/deps.d.ts.map +1 -1
- package/dist/deps.js +248 -6
- package/dist/deps.js.map +1 -1
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +8 -0
- package/dist/env.js.map +1 -1
- package/dist/errors.d.ts +94 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +126 -0
- package/dist/errors.js.map +1 -0
- package/dist/execute.d.ts +115 -0
- package/dist/execute.d.ts.map +1 -0
- package/dist/execute.js +142 -0
- package/dist/execute.js.map +1 -0
- package/dist/gateways.d.ts +79 -0
- package/dist/gateways.d.ts.map +1 -0
- package/dist/gateways.js +156 -0
- package/dist/gateways.js.map +1 -0
- package/dist/generator-document.d.ts +58 -0
- package/dist/generator-document.d.ts.map +1 -0
- package/dist/generator-document.js +124 -0
- package/dist/generator-document.js.map +1 -0
- package/dist/generator.d.ts +43 -1
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +29 -0
- package/dist/generator.js.map +1 -1
- package/dist/index.d.ts +17 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -3
- package/dist/index.js.map +1 -1
- package/dist/inspect.d.ts +48 -0
- package/dist/inspect.d.ts.map +1 -0
- package/dist/inspect.js +295 -0
- package/dist/inspect.js.map +1 -0
- package/dist/migrate.d.ts +41 -0
- package/dist/migrate.d.ts.map +1 -0
- package/dist/migrate.js +140 -0
- package/dist/migrate.js.map +1 -0
- package/dist/mime.d.ts +11 -0
- package/dist/mime.d.ts.map +1 -0
- package/dist/mime.js +40 -0
- package/dist/mime.js.map +1 -0
- package/dist/node.d.ts +10 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +24 -0
- package/dist/node.js.map +1 -0
- package/dist/onchain-uri.d.ts +110 -0
- package/dist/onchain-uri.d.ts.map +1 -0
- package/dist/onchain-uri.js +273 -0
- package/dist/onchain-uri.js.map +1 -0
- package/dist/ops.d.ts +507 -14
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +848 -32
- package/dist/ops.js.map +1 -1
- package/dist/probe.d.ts +29 -0
- package/dist/probe.d.ts.map +1 -1
- package/dist/probe.js +104 -9
- package/dist/probe.js.map +1 -1
- package/dist/reconstruct.d.ts +92 -2
- package/dist/reconstruct.d.ts.map +1 -1
- package/dist/reconstruct.js +378 -93
- package/dist/reconstruct.js.map +1 -1
- package/dist/resume.d.ts +96 -0
- package/dist/resume.d.ts.map +1 -0
- package/dist/resume.js +95 -0
- package/dist/resume.js.map +1 -0
- package/dist/script-chunks.d.ts +24 -0
- package/dist/script-chunks.d.ts.map +1 -0
- package/dist/script-chunks.js +63 -0
- package/dist/script-chunks.js.map +1 -0
- package/dist/service.d.ts +188 -9
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +228 -18
- package/dist/service.js.map +1 -1
- package/dist/spine.d.ts +31 -4
- package/dist/spine.d.ts.map +1 -1
- package/dist/spine.js +0 -0
- package/dist/spine.js.map +1 -1
- package/dist/staging.d.ts +124 -0
- package/dist/staging.d.ts.map +1 -0
- package/dist/staging.js +134 -0
- package/dist/staging.js.map +1 -0
- package/dist/tokendata.d.ts +62 -2
- package/dist/tokendata.d.ts.map +1 -1
- package/dist/tokendata.js +79 -17
- package/dist/tokendata.js.map +1 -1
- package/dist/tokens.d.ts +94 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +296 -0
- package/dist/tokens.js.map +1 -0
- package/dist/types.d.ts +60 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/util.d.ts +74 -0
- package/dist/util.d.ts.map +1 -0
- package/dist/util.js +106 -0
- package/dist/util.js.map +1 -0
- package/package.json +10 -2
package/dist/types.d.ts
CHANGED
|
@@ -33,11 +33,18 @@ export interface ParamSchema {
|
|
|
33
33
|
max: Hex;
|
|
34
34
|
selectOptions: string[];
|
|
35
35
|
}
|
|
36
|
-
/** The three param lifecycle hooks (any may be null = none). */
|
|
36
|
+
/** The three param lifecycle hooks (any may be null = none), plus whether the set is frozen. */
|
|
37
37
|
export interface ParamHooks {
|
|
38
38
|
configureHook: Address | null;
|
|
39
39
|
augmentHook: Address | null;
|
|
40
|
+
/** Ownership-change lifecycle — a **VETO**: its revert fails the transfer, and a mint is a
|
|
41
|
+
* transfer from `0x0`, so a reverting hook also stops minting. Read `locked` next to it. */
|
|
40
42
|
transferHook: Address | null;
|
|
43
|
+
/** `lockParamHooks()` was sent: the three addresses above can never change again. The read that
|
|
44
|
+
* turns "the hooks are whatever the owner currently says" into something a buyer can verify —
|
|
45
|
+
* it matters most for `transferHook`, an unlocked one being a standing power over a collector's
|
|
46
|
+
* ability to sell. Folded from `ParamHooksFrozen`. */
|
|
47
|
+
locked: boolean;
|
|
41
48
|
}
|
|
42
49
|
/** One declared code dependency (Dependencies extension); index 0 = the runtime. */
|
|
43
50
|
export interface DependencyInfo {
|
|
@@ -71,13 +78,54 @@ export interface SpineEvent {
|
|
|
71
78
|
}
|
|
72
79
|
export interface TokenState {
|
|
73
80
|
tokenId: string;
|
|
81
|
+
/**
|
|
82
|
+
* Has this id ever had a mint? For a 721 token (`Transfer` from `0x0`): latches `true` once
|
|
83
|
+
* minted and stays true (721 has no burn in the spine). For an ERC-1155 edition
|
|
84
|
+
* (`TransferSingle`/`TransferBatch`): means **`supply > 0` right now** — recomputed on every
|
|
85
|
+
* transfer leg rather than latched, since an edition id CAN return to zero (a full burn) and
|
|
86
|
+
* mint again. `false` = deployed but not yet issued (721), or currently zero live copies (1155).
|
|
87
|
+
*/
|
|
74
88
|
minted: boolean;
|
|
89
|
+
/** 721 only — the current holder. Always `null` for an edition (an id can have many
|
|
90
|
+
* concurrent holders; see {@link holders}). */
|
|
75
91
|
owner: Address | null;
|
|
76
92
|
tokenURI: string | null;
|
|
77
93
|
fields: MetadataField[];
|
|
78
94
|
lockedFields: string[];
|
|
79
95
|
/** Token-scope params (Params extension) — `seed`, PostParam values, … Absent/empty ⇒ none. */
|
|
80
96
|
params?: ParamValue[];
|
|
97
|
+
/** ERC-1155 editions only — total live copies of this id (minted − burned), folded from
|
|
98
|
+
* `TransferSingle`/`TransferBatch`. Absent for a 721 token. */
|
|
99
|
+
supply?: string;
|
|
100
|
+
/**
|
|
101
|
+
* ERC-1155 editions only — this id's **effective** supply cap: its own override when one exists,
|
|
102
|
+
* otherwise the collection default ({@link ProjectState.defaultMaxSupply}). Absent for a 721
|
|
103
|
+
* token. Equals the on-chain `maxSupply(id)` view, and therefore its head-read twin
|
|
104
|
+
* (`TokenRow.maxSupply` in `tokens.ts`) — one field name, one meaning, whichever lane produced it.
|
|
105
|
+
*
|
|
106
|
+
* It used to fold `MaxSupplyUpdated` alone, which made the two lanes disagree on the DEFAULT
|
|
107
|
+
* shape: `--copies 10` sets the cap at `initialize` and never calls `setMaxSupply`, so no id had
|
|
108
|
+
* an event of its own and this read *absent* — "open, uncapped" — for every capped edition ever
|
|
109
|
+
* deployed. The head read said `10`. That is the sibling-drift class, on the field that decides
|
|
110
|
+
* whether a buy button renders.
|
|
111
|
+
*
|
|
112
|
+
* `'0'` carries the on-chain overload deliberately: **open** when {@link maxSupplyOverridden} is
|
|
113
|
+
* false, **closed forever** when it is true.
|
|
114
|
+
*/
|
|
115
|
+
maxSupply?: string;
|
|
116
|
+
/** ERC-1155 editions only — has this id ever been explicitly overridden (`setMaxSupply`)? The
|
|
117
|
+
* distinction the on-chain getter cannot make and the log can, now that `DefaultMaxSupplySet`
|
|
118
|
+
* completes the log: it disambiguates a `'0'` cap (open vs deliberately closed) and tells you
|
|
119
|
+
* whether the monotonic never-increase rule is already in force for this id. Absent ⇒ false. */
|
|
120
|
+
maxSupplyOverridden?: boolean;
|
|
121
|
+
/** ERC-1155 editions only — current balances by holder address, folded from
|
|
122
|
+
* `TransferSingle`/`TransferBatch`. Zero balances are deleted, so a key's presence IS "holds
|
|
123
|
+
* at least one copy." Omitted/empty when unknown (a 721 token, or an edition with no folded
|
|
124
|
+
* history). Not chain-enumerable outside the event log — this is why {@link owner} can't
|
|
125
|
+
* simply generalize to "the current holders": a chain-only head read (no event scan) has no
|
|
126
|
+
* way to list them (see `tokens.ts`'s `listTokens`, which is exactly that head-read-only path
|
|
127
|
+
* and therefore never populates this field). */
|
|
128
|
+
holders?: Record<Address, string>;
|
|
81
129
|
}
|
|
82
130
|
/**
|
|
83
131
|
* The full reconstructed state of an ABX project — rebuilt from the event log
|
|
@@ -108,10 +156,19 @@ export interface ProjectState {
|
|
|
108
156
|
contractURILocked: boolean | null;
|
|
109
157
|
collectionFields: MetadataField[];
|
|
110
158
|
lockedCollectionFields: string[];
|
|
111
|
-
/** Which concrete token type this is, inferred from the enabled extensions.
|
|
112
|
-
|
|
159
|
+
/** Which concrete token type this is, inferred from the enabled extensions. The `-edition`
|
|
160
|
+
* suffix is the ERC-1155 family (detected via the Edition Supply extension), a parallel
|
|
161
|
+
* ladder to the ERC-721 one: `1of1-edition` ↔ `1of1`, `edition` ↔ `series`,
|
|
162
|
+
* `edition-code` ↔ `code`. */
|
|
163
|
+
contractType?: '1of1' | 'series' | 'code' | '1of1-edition' | 'edition' | 'edition-code';
|
|
113
164
|
/** Supply cap "X of Y" (Max Invocations extension); null/absent ⇒ uncapped 1/1. */
|
|
114
165
|
maxInvocations?: string | null;
|
|
166
|
+
/** ERC-1155 editions only — the collection-wide DEFAULT per-id cap (`editionSize` at
|
|
167
|
+
* `initialize`), folded from `DefaultMaxSupplySet`. `'0'` ⇒ open by default; null ⇒ not an
|
|
168
|
+
* edition. The 1155 analogue of {@link maxInvocations}: it is the project-level ceiling, while
|
|
169
|
+
* {@link TokenState.maxSupply} is a single id's. Every id that has never been overridden carries
|
|
170
|
+
* this, which is why the event exists — see `IAbxEditionSupply`. */
|
|
171
|
+
defaultMaxSupply?: string | null;
|
|
115
172
|
/** The single authorized minter (External Minter extension); null ⇒ owner-only. */
|
|
116
173
|
minter?: Address | null;
|
|
117
174
|
/** Whether minting is paused (Paused extension) — true ⇒ owner-only. Absent/false ⇒ open. */
|
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;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AE,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/dist/util.d.ts
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Small, environment-neutral helpers shared across the SDK core. Nothing here imports
|
|
3
|
+
* `node:*` or references a Node-only global (`Buffer`, `process` unguarded) — this module
|
|
4
|
+
* is reachable from the browser bundle (see `test/browser-bundle.test.ts`), so it has to
|
|
5
|
+
* run identically wherever a caller (Node, a bundler, a browser tab) loads it.
|
|
6
|
+
*/
|
|
7
|
+
import type { Address, PublicClient } from 'viem';
|
|
8
|
+
/** `process.env[name]`, or `undefined` — safe to call even where `process` doesn't exist
|
|
9
|
+
* (a browser bundle). The SDK core never assumes Node; a host (the CLI, the effects
|
|
10
|
+
* runner) is where `process.env` is actually meaningful. */
|
|
11
|
+
export declare function readEnv(name: string): string | undefined;
|
|
12
|
+
/** Wait `ms` milliseconds. The one place the SDK debounces/retries, so every caller shares
|
|
13
|
+
* the same primitive instead of re-declaring `new Promise((r) => setTimeout(r, ms))`. */
|
|
14
|
+
export declare function sleep(ms: number): Promise<void>;
|
|
15
|
+
/** The delay before retry `attempt` (1-indexed) under a LINEAR backoff: `attempt * baseMs`.
|
|
16
|
+
* Matches the shape `service.ts`'s request ladder already used (`retryDelayMs * attempt`) —
|
|
17
|
+
* pulled out here so every linear-backoff retry loop (the service client, the effects
|
|
18
|
+
* runner's resolver poll) computes the same delay the same way. */
|
|
19
|
+
export declare function linearBackoffDelay(attempt: number, baseMs: number): number;
|
|
20
|
+
/**
|
|
21
|
+
* The delay before retry `attempt` (1-indexed) under an EXPONENTIAL backoff, capped:
|
|
22
|
+
* `min(baseMs * 2^(attempt-1), capMs)`. Attempt 1 waits `baseMs`, attempt 2 waits `2*baseMs`,
|
|
23
|
+
* attempt 3 `4*baseMs`, and so on until the cap takes over.
|
|
24
|
+
*
|
|
25
|
+
* Prefer this over {@link linearBackoffDelay} for a SUSTAINED rate limit or an overloaded
|
|
26
|
+
* upstream, where a caller wants each retry to back off faster than the last so a burst of
|
|
27
|
+
* callers doesn't keep landing on the same wall-clock second (linear backoff's delays grow by a
|
|
28
|
+
* constant step, which under sustained pressure just re-synchronizes the retry storm at a lower
|
|
29
|
+
* frequency instead of spreading it out). Prefer `linearBackoffDelay` for a transient/one-off
|
|
30
|
+
* failure (a dropped connection, a single flaky read) where the retry ladder just needs to not
|
|
31
|
+
* hammer immediately — exponential growth there overshoots into multi-minute waits for what was
|
|
32
|
+
* likely a one-time blip.
|
|
33
|
+
*/
|
|
34
|
+
export declare function exponentialBackoffDelay(attempt: number, baseMs: number, capMs: number): number;
|
|
35
|
+
/**
|
|
36
|
+
* A parsed `data:` URI (RFC 2397) — the most permissive of the three ad hoc parses this
|
|
37
|
+
* replaces (a bare `data:,...`, a `;base64` flag anywhere in the parameter list, and an
|
|
38
|
+
* arbitrary `;charset=...` alongside it). `mime` is empty-string-normalized to `text/plain`
|
|
39
|
+
* (RFC 2397's own default); `body` is returned VERBATIM — still percent-encoded for a
|
|
40
|
+
* non-base64 URI, still base64 text for one that is — so the caller decodes it exactly the
|
|
41
|
+
* way it always did (`decodeURIComponent` vs a base64 decode).
|
|
42
|
+
*/
|
|
43
|
+
export interface ParsedDataUri {
|
|
44
|
+
mime: string;
|
|
45
|
+
base64: boolean;
|
|
46
|
+
body: string;
|
|
47
|
+
}
|
|
48
|
+
/** Parse a `data:` URI, or `null` if `uri` isn't one. */
|
|
49
|
+
export declare function parseDataUri(uri: string): ParsedDataUri | null;
|
|
50
|
+
/**
|
|
51
|
+
* Read a contract, swallowing any failure ("no data" from a codeless address, a revert on
|
|
52
|
+
* an extension the target doesn't compose) into `undefined` rather than a throw — the shape
|
|
53
|
+
* every "does this getter exist / is there even a contract here" caller wants. Replaces the
|
|
54
|
+
* three near-identical try/catch wrappers this SDK's callers each hand-rolled (a resume
|
|
55
|
+
* planner's field-by-field read, a state dump's per-getter read, an owner-op's diagnostic
|
|
56
|
+
* read) with one implementation.
|
|
57
|
+
*
|
|
58
|
+
* A caller that wants to DISTINGUISH "no contract at all" from "contract exists but this
|
|
59
|
+
* call reverted" (the CLI's `assertContractExists` diagnostic) still does that itself — this
|
|
60
|
+
* helper only knows "did the read come back", not why it didn't.
|
|
61
|
+
*/
|
|
62
|
+
export declare function tryReadContract<T>(client: PublicClient, args: {
|
|
63
|
+
address: Address;
|
|
64
|
+
abi: readonly unknown[];
|
|
65
|
+
functionName: string;
|
|
66
|
+
args?: readonly unknown[];
|
|
67
|
+
}): Promise<T | undefined>;
|
|
68
|
+
/** Bytes → base64 (RFC 4648). No `Buffer`, no `btoa` — both are runtime-conditional (Node
|
|
69
|
+
* lacks the latter, and a stricter embedder than a browser can lack the former too), and the
|
|
70
|
+
* SDK core needs exactly one behavior everywhere it runs. */
|
|
71
|
+
export declare function bytesToBase64(bytes: Uint8Array): string;
|
|
72
|
+
/** base64 → bytes — the inverse of {@link bytesToBase64}. */
|
|
73
|
+
export declare function base64ToBytes(b64: string): Uint8Array;
|
|
74
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAC,OAAO,EAAE,YAAY,EAAC,MAAM,MAAM,CAAC;AAEhD;;6DAE6D;AAC7D,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGxD;AAED;0FAC0F;AAC1F,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED;;;oEAGoE;AACpE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE9F;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAID,yDAAyD;AACzD,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAS9D;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,eAAe,CAAC,CAAC,EACrC,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,SAAS,OAAO,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,OAAO,EAAE,CAAA;CAAC,GACjG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAMxB;AAID;;8DAE8D;AAC9D,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAYvD;AAED,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAcrD"}
|
package/dist/util.js
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/** `process.env[name]`, or `undefined` — safe to call even where `process` doesn't exist
|
|
2
|
+
* (a browser bundle). The SDK core never assumes Node; a host (the CLI, the effects
|
|
3
|
+
* runner) is where `process.env` is actually meaningful. */
|
|
4
|
+
export function readEnv(name) {
|
|
5
|
+
if (typeof process === 'undefined' || !process.env)
|
|
6
|
+
return undefined;
|
|
7
|
+
return process.env[name];
|
|
8
|
+
}
|
|
9
|
+
/** Wait `ms` milliseconds. The one place the SDK debounces/retries, so every caller shares
|
|
10
|
+
* the same primitive instead of re-declaring `new Promise((r) => setTimeout(r, ms))`. */
|
|
11
|
+
export function sleep(ms) {
|
|
12
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
13
|
+
}
|
|
14
|
+
/** The delay before retry `attempt` (1-indexed) under a LINEAR backoff: `attempt * baseMs`.
|
|
15
|
+
* Matches the shape `service.ts`'s request ladder already used (`retryDelayMs * attempt`) —
|
|
16
|
+
* pulled out here so every linear-backoff retry loop (the service client, the effects
|
|
17
|
+
* runner's resolver poll) computes the same delay the same way. */
|
|
18
|
+
export function linearBackoffDelay(attempt, baseMs) {
|
|
19
|
+
return attempt * baseMs;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The delay before retry `attempt` (1-indexed) under an EXPONENTIAL backoff, capped:
|
|
23
|
+
* `min(baseMs * 2^(attempt-1), capMs)`. Attempt 1 waits `baseMs`, attempt 2 waits `2*baseMs`,
|
|
24
|
+
* attempt 3 `4*baseMs`, and so on until the cap takes over.
|
|
25
|
+
*
|
|
26
|
+
* Prefer this over {@link linearBackoffDelay} for a SUSTAINED rate limit or an overloaded
|
|
27
|
+
* upstream, where a caller wants each retry to back off faster than the last so a burst of
|
|
28
|
+
* callers doesn't keep landing on the same wall-clock second (linear backoff's delays grow by a
|
|
29
|
+
* constant step, which under sustained pressure just re-synchronizes the retry storm at a lower
|
|
30
|
+
* frequency instead of spreading it out). Prefer `linearBackoffDelay` for a transient/one-off
|
|
31
|
+
* failure (a dropped connection, a single flaky read) where the retry ladder just needs to not
|
|
32
|
+
* hammer immediately — exponential growth there overshoots into multi-minute waits for what was
|
|
33
|
+
* likely a one-time blip.
|
|
34
|
+
*/
|
|
35
|
+
export function exponentialBackoffDelay(attempt, baseMs, capMs) {
|
|
36
|
+
return Math.min(baseMs * 2 ** (attempt - 1), capMs);
|
|
37
|
+
}
|
|
38
|
+
const DATA_URI_RE = /^data:([^;,]*)((?:;[^,]*)?),([\s\S]*)$/;
|
|
39
|
+
/** Parse a `data:` URI, or `null` if `uri` isn't one. */
|
|
40
|
+
export function parseDataUri(uri) {
|
|
41
|
+
const m = DATA_URI_RE.exec(uri);
|
|
42
|
+
if (!m)
|
|
43
|
+
return null;
|
|
44
|
+
const params = m[2] ?? '';
|
|
45
|
+
return {
|
|
46
|
+
mime: m[1] || 'text/plain',
|
|
47
|
+
base64: /(^|;)base64(;|$)/.test(params),
|
|
48
|
+
body: m[3],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Read a contract, swallowing any failure ("no data" from a codeless address, a revert on
|
|
53
|
+
* an extension the target doesn't compose) into `undefined` rather than a throw — the shape
|
|
54
|
+
* every "does this getter exist / is there even a contract here" caller wants. Replaces the
|
|
55
|
+
* three near-identical try/catch wrappers this SDK's callers each hand-rolled (a resume
|
|
56
|
+
* planner's field-by-field read, a state dump's per-getter read, an owner-op's diagnostic
|
|
57
|
+
* read) with one implementation.
|
|
58
|
+
*
|
|
59
|
+
* A caller that wants to DISTINGUISH "no contract at all" from "contract exists but this
|
|
60
|
+
* call reverted" (the CLI's `assertContractExists` diagnostic) still does that itself — this
|
|
61
|
+
* helper only knows "did the read come back", not why it didn't.
|
|
62
|
+
*/
|
|
63
|
+
export async function tryReadContract(client, args) {
|
|
64
|
+
try {
|
|
65
|
+
return (await client.readContract(args));
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
return undefined;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
72
|
+
/** Bytes → base64 (RFC 4648). No `Buffer`, no `btoa` — both are runtime-conditional (Node
|
|
73
|
+
* lacks the latter, and a stricter embedder than a browser can lack the former too), and the
|
|
74
|
+
* SDK core needs exactly one behavior everywhere it runs. */
|
|
75
|
+
export function bytesToBase64(bytes) {
|
|
76
|
+
let out = '';
|
|
77
|
+
for (let i = 0; i < bytes.length; i += 3) {
|
|
78
|
+
const b0 = bytes[i];
|
|
79
|
+
const b1 = bytes[i + 1];
|
|
80
|
+
const b2 = bytes[i + 2];
|
|
81
|
+
out += BASE64_CHARS[b0 >> 2];
|
|
82
|
+
out += BASE64_CHARS[((b0 & 0x03) << 4) | (b1 === undefined ? 0 : b1 >> 4)];
|
|
83
|
+
out += b1 === undefined ? '=' : BASE64_CHARS[((b1 & 0x0f) << 2) | (b2 === undefined ? 0 : b2 >> 6)];
|
|
84
|
+
out += b2 === undefined ? '=' : BASE64_CHARS[b2 & 0x3f];
|
|
85
|
+
}
|
|
86
|
+
return out;
|
|
87
|
+
}
|
|
88
|
+
/** base64 → bytes — the inverse of {@link bytesToBase64}. */
|
|
89
|
+
export function base64ToBytes(b64) {
|
|
90
|
+
const clean = b64.replace(/=+$/, '');
|
|
91
|
+
const out = new Uint8Array(Math.floor((clean.length * 3) / 4));
|
|
92
|
+
let p = 0;
|
|
93
|
+
for (let i = 0; i < clean.length; i += 4) {
|
|
94
|
+
const c0 = BASE64_CHARS.indexOf(clean[i]);
|
|
95
|
+
const c1 = BASE64_CHARS.indexOf(clean[i + 1]);
|
|
96
|
+
const c2 = clean[i + 2] === undefined ? -1 : BASE64_CHARS.indexOf(clean[i + 2]);
|
|
97
|
+
const c3 = clean[i + 3] === undefined ? -1 : BASE64_CHARS.indexOf(clean[i + 3]);
|
|
98
|
+
out[p++] = (c0 << 2) | (c1 >> 4);
|
|
99
|
+
if (c2 >= 0)
|
|
100
|
+
out[p++] = ((c1 & 0x0f) << 4) | (c2 >> 2);
|
|
101
|
+
if (c3 >= 0)
|
|
102
|
+
out[p++] = ((c2 & 0x03) << 6) | c3;
|
|
103
|
+
}
|
|
104
|
+
return out;
|
|
105
|
+
}
|
|
106
|
+
//# sourceMappingURL=util.js.map
|
package/d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AAI,CAAC,CAAC,CAAC;QACjC,IAAI,EAAE,IAAI,CAAC;YAAE,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;QACvD,IAAI,EAAE,IAAI,CAAC;YAAE,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IAClD,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
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.20",
|
|
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",
|
|
@@ -13,7 +13,12 @@
|
|
|
13
13
|
"./abi": {
|
|
14
14
|
"types": "./dist/abi/index.d.ts",
|
|
15
15
|
"import": "./dist/abi/index.js"
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
|
+
"./node": {
|
|
18
|
+
"types": "./dist/node.d.ts",
|
|
19
|
+
"import": "./dist/node.js"
|
|
20
|
+
},
|
|
21
|
+
"./package.json": "./package.json"
|
|
17
22
|
},
|
|
18
23
|
"files": [
|
|
19
24
|
"dist",
|
|
@@ -45,6 +50,9 @@
|
|
|
45
50
|
"dependencies": {
|
|
46
51
|
"viem": "^2.21.0"
|
|
47
52
|
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"esbuild": "^0.28.1"
|
|
55
|
+
},
|
|
48
56
|
"scripts": {
|
|
49
57
|
"build": "tsc -b tsconfig.build.json",
|
|
50
58
|
"sync-abis": "tsx scripts/sync-abis.ts"
|