import type { ThirdwebContract } from "../../../contract/contract.js"; import type { BaseTransactionOptions } from "../../../transaction/types.js"; import type { Hex } from "../../../utils/encoding/hex.js"; import type { NFTInput } from "../../../utils/nft/parseNft.js"; import type { Account } from "../../../wallets/interfaces/wallet.js"; /** * Mints ERC721 tokens to a specified address with a signature via a MintableERC721 module. * @param options The options for minting tokens. * @returns A transaction to mint tokens. * @example * ```typescript * import { MintableERC721 } from "thirdweb/modules"; * * // generate the payload and signature, this is typically done on the server * // requires to be generated with a wallet that has the MINTER_ROLE * const { payload, signature } = await MintableERC721.generateMintSignature({ * account, * contract, * nfts: [{ * name: "My NFT", * description: "My NFT", * image: "https://example.com/image.png", * }], * mintRequest: { * recipient: "0x...", * }, * }); * * // prepare the transaction, this is typically done on the client * // can be executed by any wallet * const transaction = MintableERC721.mintWithSignature({ * contract, * payload, * signature, * }); * * // Send the transaction * await sendTransaction({ transaction, account }); * ``` * @modules MintableERC721 */ export declare function mintWithSignature(options: BaseTransactionOptions>>): import("../../../transaction/prepare-transaction.js").PreparedTransaction; export type GenerateMintSignatureOptions = { account: Account; contract: ThirdwebContract; nfts: (NFTInput | string)[]; mintRequest: GeneratePayloadInput; }; /** * Generates a payload and signature for minting ERC721 tokens via a MintableERC721 module. * @param options The options for generating the payload and signature. * @returns The payload and signature. * @example * ```typescript * import { MintableERC20 } from "thirdweb/modules"; * * // generate the payload and signature, this is typically done on the server * // requires to be generated with a wallet that has the MINTER_ROLE * const { payload, signature } = await MintableERC721.generateMintSignature({ * account, * contract, * nfts: [{ * name: "My NFT", * description: "My NFT", * image: "https://example.com/image.png", * }], * mintRequest: { * recipient: "0x...", * }, * }); * * // prepare the transaction, this is typically done on the client * // can be executed by any wallet * const transaction = MintableERC20.mintWithSignature({ * contract, * payload, * signature, * }); * * // Send the transaction * await sendTransaction({ transaction, account }); * ``` * @modules MintableERC721 */ export declare function generateMintSignature(options: GenerateMintSignatureOptions): Promise<{ payload: { amount: bigint; baseURI: string; data: `0x${string}`; to: `0x${string}`; }; signature: `0x${string}`; }>; type GeneratePayloadInput = { recipient: string; currency?: string; pricePerUnit?: bigint; uid?: Hex; validityStartTimestamp?: Date; validityEndTimestamp?: Date; }; export {}; //# sourceMappingURL=mintWithSignature.d.ts.map