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mD,GAAAkL,EAAAzB,CAAA,EAAqB,KAAAzJ,eAAA,0BACrG,WAAA+U,EAAA,UAAA/U,eAAA,MAAAM,OAAA,CAGA,CACAoY,gCAAA,CACA,GAAQ,GAAAxN,EAAAzB,CAAA,EAAqB,KAAAzJ,eAAA,6BAC7B,WAAAuO,EAAA,KAAAvO,eAAA,MAAAM,OAAA,CAGA,CACAsY,wBAAA,CACA,GAAQ,GAAA1N,EAAAzB,CAAA,EAAqB,KAAAzJ,eAAA,uBAC7B,WAAA8N,EAAA,KAAA9N,eAAA,CAGA,CACA8Y,sCAAA,CACA,GAAQ,GAAA5N,EAAAzB,CAAA,EAAqB,KAAAzJ,eAAA,8BAAsD,GAAAkL,EAAAzB,CAAA,EAAqB,KAAAzJ,eAAA,8BAAsD,GAAAkL,EAAAzB,CAAA,EAAqB,KAAAzJ,eAAA,0BAAkD,GAAAkL,EAAAzB,CAAA,EAAqB,KAAAzJ,eAAA,yBAC1P,WAAAoO,EAAA,KAAApO,eAAA,MAAAM,OAAA,CAGA,CACA","sources":["webpack://_N_E/./node_modules/@thirdweb-dev/sdk/dist/contract-interceptor-d7b164a7.browser.esm.js","webpack://_N_E/./node_modules/@thirdweb-dev/sdk/dist/erc-1155-67c16791.browser.esm.js","webpack://_N_E/"],"sourcesContent":["/**\n * Allows overriding transaction behavior for this contract\n * @internal\n */\nclass ContractInterceptor {\n constructor(contractWrapper) {\n this.contractWrapper = contractWrapper;\n }\n\n /**\n * The next transaction executed will add/replace any overrides passed via the passed in hook.\n * @remarks Overridden values will be applied to the next transaction executed.\n * @example\n * ```javascript\n * contract.interceptor.overrideNextTransaction(() => ({\n * gasLimit: 3000000,\n * }));\n * ```\n * @param hook - the hook to add or replace any CallOverrides (gas limit, gas price, nonce, from, value, etc...)\n * @public\n */\n overrideNextTransaction(hook) {\n this.contractWrapper.withTransactionOverride(hook);\n }\n}\n\nexport { ContractInterceptor as C };\n","import { BigNumber, utils, constants } from 'ethers';\nimport { aM as resolveAddress, B as includesErrorMessage, d5 as isNode, cs as ContractWrapper, ba as AddressOrEnsSchema, cw as AmountSchema, d6 as FEATURE_EDITION_CLAIM_CUSTOM, d7 as FEATURE_EDITION_CLAIM_CONDITIONS_V2, bh as CustomContractSchema, d8 as FEATURE_EDITION_SIGNATURE_MINTABLE, d9 as getPrebuiltInfo, da as FEATURE_EDITION_BURNABLE, db as FEATURE_EDITION_ENUMERABLE, dc as FEATURE_EDITION_LAZY_MINTABLE_V2, dd as FEATURE_EDITION_REVEALABLE, de as FEATURE_EDITION_BATCH_MINTABLE, df as FEATURE_EDITION_MINTABLE, dg as FEATURE_EDITION, x as ExtensionNotImplementedError, dh as FEATURE_EDITION_SUPPLY, n as NotFoundError, di as FEATURE_EDITION_UPDATABLE_METADATA } from './index-02e94cec.browser.esm.js';\nimport { a as assertEnabled } from './assertEnabled-4605112f.browser.esm.js';\nimport { d as detectContractFeature, h as hasFunction, C as ContractMetadata } from './contract-appuri-84a944c8.browser.esm.js';\nimport { u as uploadOrExtractURIs, D as DEFAULT_QUERY_ALL_COUNT, b as uploadOrExtractURI, F as FALLBACK_METADATA, f as fetchTokenMetadata } from './QueryParams-b6af7045.browser.esm.js';\nimport { f as buildTransactionFunction, T as Transaction } from './transactions-91b95b4c.browser.esm.js';\nimport { z } from 'zod';\nimport { c as calculateClaimCost, D as DelayedReveal } from './contract-owner-2c250fed.browser.esm.js';\nimport deepEqual from 'fast-deep-equal';\nimport { y as transformResultToClaimCondition, z as legacyContractModelToAbstract, A as newContractModelToAbstract, C as ClaimEligibility, D as convertQuantityToBigNumber, f as fetchSnapshotEntryForAddress, E as prepareClaim, F as SnapshotFormatVersion, H as processClaimConditionInputs, I as abstractContractModelToLegacy, J as abstractContractModelToNew, K as updateExistingClaimConditions, r as Signature1155PayloadInputWithTokenId, s as Signature1155PayloadOutput, w as MintRequest1155 } from './signature-52783ae4.browser.esm.js';\nimport { i as isNativeToken, C as ContractEncoder } from './fetchCurrencyValue-a150f8dd.browser.esm.js';\nimport invariant from 'tiny-invariant';\nimport { n as normalizePriceValue } from './normalizePriceValue-74eeb144.browser.esm.js';\nimport { s as setErc20Allowance } from './setErc20Allowance-e3ef471a.browser.esm.js';\n\n/**\n * Manages claim conditions for Edition Drop contracts\n * @erc1155\n * @public\n */\nclass DropErc1155ClaimConditions {\n constructor(contractWrapper, metadata, storage) {\n this.storage = storage;\n this.contractWrapper = contractWrapper;\n this.metadata = metadata;\n }\n\n /** ***************************************\n * READ FUNCTIONS\n *****************************************/\n\n /**\n * Get the currently active claim condition\n *\n * @returns The claim condition metadata\n */\n async getActive(tokenId, options) {\n const mc = await this.get(tokenId);\n const metadata = await this.metadata.get();\n return await transformResultToClaimCondition(mc, 0, this.contractWrapper.getProvider(), metadata.merkle, this.storage, options?.withAllowList || false);\n }\n async get(tokenId, conditionId) {\n if (this.isLegacySinglePhaseDrop(this.contractWrapper)) {\n const contractModel = await this.contractWrapper.read(\"claimCondition\", [tokenId]);\n return legacyContractModelToAbstract(contractModel);\n } else if (this.isLegacyMultiPhaseDrop(this.contractWrapper)) {\n const id = conditionId !== undefined ? conditionId : await this.contractWrapper.read(\"getActiveClaimConditionId\", [tokenId]);\n const contractModel = await this.contractWrapper.read(\"getClaimConditionById\", [tokenId, id]);\n return legacyContractModelToAbstract(contractModel);\n } else if (this.isNewSinglePhaseDrop(this.contractWrapper)) {\n const contractModel = await this.contractWrapper.read(\"claimCondition\", [tokenId]);\n return newContractModelToAbstract(contractModel);\n } else if (this.isNewMultiphaseDrop(this.contractWrapper)) {\n const id = conditionId !== undefined ? conditionId : await this.contractWrapper.read(\"getActiveClaimConditionId\", [tokenId]);\n const contractModel = await this.contractWrapper.read(\"getClaimConditionById\", [tokenId, id]);\n return newContractModelToAbstract(contractModel);\n } else {\n throw new Error(\"Contract does not support claim conditions\");\n }\n }\n\n /**\n * Get all the claim conditions\n *\n * @returns The claim conditions metadata\n */\n async getAll(tokenId, options) {\n if (this.isLegacyMultiPhaseDrop(this.contractWrapper) || this.isNewMultiphaseDrop(this.contractWrapper)) {\n const claimCondition = await this.contractWrapper.read(\"claimCondition\", [tokenId]);\n const startId = claimCondition.currentStartId.toNumber();\n const count = claimCondition.count.toNumber();\n const conditions = [];\n for (let i = startId; i < startId + count; i++) {\n conditions.push(await this.get(tokenId, i));\n }\n const metadata = await this.metadata.get();\n return Promise.all(conditions.map(c => transformResultToClaimCondition(c, 0, this.contractWrapper.getProvider(), metadata.merkle, this.storage, options?.withAllowList || false)));\n } else {\n return [await this.getActive(tokenId, options)];\n }\n }\n\n /**\n * Can Claim\n *\n * @remarks Check if a particular NFT can currently be claimed by a given user.\n *\n * @example\n * ```javascript\n * // Quantity of tokens to check claimability of\n * const quantity = 1;\n * const canClaim = await contract.canClaim(quantity);\n * ```\n */\n async canClaim(tokenId, quantity, addressToCheck) {\n // TODO switch to use verifyClaim\n if (addressToCheck) {\n addressToCheck = await resolveAddress(addressToCheck);\n }\n return (await this.getClaimIneligibilityReasons(tokenId, quantity, addressToCheck)).length === 0;\n }\n\n /**\n * For any claim conditions that a particular wallet is violating,\n * this function returns human-readable information about the\n * breaks in the condition that can be used to inform the user.\n *\n * @param tokenId - the token id to check\n * @param quantity - The desired quantity that would be claimed.\n * @param addressToCheck - The wallet address, defaults to the connected wallet.\n *\n */\n async getClaimIneligibilityReasons(tokenId, quantity, addressToCheck) {\n const reasons = [];\n let activeConditionIndex;\n let claimCondition;\n if (addressToCheck === undefined) {\n try {\n addressToCheck = await this.contractWrapper.getSignerAddress();\n } catch (err) {\n console.warn(\"failed to get signer address\", err);\n }\n }\n\n // if we have been unable to get a signer address, we can't check eligibility, so return a NoWallet error reason\n if (!addressToCheck) {\n return [ClaimEligibility.NoWallet];\n }\n const resolvedAddress = await resolveAddress(addressToCheck);\n try {\n claimCondition = await this.getActive(tokenId);\n } catch (err) {\n if (includesErrorMessage(err, \"!CONDITION\") || includesErrorMessage(err, \"no active mint condition\") || includesErrorMessage(err, \"DropNoActiveCondition\")) {\n reasons.push(ClaimEligibility.NoClaimConditionSet);\n return reasons;\n }\n reasons.push(ClaimEligibility.Unknown);\n return reasons;\n }\n if (claimCondition.availableSupply !== \"unlimited\") {\n if (BigNumber.from(claimCondition.availableSupply).lt(quantity)) {\n reasons.push(ClaimEligibility.NotEnoughSupply);\n return reasons;\n }\n }\n\n // check for merkle root inclusion\n const merkleRootArray = utils.stripZeros(claimCondition.merkleRootHash);\n const hasAllowList = merkleRootArray.length > 0;\n let allowListEntry = null;\n if (hasAllowList) {\n allowListEntry = await this.getClaimerProofs(tokenId, resolvedAddress);\n if (!allowListEntry && (this.isLegacySinglePhaseDrop(this.contractWrapper) || this.isLegacyMultiPhaseDrop(this.contractWrapper))) {\n // exclusive allowlist behavior\n reasons.push(ClaimEligibility.AddressNotAllowed);\n return reasons;\n }\n if (allowListEntry) {\n try {\n const claimVerification = await this.prepareClaim(tokenId, quantity, false, resolvedAddress);\n let validMerkleProof;\n if (this.isLegacyMultiPhaseDrop(this.contractWrapper)) {\n activeConditionIndex = await this.contractWrapper.read(\"getActiveClaimConditionId\", [tokenId]);\n // legacy verifyClaimerMerkleProofs function\n [validMerkleProof] = await this.contractWrapper.read(\"verifyClaimMerkleProof\", [activeConditionIndex, resolvedAddress, tokenId, quantity, claimVerification.proofs, claimVerification.maxClaimable]);\n if (!validMerkleProof) {\n reasons.push(ClaimEligibility.AddressNotAllowed);\n return reasons;\n }\n } else if (this.isLegacySinglePhaseDrop(this.contractWrapper)) {\n [validMerkleProof] = await this.contractWrapper.read(\"verifyClaimMerkleProof\", [tokenId, resolvedAddress, quantity, {\n proof: claimVerification.proofs,\n maxQuantityInAllowlist: claimVerification.maxClaimable\n }]);\n if (!validMerkleProof) {\n reasons.push(ClaimEligibility.AddressNotAllowed);\n return reasons;\n }\n } else if (this.isNewSinglePhaseDrop(this.contractWrapper)) {\n await this.contractWrapper.read(\"verifyClaim\", [tokenId, resolvedAddress, quantity, claimVerification.currencyAddress, claimVerification.price, {\n proof: claimVerification.proofs,\n quantityLimitPerWallet: claimVerification.maxClaimable,\n currency: claimVerification.currencyAddressInProof,\n pricePerToken: claimVerification.priceInProof\n }]);\n } else if (this.isNewMultiphaseDrop(this.contractWrapper)) {\n activeConditionIndex = await this.contractWrapper.read(\"getActiveClaimConditionId\", [tokenId]);\n await this.contractWrapper.read(\"verifyClaim\", [activeConditionIndex, resolvedAddress, tokenId, quantity, claimVerification.currencyAddress, claimVerification.price, {\n proof: claimVerification.proofs,\n quantityLimitPerWallet: claimVerification.maxClaimable,\n currency: claimVerification.currencyAddressInProof,\n pricePerToken: claimVerification.priceInProof\n }]);\n }\n } catch (e) {\n console.warn(\"Merkle proof verification failed:\", \"reason\" in e ? e.reason || e.errorName : e);\n const reason = e.reason || e.errorName;\n switch (reason) {\n case \"!Qty\":\n case \"DropClaimExceedLimit\":\n reasons.push(ClaimEligibility.OverMaxClaimablePerWallet);\n break;\n case \"!PriceOrCurrency\":\n case \"DropClaimInvalidTokenPrice\":\n reasons.push(ClaimEligibility.WrongPriceOrCurrency);\n break;\n case \"!MaxSupply\":\n case \"DropClaimExceedMaxSupply\":\n reasons.push(ClaimEligibility.NotEnoughSupply);\n break;\n case \"cant claim yet\":\n case \"DropClaimNotStarted\":\n reasons.push(ClaimEligibility.ClaimPhaseNotStarted);\n break;\n default:\n {\n reasons.push(ClaimEligibility.AddressNotAllowed);\n break;\n }\n }\n return reasons;\n }\n }\n }\n if (this.isNewSinglePhaseDrop(this.contractWrapper) || this.isNewMultiphaseDrop(this.contractWrapper)) {\n let claimedSupply = BigNumber.from(0);\n let maxClaimable = convertQuantityToBigNumber(claimCondition.maxClaimablePerWallet, 0);\n try {\n claimedSupply = await this.getSupplyClaimedByWallet(tokenId, resolvedAddress);\n } catch (e) {\n // no-op\n }\n if (allowListEntry) {\n maxClaimable = convertQuantityToBigNumber(allowListEntry.maxClaimable, 0);\n }\n if (maxClaimable.gt(0) && maxClaimable.lt(claimedSupply.add(quantity))) {\n reasons.push(ClaimEligibility.OverMaxClaimablePerWallet);\n return reasons;\n }\n\n // if there is no allowlist, or if there is an allowlist and the address is not in it\n // if maxClaimable is 0, we consider it as the address is not allowed\n if (!hasAllowList || hasAllowList && !allowListEntry) {\n if (maxClaimable.lte(claimedSupply) || maxClaimable.eq(0)) {\n reasons.push(ClaimEligibility.AddressNotAllowed);\n return reasons;\n }\n }\n }\n\n // check for claim timestamp between claims\n let [lastClaimedTimestamp, timestampForNextClaim] = [BigNumber.from(0), BigNumber.from(0)];\n if (this.isLegacyMultiPhaseDrop(this.contractWrapper)) {\n activeConditionIndex = await this.contractWrapper.read(\"getActiveClaimConditionId\", [tokenId]);\n [lastClaimedTimestamp, timestampForNextClaim] = await this.contractWrapper.read(\"getClaimTimestamp\", [tokenId, activeConditionIndex, resolvedAddress]);\n } else if (this.isLegacySinglePhaseDrop(this.contractWrapper)) {\n [lastClaimedTimestamp, timestampForNextClaim] = await this.contractWrapper.read(\"getClaimTimestamp\", [tokenId, resolvedAddress]);\n }\n const now = BigNumber.from(Date.now()).div(1000);\n if (lastClaimedTimestamp.gt(0) && now.lt(timestampForNextClaim)) {\n // contract will return MaxUint256 if user has already claimed and cannot claim again\n if (timestampForNextClaim.eq(constants.MaxUint256)) {\n reasons.push(ClaimEligibility.AlreadyClaimed);\n } else {\n reasons.push(ClaimEligibility.WaitBeforeNextClaimTransaction);\n }\n return reasons;\n }\n\n // if not within a browser conetext, check for wallet balance.\n // In browser context, let the wallet do that job\n if (claimCondition.price.gt(0) && isNode()) {\n const totalPrice = claimCondition.price.mul(quantity);\n const provider = this.contractWrapper.getProvider();\n if (isNativeToken(claimCondition.currencyAddress)) {\n const balance = await provider.getBalance(resolvedAddress);\n if (balance.lt(totalPrice)) {\n reasons.push(ClaimEligibility.NotEnoughTokens);\n }\n } else {\n const IERC20ABI = (await import('@thirdweb-dev/contracts-js/dist/abis/IERC20.json')).default;\n const erc20 = new ContractWrapper(provider, claimCondition.currencyAddress, IERC20ABI, {}, this.storage);\n const balance = await erc20.read(\"balanceOf\", [resolvedAddress]);\n if (balance.lt(totalPrice)) {\n reasons.push(ClaimEligibility.NotEnoughTokens);\n }\n }\n }\n return reasons;\n }\n\n /**\n * Returns allow list information and merkle proofs for the given address.\n * @param tokenId - the token ID to check\n * @param claimerAddress - the claimer address\n * @param claimConditionId - optional the claim condition id to get the proofs for\n */\n async getClaimerProofs(tokenId, claimerAddress, claimConditionId) {\n const claimCondition = await this.get(tokenId, claimConditionId);\n const merkleRoot = claimCondition.merkleRoot;\n const merkleRootArray = utils.stripZeros(merkleRoot);\n if (merkleRootArray.length > 0) {\n const metadata = await this.metadata.get();\n const resolvedAddress = await resolveAddress(claimerAddress);\n return await fetchSnapshotEntryForAddress(resolvedAddress, merkleRoot.toString(), metadata.merkle, this.contractWrapper.getProvider(), this.storage, this.getSnapshotFormatVersion());\n } else {\n return null;\n }\n }\n\n /**\n * Get the total supply claimed by a specific wallet\n * @param walletAddress - the wallet address to check\n * @returns The total supply claimed\n */\n async getSupplyClaimedByWallet(tokenId, walletAddress) {\n const resolvedAddress = await resolveAddress(walletAddress);\n if (this.isNewSinglePhaseDrop(this.contractWrapper)) {\n return await this.contractWrapper.read(\"getSupplyClaimedByWallet\", [tokenId, resolvedAddress]);\n }\n if (this.isNewMultiphaseDrop(this.contractWrapper)) {\n const activeClaimConditionId = await this.contractWrapper.read(\"getActiveClaimConditionId\", [tokenId]);\n return await this.contractWrapper.read(\"getSupplyClaimedByWallet\", [tokenId, activeClaimConditionId, resolvedAddress]);\n }\n throw new Error(\"This contract does not support the getSupplyClaimedByWallet function\");\n }\n\n /** ***************************************\n * WRITE FUNCTIONS\n *****************************************/\n\n /**\n * Set claim conditions on a single NFT\n *\n * @remarks Sets the public mint conditions that need to be fulfilled by users to claim a particular NFT in this contract.\n *\n * @example\n * ```javascript\n * const presaleStartTime = new Date();\n * const publicSaleStartTime = new Date(Date.now() + 60 * 60 * 24 * 1000);\n *\n * // Optionally specify addresses that can claim\n * const snapshots = ['0x...', '0x...']\n *\n * // Or alternatively, you can pass snapshots with the max number of NFTs each address can claim\n * // const snapshots = [{ address: '0x...', maxClaimable: 1 }, { address: '0x...', maxClaimable: 2 }]\n *\n * const claimConditions = [\n * {\n * startTime: presaleStartTime, // start the presale now\n * maxClaimableSupply: 2, // limit how many mints for this presale\n * price: 0.01, // presale price\n * snapshot: snapshots, // limit minting to only certain addresses\n * },\n * {\n * startTime: publicSaleStartTime, // 24h after presale, start public sale\n * price: 0.08, // public sale price\n * }\n * ]);\n *\n * const tokenId = 0; // the id of the NFT to set claim conditions on\n * await dropContract.claimConditions.set(tokenId, claimConditions);\n * ```\n *\n * @param tokenId - The id of the NFT to set the claim conditions on\n * @param claimConditionInputs - The claim conditions\n * @param resetClaimEligibilityForAll - Whether to reset the state of who already claimed NFTs previously\n */\n set = /* @__PURE__ */buildTransactionFunction((() => {\n var _this = this;\n return async function (tokenId, claimConditionInputs) {\n let resetClaimEligibilityForAll = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n return _this.setBatch.prepare([{\n tokenId,\n claimConditions: claimConditionInputs\n }], resetClaimEligibilityForAll);\n };\n })());\n\n /**\n * Set claim conditions on multiple NFTs at once\n *\n * @remarks Sets the claim conditions that need to be fulfilled by users to claim the given NFTs in this contract.\n *\n * @example\n * ```javascript\n * const claimConditionsForTokens = [\n * {\n * tokenId: 0,\n * claimConditions: [{\n * startTime: new Date(), // start the claim phase now\n * maxClaimableSupply: 2, // limit how many mints for this tokenId\n * price: 0.01, // price for this tokenId\n * snapshot: ['0x...', '0x...'], // limit minting to only certain addresses\n * }]\n * },\n * {\n * tokenId: 1,\n * claimConditions: [{\n * startTime: new Date(),\n * price: 0.08, // different price for this tokenId\n * }]\n * },\n * ];\n *\n * await dropContract.claimConditions.setBatch(claimConditionsForTokens);\n * ```\n *\n * @param claimConditionsForToken - The claim conditions for each NFT\n * @param resetClaimEligibilityForAll - Whether to reset the state of who already claimed NFTs previously\n */\n setBatch = /* @__PURE__ */buildTransactionFunction((() => {\n var _this2 = this;\n return async function (claimConditionsForToken) {\n let resetClaimEligibilityForAll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const merkleInfo = {};\n const processedClaimConditions = await Promise.all(claimConditionsForToken.map(async _ref => {\n let {\n tokenId,\n claimConditions\n } = _ref;\n // sanitize for single phase deletions\n let claimConditionsProcessed = claimConditions;\n if (_this2.isLegacySinglePhaseDrop(_this2.contractWrapper)) {\n resetClaimEligibilityForAll = true;\n if (claimConditions.length === 0) {\n claimConditionsProcessed = [{\n startTime: new Date(0),\n currencyAddress: constants.AddressZero,\n price: 0,\n maxClaimableSupply: 0,\n maxClaimablePerWallet: 0,\n waitInSeconds: 0,\n merkleRootHash: utils.hexZeroPad([0], 32),\n snapshot: []\n }];\n } else if (claimConditions.length > 1) {\n throw new Error(\"Single phase drop contract cannot have multiple claim conditions, only one is allowed\");\n }\n }\n // if using new snapshot format, make sure that maxClaimablePerWallet is set if allowlist is set as well\n if (_this2.isNewSinglePhaseDrop(_this2.contractWrapper) || _this2.isNewMultiphaseDrop(_this2.contractWrapper)) {\n claimConditionsProcessed.forEach(cc => {\n if (cc.snapshot && cc.snapshot.length > 0 && (cc.maxClaimablePerWallet === undefined || cc.maxClaimablePerWallet === \"unlimited\")) {\n throw new Error(\"maxClaimablePerWallet must be set to a specific value when an allowlist is set.\\n\" + \"Set it to 0 to only allow addresses in the allowlist to claim the amount specified in the allowlist.\" + \"\\n\\nex:\\n\" + \"contract.claimConditions.set(tokenId, [{ snapshot: [{ address: '0x...', maxClaimable: 1 }], maxClaimablePerWallet: 0 }])\");\n }\n if (cc.snapshot && cc.snapshot.length > 0 && cc.maxClaimablePerWallet?.toString() === \"0\" && cc.snapshot.map(s => {\n if (typeof s === \"string\") {\n return 0;\n } else {\n return Number(s.maxClaimable?.toString() || 0);\n }\n }).reduce((acc, current) => {\n return acc + current;\n }, 0) === 0) {\n throw new Error(\"maxClaimablePerWallet is set to 0, and all addresses in the allowlist have max claimable 0. This means that no one can claim.\");\n }\n });\n }\n // process inputs\n const {\n snapshotInfos,\n sortedConditions\n } = await processClaimConditionInputs(claimConditionsProcessed, 0, _this2.contractWrapper.getProvider(), _this2.storage, _this2.getSnapshotFormatVersion());\n snapshotInfos.forEach(s => {\n merkleInfo[s.merkleRoot] = s.snapshotUri;\n });\n return {\n tokenId,\n sortedConditions\n };\n }));\n const metadata = await _this2.metadata.get();\n const encoded = [];\n\n // keep the old merkle roots from other tokenIds\n for (const key of Object.keys(metadata.merkle || {})) {\n merkleInfo[key] = metadata.merkle[key];\n }\n\n // upload new merkle roots to snapshot URIs if updated\n if (!deepEqual(metadata.merkle, merkleInfo)) {\n const mergedMetadata = await _this2.metadata.parseInputMetadata({\n ...metadata,\n merkle: merkleInfo\n });\n // using internal method to just upload, avoids one contract call\n const contractURI = await _this2.metadata._parseAndUploadMetadata(mergedMetadata);\n if (hasFunction(\"setContractURI\", _this2.contractWrapper)) {\n const contractEncoder = new ContractEncoder(_this2.contractWrapper);\n encoded.push(contractEncoder.encode(\"setContractURI\", [contractURI]));\n } else {\n throw new Error(\"Setting a merkle root requires implementing ContractMetadata in your contract to support storing a merkle root.\");\n }\n }\n processedClaimConditions.forEach(_ref2 => {\n let {\n tokenId,\n sortedConditions\n } = _ref2;\n const baseContractEncoder = new ContractEncoder(_this2.contractWrapper);\n if (_this2.isLegacySinglePhaseDrop(_this2.contractWrapper)) {\n const legacyContractEncoder = new ContractEncoder(_this2.contractWrapper);\n encoded.push(legacyContractEncoder.encode(\"setClaimConditions\", [tokenId, abstractContractModelToLegacy(sortedConditions[0]), resetClaimEligibilityForAll]));\n } else if (_this2.isLegacyMultiPhaseDrop(_this2.contractWrapper)) {\n encoded.push(baseContractEncoder.encode(\"setClaimConditions\", [tokenId, sortedConditions.map(abstractContractModelToLegacy), resetClaimEligibilityForAll]));\n } else if (_this2.isNewSinglePhaseDrop(_this2.contractWrapper)) {\n encoded.push(baseContractEncoder.encode(\"setClaimConditions\", [tokenId, abstractContractModelToNew(sortedConditions[0]), resetClaimEligibilityForAll]));\n } else if (_this2.isNewMultiphaseDrop(_this2.contractWrapper)) {\n encoded.push(baseContractEncoder.encode(\"setClaimConditions\", [tokenId, sortedConditions.map(abstractContractModelToNew), resetClaimEligibilityForAll]));\n } else {\n throw new Error(\"Contract does not support claim conditions\");\n }\n });\n if (hasFunction(\"multicall\", _this2.contractWrapper)) {\n return Transaction.fromContractWrapper({\n contractWrapper: _this2.contractWrapper,\n method: \"multicall\",\n args: [encoded]\n });\n }\n throw new Error(\"Contract does not support multicall\");\n };\n })());\n\n /**\n * Update a single claim condition with new data.\n * @param tokenId - the token id to update\n * @param index - the index of the claim condition to update, as given by the index from the result of `getAll()`\n * @param claimConditionInput - the new data to update, previous data will be retained\n */\n update = /* @__PURE__ */buildTransactionFunction(async (tokenId, index, claimConditionInput) => {\n const existingConditions = await this.getAll(tokenId);\n const newConditionInputs = await updateExistingClaimConditions(index, claimConditionInput, existingConditions);\n return await this.set.prepare(tokenId, newConditionInputs);\n });\n\n /**\n * Returns proofs and the overrides required for the transaction.\n *\n * @returns `overrides` and `proofs` as an object.\n */\n async prepareClaim(tokenId, quantity, checkERC20Allowance, address) {\n const addressToClaim = await resolveAddress(address ? address : await this.contractWrapper.getSignerAddress());\n return prepareClaim(addressToClaim, quantity, await this.getActive(tokenId), async () => (await this.metadata.get()).merkle, 0, this.contractWrapper, this.storage, checkERC20Allowance, this.getSnapshotFormatVersion());\n }\n async getClaimArguments(tokenId, destinationAddress, quantity, claimVerification) {\n const resolvedAddress = await resolveAddress(destinationAddress);\n if (this.isLegacyMultiPhaseDrop(this.contractWrapper)) {\n return [resolvedAddress, tokenId, quantity, claimVerification.currencyAddress, claimVerification.price, claimVerification.proofs, claimVerification.maxClaimable];\n } else if (this.isLegacySinglePhaseDrop(this.contractWrapper)) {\n return [resolvedAddress, tokenId, quantity, claimVerification.currencyAddress, claimVerification.price, {\n proof: claimVerification.proofs,\n maxQuantityInAllowlist: claimVerification.maxClaimable\n }, utils.toUtf8Bytes(\"\")];\n }\n return [resolvedAddress, tokenId, quantity, claimVerification.currencyAddress, claimVerification.price, {\n proof: claimVerification.proofs,\n quantityLimitPerWallet: claimVerification.maxClaimable,\n pricePerToken: claimVerification.priceInProof,\n currency: claimVerification.currencyAddressInProof\n }, utils.toUtf8Bytes(\"\")];\n }\n\n /**\n * Construct a claim transaction without executing it.\n * This is useful for estimating the gas cost of a claim transaction, overriding transaction options and having fine grained control over the transaction execution.\n * @param destinationAddress - Address you want to send the token to\n * @param tokenId - Id of the token you want to claim\n * @param quantity - Quantity of the tokens you want to claim\n *\n * @deprecated Use `contract.erc1155.claim.prepare(...args)` instead\n */\n async getClaimTransaction(destinationAddress, tokenId, quantity, options) {\n if (options?.pricePerToken) {\n throw new Error(\"Price per token should be set via claim conditions by calling `contract.erc1155.claimConditions.set()`\");\n }\n const claimVerification = await this.prepareClaim(tokenId, quantity, options?.checkERC20Allowance || true);\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"claim\",\n args: await this.getClaimArguments(tokenId, destinationAddress, quantity, claimVerification),\n overrides: claimVerification.overrides\n });\n }\n isNewSinglePhaseDrop(contractWrapper) {\n return detectContractFeature(contractWrapper, \"ERC1155ClaimConditionsV2\");\n }\n isNewMultiphaseDrop(contractWrapper) {\n return detectContractFeature(contractWrapper, \"ERC1155ClaimPhasesV2\");\n }\n isLegacySinglePhaseDrop(contractWrapper) {\n return detectContractFeature(contractWrapper, \"ERC1155ClaimConditionsV1\");\n }\n isLegacyMultiPhaseDrop(contractWrapper) {\n return detectContractFeature(contractWrapper, \"ERC1155ClaimPhasesV1\");\n }\n getSnapshotFormatVersion() {\n return this.isLegacyMultiPhaseDrop(this.contractWrapper) || this.isLegacySinglePhaseDrop(this.contractWrapper) ? SnapshotFormatVersion.V1 : SnapshotFormatVersion.V2;\n }\n}\n\n/**\n * @internal\n */\nconst AirdropAddressInput = /* @__PURE__ */(() => z.object({\n address: AddressOrEnsSchema,\n quantity: AmountSchema.default(1)\n}))();\n\n/**\n * @internal\n */\nconst AirdropInputSchema = /* @__PURE__ */(() => z.union([z.array(z.string()).transform(async strings => await Promise.all(strings.map(address => AirdropAddressInput.parseAsync({\n address\n})))), z.array(AirdropAddressInput)]))();\n\n/**\n * Configure and claim ERC1155 NFTs\n * @remarks Manage claim phases and claim ERC1155 NFTs that have been lazily minted.\n * @example\n * ```javascript\n * const contract = await sdk.getContract(\"{{contract_address}}\");\n * await contract.edition.drop.claim.to(\"0x...\", tokenId, quantity);\n * ```\n */\nclass ERC1155Claimable {\n featureName = FEATURE_EDITION_CLAIM_CUSTOM.name;\n constructor(contractWrapper) {\n this.contractWrapper = contractWrapper;\n }\n\n /**\n * Construct a claim transaction without executing it.\n * This is useful for estimating the gas cost of a claim transaction, overriding transaction options and having fine grained control over the transaction execution.\n * @param destinationAddress - Address you want to send the token to\n * @param tokenId - Id of the token you want to claim\n * @param quantity - Quantity of the tokens you want to claim\n * @param options - Options for claiming the NFTs\n *\n * @deprecated Use `contract.erc1155.claim.prepare(...args)` instead\n */\n async getClaimTransaction(destinationAddress, tokenId, quantity, options) {\n let overrides = {};\n if (options && options.pricePerToken) {\n overrides = await calculateClaimCost(this.contractWrapper, options.pricePerToken, quantity, options.currencyAddress, options.checkERC20Allowance);\n }\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"claim\",\n args: [await resolveAddress(destinationAddress), tokenId, quantity],\n overrides\n });\n }\n\n /**\n * Claim NFTs to a specific Wallet\n *\n * @remarks Let the specified wallet claim NFTs.\n *\n * @example\n * ```javascript\n * const address = \"{{wallet_address}}\"; // address of the wallet you want to claim the NFTs\n * const tokenId = 0; // the id of the NFT you want to claim\n * const quantity = 1; // how many NFTs you want to claim\n *\n * const tx = await contract.erc1155.claimTo(address, tokenId, quantity);\n * const receipt = tx.receipt; // the transaction receipt\n * ```\n *\n * @param destinationAddress - Address you want to send the token to\n * @param tokenId - Id of the token you want to claim\n * @param quantity - Quantity of the tokens you want to claim\n * @param options - Options for claiming the NFTs\n *\n * @returns Receipt for the transaction\n */\n to = /* @__PURE__ */buildTransactionFunction(async (destinationAddress, tokenId, quantity, options) => {\n return await this.getClaimTransaction(destinationAddress, tokenId, quantity, options);\n });\n}\n\n/**\n * Configure and claim ERC1155 NFTs\n * @remarks Manage claim phases and claim ERC1155 NFTs that have been lazily minted.\n * @example\n * ```javascript\n * const contract = await sdk.getContract(\"{{contract_address}}\");\n * await contract.erc1155.claim(tokenId, quantity);\n * await contract.erc1155.claimConditions.getActive(tokenId);\n * ```\n */\nclass Erc1155ClaimableWithConditions {\n featureName = FEATURE_EDITION_CLAIM_CONDITIONS_V2.name;\n constructor(contractWrapper, storage) {\n this.contractWrapper = contractWrapper;\n this.storage = storage;\n const metadata = new ContractMetadata(this.contractWrapper, CustomContractSchema, this.storage);\n this.conditions = new DropErc1155ClaimConditions(contractWrapper, metadata, this.storage);\n }\n\n /**\n * Claim NFTs to a specific Wallet\n *\n * @remarks Let the specified wallet claim NFTs.\n *\n * @example\n * ```javascript\n * const address = \"{{wallet_address}}\"; // address of the wallet you want to claim the NFTs\n * const tokenId = 0; // the id of the NFT you want to claim\n * const quantity = 1; // how many NFTs you want to claim\n *\n * const tx = await contract.erc1155.claimTo(address, tokenId, quantity);\n * const receipt = tx.receipt; // the transaction receipt\n * ```\n *\n * @param destinationAddress - Address you want to send the token to\n * @param tokenId - Id of the token you want to claim\n * @param quantity - Quantity of the tokens you want to claim\n *\n * @returns Receipt for the transaction\n */\n to = /* @__PURE__ */buildTransactionFunction(async (destinationAddress, tokenId, quantity, options) => {\n return await this.conditions.getClaimTransaction(destinationAddress, tokenId, quantity, options);\n });\n}\n\n/**\n * Enables generating dynamic ERC1155 NFTs with rules and an associated signature, which can then be minted by anyone securely\n * @erc1155\n * @public\n */\nclass Erc1155SignatureMintable {\n featureName = FEATURE_EDITION_SIGNATURE_MINTABLE.name;\n constructor(contractWrapper, storage, roles) {\n this.contractWrapper = contractWrapper;\n this.storage = storage;\n this.roles = roles;\n }\n\n /**\n * Mint a dynamically generated NFT\n *\n * @remarks Mint a dynamic NFT with a previously generated signature.\n *\n * @example\n * ```javascript\n * // see how to craft a payload to sign in the `generate()` documentation\n * const signedPayload = contract.erc1155.signature.generate(payload);\n *\n * // now anyone can mint the NFT\n * const tx = contract.erc1155.signature.mint(signedPayload);\n * ```\n * @param signedPayload - the previously generated payload and signature with {@link Erc1155SignatureMintable.generate}\n * @twfeature ERC1155SignatureMintable\n */\n mint = /* @__PURE__ */buildTransactionFunction(async signedPayload => {\n const mintRequest = signedPayload.payload;\n const signature = signedPayload.signature;\n const [message, overrides] = await Promise.all([this.mapPayloadToContractStruct(mintRequest), this.contractWrapper.getCallOverrides()]);\n // TODO: Transaction Sequence Pattern\n await setErc20Allowance(this.contractWrapper, message.pricePerToken.mul(message.quantity), mintRequest.currencyAddress, overrides);\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"mintWithSignature\",\n args: [message, signature],\n overrides,\n parse: receipt => {\n const t = this.contractWrapper.parseLogs(\"TokensMintedWithSignature\", receipt.logs);\n if (t.length === 0) {\n throw new Error(\"No MintWithSignature event found\");\n }\n const id = t[0].args.tokenIdMinted;\n return {\n id,\n receipt\n };\n }\n });\n });\n\n /**\n * Mint any number of dynamically generated NFT at once\n * @remarks Mint multiple dynamic NFTs in one transaction. Note that this is only possible for free mints (cannot batch mints with a price attached to it for security reasons)\n *\n * @example\n * ```javascript\n * // see how to craft a batch of payloads to sign in the `generateBatch()` documentation\n * const signedPayloads = contract.erc1155.signature.generateBatch(payloads);\n *\n * // now anyone can mint the NFT\n * const tx = contract.erc1155.signature.mintBatch(signedPayloads);\n * ```\n *\n * @param signedPayloads - the array of signed payloads to mint\n * @twfeature ERC1155SignatureMintable\n */\n mintBatch = /* @__PURE__ */buildTransactionFunction(async signedPayloads => {\n const contractStructs = await Promise.all(signedPayloads.map(s => this.mapPayloadToContractStruct(s.payload)));\n const contractPayloads = signedPayloads.map((s, index) => {\n const message = contractStructs[index];\n const signature = s.signature;\n const price = s.payload.price;\n if (BigNumber.from(price).gt(0)) {\n throw new Error(\"Can only batch free mints. For mints with a price, use regular mint()\");\n }\n return {\n message,\n signature\n };\n });\n const contractEncoder = new ContractEncoder(this.contractWrapper);\n const encoded = contractPayloads.map(p => {\n return contractEncoder.encode(\"mintWithSignature\", [p.message, p.signature]);\n });\n if (hasFunction(\"multicall\", this.contractWrapper)) {\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"multicall\",\n args: [encoded],\n parse: receipt => {\n const events = this.contractWrapper.parseLogs(\"TokensMintedWithSignature\", receipt.logs);\n if (events.length === 0) {\n throw new Error(\"No MintWithSignature event found\");\n }\n return events.map(log => ({\n id: log.args.tokenIdMinted,\n receipt\n }));\n }\n });\n } else {\n throw new Error(\"Multicall not supported on this contract!\");\n }\n });\n\n /**\n * Verify that a payload is correctly signed\n * @param signedPayload - the payload to verify\n * @twfeature ERC1155SignatureMintable\n *\n * @example\n * ```javascript\n * const nftMetadata = {\n * name: \"Cool NFT #1\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * };\n *\n * const startTime = new Date();\n * const endTime = new Date(Date.now() + 60 * 60 * 24 * 1000);\n * const payload = {\n * metadata: nftMetadata, // The NFT to mint\n * to: {{wallet_address}}, // Who will receive the NFT\n * quantity: 2, // the quantity of NFTs to mint\n * price: 0.5, // the price per NFT\n * currencyAddress: NATIVE_TOKEN_ADDRESS, // the currency to pay with\n * mintStartTime: startTime, // can mint anytime from now\n * mintEndTime: endTime, // to 24h from now\n * royaltyRecipient: \"0x...\", // custom royalty recipient for this NFT\n * royaltyBps: 100, // custom royalty fees for this NFT (in bps)\n * primarySaleRecipient: \"0x...\", // custom sale recipient for this NFT\n * };\n *\n * const signedPayload = contract.erc1155.signature.generate(payload);\n * // Now you can verify that the payload is valid\n * const isValid = await contract.erc1155.signature.verify(signedPayload);\n * ```\n */\n async verify(signedPayload) {\n const mintRequest = signedPayload.payload;\n const signature = signedPayload.signature;\n const message = await this.mapPayloadToContractStruct(mintRequest);\n const verification = await this.contractWrapper.read(\"verify\", [message, signature]);\n return verification[0];\n }\n\n /**\n * Generate a signature that can be used to mint an NFT dynamically.\n *\n * @remarks Takes in an NFT and some information about how it can be minted, uploads the metadata and signs it with your private key. The generated signature can then be used to mint an NFT using the exact payload and signature generated.\n *\n * @example\n * ```javascript\n * const nftMetadata = {\n * name: \"Cool NFT #1\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * };\n *\n * const startTime = new Date();\n * const endTime = new Date(Date.now() + 60 * 60 * 24 * 1000);\n * const payload = {\n * metadata: nftMetadata, // The NFT to mint\n * to: {{wallet_address}}, // Who will receive the NFT\n * quantity: 2, // the quantity of NFTs to mint\n * price: 0.5, // the price per NFT\n * currencyAddress: NATIVE_TOKEN_ADDRESS, // the currency to pay with\n * mintStartTime: startTime, // can mint anytime from now\n * mintEndTime: endTime, // to 24h from now\n * royaltyRecipient: \"0x...\", // custom royalty recipient for this NFT\n * royaltyBps: 100, // custom royalty fees for this NFT (in bps)\n * primarySaleRecipient: \"0x...\", // custom sale recipient for this NFT\n * };\n *\n * const signedPayload = await contract.erc1155.signature.generate(payload);\n * // now anyone can use these to mint the NFT using `contract.erc1155.signature.mint(signedPayload)`\n * ```\n * @param payloadToSign - the payload to sign\n * @returns The signed payload and the corresponding signature\n * @twfeature ERC1155SignatureMintable\n */\n async generate(payloadToSign) {\n const payload = {\n ...payloadToSign,\n tokenId: constants.MaxUint256\n };\n return this.generateFromTokenId(payload);\n }\n\n /**\n * Generate a signature that can be used to mint additionally supply to an existing NFT.\n *\n * @remarks Takes in a payload with the token ID of an existing NFT, and signs it with your private key. The generated signature can then be used to mint additional supply to the NFT using the exact payload and signature generated.\n *\n * @example\n * ```javascript\n * const nftMetadata = {\n * name: \"Cool NFT #1\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * };\n *\n * const startTime = new Date();\n * const endTime = new Date(Date.now() + 60 * 60 * 24 * 1000);\n * const payload = {\n * tokenId: 0, // Instead of metadata, we specify the token ID of the NFT to mint supply to\n * to: {{wallet_address}}, // Who will receive the NFT (or AddressZero for anyone)\n * quantity: 2, // the quantity of NFTs to mint\n * price: 0.5, // the price per NFT\n * currencyAddress: NATIVE_TOKEN_ADDRESS, // the currency to pay with\n * mintStartTime: startTime, // can mint anytime from now\n * mintEndTime: endTime, // to 24h from now\n * royaltyRecipient: \"0x...\", // custom royalty recipient for this NFT\n * royaltyBps: 100, // custom royalty fees for this NFT (in bps)\n * primarySaleRecipient: \"0x...\", // custom sale recipient for this NFT\n * };\n *\n * const signedPayload = await contract.erc1155.signature.generateFromTokenId(payload);\n * // now anyone can use these to mint the NFT using `contract.erc1155.signature.mint(signedPayload)`\n * ```\n * @param payloadToSign - the payload to sign\n * @returns The signed payload and the corresponding signature\n * @twfeature ERC1155SignatureMintable\n */\n async generateFromTokenId(payloadToSign) {\n const payloads = await this.generateBatchFromTokenIds([payloadToSign]);\n return payloads[0];\n }\n\n /**\n * Generate a batch of signatures that can be used to mint many new NFTs dynamically.\n *\n * @remarks See {@link Erc1155SignatureMintable.generate}\n *\n * @param payloadsToSign - the payloads to sign\n * @returns An array of payloads and signatures\n * @twfeature ERC1155SignatureMintable\n */\n async generateBatch(payloadsToSign) {\n const payloads = payloadsToSign.map(payload => ({\n ...payload,\n tokenId: constants.MaxUint256\n }));\n return this.generateBatchFromTokenIds(payloads);\n }\n\n /**\n * Generate a batch of signatures that can be used to mint new NFTs or additionally supply to existing NFTs dynamically.\n *\n * @remarks See {@link Erc1155SignatureMintable.generateFromTokenId}\n *\n * @param payloadsToSign - the payloads to sign with tokenIds specified\n * @returns An array of payloads and signatures\n * @twfeature ERC1155SignatureMintable\n */\n async generateBatchFromTokenIds(payloadsToSign) {\n const signer = this.contractWrapper.getSigner();\n invariant(signer, \"No signer available\");\n await this.roles?.verify([\"minter\"], await signer.getAddress());\n const parsedRequests = await Promise.all(payloadsToSign.map(m => Signature1155PayloadInputWithTokenId.parseAsync(m)));\n const metadatas = parsedRequests.map(r => r.metadata);\n const [uris, chainId, contractInfo] = await Promise.all([uploadOrExtractURIs(metadatas, this.storage), this.contractWrapper.getChainID(), getPrebuiltInfo(this.contractWrapper.address, this.contractWrapper.getProvider())]);\n const finalPayloads = await Promise.all(parsedRequests.map((m, i) => Signature1155PayloadOutput.parseAsync({\n ...m,\n uri: uris[i]\n })));\n const contractStructs = await Promise.all(finalPayloads.map(finalPayload => this.mapPayloadToContractStruct(finalPayload)));\n const isLegacyContract = contractInfo?.type === \"TokenERC1155\";\n const signatures = await Promise.all(contractStructs.map(contractStruct => this.contractWrapper.signTypedData(signer, {\n name: isLegacyContract ? \"TokenERC1155\" : \"SignatureMintERC1155\",\n version: \"1\",\n chainId,\n verifyingContract: this.contractWrapper.address\n }, {\n MintRequest: MintRequest1155\n },\n // TYPEHASH\n contractStruct)));\n return signatures.map((signature, index) => ({\n payload: finalPayloads[index],\n signature: signature.toString()\n }));\n }\n\n /** ******************************\n * PRIVATE FUNCTIONS\n *******************************/\n\n /**\n * Maps a payload to the format expected by the contract\n *\n * @internal\n *\n * @param mintRequest - The payload to map.\n * @returns The mapped payload.\n */\n async mapPayloadToContractStruct(mintRequest) {\n const normalizedPricePerToken = await normalizePriceValue(this.contractWrapper.getProvider(), mintRequest.price, mintRequest.currencyAddress);\n return {\n to: mintRequest.to,\n tokenId: mintRequest.tokenId,\n uri: mintRequest.uri,\n quantity: mintRequest.quantity,\n pricePerToken: normalizedPricePerToken,\n currency: mintRequest.currencyAddress,\n validityStartTimestamp: mintRequest.mintStartTime,\n validityEndTimestamp: mintRequest.mintEndTime,\n uid: mintRequest.uid,\n royaltyRecipient: mintRequest.royaltyRecipient,\n royaltyBps: mintRequest.royaltyBps,\n primarySaleRecipient: mintRequest.primarySaleRecipient\n };\n }\n}\n\nclass Erc1155Burnable {\n featureName = FEATURE_EDITION_BURNABLE.name;\n constructor(contractWrapper) {\n this.contractWrapper = contractWrapper;\n }\n\n /**\n * Burn a specified amount of a NFTs\n *\n * @remarks Burn the specified NFTs from the connected wallet\n *\n * @param tokenId - the token Id to burn\n * @param amount - amount to burn\n *\n * @example\n * ```javascript\n * // The token ID to burn NFTs of\n * const tokenId = 0;\n * // The amount of the NFT you want to burn\n * const amount = 2;\n *\n * const result = await contract.edition.burn.tokens(tokenId, amount);\n * ```\n */\n tokens = /* @__PURE__ */buildTransactionFunction(async (tokenId, amount) => {\n const account = await this.contractWrapper.getSignerAddress();\n return this.from.prepare(account, tokenId, amount);\n });\n\n /**\n * Burn a specified amount of a NFTs\n *\n * @remarks Burn the specified NFTs from a specified wallet\n *\n * @param account - the address to burn NFTs from\n * @param tokenId - the tokenId to burn\n * @param amount - amount to burn\n *\n * @example\n * ```javascript\n * // The address of the wallet to burn NFTS from\n * const account = \"0x...\";\n * // The token ID to burn NFTs of\n * const tokenId = 0;\n * // The amount of this NFT you want to burn\n * const amount = 2;\n *\n * const result = await contract.edition.burn.from(account, tokenId, amount);\n * ```\n */\n from = /* @__PURE__ */buildTransactionFunction(async (account, tokenId, amount) => {\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"burn\",\n args: [await resolveAddress(account), tokenId, amount]\n });\n });\n\n /**\n * Burn a batch of NFTs\n *\n * @remarks Burn the batch NFTs from the connected wallet\n *\n * @param tokenIds - the tokenIds to burn\n * @param amounts - amount of each token to burn\n *\n * @example\n * ```javascript\n * // The token IDs to burn NFTs of\n * const tokenIds = [0, 1];\n * // The amounts of each NFT you want to burn\n * const amounts = [2, 2];\n *\n * const result = await contract.edition.burn.batch(tokenIds, amounts);\n * ```\n */\n batch = /* @__PURE__ */buildTransactionFunction(async (tokenIds, amounts) => {\n const account = await this.contractWrapper.getSignerAddress();\n return this.batchFrom.prepare(account, tokenIds, amounts);\n });\n\n /**\n * Burn a batch of NFTs\n *\n * @remarks Burn the batch NFTs from the specified wallet\n *\n * @param account - the address to burn NFTs from\n * @param tokenIds - the tokenIds to burn\n * @param amounts - amount of each token to burn\n *\n * @example\n * ```javascript\n * // The address of the wallet to burn NFTS from\n * const account = \"0x...\";\n * // The token IDs to burn NFTs of\n * const tokenIds = [0, 1];\n * // The amounts of each NFT you want to burn\n * const amounts = [2, 2];\n *\n * const result = await contract.edition.burn.batchFrom(account, tokenIds, amounts);\n * ```\n */\n batchFrom = /* @__PURE__ */buildTransactionFunction(async (account, tokenIds, amounts) => {\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"burnBatch\",\n args: [await resolveAddress(account), tokenIds, amounts]\n });\n });\n}\n\n/**\n * List ERC1155 NFTs\n * @remarks Easily list all the NFTs in a ERC1155 contract.\n * @example\n * ```javascript\n * const contract = await sdk.getContract(\"{{contract_address}}\");\n * const nfts = await contract.edition.query.all();\n * ```\n * @public\n */\n\nclass Erc1155Enumerable {\n featureName = FEATURE_EDITION_ENUMERABLE.name;\n constructor(erc1155, contractWrapper) {\n this.erc1155 = erc1155;\n this.contractWrapper = contractWrapper;\n }\n\n /**\n * Get All NFTs\n *\n * @remarks Get all the data associated with every NFT in this contract.\n *\n * By default, returns the first 100 NFTs, use queryParams to fetch more.\n *\n * @example\n * ```javascript\n * const nfts = await contract.edition.query.all();\n * ```\n * @param queryParams - optional filtering to only fetch a subset of results.\n * @returns The NFT metadata for all NFTs queried.\n */\n async all(queryParams) {\n const start = BigNumber.from(queryParams?.start || 0).toNumber();\n const count = BigNumber.from(queryParams?.count || DEFAULT_QUERY_ALL_COUNT).toNumber();\n const maxId = Math.min((await this.totalCount()).toNumber(), start + count);\n return await Promise.all([...Array(maxId - start).keys()].map(i => this.erc1155.get((start + i).toString())));\n }\n\n /**\n * Get the number of NFTs minted\n * @remarks This returns the total number of NFTs minted in this contract, **not** the total supply of a given token.\n *\n * @returns The total number of NFTs minted in this contract\n * @public\n */\n async totalCount() {\n return await this.contractWrapper.read(\"nextTokenIdToMint\", []);\n }\n\n /**\n * Get the supply of token for a given tokenId.\n * @remarks This is **not** the sum of supply of all NFTs in the contract.\n *\n * @returns The total number of NFTs minted in this contract\n * @public\n */\n async totalCirculatingSupply(tokenId) {\n return await this.contractWrapper.read(\"totalSupply\", [tokenId]);\n }\n\n /**\n * Get all NFTs owned by a specific wallet\n *\n * @remarks Get all the data associated with the NFTs owned by a specific wallet.\n *\n * @example\n * ```javascript\n * // Address of the wallet to get the NFTs of\n * const address = \"{{wallet_address}}\";\n * const nfts = await contract.edition.query.owned(address);\n * ```\n *\n * @returns The NFT metadata for all NFTs in the contract.\n */\n async owned(walletAddress, queryParams) {\n const [address, maxId] = await Promise.all([resolveAddress(walletAddress || (await this.contractWrapper.getSignerAddress())), this.contractWrapper.read(\"nextTokenIdToMint\", [])]);\n const balances = await this.contractWrapper.read(\"balanceOfBatch\", [Array(maxId.toNumber()).fill(address), Array.from(Array(maxId.toNumber()).keys())]);\n let ownedBalances = balances.map((b, i) => {\n return {\n tokenId: i,\n balance: b\n };\n }).filter(b => b.balance.gt(0));\n if (queryParams) {\n const start = queryParams?.start || 0;\n const count = queryParams?.count || DEFAULT_QUERY_ALL_COUNT;\n ownedBalances = ownedBalances.slice(start, start + count);\n }\n const nfts = (await Promise.all(ownedBalances.map(item => this.erc1155.get(item.tokenId.toString())))).map((editionMetadata, index) => ({\n ...editionMetadata,\n owner: address,\n quantityOwned: ownedBalances[index].balance.toString()\n }));\n return nfts;\n }\n}\n\nclass Erc1155LazyMintable {\n featureName = FEATURE_EDITION_LAZY_MINTABLE_V2.name;\n\n /**\n * Delayed reveal\n * @remarks Create a batch of encrypted NFTs that can be revealed at a later time.\n * @example\n * ```javascript\n * // the real NFTs, these will be encrypted until you reveal them\n * const realNFTs = [{\n * name: \"Common NFT #1\",\n * description: \"Common NFT, one of many.\",\n * image: fs.readFileSync(\"path/to/image.png\"),\n * }, {\n * name: \"Super Rare NFT #2\",\n * description: \"You got a Super Rare NFT!\",\n * image: fs.readFileSync(\"path/to/image.png\"),\n * }];\n * // A placeholder NFT that people will get immediately in their wallet, and will be converted to the real NFT at reveal time\n * const placeholderNFT = {\n * name: \"Hidden NFT\",\n * description: \"Will be revealed next week!\"\n * };\n * // Create and encrypt the NFTs\n * await contract.edition.drop.revealer.createDelayedRevealBatch(\n * placeholderNFT,\n * realNFTs,\n * \"my secret password\",\n * );\n * // Whenever you're ready, reveal your NFTs at any time\n * const batchId = 0; // the batch to reveal\n * await contract.edition.drop.revealer.reveal(batchId, \"my secret password\");\n * ```\n */\n\n constructor(erc1155, contractWrapper, storage) {\n this.erc1155 = erc1155;\n this.contractWrapper = contractWrapper;\n this.storage = storage;\n this.revealer = this.detectErc1155Revealable();\n }\n\n /**\n * Create a batch of NFTs to be claimed in the future\n *\n * @remarks Create batch allows you to create a batch of many NFTs in one transaction.\n *\n * @example\n * ```javascript\n * // Custom metadata of the NFTs to create\n * const metadatas = [{\n * name: \"Cool NFT\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * }, {\n * name: \"Cool NFT\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"),\n * }];\n *\n * const results = await contract.erc1155.lazyMint(metadatas); // uploads and creates the NFTs on chain\n * const firstTokenId = results[0].id; // token id of the first created NFT\n * const firstNFT = await results[0].data(); // (optional) fetch details of the first created NFT\n * ```\n *\n * @param metadatas - The metadata to include in the batch.\n * @param options - optional upload progress callback\n */\n lazyMint = /* @__PURE__ */buildTransactionFunction(async (metadatas, options) => {\n const startFileNumber = await this.erc1155.nextTokenIdToMint();\n const batch = await uploadOrExtractURIs(metadatas, this.storage, startFileNumber.toNumber(), options);\n // ensure baseUri is the same for the entire batch\n const baseUri = batch[0].substring(0, batch[0].lastIndexOf(\"/\"));\n for (let i = 0; i < batch.length; i++) {\n const uri = batch[i].substring(0, batch[i].lastIndexOf(\"/\"));\n if (baseUri !== uri) {\n throw new Error(`Can only create batches with the same base URI for every entry in the batch. Expected '${baseUri}' but got '${uri}'`);\n }\n }\n const parse = receipt => {\n const event = this.contractWrapper.parseLogs(\"TokensLazyMinted\", receipt?.logs);\n const startingIndex = event[0].args.startTokenId;\n const endingIndex = event[0].args.endTokenId;\n const results = [];\n for (let id = startingIndex; id.lte(endingIndex); id = id.add(1)) {\n results.push({\n id,\n receipt,\n data: () => this.erc1155.getTokenMetadata(id)\n });\n }\n return results;\n };\n const prebuiltInfo = await getPrebuiltInfo(this.contractWrapper.address, this.contractWrapper.getProvider());\n if (this.isLegacyEditionDropContract(this.contractWrapper, prebuiltInfo)) {\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"lazyMint\",\n args: [batch.length, `${baseUri.endsWith(\"/\") ? baseUri : `${baseUri}/`}`],\n parse\n });\n } else {\n // new contracts/extensions have support for delayed reveal that adds an extra parameter to lazyMint\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"lazyMint\",\n args: [batch.length, `${baseUri.endsWith(\"/\") ? baseUri : `${baseUri}/`}`, utils.toUtf8Bytes(\"\")],\n parse\n });\n }\n });\n updateMetadata = /* @__PURE__ */buildTransactionFunction(async (tokenId, metadata, options) => {\n const batchCount = await this.contractWrapper.read(\"getBaseURICount\", []);\n if (batchCount.eq(0)) {\n throw new Error(\"No base URI set. Please set a base URI before updating metadata\");\n }\n const targetTokenId = BigNumber.from(tokenId);\n let startTokenId = BigNumber.from(0);\n let endTokenId = BigNumber.from(0);\n let batchIndex = 0;\n for (let i = 0; i < batchCount.toNumber(); i++) {\n batchIndex = i;\n endTokenId = await this.contractWrapper.read(\"getBatchIdAtIndex\", [batchIndex]);\n if (endTokenId.gt(targetTokenId)) {\n break;\n }\n startTokenId = endTokenId;\n }\n // for the entire batch,\n // 1. download all of the metadata as a list of nft metadata\n const range = Array.from({\n length: endTokenId.sub(startTokenId).toNumber()\n }, (v, k) => k + startTokenId.toNumber());\n const metadatas = await Promise.all(range.map(id => this.erc1155.getTokenMetadata(id)));\n // 2. replace the metadata of the tokenId desired\n const newMetadatas = [];\n for (let i = 0; i < metadatas.length; i++) {\n const {\n id,\n uri,\n ...rest\n } = metadatas[i];\n if (BigNumber.from(targetTokenId).eq(BigNumber.from(id))) {\n newMetadatas.push(metadata);\n } else {\n newMetadatas.push(rest);\n }\n }\n // 3. re-upload the entire batch with the correct starting number\n const batch = await uploadOrExtractURIs(newMetadatas, this.storage, startTokenId.toNumber(), options);\n const baseUri = batch[0].substring(0, batch[0].lastIndexOf(\"/\"));\n // 4. update the base uri for the entire batch\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n // TODO contract detection\n method: \"updateBatchBaseURI\",\n args: [batchIndex, `${baseUri.endsWith(\"/\") ? baseUri : `${baseUri}/`}`]\n });\n });\n\n /** ******************************\n * PRIVATE FUNCTIONS\n *******************************/\n detectErc1155Revealable() {\n if (detectContractFeature(this.contractWrapper, \"ERC1155Revealable\")) {\n return new DelayedReveal(this.contractWrapper, this.storage, FEATURE_EDITION_REVEALABLE.name, () => this.erc1155.nextTokenIdToMint());\n }\n return undefined;\n }\n isLegacyEditionDropContract(contractWrapper, info) {\n return info && info.type === \"DropERC1155\" && info.version < 3 || false;\n }\n}\n\n/**\n * Mint Many ERC1155 NFTs at once\n * @remarks NFT batch minting functionality that handles IPFS storage for you.\n * @example\n * ```javascript\n * const contract = await sdk.getContract(\"{{contract_address}}\");\n * await contract.edition.mint.batch.to(walletAddress, [nftMetadataWithSupply1, nftMetadataWithSupply2, ...]);\n * ```\n * @public\n */\n\nclass Erc1155BatchMintable {\n featureName = FEATURE_EDITION_BATCH_MINTABLE.name;\n constructor(erc1155, contractWrapper, storage) {\n this.erc1155 = erc1155;\n this.contractWrapper = contractWrapper;\n this.storage = storage;\n }\n\n /**\n * Mint Many NFTs with limited supplies\n *\n * @remarks Mint many different NFTs with limited supplies to a specified wallet.\n *\n * @example\n * ```javascript\n * // Address of the wallet you want to mint the NFT to\n * const toAddress = \"{{wallet_address}}\"\n *\n * // Custom metadata and supplies of your NFTs\n * const metadataWithSupply = [{\n * supply: 50, // The number of this NFT you want to mint\n * metadata: {\n * name: \"Cool NFT #1\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * },\n * }, {\n * supply: 100,\n * metadata: {\n * name: \"Cool NFT #2\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * },\n * }];\n *\n * const tx = await contract.edition.mint.batch.to(toAddress, metadataWithSupply);\n * const receipt = tx[0].receipt; // same transaction receipt for all minted NFTs\n * const firstTokenId = tx[0].id; // token id of the first minted NFT\n * const firstNFT = await tx[0].data(); // (optional) fetch details of the first minted NFT\n * ```\n */\n to = /* @__PURE__ */buildTransactionFunction(async (to, metadataWithSupply) => {\n const metadatas = metadataWithSupply.map(a => a.metadata);\n const supplies = metadataWithSupply.map(a => a.supply);\n const uris = await uploadOrExtractURIs(metadatas, this.storage);\n const resolvedAddress = await resolveAddress(to);\n const contractEncoder = new ContractEncoder(this.contractWrapper);\n const encoded = await Promise.all(uris.map(async (uri, index) => contractEncoder.encode(\"mintTo\", [resolvedAddress, constants.MaxUint256, uri, supplies[index]])));\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"multicall\",\n args: [encoded],\n parse: receipt => {\n const events = this.contractWrapper.parseLogs(\"TokensMinted\", receipt.logs);\n if (events.length === 0 || events.length < metadatas.length) {\n throw new Error(\"TokenMinted event not found, minting failed\");\n }\n return events.map(e => {\n const id = e.args.tokenIdMinted;\n return {\n id,\n receipt,\n data: () => this.erc1155.get(id)\n };\n });\n }\n });\n });\n}\n\n/**\n * Mint ERC1155 NFTs\n * @remarks NFT minting functionality that handles IPFS storage for you.\n * @example\n * ```javascript\n * const contract = await sdk.getContract(\"{{contract_address}}\");\n * await contract.edition.mint.to(walletAddress, nftMetadata);\n * ```\n * @public\n */\n\nclass Erc1155Mintable {\n featureName = FEATURE_EDITION_MINTABLE.name;\n\n /**\n * Batch mint Tokens to many addresses\n */\n\n constructor(erc1155, contractWrapper, storage) {\n this.erc1155 = erc1155;\n this.contractWrapper = contractWrapper;\n this.storage = storage;\n this.batch = this.detectErc1155BatchMintable();\n }\n\n /**\n * Mint an NFT with a limited supply\n *\n * @remarks Mint an NFT with a limited supply to a specified wallet.\n *\n * @example\n * ```javascript\n * // Address of the wallet you want to mint the NFT to\n * const toAddress = \"{{wallet_address}}\"\n *\n * // Custom metadata of the NFT, note that you can fully customize this metadata with other properties.\n * const metadata = {\n * name: \"Cool NFT\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * }\n *\n * const metadataWithSupply = {\n * metadata,\n * supply: 1000, // The number of this NFT you want to mint\n * }\n *\n * const tx = await contract.edition.mint.to(toAddress, metadataWithSupply);\n * const receipt = tx.receipt; // the transaction receipt\n * const tokenId = tx.id; // the id of the NFT minted\n * const nft = await tx.data(); // (optional) fetch details of minted NFT\n * ```\n *\n */\n to = /* @__PURE__ */buildTransactionFunction(async (to, metadataWithSupply) => {\n const tx = await this.getMintTransaction(to, metadataWithSupply);\n tx.setParse(receipt => {\n const event = this.contractWrapper.parseLogs(\"TransferSingle\", receipt?.logs);\n if (event.length === 0) {\n throw new Error(\"TransferSingleEvent event not found\");\n }\n const id = event[0].args.id;\n return {\n id,\n receipt,\n data: () => this.erc1155.get(id.toString())\n };\n });\n return tx;\n });\n\n /**\n * @deprecated Use `contract.erc1155.mint.prepare(...args)` instead\n */\n async getMintTransaction(to, metadataWithSupply) {\n const uri = await uploadOrExtractURI(metadataWithSupply.metadata, this.storage);\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"mintTo\",\n args: [await resolveAddress(to), constants.MaxUint256, uri, metadataWithSupply.supply]\n });\n }\n\n /**\n * Increase the supply of an existing NFT and mint it to a given wallet address\n *\n * @param to - the address to mint to\n * @param tokenId - the token id of the NFT to increase supply of\n * @param additionalSupply - the additional amount to mint\n *\n * @example\n * ```javascript\n * // Address of the wallet you want to mint the NFT to\n * const toAddress = \"{{wallet_address}}\"\n * const tokenId = 0;\n * const additionalSupply = 1000;\n *\n * const tx = await contract.edition.mint.additionalSupplyTo(toAddress, tokenId, additionalSupply);\n * ```\n */\n additionalSupplyTo = /* @__PURE__ */buildTransactionFunction(async (to, tokenId, additionalSupply) => {\n const metadata = await this.erc1155.getTokenMetadata(tokenId);\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"mintTo\",\n args: [await resolveAddress(to), tokenId, metadata.uri, additionalSupply],\n parse: receipt => {\n return {\n id: BigNumber.from(tokenId),\n receipt,\n data: () => this.erc1155.get(tokenId)\n };\n }\n });\n });\n detectErc1155BatchMintable() {\n if (detectContractFeature(this.contractWrapper, \"ERC1155BatchMintable\")) {\n return new Erc1155BatchMintable(this.erc1155, this.contractWrapper, this.storage);\n }\n }\n}\n\n/**\n * Standard ERC1155 NFT functions\n * @remarks Basic functionality for a ERC1155 contract that handles IPFS storage for you.\n * @example\n * ```javascript\n * const contract = await sdk.getContract(\"{{contract_address}}\");\n * await contract.erc1155.transfer(walletAddress, tokenId, quantity);\n * ```\n * @erc1155\n * @public\n */\nclass Erc1155 {\n featureName = FEATURE_EDITION.name;\n get chainId() {\n return this._chainId;\n }\n constructor(contractWrapper, storage, chainId) {\n this.contractWrapper = contractWrapper;\n this.storage = storage;\n this.query = this.detectErc1155Enumerable();\n this.mintable = this.detectErc1155Mintable();\n this.burnable = this.detectErc1155Burnable();\n this.lazyMintable = this.detectErc1155LazyMintable();\n this.signatureMintable = this.detectErc1155SignatureMintable();\n this.claimCustom = this.detectErc1155Claimable();\n this.claimWithConditions = this.detectErc1155ClaimableWithConditions();\n this._chainId = chainId;\n }\n\n /**\n * @internal\n */\n onNetworkUpdated(network) {\n this.contractWrapper.updateSignerOrProvider(network);\n }\n getAddress() {\n return this.contractWrapper.address;\n }\n\n ////// Standard ERC1155 functions //////\n\n /**\n * Get a single NFT\n *\n * @example\n * ```javascript\n * const tokenId = 0;\n * const nft = await contract.erc1155.get(tokenId);\n * ```\n * @param tokenId - the tokenId of the NFT to retrieve\n * @returns The NFT metadata\n * @twfeature ERC1155\n */\n async get(tokenId) {\n const [supply, metadata] = await Promise.all([this.contractWrapper.read(\"totalSupply\", [tokenId]).catch(() => BigNumber.from(0)), this.getTokenMetadata(tokenId).catch(() => ({\n id: tokenId.toString(),\n uri: \"\",\n ...FALLBACK_METADATA\n }))]);\n return {\n owner: constants.AddressZero,\n metadata,\n type: \"ERC1155\",\n supply: supply.toString()\n };\n }\n\n /**\n * Get the total supply of a specific token\n * @example\n * ```javascript\n * const tokenId = 0;\n * const nft = await contract.erc1155.totalSupply(tokenId);\n * ```\n * @param tokenId - The token ID to get the total supply of\n * @returns The total supply\n * @twfeature ERC1155\n */\n async totalSupply(tokenId) {\n if (detectContractFeature(this.contractWrapper, \"ERC1155Supply\")) {\n return await this.contractWrapper.read(\"totalSupply\", [tokenId]);\n } else {\n throw new ExtensionNotImplementedError(FEATURE_EDITION_SUPPLY);\n }\n }\n\n /**\n * Get NFT balance of a specific wallet\n *\n * @remarks Get a wallets NFT balance (number of NFTs in this contract owned by the wallet).\n *\n * @example\n * ```javascript\n * // Address of the wallet to check NFT balance\n * const walletAddress = \"{{wallet_address}}\";\n * const tokenId = 0; // Id of the NFT to check\n * const balance = await contract.erc1155.balanceOf(walletAddress, tokenId);\n * ```\n * @twfeature ERC1155\n */\n async balanceOf(address, tokenId) {\n return await this.contractWrapper.read(\"balanceOf\", [await resolveAddress(address), tokenId]);\n }\n\n /**\n * Get NFT balance for the currently connected wallet\n */\n async balance(tokenId) {\n return await this.balanceOf(await this.contractWrapper.getSignerAddress(), tokenId);\n }\n\n /**\n * Get whether this wallet has approved transfers from the given operator\n * @param address - the wallet address\n * @param operator - the operator address\n */\n async isApproved(address, operator) {\n return await this.contractWrapper.read(\"isApprovedForAll\", [await resolveAddress(address), await resolveAddress(operator)]);\n }\n\n /**\n * Transfer an NFT\n *\n * @remarks Transfer an NFT from the connected wallet to another wallet.\n *\n * @example\n * ```javascript\n * // Address of the wallet you want to send the NFT to\n * const toAddress = \"{{wallet_address}}\";\n * const tokenId = \"0\"; // The token ID of the NFT you want to send\n * const amount = 3; // How many copies of the NFTs to transfer\n * await contract.erc1155.transfer(toAddress, tokenId, amount);\n * ```\n * @twfeature ERC1155\n */\n transfer = /* @__PURE__ */buildTransactionFunction((() => {\n var _this = this;\n return async function (to, tokenId, amount) {\n let data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [0];\n const from = await _this.contractWrapper.getSignerAddress();\n return Transaction.fromContractWrapper({\n contractWrapper: _this.contractWrapper,\n method: \"safeTransferFrom\",\n args: [from, await resolveAddress(to), tokenId, amount, data]\n });\n };\n })());\n\n /**\n * Transfer multiple NFTs\n *\n * @remarks Transfer multiple NFTs from the connected wallet to another wallet.\n *\n * @example\n * ```javascript\n * // Address of the wallet you want to send the NFT to\n * const toAddress = \"{{wallet_address}}\";\n * // The token IDs of the NFTs you want to send\n * const tokenIds = [0, 1, 2];\n * // How many copies of the NFTs to transfer\n * const amounts = [1, 2, 3];\n * await contract.erc1155.transferBatch(toAddress, tokenIds, amounts);\n * ```\n *\n * @twfeature ERC1155BatchTransferable\n */\n transferBatch = /* @__PURE__ */buildTransactionFunction((() => {\n var _this2 = this;\n return async function (to, tokenIds, amounts, fromAddress) {\n let data = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [0];\n const from = fromAddress ? await resolveAddress(fromAddress) : await _this2.contractWrapper.getSignerAddress();\n return Transaction.fromContractWrapper({\n contractWrapper: _this2.contractWrapper,\n method: \"safeBatchTransferFrom\",\n args: [from, await resolveAddress(to), tokenIds, amounts, data]\n });\n };\n })());\n\n /**\n * Transfer an NFT from a specific wallet\n *\n * @remarks Transfer an NFT from a specific wallet to another wallet.\n *\n * @example\n * ```javascript\n * // Address of the wallet you want to send the NFT to\n * const toAddress = \"{{wallet_address}}\";\n * const tokenId = \"0\"; // The token ID of the NFT you want to send\n * const amount = 3; // How many copies of the NFTs to transfer\n * await contract.erc1155.transfer(toAddress, tokenId, amount);\n * ```\n * @twfeature ERC1155\n */\n transferFrom = /* @__PURE__ */buildTransactionFunction((() => {\n var _this3 = this;\n return async function (from, to, tokenId, amount) {\n let data = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [0];\n return Transaction.fromContractWrapper({\n contractWrapper: _this3.contractWrapper,\n method: \"safeTransferFrom\",\n args: [await resolveAddress(from), await resolveAddress(to), tokenId, amount, data]\n });\n };\n })());\n\n /**\n * Set approval for all NFTs\n * @remarks Approve or remove operator as an operator for the caller. Operators can call transferFrom or safeTransferFrom for any token owned by the caller.\n * @example\n * ```javascript\n * const operator = \"{{wallet_address}}\";\n * await contract.erc1155.setApprovalForAll(operator, true);\n * ```\n * @param operator - the operator's address\n * @param approved - whether to approve or remove\n * @twfeature ERC1155\n */\n setApprovalForAll = /* @__PURE__ */buildTransactionFunction(async (operator, approved) => {\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"setApprovalForAll\",\n args: [operator, approved]\n });\n });\n\n /**\n * Airdrop multiple NFTs\n *\n * @remarks Airdrop one or multiple NFTs to the provided wallet addresses.\n *\n * @example\n * ```javascript\n * // The token ID of the NFT you want to airdrop\n * const tokenId = \"0\";\n * // Array of objects of addresses and quantities to airdrop NFTs to\n * const addresses = [\n * {\n * address: \"0x...\",\n * quantity: 2,\n * },\n * {\n * address: \"0x...\",\n * quantity: 3,\n * },\n * ];\n * await contract.erc1155.airdrop(tokenId, addresses);\n *\n * // You can also pass an array of addresses, it will airdrop 1 NFT per address\n * const tokenId = \"0\";\n * const addresses = [\n * \"0x...\", \"0x...\", \"0x...\",\n * ]\n * await contract.erc1155.airdrop(tokenId, addresses);\n * ```\n * @twfeature ERC1155BatchTransferable\n */\n airdrop = /* @__PURE__ */buildTransactionFunction((() => {\n var _this4 = this;\n return async function (tokenId, addresses, fromAddress) {\n let data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [0];\n const from = fromAddress ? await resolveAddress(fromAddress) : await _this4.contractWrapper.getSignerAddress();\n const balanceOf = await _this4.balanceOf(from, tokenId);\n const input = await AirdropInputSchema.parseAsync(addresses);\n const totalToAirdrop = input.reduce((prev, curr) => {\n return BigNumber.from(prev).add(BigNumber.from(curr?.quantity || 1));\n }, BigNumber.from(0));\n if (balanceOf.lt(BigNumber.from(totalToAirdrop))) {\n throw new Error(`The caller owns ${balanceOf.toString()} NFTs, but wants to airdrop ${totalToAirdrop.toString()} NFTs.`);\n }\n const contractEncoder = new ContractEncoder(_this4.contractWrapper);\n const encoded = input.map(_ref => {\n let {\n address: to,\n quantity\n } = _ref;\n return contractEncoder.encode(\"safeTransferFrom\", [from, to, tokenId, quantity, data]);\n });\n return Transaction.fromContractWrapper({\n contractWrapper: _this4.contractWrapper,\n method: \"multicall\",\n args: [encoded]\n });\n };\n })());\n\n /**\n * Return the next available token ID to mint\n * @internal\n */\n async nextTokenIdToMint() {\n if (hasFunction(\"nextTokenIdToMint\", this.contractWrapper)) {\n return await this.contractWrapper.read(\"nextTokenIdToMint\", []);\n } else {\n throw new Error(\"Contract requires the `nextTokenIdToMint` function available to determine the next token ID to mint\");\n }\n }\n\n ////// ERC1155 Enumerable Extension //////\n\n /**\n * Get all NFTs\n *\n * @remarks Get all the data associated with every NFT in this contract.\n *\n * By default, returns the first 100 NFTs, use queryParams to fetch more.\n *\n * @example\n * ```javascript\n * const nfts = await contract.erc1155.getAll();\n * ```\n * @param queryParams - optional filtering to only fetch a subset of results.\n * @returns The NFT metadata for all NFTs queried.\n * @twfeature ERC1155Enumerable\n */\n async getAll(queryParams) {\n return assertEnabled(this.query, FEATURE_EDITION_ENUMERABLE).all(queryParams);\n }\n\n /**\n * Get the total number of NFTs minted\n * @remarks This returns the total number of NFTs minted in this contract, **not** the total supply of a given token.\n * @example\n * ```javascript\n * const count = await contract.erc1155.totalCount();\n * console.log(count);\n * ```\n * @returns The total number of NFTs minted in this contract\n * @public\n * @twfeature ERC1155Enumerable\n */\n async totalCount() {\n return assertEnabled(this.query, FEATURE_EDITION_ENUMERABLE).totalCount();\n }\n\n /**\n * Get the total supply of a specific NFT\n * @remarks This is **not** the sum of supply of all NFTs in the contract.\n *\n * @returns The total number of NFTs minted in this contract\n * @public\n * @twfeature ERC1155Enumerable\n */\n async totalCirculatingSupply(tokenId) {\n return assertEnabled(this.query, FEATURE_EDITION_ENUMERABLE).totalCirculatingSupply(tokenId);\n }\n\n /**\n * Get all NFTs owned by a specific wallet\n *\n * @remarks Get all the data associated with the NFTs owned by a specific wallet.\n *\n * @example\n * ```javascript\n * // Address of the wallet to get the NFTs of\n * const address = \"{{wallet_address}}\";\n * const nfts = await contract.erc1155.getOwned(address);\n * ```\n *\n * @returns The NFT metadata for all NFTs in the contract.\n * @twfeature ERC1155Enumerable\n */\n async getOwned(walletAddress, queryParams) {\n if (walletAddress) {\n walletAddress = await resolveAddress(walletAddress);\n }\n return assertEnabled(this.query, FEATURE_EDITION_ENUMERABLE).owned(walletAddress, queryParams);\n }\n\n ////// ERC1155 Mintable Extension //////\n\n /**\n * Mint an NFT\n *\n * @remarks Mint an NFT with a limited supply to the connected wallet.\n *\n * @example\n * ```javascript\n * // Address of the wallet you want to mint the NFT to\n * const toAddress = \"{{wallet_address}}\"\n *\n * // Custom metadata of the NFT, note that you can fully customize this metadata with other properties.\n * const metadata = {\n * name: \"Cool NFT\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * }\n *\n * const metadataWithSupply = {\n * metadata,\n * supply: 1000, // The number of this NFT you want to mint\n * }\n *\n * const tx = await contract.erc1155.mint(toAddress, metadataWithSupply);\n * const receipt = tx.receipt; // the transaction receipt\n * const tokenId = tx.id; // the id of the NFT minted\n * const nft = await tx.data(); // (optional) fetch details of minted NFT\n * ```\n * @twfeature ERC1155Mintable\n */\n mint = /* @__PURE__ */buildTransactionFunction(async metadataWithSupply => {\n return this.mintTo.prepare(await this.contractWrapper.getSignerAddress(), metadataWithSupply);\n });\n\n /**\n * Mint an NFT to a specific wallet\n *\n * @remarks Mint an NFT with a limited supply to a specified wallet.\n *\n * @example\n * ```javascript\n * // Address of the wallet you want to mint the NFT to\n * const toAddress = \"{{wallet_address}}\"\n *\n * // Custom metadata of the NFT, note that you can fully customize this metadata with other properties.\n * const metadata = {\n * name: \"Cool NFT\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * }\n *\n * const metadataWithSupply = {\n * metadata,\n * supply: 1000, // The number of this NFT you want to mint\n * }\n *\n * const tx = await contract.erc1155.mintTo(toAddress, metadataWithSupply);\n * const receipt = tx.receipt; // the transaction receipt\n * const tokenId = tx.id; // the id of the NFT minted\n * const nft = await tx.data(); // (optional) fetch details of minted NFT\n * ```\n * @twfeature ERC1155Mintable\n */\n mintTo = /* @__PURE__ */buildTransactionFunction(async (receiver, metadataWithSupply) => {\n return assertEnabled(this.mintable, FEATURE_EDITION_MINTABLE).to.prepare(receiver, metadataWithSupply);\n });\n\n /**\n * Construct a mint transaction without executing it.\n * This is useful for estimating the gas cost of a mint transaction, overriding transaction options and having fine grained control over the transaction execution.\n * @param receiver - Address you want to send the token to\n * @param metadataWithSupply - The metadata of the NFT you want to mint\n *\n * @deprecated Use `contract.erc1155.mint.prepare(...args)` instead\n * @twfeature ERC1155Mintable\n */\n async getMintTransaction(receiver, metadataWithSupply) {\n return assertEnabled(this.mintable, FEATURE_EDITION_MINTABLE).getMintTransaction(receiver, metadataWithSupply);\n }\n\n /**\n * Increase the supply of an existing NFT\n * @remarks Increase the supply of an existing NFT and mint it to the connected wallet address\n * @example\n * ```javascript\n * const tokenId = 0;\n * const additionalSupply = 1000;\n * await contract.erc1155.mintAdditionalSupply(tokenId, additionalSupply);\n * ```\n *\n * @param tokenId - the token id of the NFT to increase supply of\n * @param additionalSupply - the additional amount to mint\n * @twfeature ERC1155Mintable\n */\n mintAdditionalSupply = /* @__PURE__ */buildTransactionFunction(async (tokenId, additionalSupply) => {\n return assertEnabled(this.mintable, FEATURE_EDITION_MINTABLE).additionalSupplyTo.prepare(await this.contractWrapper.getSignerAddress(), tokenId, additionalSupply);\n });\n\n /**\n * Increase the supply of an existing NFT and mint it to a given wallet address\n *\n * @param to - the address to mint to\n * @param tokenId - the token id of the NFT to increase supply of\n * @param additionalSupply - the additional amount to mint\n * @twfeature ERC1155Mintable\n */\n mintAdditionalSupplyTo = /* @__PURE__ */buildTransactionFunction(async (receiver, tokenId, additionalSupply) => {\n return assertEnabled(this.mintable, FEATURE_EDITION_MINTABLE).additionalSupplyTo.prepare(receiver, tokenId, additionalSupply);\n });\n\n ////// ERC1155 BatchMintable Extension //////\n\n /**\n * Mint multiple NFTs at once\n *\n * @remarks Mint multiple different NFTs with limited supplies to the connected wallet.\n *\n * @example\n * ```javascript\n * // Custom metadata and supplies of your NFTs\n * const metadataWithSupply = [{\n * supply: 50, // The number of this NFT you want to mint\n * metadata: {\n * name: \"Cool NFT #1\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * },\n * }, {\n * supply: 100,\n * metadata: {\n * name: \"Cool NFT #2\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * },\n * }];\n *\n * const tx = await contract.erc1155.mintBatch(metadataWithSupply);\n * const receipt = tx[0].receipt; // same transaction receipt for all minted NFTs\n * const firstTokenId = tx[0].id; // token id of the first minted NFT\n * const firstNFT = await tx[0].data(); // (optional) fetch details of the first minted NFT\n * ```\n * @twfeature ERC1155BatchMintable\n */\n mintBatch = /* @__PURE__ */buildTransactionFunction(async metadataWithSupply => {\n return this.mintBatchTo.prepare(await this.contractWrapper.getSignerAddress(), metadataWithSupply);\n });\n\n /**\n * Mint multiple NFTs at once to a specific wallet\n *\n * @remarks Mint multiple different NFTs with limited supplies to a specified wallet.\n *\n * @example\n * ```javascript\n * // Address of the wallet you want to mint the NFT to\n * const toAddress = \"{{wallet_address}}\"\n *\n * // Custom metadata and supplies of your NFTs\n * const metadataWithSupply = [{\n * supply: 50, // The number of this NFT you want to mint\n * metadata: {\n * name: \"Cool NFT #1\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * },\n * }, {\n * supply: 100,\n * metadata: {\n * name: \"Cool NFT #2\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * },\n * }];\n *\n * const tx = await contract.erc1155.mintBatchTo(toAddress, metadataWithSupply);\n * const receipt = tx[0].receipt; // same transaction receipt for all minted NFTs\n * const firstTokenId = tx[0].id; // token id of the first minted NFT\n * const firstNFT = await tx[0].data(); // (optional) fetch details of the first minted NFT\n * ```\n * @twfeature ERC1155BatchMintable\n */\n mintBatchTo = /* @__PURE__ */buildTransactionFunction(async (receiver, metadataWithSupply) => {\n return assertEnabled(this.mintable?.batch, FEATURE_EDITION_BATCH_MINTABLE).to.prepare(receiver, metadataWithSupply);\n });\n\n ////// ERC1155 Burnable Extension //////\n\n /**\n * Burn NFTs\n *\n * @remarks Burn the specified NFTs from the connected wallet\n *\n * @param tokenId - the token Id to burn\n * @param amount - amount to burn\n *\n * @example\n * ```javascript\n * // The token ID to burn NFTs of\n * const tokenId = 0;\n * // The amount of the NFT you want to burn\n * const amount = 2;\n *\n * const result = await contract.erc1155.burn(tokenId, amount);\n * ```\n * @twfeature ERC1155Burnable\n */\n burn = /* @__PURE__ */buildTransactionFunction(async (tokenId, amount) => {\n return assertEnabled(this.burnable, FEATURE_EDITION_BURNABLE).tokens.prepare(tokenId, amount);\n });\n\n /**\n * Burn NFTs from a specific wallet\n *\n * @remarks Burn the specified NFTs from a specified wallet\n *\n * @param account - the address to burn NFTs from\n * @param tokenId - the tokenId to burn\n * @param amount - amount to burn\n *\n * @example\n * ```javascript\n * // The address of the wallet to burn NFTS from\n * const account = \"0x...\";\n * // The token ID to burn NFTs of\n * const tokenId = 0;\n * // The amount of this NFT you want to burn\n * const amount = 2;\n *\n * const result = await contract.erc1155.burnFrom(account, tokenId, amount);\n * ```\n * @twfeature ERC1155Burnable\n */\n burnFrom = /* @__PURE__ */buildTransactionFunction(async (account, tokenId, amount) => {\n return assertEnabled(this.burnable, FEATURE_EDITION_BURNABLE).from.prepare(account, tokenId, amount);\n });\n\n /**\n * Burn a batch of NFTs\n *\n * @remarks Burn the batch NFTs from the connected wallet\n *\n * @param tokenIds - the tokenIds to burn\n * @param amounts - amount of each token to burn\n *\n * @example\n * ```javascript\n * // The token IDs to burn NFTs of\n * const tokenIds = [0, 1];\n * // The amounts of each NFT you want to burn\n * const amounts = [2, 2];\n *\n * const result = await contract.erc1155.burnBatch(tokenIds, amounts);\n * ```\n * @twfeature ERC1155Burnable\n */\n burnBatch = /* @__PURE__ */buildTransactionFunction(async (tokenIds, amounts) => {\n return assertEnabled(this.burnable, FEATURE_EDITION_BURNABLE).batch.prepare(tokenIds, amounts);\n });\n\n /**\n * Burn a batch of NFTs from a specific wallet\n *\n * @remarks Burn the batch NFTs from the specified wallet\n *\n * @param account - the address to burn NFTs from\n * @param tokenIds - the tokenIds to burn\n * @param amounts - amount of each token to burn\n *\n * @example\n * ```javascript\n * // The address of the wallet to burn NFTS from\n * const account = \"0x...\";\n * // The token IDs to burn NFTs of\n * const tokenIds = [0, 1];\n * // The amounts of each NFT you want to burn\n * const amounts = [2, 2];\n *\n * const result = await contract.erc1155.burnBatchFrom(account, tokenIds, amounts);\n * ```\n * @twfeature ERC1155Burnable\n */\n burnBatchFrom = /* @__PURE__ */buildTransactionFunction(async (account, tokenIds, amounts) => {\n return assertEnabled(this.burnable, FEATURE_EDITION_BURNABLE).batchFrom.prepare(account, tokenIds, amounts);\n });\n\n ////// ERC721 LazyMint Extension //////\n\n /**\n * Lazy mint NFTs\n *\n * @remarks Create batch allows you to create a batch of many NFTs in one transaction.\n *\n * @example\n * ```javascript\n * // Custom metadata of the NFTs to create\n * const metadatas = [{\n * name: \"Cool NFT\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * }, {\n * name: \"Cool NFT\",\n * description: \"This is a cool NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"),\n * }];\n *\n * const results = await contract.erc1155.lazyMint(metadatas); // uploads and creates the NFTs on chain\n * const firstTokenId = results[0].id; // token id of the first created NFT\n * const firstNFT = await results[0].data(); // (optional) fetch details of the first created NFT\n * ```\n *\n * @param metadatas - The metadata to include in the batch.\n * @param options - optional upload progress callback\n * @twfeature ERC1155LazyMintableV1 | ERC1155LazyMintableV2\n */\n lazyMint = /* @__PURE__ */buildTransactionFunction(async (metadatas, options) => {\n return assertEnabled(this.lazyMintable, FEATURE_EDITION_LAZY_MINTABLE_V2).lazyMint.prepare(metadatas, options);\n });\n\n ////// ERC1155 Update Metadata Extension //////\n\n /**\n * Update the metadata of an NFT\n *\n * @remarks Update the metadata of an NFT in the connected wallet\n *\n * @example\n * ```javascript\n * // The token ID of the NFT you want to update\n * const tokenId = 0;\n * // The updated metadata of the NFT\n * const metadata = {\n * name: \"Updated NFT\",\n * description: \"This is an updated NFT\",\n * image: fs.readFileSync(\"path/to/image.png\"), // This can be an image url or file\n * }\n *\n * const result = await contract.erc1155.updateMetadata(tokenId, metadata);\n * ```\n * @twfeature ERC1155UpdateMetadata\n */\n updateMetadata = /* @__PURE__ */buildTransactionFunction(async (tokenId, metadata) => {\n if (this.lazyMintable) {\n return this.lazyMintable.updateMetadata.prepare(tokenId, metadata);\n } else if (detectContractFeature(this.contractWrapper, \"ERC1155UpdatableMetadata\")) {\n const uri = await this.storage.upload(metadata);\n return Transaction.fromContractWrapper({\n contractWrapper: this.contractWrapper,\n method: \"setTokenURI\",\n args: [tokenId, uri]\n });\n } else {\n throw new ExtensionNotImplementedError(FEATURE_EDITION_UPDATABLE_METADATA);\n }\n });\n\n ////// ERC1155 Claimable Extension //////\n\n /**\n * Construct a claim transaction without executing it.\n * This is useful for estimating the gas cost of a claim transaction, overriding transaction options and having fine grained control over the transaction execution.\n * @param destinationAddress - Address you want to send the token to\n * @param tokenId - Id of the token you want to claim\n * @param quantity - Quantity of the tokens you want to claim\n * @param options - Optional claim verification data (e.g. price, currency, etc...)\n *\n * @deprecated Use `contract.erc1155.claim.prepare(...args)` instead\n */\n async getClaimTransaction(destinationAddress, tokenId, quantity, options) {\n const claimWithConditions = this.claimWithConditions;\n const claim = this.claimCustom;\n if (claimWithConditions) {\n return claimWithConditions.conditions.getClaimTransaction(destinationAddress, tokenId, quantity, options);\n }\n if (claim) {\n return claim.getClaimTransaction(destinationAddress, tokenId, quantity, options);\n }\n throw new ExtensionNotImplementedError(FEATURE_EDITION_CLAIM_CUSTOM);\n }\n\n /**\n * Claim NFTs\n *\n * @remarks Let the connected wallet claim NFTs.\n *\n * @example\n * ```javascript\n * const tokenId = 0; // the id of the NFT you want to claim\n * const quantity = 1; // how many NFTs you want to claim\n *\n * const tx = await contract.erc1155.claim(tokenId, quantity);\n * const receipt = tx.receipt; // the transaction receipt\n * ```\n *\n * @param tokenId - Id of the token you want to claim\n * @param quantity - Quantity of the tokens you want to claim\n * @param options - Optional claim verification data (e.g. price, currency, etc...)\n *\n * @returns Receipt for the transaction\n * @twfeature ERC1155ClaimCustom | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1\n */\n claim = /* @__PURE__ */buildTransactionFunction(async (tokenId, quantity, options) => {\n return this.claimTo.prepare(await this.contractWrapper.getSignerAddress(), tokenId, quantity, options);\n });\n\n /**\n * Claim NFTs to a specific Wallet\n *\n * @remarks Let the specified wallet claim NFTs.\n *\n * @example\n * ```javascript\n * const address = \"{{wallet_address}}\"; // address of the wallet you want to claim the NFTs\n * const tokenId = 0; // the id of the NFT you want to claim\n * const quantity = 1; // how many NFTs you want to claim\n *\n * const tx = await contract.erc1155.claimTo(address, tokenId, quantity);\n * const receipt = tx.receipt; // the transaction receipt\n * ```\n *\n * @param destinationAddress - Address you want to send the token to\n * @param tokenId - Id of the token you want to claim\n * @param quantity - Quantity of the tokens you want to claim\n * @param options - Optional claim verification data (e.g. price, currency, etc...)\n *\n * @returns Receipt for the transaction\n * @twfeature ERC1155ClaimCustom | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1\n */\n claimTo = /* @__PURE__ */buildTransactionFunction(async (destinationAddress, tokenId, quantity, options) => {\n const claimWithConditions = this.claimWithConditions;\n const claim = this.claimCustom;\n if (claimWithConditions) {\n return claimWithConditions.to.prepare(destinationAddress, tokenId, quantity, options);\n }\n if (claim) {\n return claim.to.prepare(destinationAddress, tokenId, quantity, options);\n }\n throw new ExtensionNotImplementedError(FEATURE_EDITION_CLAIM_CUSTOM);\n });\n\n /**\n * Configure claim conditions\n * @remarks Define who can claim NFTs in the collection, when and how many.\n * @example\n * ```javascript\n * const presaleStartTime = new Date();\n * const publicSaleStartTime = new Date(Date.now() + 60 * 60 * 24 * 1000);\n * const claimConditions = [\n * {\n * startTime: presaleStartTime, // start the presale now\n * maxClaimableSupply: 2, // limit how many mints for this presale\n * price: 0.01, // presale price\n * snapshot: ['0x...', '0x...'], // limit minting to only certain addresses\n * },\n * {\n * startTime: publicSaleStartTime, // 24h after presale, start public sale\n * price: 0.08, // public sale price\n * }\n * ]);\n * await contract.erc1155.claimConditions.set(tokenId, claimConditions);\n * ```\n * @twfeature ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1\n */\n get claimConditions() {\n return assertEnabled(this.claimWithConditions, FEATURE_EDITION_CLAIM_CONDITIONS_V2).conditions;\n }\n\n ////// ERC1155 SignatureMintable Extension //////\n\n /**\n * Mint with signature\n * @remarks Generate dynamic NFTs with your own signature, and let others mint them using that signature.\n * @example\n * ```javascript\n * // see how to craft a payload to sign in the `contract.erc1155.signature.generate()` documentation\n * const signedPayload = contract.erc1155.signature().generate(payload);\n *\n * // now anyone can mint the NFT\n * const tx = contract.erc1155.signature.mint(signedPayload);\n * const receipt = tx.receipt; // the mint transaction receipt\n * const mintedId = tx.id; // the id of the NFT minted\n * ```\n * @twfeature ERC1155SignatureMintable\n */\n get signature() {\n return assertEnabled(this.signatureMintable, FEATURE_EDITION_SIGNATURE_MINTABLE);\n }\n\n ////// ERC1155 DelayedReveal Extension //////\n\n /**\n * Mint delayed reveal NFTs\n * @remarks Create a batch of encrypted NFTs that can be revealed at a later time.\n * @example\n * ```javascript\n * // the real NFTs, these will be encrypted until you reveal them\n * const realNFTs = [{\n * name: \"Common NFT #1\",\n * description: \"Common NFT, one of many.\",\n * image: fs.readFileSync(\"path/to/image.png\"),\n * }, {\n * name: \"Super Rare NFT #2\",\n * description: \"You got a Super Rare NFT!\",\n * image: fs.readFileSync(\"path/to/image.png\"),\n * }];\n * // A placeholder NFT that people will get immediately in their wallet, and will be converted to the real NFT at reveal time\n * const placeholderNFT = {\n * name: \"Hidden NFT\",\n * description: \"Will be revealed next week!\"\n * };\n * // Create and encrypt the NFTs\n * await contract.erc1155.drop.revealer.createDelayedRevealBatch(\n * placeholderNFT,\n * realNFTs,\n * \"my secret password\",\n * );\n * // Whenever you're ready, reveal your NFTs at any time\n * const batchId = 0; // the batch to reveal\n * await contract.erc1155.revealer.reveal(batchId, \"my secret password\");\n * ```\n * @twfeature ERC1155Revealable\n */\n get revealer() {\n return assertEnabled(this.lazyMintable?.revealer, FEATURE_EDITION_REVEALABLE);\n }\n\n /** ******************************\n * PRIVATE FUNCTIONS\n *******************************/\n\n /**\n * @internal\n * @param tokenId - the token Id to fetch\n */\n async getTokenMetadata(tokenId) {\n const tokenUri = await this.contractWrapper.read(\"uri\", [tokenId]);\n if (!tokenUri) {\n throw new NotFoundError();\n }\n return fetchTokenMetadata(tokenId, tokenUri, this.storage);\n }\n detectErc1155Enumerable() {\n if (detectContractFeature(this.contractWrapper, \"ERC1155Enumerable\")) {\n return new Erc1155Enumerable(this, this.contractWrapper);\n }\n }\n detectErc1155Mintable() {\n if (detectContractFeature(this.contractWrapper, \"ERC1155Mintable\")) {\n return new Erc1155Mintable(this, this.contractWrapper, this.storage);\n }\n return undefined;\n }\n detectErc1155Burnable() {\n if (detectContractFeature(this.contractWrapper, \"ERC1155Burnable\")) {\n return new Erc1155Burnable(this.contractWrapper);\n }\n return undefined;\n }\n detectErc1155LazyMintable() {\n if (detectContractFeature(this.contractWrapper, \"ERC1155LazyMintableV1\") || detectContractFeature(this.contractWrapper, \"ERC1155LazyMintableV2\")) {\n return new Erc1155LazyMintable(this, this.contractWrapper, this.storage);\n }\n return undefined;\n }\n detectErc1155SignatureMintable() {\n if (detectContractFeature(this.contractWrapper, \"ERC1155SignatureMintable\")) {\n return new Erc1155SignatureMintable(this.contractWrapper, this.storage);\n }\n return undefined;\n }\n detectErc1155Claimable() {\n if (detectContractFeature(this.contractWrapper, \"ERC1155ClaimCustom\")) {\n return new ERC1155Claimable(this.contractWrapper);\n }\n return undefined;\n }\n detectErc1155ClaimableWithConditions() {\n if (detectContractFeature(this.contractWrapper, \"ERC1155ClaimConditionsV1\") || detectContractFeature(this.contractWrapper, \"ERC1155ClaimConditionsV2\") || detectContractFeature(this.contractWrapper, \"ERC1155ClaimPhasesV1\") || detectContractFeature(this.contractWrapper, \"ERC1155ClaimPhasesV2\")) {\n return new Erc1155ClaimableWithConditions(this.contractWrapper, this.storage);\n }\n return undefined;\n }\n}\n\nexport { DropErc1155ClaimConditions as D, Erc1155 as E, Erc1155SignatureMintable as a };\n"],"names":["ContractInterceptor","constructor","contractWrapper","overrideNextTransaction","hook","withTransactionOverride","DropErc1155ClaimConditions","metadata","storage","getActive","tokenId","options","mc","get","_signature_52783ae4_browser_esm_js__WEBPACK_IMPORTED_MODULE_1__","y","getProvider","merkle","withAllowList","conditionId","isLegacySinglePhaseDrop","contractModel","read","z","isLegacyMultiPhaseDrop","id","undefined","isNewSinglePhaseDrop","A","isNewMultiphaseDrop","getAll","claimCondition","startId","currentStartId","toNumber","count","conditions","i","push","Promise","all","map","c","canClaim","quantity","addressToCheck","_index_02e94cec_browser_esm_js__WEBPACK_IMPORTED_MODULE_2__","aM","getClaimIneligibilityReasons","length","activeConditionIndex","reasons","getSignerAddress","err","console","warn","C","NoWallet","resolvedAddress","B","NoClaimConditionSet","Unknown","availableSupply","ethers__WEBPACK_IMPORTED_MODULE_3__","O$","from","lt","NotEnoughSupply","merkleRootArray","ethers__WEBPACK_IMPORTED_MODULE_4__","stripZeros","merkleRootHash","hasAllowList","allowListEntry","getClaimerProofs","AddressNotAllowed","validMerkleProof","claimVerification","prepareClaim","proofs","maxClaimable","proof","maxQuantityInAllowlist","currencyAddress","price","quantityLimitPerWallet","currency","currencyAddressInProof","pricePerToken","priceInProof","e","reason","errorName","OverMaxClaimablePerWallet","WrongPriceOrCurrency","ClaimPhaseNotStarted","claimedSupply","D","maxClaimablePerWallet","getSupplyClaimedByWallet","gt","add","lte","eq","lastClaimedTimestamp","timestampForNextClaim","now","Date","div","ethers__WEBPACK_IMPORTED_MODULE_5__","Bz","AlreadyClaimed","WaitBeforeNextClaimTransaction","d5","totalPrice","mul","provider","_fetchCurrencyValue_a150f8dd_browser_esm_js__WEBPACK_IMPORTED_MODULE_6__","balance","getBalance","NotEnoughTokens","IERC20ABI","resolve","then","__webpack_require__","t","bind","default","erc20","cs","claimerAddress","claimConditionId","merkleRoot","f","toString","getSnapshotFormatVersion","walletAddress","activeClaimConditionId","set","_transactions_91b95b4c_browser_esm_js__WEBPACK_IMPORTED_MODULE_7__","_this","claimConditionInputs","resetClaimEligibilityForAll","arguments","setBatch","prepare","claimConditions","_this2","claimConditionsForToken","merkleInfo","processedClaimConditions","_ref","claimConditionsProcessed","startTime","ethers__WEBPACK_IMPORTED_MODULE_8__","d","maxClaimableSupply","waitInSeconds","hexZeroPad","snapshot","forEach","cc","s","Number","reduce","acc","current","snapshotInfos","sortedConditions","H","snapshotUri","encoded","key","Object","keys","fast_deep_equal__WEBPACK_IMPORTED_MODULE_0___default","mergedMetadata","parseInputMetadata","contractURI","_parseAndUploadMetadata","_contract_appuri_84a944c8_browser_esm_js__WEBPACK_IMPORTED_MODULE_9__","h","contractEncoder","encode","_ref2","baseContractEncoder","legacyContractEncoder","I","J","T","fromContractWrapper","method","args","update","index","claimConditionInput","existingConditions","newConditionInputs","K","checkERC20Allowance","address","addressToClaim","E","getClaimArguments","destinationAddress","ethers__WEBPACK_IMPORTED_MODULE_10__","Y0","getClaimTransaction","overrides","F","V1","V2","AirdropAddressInput","zod__WEBPACK_IMPORTED_MODULE_11__","object","ba","cw","AirdropInputSchema","union","array","string","transform","strings","parseAsync","ERC1155Claimable","featureName","d6","name","_contract_owner_2c250fed_browser_esm_js__WEBPACK_IMPORTED_MODULE_12__","to","Erc1155ClaimableWithConditions","d7","bh","Erc1155SignatureMintable","d8","roles","mint","signedPayload","mintRequest","payload","signature","message","mapPayloadToContractStruct","getCallOverrides","_setErc20Allowance_e3ef471a_browser_esm_js__WEBPACK_IMPORTED_MODULE_13__","parse","receipt","parseLogs","logs","tokenIdMinted","mintBatch","signedPayloads","contractStructs","contractPayloads","p","events","log","verify","verification","generate","payloadToSign","generateFromTokenId","payloads","generateBatchFromTokenIds","generateBatch","payloadsToSign","signer","getSigner","tiny_invariant__WEBPACK_IMPORTED_MODULE_14__","Z","getAddress","parsedRequests","m","r","metadatas","uris","chainId","contractInfo","_QueryParams_b6af7045_browser_esm_js__WEBPACK_IMPORTED_MODULE_15__","u","getChainID","d9","finalPayloads","uri","finalPayload","isLegacyContract","type","signatures","contractStruct","signTypedData","version","verifyingContract","MintRequest","w","normalizedPricePerToken","_normalizePriceValue_74eeb144_browser_esm_js__WEBPACK_IMPORTED_MODULE_16__","n","validityStartTimestamp","mintStartTime","validityEndTimestamp","mintEndTime","uid","royaltyRecipient","royaltyBps","primarySaleRecipient","Erc1155Burnable","da","tokens","amount","account","batch","tokenIds","amounts","batchFrom","Erc1155Enumerable","db","erc1155","queryParams","start","maxId","Math","min","totalCount","Array","totalCirculatingSupply","owned","balances","fill","ownedBalances","b","filter","slice","nfts","item","editionMetadata","owner","quantityOwned","Erc1155LazyMintable","dc","revealer","detectErc1155Revealable","lazyMint","startFileNumber","nextTokenIdToMint","baseUri","substring","lastIndexOf","event","startingIndex","startTokenId","endingIndex","endTokenId","results","data","getTokenMetadata","prebuiltInfo","isLegacyEditionDropContract","endsWith","updateMetadata","batchCount","targetTokenId","batchIndex","range","sub","v","k","newMetadatas","rest","dd","info","Erc1155BatchMintable","de","metadataWithSupply","a","supplies","supply","Erc1155Mintable","df","detectErc1155BatchMintable","tx","getMintTransaction","setParse","additionalSupplyTo","additionalSupply","Erc1155","dg","_chainId","query","detectErc1155Enumerable","mintable","detectErc1155Mintable","burnable","detectErc1155Burnable","lazyMintable","detectErc1155LazyMintable","signatureMintable","detectErc1155SignatureMintable","claimCustom","detectErc1155Claimable","claimWithConditions","detectErc1155ClaimableWithConditions","onNetworkUpdated","network","updateSignerOrProvider","catch","totalSupply","x","dh","balanceOf","isApproved","operator","transfer","transferBatch","fromAddress","transferFrom","_this3","setApprovalForAll","approved","airdrop","_this4","addresses","input","totalToAirdrop","prev","curr","_assertEnabled_4605112f_browser_esm_js__WEBPACK_IMPORTED_MODULE_17__","getOwned","mintTo","receiver","mintAdditionalSupply","mintAdditionalSupplyTo","mintBatchTo","burn","burnFrom","burnBatch","burnBatchFrom","upload","di","claim","claimTo","tokenUri"],"sourceRoot":""}