thirdweb 5.50.1 → 5.51.0-nightly-f9c351c22d9c869770dad13332f9c23d8cb84ed7-20240905000555

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/cjs/exports/extensions/erc721.js +25 -1
  2. package/dist/cjs/exports/extensions/erc721.js.map +1 -1
  3. package/dist/cjs/extensions/erc721/__generated__/IDrop/read/claimCondition.js +76 -0
  4. package/dist/cjs/extensions/erc721/__generated__/IDrop/read/claimCondition.js.map +1 -0
  5. package/dist/cjs/extensions/erc721/drops/read/getActiveClaimCondition.js +28 -6
  6. package/dist/cjs/extensions/erc721/drops/read/getActiveClaimCondition.js.map +1 -1
  7. package/dist/cjs/extensions/erc721/drops/read/getClaimConditions.js +73 -0
  8. package/dist/cjs/extensions/erc721/drops/read/getClaimConditions.js.map +1 -0
  9. package/dist/cjs/extensions/erc721/drops/write/claimTo.js +19 -0
  10. package/dist/cjs/extensions/erc721/drops/write/claimTo.js.map +1 -1
  11. package/dist/cjs/extensions/erc721/drops/write/resetClaimEligibility.js +56 -0
  12. package/dist/cjs/extensions/erc721/drops/write/resetClaimEligibility.js.map +1 -0
  13. package/dist/cjs/extensions/erc721/drops/write/setClaimConditions.js +24 -0
  14. package/dist/cjs/extensions/erc721/drops/write/setClaimConditions.js.map +1 -1
  15. package/dist/cjs/extensions/erc721/write/lazyMint.js +20 -2
  16. package/dist/cjs/extensions/erc721/write/lazyMint.js.map +1 -1
  17. package/dist/cjs/utils/extensions/drops/get-claim-params.js +3 -3
  18. package/dist/cjs/version.js +1 -1
  19. package/dist/cjs/version.js.map +1 -1
  20. package/dist/esm/exports/extensions/erc721.js +17 -6
  21. package/dist/esm/exports/extensions/erc721.js.map +1 -1
  22. package/dist/esm/extensions/erc721/__generated__/IDrop/read/claimCondition.js +70 -0
  23. package/dist/esm/extensions/erc721/__generated__/IDrop/read/claimCondition.js.map +1 -0
  24. package/dist/esm/extensions/erc721/drops/read/getActiveClaimCondition.js +27 -6
  25. package/dist/esm/extensions/erc721/drops/read/getActiveClaimCondition.js.map +1 -1
  26. package/dist/esm/extensions/erc721/drops/read/getClaimConditions.js +69 -0
  27. package/dist/esm/extensions/erc721/drops/read/getClaimConditions.js.map +1 -0
  28. package/dist/esm/extensions/erc721/drops/write/claimTo.js +19 -1
  29. package/dist/esm/extensions/erc721/drops/write/claimTo.js.map +1 -1
  30. package/dist/esm/extensions/erc721/drops/write/resetClaimEligibility.js +52 -0
  31. package/dist/esm/extensions/erc721/drops/write/resetClaimEligibility.js.map +1 -0
  32. package/dist/esm/extensions/erc721/drops/write/setClaimConditions.js +24 -1
  33. package/dist/esm/extensions/erc721/drops/write/setClaimConditions.js.map +1 -1
  34. package/dist/esm/extensions/erc721/write/lazyMint.js +20 -3
  35. package/dist/esm/extensions/erc721/write/lazyMint.js.map +1 -1
  36. package/dist/esm/utils/extensions/drops/get-claim-params.js +4 -4
  37. package/dist/esm/version.js +1 -1
  38. package/dist/esm/version.js.map +1 -1
  39. package/dist/types/exports/extensions/erc721.d.ts +9 -6
  40. package/dist/types/exports/extensions/erc721.d.ts.map +1 -1
  41. package/dist/types/extensions/erc721/__generated__/IDrop/read/claimCondition.d.ts +45 -0
  42. package/dist/types/extensions/erc721/__generated__/IDrop/read/claimCondition.d.ts.map +1 -0
  43. package/dist/types/extensions/erc721/drops/read/getActiveClaimCondition.d.ts +13 -0
  44. package/dist/types/extensions/erc721/drops/read/getActiveClaimCondition.d.ts.map +1 -1
  45. package/dist/types/extensions/erc721/drops/read/getClaimConditions.d.ts +29 -0
  46. package/dist/types/extensions/erc721/drops/read/getClaimConditions.d.ts.map +1 -0
  47. package/dist/types/extensions/erc721/drops/write/claimTo.d.ts +13 -0
  48. package/dist/types/extensions/erc721/drops/write/claimTo.d.ts.map +1 -1
  49. package/dist/types/extensions/erc721/drops/write/resetClaimEligibility.d.ts +33 -0
  50. package/dist/types/extensions/erc721/drops/write/resetClaimEligibility.d.ts.map +1 -0
  51. package/dist/types/extensions/erc721/drops/write/setClaimConditions.d.ts +13 -0
  52. package/dist/types/extensions/erc721/drops/write/setClaimConditions.d.ts.map +1 -1
  53. package/dist/types/extensions/erc721/write/lazyMint.d.ts +13 -0
  54. package/dist/types/extensions/erc721/write/lazyMint.d.ts.map +1 -1
  55. package/dist/types/version.d.ts +1 -1
  56. package/dist/types/version.d.ts.map +1 -1
  57. package/package.json +1 -1
  58. package/src/exports/extensions/erc721.ts +36 -3
  59. package/src/extensions/erc721/__generated__/IDrop/read/claimCondition.ts +76 -0
  60. package/src/extensions/erc721/drop721.test.ts +102 -2
  61. package/src/extensions/erc721/drops/read/getActiveClaimCondition.ts +32 -6
  62. package/src/extensions/erc721/drops/read/getClaimConditions.ts +93 -0
  63. package/src/extensions/erc721/drops/write/claimTo.ts +25 -1
  64. package/src/extensions/erc721/drops/write/resetClaimEligibility.ts +70 -0
  65. package/src/extensions/erc721/drops/write/setClaimConditions.ts +30 -1
  66. package/src/extensions/erc721/write/lazyMint.ts +26 -3
  67. package/src/utils/extensions/drops/get-claim-params.ts +4 -4
  68. package/src/version.ts +1 -1
