@manifoldxyz/dropkit 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -97,6 +97,48 @@ function erc20ContractConfig(chainId: number, address: Address, paymentToken: Ad
97
97
  The example charges 1,000,000 token base units per mint. The deployed contract must spend that token from the payer.
98
98
  The adapter reads allowance and creates an approval leg when required. Manifold claims discover their payment token on-chain instead.
99
99
 
100
+ ## Transient Labs drops
101
+
102
+ `tl-stacks` sells a drop that lives on Transient Labs (TL) Stacks 721 (v2.3.0 or v2.3.1) from your own page. Write three values; everything else is read from the chain.
103
+
104
+ ```tsx
105
+ import { MintButton, type MintResult, type TlStacksConfig } from '@manifoldxyz/dropkit';
106
+
107
+ const boneMarket: TlStacksConfig = {
108
+ type: 'tl-stacks',
109
+ chainId: 1,
110
+ stacks: '0x384092784cfaa91efaa77870c04d958e20840242',
111
+ nftContract: '0x8da32357980b32d13f91c607ac52712d96f5e656',
112
+ // Only a presale needs this. See "Where allowlistUrl comes from".
113
+ allowlistUrl: 'https://example.com/stacks/drop-id/allowlist',
114
+ };
115
+
116
+ export function Mint({ rpcUrl }: { rpcUrl: string }) {
117
+ return <MintButton config={boneMarket} rpcUrls={{ 1: rpcUrl }} />;
118
+ }
119
+
120
+ /** "Minted 1 of 5. The rest was refunded." when the sale minted fewer than asked. */
121
+ export function mintedLine(result: MintResult): string {
122
+ const minted = result.tokens.length;
123
+ return minted < result.requested ? `Minted ${minted} of ${result.requested}. The rest was refunded.` : `Minted ${minted}.`;
124
+ }
125
+ ```
126
+
127
+ - `stacks` is TL's sale contract. It is `0x384092784cfaa91efaa77870c04d958e20840242` on Ethereum, Base, Arbitrum, Shape, Sepolia and Base Sepolia. It has no default: a TL redeploy must be a config change.
128
+ - `nftContract` is the creator's TL contract (ERC721TL, ERC7160TL or ERC7160TLEditions). TL keeps one drop per NFT contract.
129
+ - The button shows the price for the current phase, TL's fee, supply left, the phase times and the per-wallet limit, all read from the chain. It refreshes by itself when the presale ends, so the price changes from presale to public with no reload.
130
+ - `rpcUrls`: the Manifold read bridge only serves Manifold contracts. Pass your own domain-restricted RPC key for the drop's chain. Without it, reads use the chain's public RPC.
131
+
132
+ **Where `allowlistUrl` comes from.** TL publishes an allowlist file for every presale. Its URL is the `allowlistUrl` field in the drop's page data on transient.xyz. It is an OpenZeppelin merkle tree dump (`format: "standard-v1"`, leaves `[keccak256(abi.encode(wallet)), allowance]`). A site can also host a copy in the same format. The button loads it once per page, only in the presale and only after a wallet connects, checks that its root equals the drop's on-chain `presaleMerkleRoot`, and builds the wallet's proof in the browser. Nothing is asked of the collector or the creator. A presale with no `allowlistUrl`, an unreachable file or a root that does not match fails with `ALLOWLIST_UNAVAILABLE`; the button never sends a presale mint it cannot prove. The public sale does not use the file. A page left open while TL changes the allowlist needs a reload.
133
+
134
+ **Limits (v1).** ERC-721 drops priced in the chain's native token only. No ERC-1155, ERC-20 prices, ERC-7160 version picker, Relay cross-chain payment or cart: a `tl-stacks` config in the cart is rejected with `INVALID_CONFIG`. Other Stacks versions are `unsupported` with `INVALID_CONFIG`. A chain with no drop for the NFT contract is `unsupported` with `DROP_NOT_FOUND`.
135
+
136
+ **Fee.** For `tl-stacks`, `DropInfo.unitFee` is TL's protocol fee, not a Manifold fee. Label it "TL fee" in a custom UI. The collector pays `quantity × (unitPrice + unitFee)`.
137
+
138
+ **Partial mints.** TL mints fewer tokens than asked when the wallet limit or the supply left is lower, and refunds the rest in the same transaction. `MintResult.requested` is the quantity asked for and `tokens.length` is what was minted, so a site can show "Minted 1 of 5. The rest was refunded." as above. For Manifold claims and contract drops `requested` equals the quantity, so their results read as before. A refund to a wallet that rejects a 100k-gas ETH transfer, such as some smart wallets, arrives as WETH instead of ETH.
139
+
140
+ **Price changes.** The amount sent is the last drop read before the click. If the price or fee went up since, the simulation fails and the next refresh shows the new amount. If it went down, TL refunds the difference.
141
+
100
142
  ## React API
101
143
 
102
144
  `useMint(options)` and `MintButton` accept:
@@ -148,7 +190,7 @@ export function CustomMint({ config }: { config: MintConfig }) {
148
190
  | `total` | `{ native: Money, erc20: Money \| null }`, or null before the drop loads. Includes the Manifold fee. |
149
191
  | `mint` | Stable callback. Connects, submits an attempt, or resets a terminal state, depending on `state`. |
150
192
  | `refresh` | Stable callback returning `Promise<void>`. Re-reads drop data. Queues refreshes during an attempt. |
151
- | `result` | `{ txHash, explorerUrl, tokens }` after success, otherwise null. Token IDs and amounts are bigint. |
193
+ | `result` | `{ txHash, explorerUrl, tokens, requested }` after success, otherwise null. Token IDs and amounts are bigint. `requested` is the quantity asked for. |
152
194
  | `canAct` | Whether a click can act. False during an attempt, including its pre-prompt planning phase. |
153
195
  | `route` | `{ kind: 'direct', chainId }` or `{ kind: 'relay', originChainId, amountIn, relayFee, originGas, quotedAt }`. Null before the wallet read. |
154
196
  | `crossChain` | Inputs for `PayWithPicker`. Null when Relay cannot mint this drop for this wallet. |
@@ -197,6 +239,7 @@ ERC20 totals include the token price and any native fee. Gas is checked separate
197
239
  | `UNKNOWN_EXTENSION` | `unsupported` | Extension is not supported on this chain. |
198
240
  | `AMBIGUOUS_EXTENSION` | `unsupported` | Discovery found multiple claims. Supply `extension`. |
199
241
  | `CLAIM_NOT_FOUND` | `unsupported` | No supported extension contains this claim. |
242
+ | `DROP_NOT_FOUND` | `unsupported` | `tl-stacks` only: Stacks has no drop configured for this NFT contract. |
200
243
  | `SIGNATURE_CLAIM` | `unsupported` | Signature or redemption-code minting is not supported. |
201
244
  | `INVALID_CONFIG` | `unsupported` | Invalid field, ABI, function, placeholder, or chain. Read `message`. |
202
245
  | `CONNECT_WIDGET_TOO_OLD` | `unsupported` | Host widget lacks the required modal API. |
@@ -334,13 +377,13 @@ From the repository root, use Node 24 and pnpm 10.34.5:
334
377
  pnpm install --frozen-lockfile
335
378
  cd packages/react/dropkit
336
379
  pnpm test # fast unit and component tests, no network
337
- pnpm test:chain # adapters against a local Sepolia fork
380
+ pnpm test:chain # adapters against local Sepolia and Ethereum mainnet forks
338
381
  pnpm run typecheck
339
382
  pnpm run lint
340
383
  pnpm run build
341
384
  pnpm verify:package # packed tarball in clean React 18 and 19 consumers
342
385
  ```
343
386
 
344
- `test:chain` requires `anvil` on `PATH` and `SEPOLIA_RPC_URL`. It forks block 11838500 and fails rather than skips when either is missing.
387
+ `test:chain` requires `anvil` on `PATH`, `SEPOLIA_RPC_URL` and `MAINNET_RPC_URL`. The Sepolia tests fork block 11838500. The Transient Labs test forks Ethereum mainnet at blocks 26234702 and 26235901, so `MAINNET_RPC_URL` must be an archive endpoint. It fails rather than skips when any is missing.
345
388
  `verify:package` needs npm registry access. It type-checks every TypeScript example in this README.
346
389
  The repository's pnpm policy enforces a seven-day release age, except for `@manifoldxyz/*` packages.
package/dist/cart.cjs CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- var _chunkOO6QQT3Mcjs = require('./chunk-OO6QQT3M.cjs');
21
+ var _chunkGO4TR3HBcjs = require('./chunk-GO4TR3HB.cjs');
22
22
 
23
23
  // src/cart/react.ts
24
24
  var _react = require('react');
@@ -34,13 +34,13 @@ var CartError = class extends Error {
34
34
  };
35
35
  function cartReason(e) {
36
36
  if (e instanceof CartError) return { reason: e.reason, message: e.message };
37
- if (_chunkOO6QQT3Mcjs.isMintError.call(void 0, e)) return _chunkOO6QQT3Mcjs.toReason.call(void 0, e);
38
- return _chunkOO6QQT3Mcjs.toReason.call(void 0, e);
37
+ if (_chunkGO4TR3HBcjs.isMintError.call(void 0, e)) return _chunkGO4TR3HBcjs.toReason.call(void 0, e);
38
+ return _chunkGO4TR3HBcjs.toReason.call(void 0, e);
39
39
  }
40
40
 
41
41
  // src/cart/line.ts
42
42
  var _viem = require('viem');
43
- var isUnsupportedReason = (r) => _chunkOO6QQT3Mcjs.UNSUPPORTED_REASONS.includes(r);
43
+ var isUnsupportedReason = (r) => _chunkGO4TR3HBcjs.UNSUPPORTED_REASONS.includes(r);
44
44
  function deriveLine(args) {
45
45
  const { drop, walletRead, readError, now, pending, walletConnected } = args;
46
46
  const out = (state, reason = null, message = null) => ({ state, reason, message });
@@ -63,7 +63,7 @@ function lineMaxQuantity(drop, walletRead) {
63
63
  let max = null;
64
64
  if (drop.maxSupply !== null && drop.maxSupply > 0n) {
65
65
  const left = drop.maxSupply - drop.totalMinted;
66
- max = left > 0n ? left < BigInt(_chunkOO6QQT3Mcjs.MAX_QUANTITY) ? Number(left) : _chunkOO6QQT3Mcjs.MAX_QUANTITY : 0;
66
+ max = left > 0n ? left < BigInt(_chunkGO4TR3HBcjs.MAX_QUANTITY) ? Number(left) : _chunkGO4TR3HBcjs.MAX_QUANTITY : 0;
67
67
  }
68
68
  if (walletRead !== null && walletRead.maxQuantity !== null) {
69
69
  const cap = Math.max(0, Math.floor(walletRead.maxQuantity));
@@ -100,7 +100,7 @@ function sharedReadClient(raw) {
100
100
  const overrides = {
101
101
  getCode: (args) => {
102
102
  const address = args.address.toLowerCase();
103
- if (_chunkOO6QQT3Mcjs.findExtension.call(void 0, chainId(), address)) return memo(forever, `code:${address}`, () => raw.getCode(args));
103
+ if (_chunkGO4TR3HBcjs.findExtension.call(void 0, chainId(), address)) return memo(forever, `code:${address}`, () => raw.getCode(args));
104
104
  return raw.getCode(args);
105
105
  },
106
106
  readContract: (args) => {
@@ -185,19 +185,19 @@ function itemKey(config) {
185
185
  function canonicalConfig(config, chainId) {
186
186
  const c = _nullishCoalesce(config, () => ( {}));
187
187
  if (c.type !== "manifold-claim") {
188
- throw new (0, _chunkOO6QQT3Mcjs.MintError)("INVALID_CONFIG", 'The cart takes only Manifold claims (type: "manifold-claim").', { field: "type" });
188
+ throw new (0, _chunkGO4TR3HBcjs.MintError)("INVALID_CONFIG", 'The cart takes only Manifold claims (type: "manifold-claim").', { field: "type" });
189
189
  }
190
190
  if (c.chainId !== chainId) {
191
- throw new (0, _chunkOO6QQT3Mcjs.MintError)("INVALID_CONFIG", `This cart is on chain ${String(chainId)}; the config is on chain ${String(c.chainId)}.`, { field: "chainId" });
191
+ throw new (0, _chunkGO4TR3HBcjs.MintError)("INVALID_CONFIG", `This cart is on chain ${String(chainId)}; the config is on chain ${String(c.chainId)}.`, { field: "chainId" });
192
192
  }
193
193
  if (typeof c.creatorContract !== "string" || !_viem.isAddress.call(void 0, c.creatorContract, { strict: false })) {
194
- throw new (0, _chunkOO6QQT3Mcjs.MintError)("INVALID_CONFIG", "creatorContract is not a valid address.", { field: "creatorContract" });
194
+ throw new (0, _chunkGO4TR3HBcjs.MintError)("INVALID_CONFIG", "creatorContract is not a valid address.", { field: "creatorContract" });
195
195
  }
196
196
  if (typeof c.extension !== "string" || !_viem.isAddress.call(void 0, c.extension, { strict: false })) {
197
- throw new (0, _chunkOO6QQT3Mcjs.MintError)("INVALID_CONFIG", "Cart configs must set extension (the claim extension address).", { field: "extension" });
197
+ throw new (0, _chunkGO4TR3HBcjs.MintError)("INVALID_CONFIG", "Cart configs must set extension (the claim extension address).", { field: "extension" });
198
198
  }
199
199
  if (typeof c.instanceId !== "string" || !/^\d+$/.test(c.instanceId)) {
200
- throw new (0, _chunkOO6QQT3Mcjs.MintError)("INVALID_CONFIG", "instanceId must be a non-negative integer string.", { field: "instanceId" });
200
+ throw new (0, _chunkGO4TR3HBcjs.MintError)("INVALID_CONFIG", "instanceId must be a non-negative integer string.", { field: "instanceId" });
201
201
  }
202
202
  return {
203
203
  type: "manifold-claim",
@@ -207,13 +207,13 @@ function canonicalConfig(config, chainId) {
207
207
  extension: _viem.getAddress.call(void 0, c.extension)
208
208
  };
209
209
  }
210
- var clampQuantity = (q) => Math.max(1, Math.min(Math.floor(Number.isFinite(q) ? q : 1), _chunkOO6QQT3Mcjs.MAX_QUANTITY));
210
+ var clampQuantity = (q) => Math.max(1, Math.min(Math.floor(Number.isFinite(q) ? q : 1), _chunkGO4TR3HBcjs.MAX_QUANTITY));
211
211
  var EMPTY_VALUE = (chainId) => ({ v: CART_VALUE_VERSION, chainId, items: [], pending: [], results: [] });
212
212
  var isRecord = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
213
213
  var isHash = (v) => typeof v === "string" && /^0x[0-9a-fA-F]{64}$/.test(v);
214
214
  var isAddr = (v) => typeof v === "string" && _viem.isAddress.call(void 0, v, { strict: false });
215
215
  var isIntStr = (v) => typeof v === "string" && /^\d+$/.test(v);
216
- var isQuantity = (v) => typeof v === "number" && Number.isInteger(v) && v >= 1 && v <= _chunkOO6QQT3Mcjs.MAX_QUANTITY;
216
+ var isQuantity = (v) => typeof v === "number" && Number.isInteger(v) && v >= 1 && v <= _chunkGO4TR3HBcjs.MAX_QUANTITY;
217
217
  function restoreConfig(v, chainId) {
218
218
  try {
219
219
  return canonicalConfig(v, chainId);
@@ -552,7 +552,7 @@ var CART_TIMING = {
552
552
  merklePerMinute: 10
553
553
  };
554
554
  var nowSec = () => Math.floor(Date.now() / 1e3);
555
- var adapter = _chunkOO6QQT3Mcjs.manifoldClaimAdapter;
555
+ var adapter = _chunkGO4TR3HBcjs.manifoldClaimAdapter;
556
556
  var LineSkipped = class extends Error {
557
557
 
558
558
 
@@ -603,11 +603,11 @@ async function prepareLine(env, line, payer) {
603
603
  try {
604
604
  await adapter.simulate(a.ctx, a.attempt, a.plan);
605
605
  } catch (e) {
606
- if (e instanceof _chunkOO6QQT3Mcjs.MintError && e.reason === "SIMULATION_REVERTED") throw new LineSkipped("ineligible", "SIMULATION_REVERTED", _chunkOO6QQT3Mcjs.friendlyErrorMessage.call(void 0, e));
606
+ if (e instanceof _chunkGO4TR3HBcjs.MintError && e.reason === "SIMULATION_REVERTED") throw new LineSkipped("ineligible", "SIMULATION_REVERTED", _chunkGO4TR3HBcjs.friendlyErrorMessage.call(void 0, e));
607
607
  throw e;
608
608
  }
609
609
  const query = _nullishCoalesce(_optionalChain([adapter, 'access', _27 => _27.holdingsQuery, 'optionalCall', _28 => _28(a.drop)]), () => ( null));
610
- if (!query || !adapter.readHoldings) throw new (0, _chunkOO6QQT3Mcjs.MintError)("RPC_ERROR", "The cart cannot count holdings for this item.");
610
+ if (!query || !adapter.readHoldings) throw new (0, _chunkGO4TR3HBcjs.MintError)("RPC_ERROR", "The cart cannot count holdings for this item.");
611
611
  const before = await adapter.readHoldings(a.ctx, query, a.recipient);
612
612
  const unit = a.drop.unitPrice;
613
613
  return {
@@ -635,8 +635,8 @@ async function withRetries(fn, delaysMs, isFinal, signal) {
635
635
  }
636
636
  }
637
637
  }
638
- var sendSwitch = (chainId) => _chunkOO6QQT3Mcjs.requestSwitch.call(void 0, chainId);
639
- var sendAddChain = (chainId) => _chunkOO6QQT3Mcjs.requestAddChain.call(void 0, chainId);
638
+ var sendSwitch = (chainId) => _chunkGO4TR3HBcjs.requestSwitch.call(void 0, chainId);
639
+ var sendAddChain = (chainId) => _chunkGO4TR3HBcjs.requestAddChain.call(void 0, chainId);
640
640
  var openCalls = /* @__PURE__ */ new Set();
641
641
  var notSentCalls = /* @__PURE__ */ new Set();
642
642
  var markCallOpen = (id) => void openCalls.add(id);
@@ -647,15 +647,15 @@ var wasNotSent = (id) => notSentCalls.has(id);
647
647
  var SEND_METHODS = /* @__PURE__ */ new Set(["eth_sendTransaction", "wallet_sendTransaction"]);
648
648
  async function sendMint(prepared, hooks) {
649
649
  const notSent = (message, cause) => new CartError("REQUEST_NOT_SENT", message, { cause });
650
- const live = _chunkOO6QQT3Mcjs.getAccount.call(void 0, );
650
+ const live = _chunkGO4TR3HBcjs.getAccount.call(void 0, );
651
651
  if (!live || live.address.toLowerCase() !== prepared.payer.toLowerCase()) {
652
652
  throw notSent("The connected wallet changed before the transaction was sent.");
653
653
  }
654
654
  let provider;
655
655
  let chain;
656
656
  try {
657
- provider = _chunkOO6QQT3Mcjs.getWalletProvider.call(void 0, );
658
- chain = _chunkOO6QQT3Mcjs.getChain.call(void 0, prepared.config.chainId);
657
+ provider = _chunkGO4TR3HBcjs.getWalletProvider.call(void 0, );
658
+ chain = _chunkGO4TR3HBcjs.getChain.call(void 0, prepared.config.chainId);
659
659
  } catch (e) {
660
660
  throw notSent("No wallet is connected.", e);
661
661
  }
@@ -678,7 +678,7 @@ async function sendMint(prepared, hooks) {
678
678
  var receiptOk = (status) => status === "success" || status === 1 || status === 1n || status === "0x1";
679
679
  function toMintReceipt(receipt, hash, tokenContract, recipient) {
680
680
  const ok = receiptOk(receipt.status);
681
- const parsed = ok ? _chunkOO6QQT3Mcjs.parseMintReceipt.call(void 0, _nullishCoalesce(receipt.logs, () => ( [])), { tokenContract, recipient }) : [];
681
+ const parsed = ok ? _chunkGO4TR3HBcjs.parseMintReceipt.call(void 0, _nullishCoalesce(receipt.logs, () => ( [])), { tokenContract, recipient }) : [];
682
682
  const minted = parsed.reduce((n, t) => n + t.amount, 0n);
683
683
  const tokens = parsed.map((t) => ({ contract: t.contract, tokenId: t.tokenId.toString() }));
684
684
  return { status: ok ? "success" : "reverted", hash: _nullishCoalesce(receipt.transactionHash, () => ( hash)), minted, tokens };
@@ -811,7 +811,7 @@ function explorerTx(chainId, hash) {
811
811
  if (!hash) return null;
812
812
  let base;
813
813
  try {
814
- base = _optionalChain([_chunkOO6QQT3Mcjs.getChain.call(void 0, chainId), 'access', _34 => _34.blockExplorers, 'optionalAccess', _35 => _35.default, 'access', _36 => _36.url]);
814
+ base = _optionalChain([_chunkGO4TR3HBcjs.getChain.call(void 0, chainId), 'access', _34 => _34.blockExplorers, 'optionalAccess', _35 => _35.default, 'access', _36 => _36.url]);
815
815
  } catch (e11) {
816
816
  return null;
817
817
  }
@@ -845,17 +845,17 @@ var StateContext = _react.createContext.call(void 0, null);
845
845
  var InternalsContext = _react.createContext.call(void 0, null);
846
846
  function useCartInternals() {
847
847
  const v = _react.useContext.call(void 0, InternalsContext);
848
- if (!v) throw new (0, _chunkOO6QQT3Mcjs.MintError)("INVALID_CONFIG", "useCheckout must be used inside <CartProvider>.");
848
+ if (!v) throw new (0, _chunkGO4TR3HBcjs.MintError)("INVALID_CONFIG", "useCheckout must be used inside <CartProvider>.");
849
849
  return v;
850
850
  }
851
851
  function useCart() {
852
852
  const v = _react.useContext.call(void 0, StateContext);
853
- if (!v) throw new (0, _chunkOO6QQT3Mcjs.MintError)("INVALID_CONFIG", "useCart must be used inside <CartProvider>.");
853
+ if (!v) throw new (0, _chunkGO4TR3HBcjs.MintError)("INVALID_CONFIG", "useCart must be used inside <CartProvider>.");
854
854
  return v;
855
855
  }
856
856
  var isFinalRead = (e) => {
857
857
  const r = cartReason(e).reason;
858
- return _chunkOO6QQT3Mcjs.UNSUPPORTED_REASONS.includes(r) || r === "INVALID_CONFIG";
858
+ return _chunkGO4TR3HBcjs.UNSUPPORTED_REASONS.includes(r) || r === "INVALID_CONFIG";
859
859
  };
860
860
  var emptyValue = (chainId) => ({ v: 6, chainId, items: [], pending: [], results: [] });
861
861
  var LineBook = (_class3 = class {constructor() { _class3.prototype.__init11.call(this);_class3.prototype.__init12.call(this);_class3.prototype.__init13.call(this);_class3.prototype.__init14.call(this);_class3.prototype.__init15.call(this); }
@@ -908,9 +908,9 @@ var Core = (_class4 = class {constructor() { _class4.prototype.__init16.call(thi
908
908
  return this.lifetime;
909
909
  }
910
910
  }, _class4);
911
- var subscribeAccountChanges = (notify) => _chunkOO6QQT3Mcjs.subscribeAccount.call(void 0, () => notify());
911
+ var subscribeAccountChanges = (notify) => _chunkGO4TR3HBcjs.subscribeAccount.call(void 0, () => notify());
912
912
  var accountSnapshot = () => {
913
- const a = _chunkOO6QQT3Mcjs.getAccount.call(void 0, );
913
+ const a = _chunkGO4TR3HBcjs.getAccount.call(void 0, );
914
914
  return a ? `${a.address}:${String(a.chainId)}` : "";
915
915
  };
916
916
  function buildLines(value, book, payer, now, version) {
@@ -944,7 +944,7 @@ function CartProvider(props) {
944
944
  _react.useEffect.call(void 0, () => core.sync(value.items, payer), [core, value.items, payer]);
945
945
  _react.useEffect.call(void 0, () => {
946
946
  if (activeKeys.has(storageKey)) {
947
- throw new (0, _chunkOO6QQT3Mcjs.MintError)("INVALID_CONFIG", "Only one CartProvider per storageKey. Wrap your app once.", { field: "storageKey" });
947
+ throw new (0, _chunkGO4TR3HBcjs.MintError)("INVALID_CONFIG", "Only one CartProvider per storageKey. Wrap your app once.", { field: "storageKey" });
948
948
  }
949
949
  activeKeys.add(storageKey);
950
950
  core.setRegistered(storageKey);
@@ -963,7 +963,7 @@ function CartProvider(props) {
963
963
  }, []);
964
964
  const rpcKey = _nullishCoalesce(_optionalChain([rpcUrls, 'optionalAccess', _44 => _44[chainId]]), () => ( ""));
965
965
  const readClient = _react.useMemo.call(void 0,
966
- () => _chunkOO6QQT3Mcjs.createReadClient.call(void 0, { chainId, ...rpcKey ? { rpcUrls: { [chainId]: rpcKey } } : {}, useBridge: true }),
966
+ () => _chunkGO4TR3HBcjs.createReadClient.call(void 0, { chainId, ...rpcKey ? { rpcUrls: { [chainId]: rpcKey } } : {}, useBridge: true }),
967
967
  [chainId, rpcKey]
968
968
  );
969
969
  const shared = _react.useMemo.call(void 0, () => sharedReadClient(readClient), [readClient]);
@@ -986,14 +986,14 @@ function CartProvider(props) {
986
986
  [shared, chainId, merkleFetch, core]
987
987
  );
988
988
  _react.useEffect.call(void 0, () => {
989
- const loading = _chunkOO6QQT3Mcjs.loadConnectWidget.call(void 0, { chainIds: [chainId], ...projectId ? { walletConnectProjectId: projectId } : {} });
989
+ const loading = _chunkGO4TR3HBcjs.loadConnectWidget.call(void 0, { chainIds: [chainId], ...projectId ? { walletConnectProjectId: projectId } : {} });
990
990
  core.setWidgetLoad(loading);
991
991
  loading.catch(() => void 0);
992
992
  }, [chainId, projectId, core]);
993
993
  const connect = _react.useCallback.call(void 0, async () => {
994
994
  try {
995
995
  await core.widgetLoad;
996
- return await _chunkOO6QQT3Mcjs.openConnectModal.call(void 0, );
996
+ return await _chunkGO4TR3HBcjs.openConnectModal.call(void 0, );
997
997
  } catch (e13) {
998
998
  return "dismissed";
999
999
  }
@@ -1290,11 +1290,11 @@ function useCheckout() {
1290
1290
  };
1291
1291
  try {
1292
1292
  if (!k.store.persistenceOk()) return blocked("PERSISTENCE_UNAVAILABLE", "The cart could not save its state in this tab, so nothing was sent.");
1293
- let account = _chunkOO6QQT3Mcjs.getAccount.call(void 0, );
1293
+ let account = _chunkGO4TR3HBcjs.getAccount.call(void 0, );
1294
1294
  if (!account) {
1295
1295
  const outcome = await k.connect();
1296
1296
  if (!live()) return;
1297
- account = _chunkOO6QQT3Mcjs.getAccount.call(void 0, );
1297
+ account = _chunkGO4TR3HBcjs.getAccount.call(void 0, );
1298
1298
  if (outcome === "dismissed" || !account) return idle();
1299
1299
  }
1300
1300
  const payer = account.address;
@@ -1561,7 +1561,7 @@ function useCheckout() {
1561
1561
  const out2 = await k.settle(pending.id);
1562
1562
  return applyOutcome(pending.lineKey, pending.id, out2, null);
1563
1563
  }
1564
- if (_chunkOO6QQT3Mcjs.isRejection.call(void 0, e)) {
1564
+ if (_chunkGO4TR3HBcjs.isRejection.call(void 0, e)) {
1565
1565
  try {
1566
1566
  k.store.removePending(pending.id);
1567
1567
  } catch (e18) {
package/dist/cart.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, ReactElement } from 'react';
2
2
  import { Address, Hex } from 'viem';
3
- import { R as ReasonCode, M as ManifoldClaimConfig, D as DropInfo, a as Money, b as RpcUrls } from './types-CFLoS6p4.cjs';
3
+ import { R as ReasonCode, M as ManifoldClaimConfig, D as DropInfo, a as Money, b as RpcUrls } from './types-BjKGb6c7.cjs';
4
4
 
5
5
  declare const CART_REASONS: readonly ["CART_ERC20_UNSUPPORTED", "PERSISTENCE_UNAVAILABLE", "REQUEST_NOT_SENT"];
6
6
  type CartOnlyReason = (typeof CART_REASONS)[number];
package/dist/cart.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, ReactElement } from 'react';
2
2
  import { Address, Hex } from 'viem';
3
- import { R as ReasonCode, M as ManifoldClaimConfig, D as DropInfo, a as Money, b as RpcUrls } from './types-CFLoS6p4.js';
3
+ import { R as ReasonCode, M as ManifoldClaimConfig, D as DropInfo, a as Money, b as RpcUrls } from './types-BjKGb6c7.js';
4
4
 
5
5
  declare const CART_REASONS: readonly ["CART_ERC20_UNSUPPORTED", "PERSISTENCE_UNAVAILABLE", "REQUEST_NOT_SENT"];
6
6
  type CartOnlyReason = (typeof CART_REASONS)[number];
package/dist/cart.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  requestSwitch,
19
19
  subscribeAccount,
20
20
  toReason
21
- } from "./chunk-3PA74M2L.js";
21
+ } from "./chunk-SUJQB3SL.js";
22
22
 
23
23
  // src/cart/react.ts
24
24
  import { createContext, createElement, useCallback, useContext, useEffect, useMemo, useState, useSyncExternalStore } from "react";
@@ -37,7 +37,7 @@ function friendlyErrorMessage(error) {
37
37
  if (isMintError(error)) {
38
38
  if (error.reason === "INSUFFICIENT_FUNDS") return _nullishCoalesce(fundsMessage(collect(error.cause)), () => ( error.message));
39
39
  if (error.reason !== "RPC_ERROR" && error.reason !== "SIMULATION_REVERTED") return error.message;
40
- if (error.reason === "SIMULATION_REVERTED" && error.domain === "relay") return error.message;
40
+ if (error.reason === "SIMULATION_REVERTED" && (error.domain === "relay" || error.domain === "tl-stacks")) return error.message;
41
41
  if (error.reason === "SIMULATION_REVERTED" && (error.message === "The token refused the approval." || error.message === "The drop is no longer available for this quantity.")) return error.message;
42
42
  }
43
43
  const errors = collect(error);
@@ -89,6 +89,7 @@ var UNSUPPORTED_REASONS = [
89
89
  "UNKNOWN_EXTENSION",
90
90
  "AMBIGUOUS_EXTENSION",
91
91
  "CLAIM_NOT_FOUND",
92
+ "DROP_NOT_FOUND",
92
93
  "SIGNATURE_CLAIM",
93
94
  "INVALID_CONFIG",
94
95
  "CONNECT_WIDGET_TOO_OLD"
@@ -118,7 +119,7 @@ var MintError = class extends Error {
118
119
 
119
120
  /** INVALID_CONFIG only: dotted path of the bad field, e.g. "mint.args[1]" or "price". */
120
121
 
121
- /** 'relay': the message is Relay's decoded destination revert, shown as-is. */
122
+ /** 'relay' or 'tl-stacks': the message is a decoded destination revert, shown as-is. */
122
123
 
123
124
  constructor(reason, message, opts) {
124
125
  super(message, _optionalChain([opts, 'optionalAccess', _6 => _6.cause]) === void 0 ? void 0 : { cause: opts.cause });
@@ -263,7 +264,12 @@ function reducer(state, event) {
263
264
  }
264
265
  case "DROP_LOADED": {
265
266
  if (event.gen !== state.readGen) return state;
266
- const next = { ...state, drop: event.drop, now: Math.max(state.now, event.now) };
267
+ let next = { ...state, drop: event.drop, now: Math.max(state.now, event.now) };
268
+ const oldKey = _optionalChain([state, 'access', _12 => _12.drop, 'optionalAccess', _13 => _13.walletKey]);
269
+ const newKey = event.drop.walletKey;
270
+ if (oldKey !== void 0 && newKey !== void 0 && oldKey !== newKey) {
271
+ next = { ...next, walletRead: null, walletGen: state.walletGen + 1 };
272
+ }
267
273
  if (inFlight) return { ...next, pendingRefresh: true };
268
274
  return isIdle(next) ? settle(clampQuantity(next), false) : clampQuantity(next);
269
275
  }
@@ -317,7 +323,7 @@ function reducer(state, event) {
317
323
  case "TX_SUBMITTED":
318
324
  return step(state, event.attemptId, "confirming");
319
325
  case "ATTEMPT_SUCCEEDED":
320
- return _optionalChain([state, 'access', _12 => _12.attempt, 'optionalAccess', _13 => _13.attemptId]) === event.attemptId ? {
326
+ return _optionalChain([state, 'access', _14 => _14.attempt, 'optionalAccess', _15 => _15.attemptId]) === event.attemptId ? {
321
327
  ...state,
322
328
  name: "success",
323
329
  reason: null,
@@ -328,7 +334,7 @@ function reducer(state, event) {
328
334
  readGen: state.readGen + 1
329
335
  } : state;
330
336
  case "ATTEMPT_FAILED": {
331
- if (_optionalChain([state, 'access', _14 => _14.attempt, 'optionalAccess', _15 => _15.attemptId]) !== event.attemptId) return state;
337
+ if (_optionalChain([state, 'access', _16 => _16.attempt, 'optionalAccess', _17 => _17.attemptId]) !== event.attemptId) return state;
332
338
  const { reason, message } = event;
333
339
  const done = { ...state, reason, message, attempt: null, result: null };
334
340
  if (INELIGIBLE_REASONS.includes(reason)) {
@@ -362,7 +368,7 @@ function reducer(state, event) {
362
368
  }
363
369
  var STEP_ORDER = ["switching-chain", "approving", "minting", "confirming"];
364
370
  function step(state, attemptId, name) {
365
- if (_optionalChain([state, 'access', _16 => _16.attempt, 'optionalAccess', _17 => _17.attemptId]) !== attemptId) return state;
371
+ if (_optionalChain([state, 'access', _18 => _18.attempt, 'optionalAccess', _19 => _19.attemptId]) !== attemptId) return state;
366
372
  if (STEP_ORDER.indexOf(name) <= STEP_ORDER.indexOf(state.name)) return state;
367
373
  return { ...state, name, reason: null, message: null };
368
374
  }
@@ -432,7 +438,7 @@ var CHAIN_NAMES = {
432
438
  84532: "Base Sepolia"
433
439
  };
434
440
  function chainName(chainId) {
435
- return _nullishCoalesce(_nullishCoalesce(CHAIN_NAMES[chainId], () => ( _optionalChain([CHAINS, 'access', _18 => _18[chainId], 'optionalAccess', _19 => _19.name]))), () => ( `chain ${String(chainId)}`));
441
+ return _nullishCoalesce(_nullishCoalesce(CHAIN_NAMES[chainId], () => ( _optionalChain([CHAINS, 'access', _20 => _20[chainId], 'optionalAccess', _21 => _21.name]))), () => ( `chain ${String(chainId)}`));
436
442
  }
437
443
  var TRANSPORT_TIMEOUT_MS = 8e3;
438
444
  function getChain(chainId) {
@@ -476,7 +482,7 @@ function shouldFallback(err) {
476
482
  }
477
483
  function createReadClient(opts) {
478
484
  const chain = getChain(opts.chainId);
479
- const urls = [_optionalChain([opts, 'access', _20 => _20.rpcUrls, 'optionalAccess', _21 => _21[opts.chainId]]), opts.useBridge ? BRIDGE_URLS[opts.chainId] : void 0, chain.rpcUrls.default.http[0]].filter(
485
+ const urls = [_optionalChain([opts, 'access', _22 => _22.rpcUrls, 'optionalAccess', _23 => _23[opts.chainId]]), opts.useBridge ? BRIDGE_URLS[opts.chainId] : void 0, chain.rpcUrls.default.http[0]].filter(
480
486
  (u, i, all) => !!u && all.indexOf(u) === i
481
487
  );
482
488
  const transport = ({ chain: c, pollingInterval }) => {
@@ -545,7 +551,7 @@ function register(state, opts) {
545
551
  }
546
552
  function startLoad(state) {
547
553
  const connect = win().ManifoldConnect;
548
- if (_optionalChain([connect, 'optionalAccess', _22 => _22.capabilities, 'optionalAccess', _23 => _23.includes, 'call', _24 => _24("open")])) return Promise.resolve(connect.ready).then(() => void 0);
554
+ if (_optionalChain([connect, 'optionalAccess', _24 => _24.capabilities, 'optionalAccess', _25 => _25.includes, 'call', _26 => _26("open")])) return Promise.resolve(connect.ready).then(() => void 0);
549
555
  const hasScript = Array.from(document.querySelectorAll("script[src]")).some((s) => isManifoldConnectScript(s.src));
550
556
  if (hasScript || document.querySelector('[data-widget="m-connect"]')) {
551
557
  return Promise.reject(new MintError("CONNECT_WIDGET_TOO_OLD", TOO_OLD));
@@ -571,7 +577,7 @@ function startLoad(state) {
571
577
  script.src = `${CONNECT_BASE_URL}/connect.umd.min.js`;
572
578
  script.async = true;
573
579
  script.addEventListener("load", () => {
574
- const ready = _optionalChain([win, 'call', _25 => _25(), 'access', _26 => _26.ManifoldConnect, 'optionalAccess', _27 => _27.ready]);
580
+ const ready = _optionalChain([win, 'call', _27 => _27(), 'access', _28 => _28.ManifoldConnect, 'optionalAccess', _29 => _29.ready]);
575
581
  if (!ready) return reject(new MintError("CONNECT_WIDGET_TOO_OLD", TOO_OLD));
576
582
  Promise.resolve(ready).then(() => resolve(), reject);
577
583
  });
@@ -585,13 +591,13 @@ function loadConnectWidget(opts) {
585
591
  const page = pageState();
586
592
  const existing = w[LOADER_KEY];
587
593
  if (existing) {
588
- if (_optionalChain([page, 'access', _28 => _28.load, 'optionalAccess', _29 => _29.promise]) !== existing) {
594
+ if (_optionalChain([page, 'access', _30 => _30.load, 'optionalAccess', _31 => _31.promise]) !== existing) {
589
595
  const div = _nullishCoalesce(document.querySelector(`[data-widget="m-connect"][data-connect-id="${CONNECT_ID}"]`), () => ( void 0));
590
596
  page.load = {
591
597
  promise: existing,
592
- networks: _nullishCoalesce(_optionalChain([div, 'optionalAccess', _30 => _30.dataset, 'access', _31 => _31.network, 'optionalAccess', _32 => _32.split, 'call', _33 => _33(","), 'access', _34 => _34.filter, 'call', _35 => _35(Boolean), 'access', _36 => _36.map, 'call', _37 => _37(Number)]), () => ( [])),
598
+ networks: _nullishCoalesce(_optionalChain([div, 'optionalAccess', _32 => _32.dataset, 'access', _33 => _33.network, 'optionalAccess', _34 => _34.split, 'call', _35 => _35(","), 'access', _36 => _36.filter, 'call', _37 => _37(Boolean), 'access', _38 => _38.map, 'call', _39 => _39(Number)]), () => ( [])),
593
599
  // The default id is a placeholder, not a choice: a caller's real id may still replace it.
594
- projectId: _optionalChain([div, 'optionalAccess', _38 => _38.dataset, 'access', _39 => _39.walletConnectProjectId]) === DEFAULT_WALLETCONNECT_PROJECT_ID ? void 0 : _optionalChain([div, 'optionalAccess', _40 => _40.dataset, 'access', _41 => _41.walletConnectProjectId]),
600
+ projectId: _optionalChain([div, 'optionalAccess', _40 => _40.dataset, 'access', _41 => _41.walletConnectProjectId]) === DEFAULT_WALLETCONNECT_PROJECT_ID ? void 0 : _optionalChain([div, 'optionalAccess', _42 => _42.dataset, 'access', _43 => _43.walletConnectProjectId]),
595
601
  div,
596
602
  nodes: []
597
603
  };
@@ -611,7 +617,7 @@ function loadConnectWidget(opts) {
611
617
  p.catch(() => {
612
618
  if (w[LOADER_KEY] === p) delete w[LOADER_KEY];
613
619
  if (page.load === state) page.load = void 0;
614
- for (const node of state.nodes) _optionalChain([node, 'access', _42 => _42.parentNode, 'optionalAccess', _43 => _43.removeChild, 'call', _44 => _44(node)]);
620
+ for (const node of state.nodes) _optionalChain([node, 'access', _44 => _44.parentNode, 'optionalAccess', _45 => _45.removeChild, 'call', _46 => _46(node)]);
615
621
  state.nodes.length = 0;
616
622
  state.div = void 0;
617
623
  });
@@ -642,11 +648,11 @@ function openConnectModal() {
642
648
  }
643
649
  function getAccount() {
644
650
  const p = win().ManifoldEthereumProvider;
645
- const address = _optionalChain([p, 'optionalAccess', _45 => _45.selectedAddress, 'optionalCall', _46 => _46()]);
646
- let chainId = _optionalChain([p, 'optionalAccess', _47 => _47.chainId, 'optionalCall', _48 => _48()]);
651
+ const address = _optionalChain([p, 'optionalAccess', _47 => _47.selectedAddress, 'optionalCall', _48 => _48()]);
652
+ let chainId = _optionalChain([p, 'optionalAccess', _49 => _49.chainId, 'optionalCall', _50 => _50()]);
647
653
  if (chainId === void 0 || chainId === null) {
648
654
  try {
649
- chainId = _optionalChain([p, 'optionalAccess', _49 => _49.browserChainId, 'optionalCall', _50 => _50()]);
655
+ chainId = _optionalChain([p, 'optionalAccess', _51 => _51.browserChainId, 'optionalCall', _52 => _52()]);
650
656
  } catch (e3) {
651
657
  chainId = void 0;
652
658
  }
@@ -665,7 +671,7 @@ function subscribeAccount(cb) {
665
671
  }
666
672
  function eip1193() {
667
673
  const p = win().ManifoldEthereumProvider;
668
- const provider = _optionalChain([(_nullishCoalesce(_optionalChain([p, 'optionalAccess', _51 => _51.provider, 'optionalCall', _52 => _52(true)]), () => ( _optionalChain([p, 'optionalAccess', _53 => _53.browserProvider, 'optionalCall', _54 => _54()])))), 'optionalAccess', _55 => _55.provider]);
674
+ const provider = _optionalChain([(_nullishCoalesce(_optionalChain([p, 'optionalAccess', _53 => _53.provider, 'optionalCall', _54 => _54(true)]), () => ( _optionalChain([p, 'optionalAccess', _55 => _55.browserProvider, 'optionalCall', _56 => _56()])))), 'optionalAccess', _57 => _57.provider]);
669
675
  if (!provider) throw new MintError("CHAIN_SWITCH_FAILED", "No wallet is connected.");
670
676
  return provider;
671
677
  }
@@ -705,7 +711,7 @@ async function getConnectedBalance(address, chainId) {
705
711
  clearTimeout(timer);
706
712
  }
707
713
  }
708
- var code = (e) => _optionalChain([e, 'optionalAccess', _56 => _56.code]);
714
+ var code = (e) => _optionalChain([e, 'optionalAccess', _58 => _58.code]);
709
715
  var hexChainId = (chainId) => `0x${chainId.toString(16)}`;
710
716
  var sendSwitchRequest = (provider, chainId) => provider.request({ method: "wallet_switchEthereumChain", params: [{ chainId: hexChainId(chainId) }] });
711
717
  var sendAddRequest = (provider, chainId) => {
@@ -834,7 +840,7 @@ var UINT32_MAX = 4294967295;
834
840
  async function getJson(fetchFn, url, signal, what) {
835
841
  let res;
836
842
  try {
837
- _optionalChain([signal, 'optionalAccess', _57 => _57.throwIfAborted, 'call', _58 => _58()]);
843
+ _optionalChain([signal, 'optionalAccess', _59 => _59.throwIfAborted, 'call', _60 => _60()]);
838
844
  res = await fetchFn(url, signal ? { signal } : void 0);
839
845
  } catch (cause) {
840
846
  throw new MintError("ALLOWLIST_UNAVAILABLE", `Could not reach the allowlist service (${what}).`, { cause });
@@ -895,13 +901,13 @@ async function loadEntries(fetchFn, api, instanceId, recipient, scoped) {
895
901
  });
896
902
  }
897
903
  async function fetchMerkleEntries(args) {
898
- if (_optionalChain([args, 'access', _59 => _59.signal, 'optionalAccess', _60 => _60.aborted])) {
904
+ if (_optionalChain([args, 'access', _61 => _61.signal, 'optionalAccess', _62 => _62.aborted])) {
899
905
  throw new MintError("ALLOWLIST_UNAVAILABLE", "The allowlist request was cancelled.", { cause: args.signal.reason });
900
906
  }
901
907
  const fetchFn = _nullishCoalesce(args.fetch, () => ( ((input, init) => globalThis.fetch(input, init))));
902
908
  const key = `${args.api}|${args.instanceId}|${args.recipient.toLowerCase()}`;
903
909
  let scoped = scopeCaches.get(args.scope);
904
- if (!scoped || _optionalChain([scoped, 'access', _61 => _61.signal, 'optionalAccess', _62 => _62.aborted])) {
910
+ if (!scoped || _optionalChain([scoped, 'access', _63 => _63.signal, 'optionalAccess', _64 => _64.aborted])) {
905
911
  scoped = { signal: args.signal, instances: /* @__PURE__ */ new Map(), entries: /* @__PURE__ */ new Map() };
906
912
  scopeCaches.set(args.scope, scoped);
907
913
  }
@@ -973,9 +979,9 @@ function revertData(e) {
973
979
  const d2 = x.data;
974
980
  return _viem.isHex.call(void 0, d2) && d2.length >= 10 || typeof d2 === "object" && d2 !== null && _viem.isHex.call(void 0, d2.data);
975
981
  });
976
- const d = _optionalChain([hit, 'optionalAccess', _63 => _63.data]);
982
+ const d = _optionalChain([hit, 'optionalAccess', _65 => _65.data]);
977
983
  if (_viem.isHex.call(void 0, d)) return d;
978
- const inner = _optionalChain([d, 'optionalAccess', _64 => _64.data]);
984
+ const inner = _optionalChain([d, 'optionalAccess', _66 => _66.data]);
979
985
  return _viem.isHex.call(void 0, inner) ? inner : void 0;
980
986
  }
981
987
  function decodeRevert(e) {
@@ -984,8 +990,8 @@ function decodeRevert(e) {
984
990
  if (data) {
985
991
  try {
986
992
  const d = _viem.decodeErrorResult.call(void 0, { abi: EXTENSION_ERRORS_ABI, data });
987
- if (d.errorName === "Error" && typeof _optionalChain([d, 'access', _65 => _65.args, 'optionalAccess', _66 => _66[0]]) === "string") return d.args[0];
988
- if (d.errorName === "Panic") return `Panic(${String(_optionalChain([d, 'access', _67 => _67.args, 'optionalAccess', _68 => _68[0]]))})`;
993
+ if (d.errorName === "Error" && typeof _optionalChain([d, 'access', _67 => _67.args, 'optionalAccess', _68 => _68[0]]) === "string") return d.args[0];
994
+ if (d.errorName === "Panic") return `Panic(${String(_optionalChain([d, 'access', _69 => _69.args, 'optionalAccess', _70 => _70[0]]))})`;
989
995
  return d.errorName;
990
996
  } catch (e5) {
991
997
  return `reverted with unknown error ${data.slice(0, 10)}`;
@@ -1109,7 +1115,7 @@ async function loadDrop(ctx, config) {
1109
1115
  const fee = await rpc(
1110
1116
  () => client.readContract({ address: extension, abi: EXTENSION_COMMON_ABI, functionName: isAllowlist(claim) ? "MINT_FEE_MERKLE" : "MINT_FEE" })
1111
1117
  );
1112
- const native = _nullishCoalesce(_optionalChain([client, 'access', _69 => _69.chain, 'optionalAccess', _70 => _70.nativeCurrency]), () => ( { symbol: "ETH", decimals: 18 }));
1118
+ const native = _nullishCoalesce(_optionalChain([client, 'access', _71 => _71.chain, 'optionalAccess', _72 => _72.nativeCurrency]), () => ( { symbol: "ETH", decimals: 18 }));
1113
1119
  let unitPrice;
1114
1120
  let paymentToken = null;
1115
1121
  if (claim.erc20 === _viem.zeroAddress) {
@@ -1206,7 +1212,7 @@ async function loadWallet(ctx, config, args) {
1206
1212
  data
1207
1213
  };
1208
1214
  }
1209
- var sameClaim = (a, b) => a.chainId === b.chainId && a.creatorContract.toLowerCase() === b.creatorContract.toLowerCase() && a.instanceId === b.instanceId && _optionalChain([a, 'access', _71 => _71.extension, 'optionalAccess', _72 => _72.toLowerCase, 'call', _73 => _73()]) === _optionalChain([b, 'access', _74 => _74.extension, 'optionalAccess', _75 => _75.toLowerCase, 'call', _76 => _76()]);
1215
+ var sameClaim = (a, b) => a.chainId === b.chainId && a.creatorContract.toLowerCase() === b.creatorContract.toLowerCase() && a.instanceId === b.instanceId && _optionalChain([a, 'access', _73 => _73.extension, 'optionalAccess', _74 => _74.toLowerCase, 'call', _75 => _75()]) === _optionalChain([b, 'access', _76 => _76.extension, 'optionalAccess', _77 => _77.toLowerCase, 'call', _78 => _78()]);
1210
1216
  async function buildPlan(ctx, attempt, wallet) {
1211
1217
  const { config, quantity } = attempt;
1212
1218
  if (!Number.isInteger(quantity) || quantity < 1 || quantity > MAX_MINT_COUNT) {
@@ -1396,5 +1402,5 @@ function parseMintReceipt(logs, { tokenContract, recipient }) {
1396
1402
 
1397
1403
 
1398
1404
 
1399
- exports.friendlyErrorMessage = friendlyErrorMessage; exports.UNSUPPORTED_REASONS = UNSUPPORTED_REASONS; exports.REASON_CODES = REASON_CODES; exports.MintError = MintError; exports.isMintError = isMintError; exports.isRejection = isRejection; exports.toReason = toReason; exports.chainName = chainName; exports.getChain = getChain; exports.createReadClient = createReadClient; exports.loadConnectWidget = loadConnectWidget; exports.openConnectModal = openConnectModal; exports.getAccount = getAccount; exports.subscribeAccount = subscribeAccount; exports.getWalletClient = getWalletClient; exports.waitForDeposit = waitForDeposit; exports.getConnectedBalance = getConnectedBalance; exports.switchToChain = switchToChain; exports.requestSwitch = requestSwitch; exports.requestAddChain = requestAddChain; exports.getWalletProvider = getWalletProvider; exports.findExtension = findExtension; exports.manifoldClaimAdapter = manifoldClaimAdapter; exports.MINT_STATES = MINT_STATES; exports.CLICKABLE_STATES = CLICKABLE_STATES; exports.IN_FLIGHT_STATES = IN_FLIGHT_STATES; exports.MAX_QUANTITY = MAX_QUANTITY; exports.initialState = initialState; exports.reducer = reducer; exports.selectMaxQuantity = selectMaxQuantity; exports.selectTotal = selectTotal; exports.canAct = canAct; exports.parseMintReceipt = parseMintReceipt;
1400
- //# sourceMappingURL=chunk-OO6QQT3M.cjs.map
1405
+ exports.friendlyErrorMessage = friendlyErrorMessage; exports.UNSUPPORTED_REASONS = UNSUPPORTED_REASONS; exports.REASON_CODES = REASON_CODES; exports.MintError = MintError; exports.isMintError = isMintError; exports.isRejection = isRejection; exports.toReason = toReason; exports.chainName = chainName; exports.getChain = getChain; exports.createReadClient = createReadClient; exports.loadConnectWidget = loadConnectWidget; exports.openConnectModal = openConnectModal; exports.getAccount = getAccount; exports.subscribeAccount = subscribeAccount; exports.getWalletClient = getWalletClient; exports.waitForDeposit = waitForDeposit; exports.getConnectedBalance = getConnectedBalance; exports.switchToChain = switchToChain; exports.requestSwitch = requestSwitch; exports.requestAddChain = requestAddChain; exports.getWalletProvider = getWalletProvider; exports.MINT_STATES = MINT_STATES; exports.CLICKABLE_STATES = CLICKABLE_STATES; exports.IN_FLIGHT_STATES = IN_FLIGHT_STATES; exports.MAX_QUANTITY = MAX_QUANTITY; exports.initialState = initialState; exports.reducer = reducer; exports.selectMaxQuantity = selectMaxQuantity; exports.selectTotal = selectTotal; exports.canAct = canAct; exports.findExtension = findExtension; exports.manifoldClaimAdapter = manifoldClaimAdapter; exports.parseMintReceipt = parseMintReceipt;
1406
+ //# sourceMappingURL=chunk-GO4TR3HB.cjs.map