@@ -0,0 +1,70 @@
1
+ import { readContract } from "../../../../../transaction/read-contract.js";
2
+ import { decodeAbiParameters } from "viem";
3
+ import { detectMethod } from "../../../../../utils/bytecode/detectExtension.js";
4
+ export const FN_SELECTOR = "0xd637ed59";
5
+ const FN_INPUTS = [];
6
+ const FN_OUTPUTS = [
7
+ {
8
+ type: "uint256",
9
+ name: "currentStartId",
10
+ },
11
+ {
12
+ type: "uint256",
13
+ name: "count",
14
+ },
15
+ ];
16
+ /**
17
+ * Checks if the `claimCondition` method is supported by the given contract.
18
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
19
+ * @returns A boolean indicating if the `claimCondition` method is supported.
20
+ * @extension ERC721
21
+ * @example
22
+ * ```ts
23
+ * import { isClaimConditionSupported } from "thirdweb/extensions/erc721";
24
+ *
25
+ * const supported = isClaimConditionSupported(["0x..."]);
26
+ * ```
27
+ */
28
+ export function isClaimConditionSupported(availableSelectors) {
29
+ return detectMethod({
30
+ availableSelectors,
31
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS],
32
+ });
33
+ }
34
+ /**
35
+ * Decodes the result of the claimCondition function call.
36
+ * @param result - The hexadecimal result to decode.
37
+ * @returns The decoded result as per the FN_OUTPUTS definition.
38
+ * @extension ERC721
39
+ * @example
40
+ * ```ts
41
+ * import { decodeClaimConditionResult } from "thirdweb/extensions/erc721";
42
+ * const result = decodeClaimConditionResult("...");
43
+ * ```
44
+ */
45
+ export function decodeClaimConditionResult(result) {
46
+ return decodeAbiParameters(FN_OUTPUTS, result);
47
+ }
48
+ /**
49
+ * Calls the "claimCondition" function on the contract.
50
+ * @param options - The options for the claimCondition function.
51
+ * @returns The parsed result of the function call.
52
+ * @extension ERC721
53
+ * @example
54
+ * ```ts
55
+ * import { claimCondition } from "thirdweb/extensions/erc721";
56
+ *
57
+ * const result = await claimCondition({
58
+ * contract,
59
+ * });
60
+ *
61
+ * ```
62
+ */
63
+ export async function claimCondition(options) {
64
+ return readContract({
65
+ contract: options.contract,
66
+ method: [FN_SELECTOR, FN_INPUTS, FN_OUTPUTS],
67
+ params: [],
68
+ });
69
+ }
70
+ //# sourceMappingURL=claimCondition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claimCondition.js","sourceRoot":"","sources":["../../../../../../../src/extensions/erc721/__generated__/IDrop/read/claimCondition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAG3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAC;AAEhF,MAAM,CAAC,MAAM,WAAW,GAAG,YAAqB,CAAC;AACjD,MAAM,SAAS,GAAG,EAAW,CAAC;AAC9B,MAAM,UAAU,GAAG;IACjB;QACE,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,gBAAgB;KACvB;IACD;QACE,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,OAAO;KACd;CACO,CAAC;AAEX;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,yBAAyB,CAAC,kBAA4B;IACpE,OAAO,YAAY,CAAC;QAClB,kBAAkB;QAClB,MAAM,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,UAAU,CAAU;KACtD,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,0BAA0B,CAAC,MAAW;IACpD,OAAO,mBAAmB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,OAA+B;IAClE,OAAO,YAAY,CAAC;QAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,MAAM,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,UAAU,CAAU;QACrD,MAAM,EAAE,EAAE;KACX,CAAC,CAAC;AACL,CAAC"}
@@ -1,6 +1,6 @@
1
- import { claimCondition } from "../../__generated__/DropSinglePhase/read/claimCondition.js";
2
- import { getActiveClaimConditionId } from "../../__generated__/IDrop/read/getActiveClaimConditionId.js";
3
- import { getClaimConditionById } from "../../__generated__/IDrop/read/getClaimConditionById.js";
1
+ import * as SinglePhase from "../../__generated__/DropSinglePhase/read/claimCondition.js";
2
+ import * as GetActiveId from "../../__generated__/IDrop/read/getActiveClaimConditionId.js";
3
+ import * as ById from "../../__generated__/IDrop/read/getClaimConditionById.js";
4
4
  /**
5
5
  * Retrieves the active claim condition.
6
6
  * @param options - The transaction options.
@@ -15,11 +15,11 @@ import { getClaimConditionById } from "../../__generated__/IDrop/read/getClaimCo
15
15
  */
16
16
  export async function getActiveClaimCondition(options) {
17
17
  const getActiveClaimConditionMultiPhase = async () => {
18
- const conditionId = await getActiveClaimConditionId(options);
19
- return getClaimConditionById({ ...options, conditionId });
18
+ const conditionId = await GetActiveId.getActiveClaimConditionId(options);
19
+ return ById.getClaimConditionById({ ...options, conditionId });
20
20
  };
21
21
  const getActiveClaimConditionSinglePhase = async () => {
22
- const [startTimestamp, maxClaimableSupply, supplyClaimed, quantityLimitPerWallet, merkleRoot, pricePerToken, currency, metadata,] = await claimCondition(options);
22
+ const [startTimestamp, maxClaimableSupply, supplyClaimed, quantityLimitPerWallet, merkleRoot, pricePerToken, currency, metadata,] = await SinglePhase.claimCondition(options);
23
23
  return {
24
24
  startTimestamp,
25
25
  maxClaimableSupply,
@@ -42,4 +42,25 @@ export async function getActiveClaimCondition(options) {
42
42
  }
43
43
  throw new Error("Claim condition not found");
44
44
  }
45
+ /**
46
+ * Checks if the `getActiveClaimCondition` method is supported by the given contract.
47
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
48
+ * @returns A boolean indicating if the `getActiveClaimCondition` method is supported.
49
+ * @extension ERC721
50
+ * @example
51
+ * ```ts
52
+ * import { isGetActiveClaimConditionSupported } from "thirdweb/extensions/erc721";
53
+ *
54
+ * const supported = isGetActiveClaimConditionSupported(["0x..."]);
55
+ * ```
56
+ */
57
+ export function isGetActiveClaimConditionSupported(availableSelectors) {
58
+ // if single phase is supported, return true
59
+ if (SinglePhase.isClaimConditionSupported(availableSelectors)) {
60
+ return true;
61
+ }
62
+ // otherwise check that both multi phase functions are supported
63
+ return (GetActiveId.isGetActiveClaimConditionIdSupported(availableSelectors) &&
64
+ ById.isGetClaimConditionByIdSupported(availableSelectors));
65
+ }
45
66
  //# sourceMappingURL=getActiveClaimCondition.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getActiveClaimCondition.js","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/read/getActiveClaimCondition.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,4DAA4D,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,6DAA6D,CAAC;AACxG,OAAO,EAAE,qBAAqB,EAAE,MAAM,yDAAyD,CAAC;AAEhG;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAA+B;IAE/B,MAAM,iCAAiC,GAAG,KAAK,IAAI,EAAE;QACnD,MAAM,WAAW,GAAG,MAAM,yBAAyB,CAAC,OAAO,CAAC,CAAC;QAC7D,OAAO,qBAAqB,CAAC,EAAE,GAAG,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC;IAC5D,CAAC,CAAC;IACF,MAAM,kCAAkC,GAAG,KAAK,IAAI,EAAE;QACpD,MAAM,CACJ,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,sBAAsB,EACtB,UAAU,EACV,aAAa,EACb,QAAQ,EACR,QAAQ,EACT,GAAG,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;QAClC,OAAO;YACL,cAAc;YACd,kBAAkB;YAClB,aAAa;YACb,sBAAsB;YACtB,UAAU;YACV,aAAa;YACb,QAAQ;YACR,QAAQ;SACT,CAAC;IACJ,CAAC,CAAC;IAEF,oHAAoH;IACpH,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC;QACvC,iCAAiC,EAAE;QACnC,kCAAkC,EAAE;KACrC,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,WAAW,CAAC,CAAC;IAC1E,IAAI,SAAS,EAAE,MAAM,KAAK,WAAW,EAAE,CAAC;QACtC,OAAO,SAAS,CAAC,KAAK,CAAC;IACzB,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;AAC/C,CAAC"}
1
+ {"version":3,"file":"getActiveClaimCondition.js","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/read/getActiveClaim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;;;;;;;;GAWG;AACH,MAAM,UAAU,kCAAkC,CAChD,kBAA4B;IAE5B,4CAA4C;IAC5C,IAAI,WAAW,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAC9D,OAAO,IAAI,CAAC;IACd,CAAC;IACD,gEAAgE;IAChE,OAAO,CACL,WAAW,CAAC,oCAAoC,CAAC,kBAAkB,CAAC;QACpE,IAAI,CAAC,gCAAgC,CAAC,kBAAkB,CAAC,CAC1D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,69 @@
1
+ import * as SinglePhase from "../../__generated__/DropSinglePhase/read/claimCondition.js";
2
+ import * as MultiPhase from "../../__generated__/IDrop/read/claimCondition.js";
3
+ import * as ById from "../../__generated__/IDrop/read/getClaimConditionById.js";
4
+ /**
5
+ * Retrieves all claim conditions.
6
+ * @param options - The transaction options.
7
+ * @returns A promise that resolves to all claim conditions.
8
+ * @throws An error if the claim conditions are unsupported by the contract.
9
+ * @extension ERC721
10
+ * @example
11
+ * ```ts
12
+ * import { getClaimConditions } from "thirdweb/extensions/erc721";
13
+ * const conditions = await getClaimConditions({ contract });
14
+ * ```
15
+ */
16
+ export async function getClaimConditions(options) {
17
+ const [multi, single] = await Promise.allSettled([
18
+ (async () => {
19
+ const [startId, count] = await MultiPhase.claimCondition(options);
20
+ const conditionPromises = [];
21
+ for (let i = startId; i < count; i++) {
22
+ conditionPromises.push(ById.getClaimConditionById({
23
+ ...options,
24
+ conditionId: i,
25
+ }));
26
+ }
27
+ return Promise.all(conditionPromises);
28
+ })(),
29
+ SinglePhase.claimCondition(options).then(([startTimestamp, maxClaimableSupply, supplyClaimed, quantityLimitPerWallet, merkleRoot, pricePerToken, currency, metadata,]) => ({
30
+ startTimestamp,
31
+ maxClaimableSupply,
32
+ supplyClaimed,
33
+ quantityLimitPerWallet,
34
+ merkleRoot,
35
+ pricePerToken,
36
+ currency,
37
+ metadata,
38
+ })),
39
+ ]);
40
+ if (multi.status === "fulfilled") {
41
+ return multi.value;
42
+ }
43
+ if (single.status === "fulfilled") {
44
+ return [single.value];
45
+ }
46
+ throw new Error("Claim condition not found");
47
+ }
48
+ /**
49
+ * Checks if the `getClaimConditions` method is supported by the given contract.
50
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
51
+ * @returns A boolean indicating if the `getClaimConditions` method is supported.
52
+ * @extension ERC721
53
+ * @example
54
+ * ```ts
55
+ * import { isGetClaimConditionsSupported } from "thirdweb/extensions/erc721";
56
+ *
57
+ * const supported = isGetClaimConditionsSupported(["0x..."]);
58
+ * ```
59
+ */
60
+ export function isGetClaimConditionsSupported(availableSelectors) {
61
+ // if single phase is supported, return true
62
+ if (SinglePhase.isClaimConditionSupported(availableSelectors)) {
63
+ return true;
64
+ }
65
+ // if multi phase is supported, return true
66
+ return (MultiPhase.isClaimConditionSupported(availableSelectors) &&
67
+ ById.isGetClaimConditionByIdSupported(availableSelectors));
68
+ }
69
+ //# sourceMappingURL=getClaimConditions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getClaimConditions.js","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/read/getClaimConditions.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,4DAA4D,CAAC;AAC1F,OAAO,KAAK,UAAU,MAAM,kDAAkD,CAAC;AAC/E,OAAO,KAAK,IAAI,MAAM,yDAAyD,CAAC;AAEhF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,OAA+B;IAE/B,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC;QAC/C,CAAC,KAAK,IAAI,EAAE;YACV,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,GAAG,MAAM,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;YAElE,MAAM,iBAAiB,GAEnB,EAAE,CAAC;YACP,KAAK,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6 @@
1
1
  import { getClaimParams } from "../../../../utils/extensions/drops/get-claim-params.js";
2
- import { claim } from "../../__generated__/IDrop/write/claim.js";
2
+ import { claim, isClaimSupported, } from "../../__generated__/IDrop/write/claim.js";
3
+ import { isGetActiveClaimConditionSupported } from "../read/getActiveClaimCondition.js";
3
4
  /**
4
5
  * Claim ERC721 NFTs to a specified address
5
6
  * @param options - The options for the transaction
@@ -32,4 +33,21 @@ export function claimTo(options) {
32
33
  }),
33
34
  });
34
35
  }
36
+ /**
37
+ * Checks if the `claimTo` method is supported by the given contract.
38
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
39
+ * @returns A boolean indicating if the `claimTo` method is supported.
40
+ * @extension ERC721
41
+ * @example
42
+ * ```ts
43
+ * import { isClaimToSupported } from "thirdweb/extensions/erc721";
44
+ *
45
+ * const supported = isClaimToSupported(["0x..."]);
46
+ * ```
47
+ */
48
+ export function isClaimToSupported(availableSelectors) {
49
+ return (isClaimSupported(availableSelectors) &&
50
+ // required to check if the contract supports the getActiveClaimCondition method
51
+ isGetActiveClaimConditionSupported(availableSelectors));
52
+ }
35
53
  //# sourceMappingURL=claimTo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"claimTo.js","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/write/claimTo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,EAAE,KAAK,EAAE,MAAM,0CAA0C,CAAC;AAYjE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,OAAO,CAAC,OAA8C;IACpE,OAAO,KAAK,CAAC;QACX,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,GAAG,EAAE,CAChB,cAAc,CAAC;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;SACnB,CAAC;KACL,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"claimTo.js","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/write/claimTo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,wDAAwD,CAAC;AACxF,OAAO,EACL,KAAK,EACL,gBAAgB,GACjB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,kCAAkC,EAAE,MAAM,oCAAoC,CAAC;AAYxF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,OAAO,CAAC,OAA8C;IACpE,OAAO,KAAK,CAAC;QACX,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,GAAG,EAAE,CAChB,cAAc,CAAC;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,IAAI,EAAE,OAAO,CAAC,IAAI;SACnB,CAAC;KACL,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kBAAkB,CAAC,kBAA4B;IAC7D,OAAO,CACL,gBAAgB,CAAC,kBAAkB,CAAC;QACpC,gFAAgF;QAChF,kCAAkC,CAAC,kBAAkB,CAAC,CACvD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { isSetClaimConditionsSupported, setClaimConditions, } from "../../__generated__/IDrop/write/setClaimConditions.js";
2
+ import { getClaimConditions, isGetClaimConditionsSupported, } from "../read/getClaimConditions.js";
3
+ /**
4
+ * Reset the claim eligibility for all users.
5
+ * @param options
6
+ * @returns the prepared transaction
7
+ * @extension ERC721
8
+ * @example
9
+ * ```ts
10
+ * import { resetClaimEligibility } from "thirdweb/extensions/erc721";
11
+ * import { sendTransaction } from "thirdweb";
12
+ *
13
+ * const transaction = resetClaimEligibility({
14
+ * contract,
15
+ * });
16
+ *
17
+ * await sendTransaction({ transaction, account });
18
+ * ```
19
+ */
20
+ export function resetClaimEligibility(options) {
21
+ // download existing conditions
22
+ return setClaimConditions({
23
+ contract: options.contract,
24
+ asyncParams: async () => {
25
+ // get existing conditions
26
+ const existingConditions = await getClaimConditions(options);
27
+ // then simply return the exact same ones, but with the resetClaimEligibility flag set to true
28
+ return {
29
+ // type is necessary because of viem hex shenanigans (strict vs non-strict `0x` prefix string)
30
+ phases: existingConditions,
31
+ resetClaimEligibility: true,
32
+ };
33
+ },
34
+ });
35
+ }
36
+ /**
37
+ * Checks if the `resetClaimEligibility` method is supported by the given contract.
38
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
39
+ * @returns A boolean indicating if the `resetClaimEligibility` method is supported.
40
+ * @extension ERC721
41
+ * @example
42
+ * ```ts
43
+ * import { isResetClaimEligibilitySupported } from "thirdweb/extensions/erc721";
44
+ *
45
+ * const supported = isResetClaimEligibilitySupported(["0x..."]);
46
+ * ```
47
+ */
48
+ export function isResetClaimEligibilitySupported(availableSelectors) {
49
+ return (isGetClaimConditionsSupported(availableSelectors) &&
50
+ isSetClaimConditionsSupported(availableSelectors));
51
+ }
52
+ //# sourceMappingURL=resetClaimEligibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resetClaimEligibility.js","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/write/resetClaimEligibility.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,6BAA6B,EAC7B,kBAAkB,GACnB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC;AAEvC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAA+B;IACnE,+BAA+B;IAC/B,OAAO,kBAAkB,CAAC;QACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,KAAK,IAAI,EAAE;YACtB,0BAA0B;YAC1B,MAAM,kBAAkB,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,CAAC;YAE7D,8FAA8F;YAC9F,OAAO;gBACL,8FAA8F;gBAC9F,MAAM,EAAE,kBAKP;gBACD,qBAAqB,EAAE,IAAI;aAC5B,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gCAAgC,CAAC,kBAA4B;IAC3E,OAAO,CACL,6BAA6B,CAAC,kBAAkB,CAAC;QACjD,6BAA6B,CAAC,kBAAkB,CAAC,CAClD,CAAC;AACJ,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import { getMulticallSetClaimConditionTransactions } from "../../../../utils/extensions/drops/get-multicall-set-claim-claim-conditon-transactions.js";
2
- import { multicall } from "../../../common/__generated__/IMulticall/write/multicall.js";
2
+ import { isSetContractURISupported } from "../../../common/__generated__/IContractMetadata/write/setContractURI.js";
3
+ import { isMulticallSupported, multicall, } from "../../../common/__generated__/IMulticall/write/multicall.js";
4
+ import { isGetContractMetadataSupported } from "../../../common/read/getContractMetadata.js";
5
+ import { isSetClaimConditionsSupported as isSetClaimConditionsSupportedGenerated } from "../../__generated__/IDrop/write/setClaimConditions.js";
3
6
  /**
4
7
  * Set the claim conditions for a ERC721 drop
5
8
  * @param options
@@ -41,4 +44,24 @@ export function setClaimConditions(options) {
41
44
  },
42
45
  });
43
46
  }
47
+ /**
48
+ * Checks if the `setClaimConditions` method is supported by the given contract.
49
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
50
+ * @returns A boolean indicating if the `setClaimConditions` method is supported.
51
+ * @extension ERC721
52
+ * @example
53
+ * ```ts
54
+ * import { isSetClaimConditionsSupported } from "thirdweb/extensions/erc721";
55
+ *
56
+ * const supported = isSetClaimConditionsSupported(["0x..."]);
57
+ * ```
58
+ */
59
+ export function isSetClaimConditionsSupported(availableSelectors) {
60
+ return (isMulticallSupported(availableSelectors) &&
61
+ // needed for setting contract metadata
62
+ isGetContractMetadataSupported(availableSelectors) &&
63
+ isSetContractURISupported(availableSelectors) &&
64
+ // needs to actually be able to set the claim Conditions
65
+ isSetClaimConditionsSupportedGenerated(availableSelectors));
66
+ }
44
67
  //# sourceMappingURL=setClaimConditions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"setClaimConditions.js","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/write/setClaimConditions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yCAAyC,EAAE,MAAM,2FAA2F,CAAC;AAEtJ,OAAO,EAAE,SAAS,EAAE,MAAM,6DAA6D,CAAC;AAUxF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAyD;IAEzD,OAAO,SAAS,CAAC;QACf,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,KAAK,IAAI,EAAE;YACtB,OAAO;gBACL,IAAI,EAAE,MAAM,yCAAyC,CAAC;oBACpD,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;oBACpD,aAAa,EAAE,CAAC;iBACjB,CAAC;aACH,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"setClaimConditions.js","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/write/setClaimConditions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yCAAyC,EAAE,MAAM,2FAA2F,CAAC;AAEtJ,OAAO,EAAE,yBAAyB,EAAE,MAAM,yEAAyE,CAAC;AACpH,OAAO,EACL,oBAAoB,EACpB,SAAS,GACV,MAAM,6DAA6D,CAAC;AACrE,OAAO,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,6BAA6B,IAAI,sCAAsC,EAAE,MAAM,uDAAuD,CAAC;AAUhJ;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAyD;IAEzD,OAAO,SAAS,CAAC;QACf,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,KAAK,IAAI,EAAE;YACtB,OAAO;gBACL,IAAI,EAAE,MAAM,yCAAyC,CAAC;oBACpD,QAAQ,EAAE,OAAO,CAAC,QAAQ;oBAC1B,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,qBAAqB,EAAE,OAAO,CAAC,qBAAqB;oBACpD,aAAa,EAAE,CAAC;iBACjB,CAAC;aACH,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,6BAA6B,CAAC,kBAA4B;IACxE,OAAO,CACL,oBAAoB,CAAC,kBAAkB,CAAC;QACxC,uCAAuC;QACvC,8BAA8B,CAAC,kBAAkB,CAAC;QAClD,yBAAyB,CAAC,kBAAkB,CAAC;QAC7C,wDAAwD;QACxD,sCAAsC,CAAC,kBAAkB,CAAC,CAC3D,CAAC;AACJ,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { getBaseUriFromBatch, uploadOrExtractURIs, } from "../../../utils/ipfs.js";
2
- import { nextTokenIdToMint } from "../__generated__/IERC721Enumerable/read/nextTokenIdToMint.js";
3
- import { lazyMint as generatedLazyMint } from "../__generated__/ILazyMint/write/lazyMint.js";
2
+ import { isNextTokenIdToMintSupported, nextTokenIdToMint, } from "../__generated__/IERC721Enumerable/read/nextTokenIdToMint.js";
3
+ import * as LazyMint from "../__generated__/ILazyMint/write/lazyMint.js";
4
4
  /**
5
5
  * Lazily mints ERC721 tokens.
6
6
  * @param options - The options for the lazy minting process.
@@ -26,7 +26,7 @@ import { lazyMint as generatedLazyMint } from "../__generated__/ILazyMint/write/
26
26
  * ```
27
27
  */
28
28
  export function lazyMint(options) {
29
- return generatedLazyMint({
29
+ return LazyMint.lazyMint({
30
30
  contract: options.contract,
31
31
  asyncParams: async () => {
32
32
  const startFileNumber = await nextTokenIdToMint({
@@ -44,4 +44,21 @@ export function lazyMint(options) {
44
44
  },
45
45
  });
46
46
  }
47
+ /**
48
+ * Checks if the `lazyMint` method is supported by the given contract.
49
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
50
+ * @returns A boolean indicating if the `lazyMint` method is supported.
51
+ * @extension ERC721
52
+ * @example
53
+ * ```ts
54
+ * import { isLazyMintSupported } from "thirdweb/extensions/erc721";
55
+ *
56
+ * const supported = isLazyMintSupported(["0x..."]);
57
+ * ```
58
+ */
59
+ export function isLazyMintSupported(availableSelectors) {
60
+ return (LazyMint.isLazyMintSupported(availableSelectors) &&
61
+ // required because we use it in the lazyMint function
62
+ isNextTokenIdToMintSupported(availableSelectors));
63
+ }
47
64
  //# sourceMappingURL=lazyMint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lazyMint.js","sourceRoot":"","sources":["../../../../../src/extensions/erc721/write/lazyMint.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,8DAA8D,CAAC;AACjG,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,8CAA8C,CAAC;AA0B7F;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,QAAQ,CAAC,OAA+C;IACtE,OAAO,iBAAiB,CAAC;QACvB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,WAAW,EAAE,KAAK,IAAI,EA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AC,QAAQ,CAAC,MAAM;YACvB,+IAA+I;YAC/I,MAAM,CAAC,eAAe,CAAC,CACxB,CAAC;YAEF,MAAM,OAAO,GAAG,mBAAmB,CAAC,WAAW,CAAC,CAAC;YAEjD,OAAO;gBACL,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;gBAClC,gBAAgB,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG;gBACjE,SAAS,EAAE,IAAI;aACP,CAAC;QACb,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,mBAAmB,CAAC,kBAA4B;IAC9D,OAAO,CACL,QAAQ,CAAC,mBAAmB,CAAC,kBAAkB,CAAC;QAChD,sDAAsD;QACtD,4BAA4B,CAAC,kBAAkB,CAAC,CACjD,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { maxUint256, padHex } from "viem";
2
- import { ADDRESS_ZERO, isNativeTokenAddress, } from "../../../constants/addresses.js";
2
+ import { ZERO_ADDRESS, isNativeTokenAddress, } from "../../../constants/addresses.js";
3
3
  /**
4
4
  * Get the claim parameters for a given drop
5
5
  * @param options - The options for getting the claim parameters
@@ -49,7 +49,7 @@ export async function getClaimParams(options) {
49
49
  // early exit if no merkle root is set
50
50
  if (!cc.merkleRoot || cc.merkleRoot === padHex("0x", { size: 32 })) {
51
51
  return {
52
- currency: ADDRESS_ZERO,
52
+ currency: ZERO_ADDRESS,
53
53
  proof: [],
54
54
  quantityLimitPerWallet: 0n,
55
55
  pricePerToken: maxUint256,
@@ -66,7 +66,7 @@ export async function getClaimParams(options) {
66
66
  // if no proof is found, we'll try the empty proof
67
67
  if (!allowListProof) {
68
68
  return {
69
- currency: ADDRESS_ZERO,
69
+ currency: ZERO_ADDRESS,
70
70
  proof: [],
71
71
  quantityLimitPerWallet: 0n,
72
72
  pricePerToken: maxUint256,
@@ -77,7 +77,7 @@ export async function getClaimParams(options) {
77
77
  })();
78
78
  // currency and price need to match the allowlist proof if set
79
79
  // if default values in the allowlist proof, fallback to the claim condition
80
- const currency = allowlistProof.currency && allowlistProof.currency !== ADDRESS_ZERO
80
+ const currency = allowlistProof.currency && allowlistProof.currency !== ZERO_ADDRESS
81
81
  ? allowlistProof.currency
82
82
  : cc.currency;
83
83
  const pricePerToken = allowlistProof.pricePerToken !== undefined &&
@@ -1,2 +1,2 @@
1
- export const version = "5.50.1";
1
+ export const version = "5.51.0-nightly-f9c351c22d9c869770dad13332f9c23d8cb84ed7-20240905000555";
2
2
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,wEAAwE,CAAC"}
@@ -30,12 +30,15 @@ export { setTokenURI, type SetTokenURIParams, } from "../../extensions/erc721/__
30
30
  /**
31
31
  * DROPS extension for ERC721
32
32
  */
33
- export { getClaimConditionById } from "../../extensions/erc721/__generated__/IDrop/read/getClaimConditionById.js";
34
- export { claimCondition } from "../../extensions/erc721/__generated__/DropSinglePhase/read/claimCondition.js";
35
- export { getActiveClaimCondition } from "../../extensions/erc721/drops/read/getActiveClaimCondition.js";
36
- export { claimTo, type ClaimToParams, } from "../../extensions/erc721/drops/write/claimTo.js";
37
- export { lazyMint, type LazyMintParams, } from "../../extensions/erc721/write/lazyMint.js";
38
- export { setClaimConditions, type SetClaimConditionsParams, } from "../../extensions/erc721/drops/write/setClaimConditions.js";
33
+ export { getClaimConditionById, isGetClaimConditionByIdSupported, } from "../../extensions/erc721/__generated__/IDrop/read/getClaimConditionById.js";
34
+ export { getActiveClaimConditionId, isGetActiveClaimConditionIdSupported, } from "../../extensions/erc721/__generated__/IDrop/read/getActiveClaimConditionId.js";
35
+ export { getClaimConditions, isGetClaimConditionsSupported, } from "../../extensions/erc721/drops/read/getClaimConditions.js";
36
+ export { claimCondition, isClaimConditionSupported, } from "../../extensions/erc721/__generated__/DropSinglePhase/read/claimCondition.js";
37
+ export { getActiveClaimCondition, isGetActiveClaimConditionSupported, } from "../../extensions/erc721/drops/read/getActiveClaimCondition.js";
38
+ export { claimTo, type ClaimToParams, isClaimToSupported, } from "../../extensions/erc721/drops/write/claimTo.js";
39
+ export { lazyMint, type LazyMintParams, isLazyMintSupported, } from "../../extensions/erc721/write/lazyMint.js";
40
+ export { setClaimConditions, type SetClaimConditionsParams, isSetClaimConditionsSupported, } from "../../extensions/erc721/drops/write/setClaimConditions.js";
41
+ export { resetClaimEligibility, isResetClaimEligibilitySupported, } from "../../extensions/erc721/drops/write/resetClaimEligibility.js";
39
42
  /**
40
43
  * SIGNATURE extension for ERC721
41
44
  */
@@ -1 +1 @@
1
- {"version":3,"file":"erc721.d.ts","sourceRoot":"","sources":["../../../../src/exports/extensions/erc721.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EACL,MAAM,EACN,KAAK,YAAY,GAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,OAAO,EACP,KAAK,aAAa,GACnB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mFAAmF,CAAC;AACtH,OAAO,EACL,OAAO,EACP,KAAK,aAAa,GACnB,MAAM,gEAAgE,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,qEAAqE,CAAC;AACnG,OAAO,EACL,QAAQ,EACR,KAAK,cAAc,GACpB,MAAM,iEAAiE,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,oEAAoE,CAAC;AACjG,OAAO,EACL,SAAS,EACT,KAAK,eAAe,GACr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,EACd,KAAK,oBAAoB,GAC1B,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,cAAc,EACd,KAAK,oBAAoB,GAC1B,MAAM,iDAAiD,CAAC"}
1
+ {"version":3,"file":"erc721.d.ts","sourceRoot":"","sources":["../../../../src/exports/extensions/erc721.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,0CAA0C,CAAC;AACpE,OAAO,EACL,MAAM,EACN,KAAK,YAAY,GAClB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,OAAO,EACP,KAAK,aAAa,GACnB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mFAAmF,CAAC;AACtH,OAAO,EACL,OAAO,EACP,KAAK,aAAa,GACnB,MAAM,gEAAgE,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,qEAAqE,CAAC;AACnG,OAAO,EACL,QAAQ,EACR,KAAK,cAAc,GACpB,MAAM,iEAAiE,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,oEAAoE,CAAC;AACjG,OAAO,EACL,SAAS,EACT,KAAK,eAAe,GACrB,MAAM,kEAAkE,CAAC;AAC1E,OAAO,EACL,mBAAmB,EACnB,KAAK,yBAAyB,GAC/B,MAAM,qFAAqF,CAAC;AAC7F,OAAO,EACL,aAAa,EACb,KAAK,mBAAmB,GACzB,MAAM,+EAA+E,CAAC;AACvF,OAAO,EACL,YAAY,EACZ,KAAK,kBAAkB,GACxB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,gBAAgB,EAChB,KAAK,sBAAsB,GAC5B,MAAM,yEAAyE,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EACL,gBAAgB,EAChB,KAAK,sBAAsB,GAC5B,MAAM,kDAAkD,CAAC;AAC1D,OAA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AAM,0CAA0C,CAAC;AAElD;;GAEG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,8EAA8E,CAAC;AAC9G,OAAO,EACL,iBAAiB,EACjB,KAAK,uBAAuB,GAC7B,MAAM,oDAAoD,CAAC;AAE5D;;GAEG;AACH,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,GAC1B,MAAM,mEAAmE,CAAC;AAC3E,OAAO,EACL,qBAAqB,EACrB,KAAK,4BAA4B,GAClC,MAAM,4EAA4E,CAAC;AACpF,OAAO,EACL,aAAa,EACb,KAAK,oBAAoB,GAC1B,MAAM,mEAAmE,CAAC;AAC3E,OAAO,EACL,mBAAmB,EACnB,KAAK,0BAA0B,GAChC,MAAM,yEAAyE,CAAC;AACjF,OAAO,EACL,8BAA8B,EAC9B,KAAK,qCAAqC,GAC3C,MAAM,gGAAgG,CAAC;AACxG,OAAO,EAAE,2BAA2B,EAAE,MAAM,8EAA8E,CAAC;AAC3H,OAAO,EACL,kBAAkB,EAClB,KAAK,yBAAyB,GAC/B,MAAM,qEAAqE,CAAC;AAC7E,OAAO,EAAE,0BAA0B,EAAE,MAAM,uFAAuF,CAAC;AACnI,OAAO,EACL,qBAAqB,EACrB,KAAK,4BAA4B,GAClC,MAAM,iFAAiF,CAAC;AAGzF,OAAO,EACL,KAAK,8BAA8B,EACnC,wBAAwB,GACzB,MAAM,uEAAuE,CAAC;AAC/E,OAAO,EACL,KAAK,YAAY,EACjB,MAAM,GACP,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EACL,KAAK,aAAa,EAClB,kBAAkB,GACnB,MAAM,gEAAgE,CAAC;AACxE,OAAO,EACL,cAAc,EACd,KAAK,oBAAoB,GAC1B,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EACL,cAAc,EACd,KAAK,oBAAoB,GAC1B,MAAM,iDAAiD,CAAC"}
@@ -0,0 +1,45 @@
1
+ import type { BaseTransactionOptions } from "../../../../../transaction/types.js";
2
+ import type { Hex } from "../../../../../utils/encoding/hex.js";
3
+ export declare const FN_SELECTOR: "0xd637ed59";
4
+ /**
5
+ * Checks if the `claimCondition` method is supported by the given contract.
6
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
7
+ * @returns A boolean indicating if the `claimCondition` method is supported.
8
+ * @extension ERC721
9
+ * @example
10
+ * ```ts
11
+ * import { isClaimConditionSupported } from "thirdweb/extensions/erc721";
12
+ *
13
+ * const supported = isClaimConditionSupported(["0x..."]);
14
+ * ```
15
+ */
16
+ export declare function isClaimConditionSupported(availableSelectors: string[]): boolean;
17
+ /**
18
+ * Decodes the result of the claimCondition function call.
19
+ * @param result - The hexadecimal result to decode.
20
+ * @returns The decoded result as per the FN_OUTPUTS definition.
21
+ * @extension ERC721
22
+ * @example
23
+ * ```ts
24
+ * import { decodeClaimConditionResult } from "thirdweb/extensions/erc721";
25
+ * const result = decodeClaimConditionResult("...");
26
+ * ```
27
+ */
28
+ export declare function decodeClaimConditionResult(result: Hex): readonly [bigint, bigint];
29
+ /**
30
+ * Calls the "claimCondition" function on the contract.
31
+ * @param options - The options for the claimCondition function.
32
+ * @returns The parsed result of the function call.
33
+ * @extension ERC721
34
+ * @example
35
+ * ```ts
36
+ * import { claimCondition } from "thirdweb/extensions/erc721";
37
+ *
38
+ * const result = await claimCondition({
39
+ * contract,
40
+ * });
41
+ *
42
+ * ```
43
+ */
44
+ export declare function claimCondition(options: BaseTransactionOptions): Promise<readonly [bigint, bigint]>;
45
+ //# sourceMappingURL=claimCondition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claimCondition.d.ts","sourceRoot":"","sources":["../../../../../../../src/extensions/erc721/__generated__/IDrop/read/claimCondition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAGlF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sCAAsC,CAAC;AAGhE,eAAO,MAAM,WAAW,cAAwB,CAAC;AAajD;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CAAC,kBAAkB,EAAE,MAAM,EAAE,WAKrE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,GAAG,6BAErD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,sBAAsB,sCAMnE"}
@@ -13,4 +13,17 @@ import type { ClaimCondition } from "../../../../utils/extensions/drops/types.js
13
13
  * ```
14
14
  */
15
15
  export declare function getActiveClaimCondition(options: BaseTransactionOptions): Promise<ClaimCondition>;
16
+ /**
17
+ * Checks if the `getActiveClaimCondition` method is supported by the given contract.
18
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
19
+ * @returns A boolean indicating if the `getActiveClaimCondition` method is supported.
20
+ * @extension ERC721
21
+ * @example
22
+ * ```ts
23
+ * import { isGetActiveClaimConditionSupported } from "thirdweb/extensions/erc721";
24
+ *
25
+ * const supported = isGetActiveClaimConditionSupported(["0x..."]);
26
+ * ```
27
+ */
28
+ export declare function isGetActiveClaimConditionSupported(availableSelectors: string[]): boolean;
16
29
  //# sourceMappingURL=getActiveClaimCondition.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getActiveClaimCondition.d.ts","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/read/getActiveClaimCondition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAKlF;;;;;;;;;;;GAWG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,cAAc,CAAC,CAuCzB"}
1
+ {"version":3,"file":"getActiveClaimCondition.d.ts","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/read/getActiveClaimCondition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAKlF;;;;;;;;;;;GAWG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,cAAc,CAAC,CAuCzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kCAAkC,CAChD,kBAAkB,EAAE,MAAM,EAAE,WAW7B"}
@@ -0,0 +1,29 @@
1
+ import type { BaseTransactionOptions } from "../../../../transaction/types.js";
2
+ import type { ClaimCondition } from "../../../../utils/extensions/drops/types.js";
3
+ /**
4
+ * Retrieves all claim conditions.
5
+ * @param options - The transaction options.
6
+ * @returns A promise that resolves to all claim conditions.
7
+ * @throws An error if the claim conditions are unsupported by the contract.
8
+ * @extension ERC721
9
+ * @example
10
+ * ```ts
11
+ * import { getClaimConditions } from "thirdweb/extensions/erc721";
12
+ * const conditions = await getClaimConditions({ contract });
13
+ * ```
14
+ */
15
+ export declare function getClaimConditions(options: BaseTransactionOptions): Promise<ClaimCondition[]>;
16
+ /**
17
+ * Checks if the `getClaimConditions` method is supported by the given contract.
18
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
19
+ * @returns A boolean indicating if the `getClaimConditions` method is supported.
20
+ * @extension ERC721
21
+ * @example
22
+ * ```ts
23
+ * import { isGetClaimConditionsSupported } from "thirdweb/extensions/erc721";
24
+ *
25
+ * const supported = isGetClaimConditionsSupported(["0x..."]);
26
+ * ```
27
+ */
28
+ export declare function isGetClaimConditionsSupported(availableSelectors: string[]): boolean;
29
+ //# sourceMappingURL=getClaimConditions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getClaimConditions.d.ts","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/read/getClaimConditions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAKlF;;;;;;;;;;;GAWG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,cAAc,EAAE,CAAC,CAgD3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,6BAA6B,CAAC,kBAAkB,EAAE,MAAM,EAAE,WAUzE"}
@@ -30,4 +30,17 @@ export type ClaimToParams = {
30
30
  * @returns A promise that resolves with the submitted transaction hash.
31
31
  */
32
32
  export declare function claimTo(options: BaseTransactionOptions<ClaimToParams>): import("../../../../transaction/prepare-transaction.js").PreparedTransaction<any, import("abitype").AbiFunction, import("../../../../transaction/prepare-transaction.js").PrepareTransactionOptions>;
33
+ /**
34
+ * Checks if the `claimTo` method is supported by the given contract.
35
+ * @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
36
+ * @returns A boolean indicating if the `claimTo` method is supported.
37
+ * @extension ERC721
38
+ * @example
39
+ * ```ts
40
+ * import { isClaimToSupported } from "thirdweb/extensions/erc721";
41
+ *
42
+ * const supported = isClaimToSupported(["0x..."]);
43
+ * ```
44
+ */
45
+ export declare function isClaimToSupported(availableSelectors: string[]): boolean;
33
46
  //# sourceMappingURL=claimTo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claimTo.d.ts","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/write/claimTo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAI/E;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,sBAAsB,CAAC,aAAa,CAAC,wMAYrE"}
1
+ {"version":3,"file":"claimTo.d.ts","sourceRoot":"","sources":["../../../../../../src/extensions/erc721/drops/write/claimTo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAQ/E;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,OAAO,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,sBAAsB,CAAC,aAAa,CAAC,wMAYrE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,kBAAkB,EAAE,MAAM,EAAE,WAM9D"}