Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type CanClaimResult = {

/**
* Check if a user can claim a drop.
*
* This method is only available on the `DropERC1155` contract.
* @param options - The options for the transaction.
* @returns Whether the user can claim the drop.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
export type GetActiveClaimConditionParams = GetActiveClaimConditionIdParams;
/**
* Retrieves the active claim condition.
* This method is only available on the `DropERC1155` contract.
* @param options - The transaction options.
* @returns A promise that resolves to the active claim condition.
* @throws An error if the claim condition is unsupported.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type GetClaimConditionsParams = {
};
/**
* Retrieves all claim conditions.
* This method is only available on the `DropERC1155` contract.
* @param options - The transaction options.
* @returns A promise that resolves to all claim conditions.
* @throws An error if the claim conditions are unsupported by the contract.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export type ClaimToParams = {

/**
* Claim ERC1155 NFTs to a specified address
* This method is only available on the `DropERC1155` contract.
* @param options - The options for the transaction
* @extension ERC1155
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type ResetClaimEligibilityParams = GetClaimConditionsParams;

/**
* Reset the claim eligibility for all users.
* This method is only available on the `DropERC1155` contract.
* @param options
* @returns the prepared transaction
* @extension ERC1155
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type SetClaimConditionsParams = {

/**
* Set the claim conditions for a ERC1155 drop
* This method is only available on the `DropERC1155` contract.
* @param options
* @returns the prepared transaction
* @extension ERC1155
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export type LazyMintParams = {

/**
* Lazily mints ERC1155 tokens.
* This method is only available on the `DropERC1155` contract.
* @param options - The options for the lazy minting process.
* @returns A promise that resolves to the prepared contract call.
* @extension ERC1155
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type MintAdditionalSupplyToParams = {

/**
* Mints a "supply" number of additional ERC1155 tokens to the specified "to" address.
* This method is only available on the `TokenERC1155` contract.
* @param options - The transaction options.
* @returns A promise that resolves to the transaction result.
* @extension ERC1155
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type MintAdditionalSupplyToBatchParams = WithOverrides<{

/**
* This extension batches multiple `mintAdditionalSupplyToBatch` extensions into one single multicall.
* This method is only available on the `TokenERC1155` contract.
* Keep in mind that there is a limit of how many NFTs you can mint per transaction.
* This limit varies depends on the network that you are transacting on.
*
Expand Down
1 change: 1 addition & 0 deletions packages/thirdweb/src/extensions/erc1155/write/mintTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export type MintToParams = WithOverrides<{

/**
* Mints a "supply" number of new ERC1155 tokens to the specified "to" address.
* This method is only available on the `TokenERC1155` contract.
* If the `nft` parameter is a string, it will be used as the token URI.
* If the `nft` parameter is a file, it will be uploaded to the storage server and the resulting URI will be used as the token URI.
* @param options - The transaction options.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export type MintToBatchParams = WithOverrides<{

/**
* This extension batches multiple `mintTo` extensions into one single multicall.
* This method is only available on the `TokenERC1155` contract.
* Keep in mind that there is a limit of how many NFTs you can mint per transaction.
* This limit varies depends on the network that you are transacting on.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {

/**
* Mints a new ERC1155 token with the given minter signature
* This method is only available on the `TokenERC1155` contract.
* @param options - The transaction options.
* @example
* ```ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type UpdateTokenURIParams = {
* which means it uses `setTokenURI` under the hood.
* While the `setTokenURI` method only takes in a uri string, this extension takes in a user-friendly [`NFTInput`](https://portal.thirdweb.com/references/typescript/v5/NFTInput),
* upload that content to IPFS and pass the IPFS URI (of said `NFTInput`) to the underlying `setTokenURI` method.
* This method is only available on the `TokenERC1155` contract.
*
* This extension does not validate the NFTInput so make sure you are passing the proper content that you want to update.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type CanClaimResult = {

/**
* Check if a user can claim a drop.
*
* This method is only available on the `DropERC20` contract.
* @param options - The options for the transaction.
* @returns Whether the user can claim the drop.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as MultiById from "../../__generated__/IDropERC20/read/getClaimConditio

/**
* Retrieves the active claim condition.
* This method is only available on the `DropERC20` contract.
* @param options - The transaction options.
* @returns A promise that resolves to the active claim condition.
* @throws An error if the claim condition is unsupported.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as MultiById from "../../__generated__/IDropERC20/read/getClaimConditio

/**
* Retrieves all claim conditions.
* This method is only available on the `DropERC20` contract.
* @param options - The transaction options.
* @returns A promise that resolves to all claim conditions.
* @throws An error if the claim conditions are unsupported by the contract.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export type ClaimToParams = {

/**
* Claim ERC20 NFTs to a specified address
* This method is only available on the `DropERC20` contract.
*
* @param options - The options for the transaction
* @extension ERC20
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {

/**
* Reset the claim eligibility for all users.
* This method is only available on the `DropERC20` contract.
* @param options
* @returns the prepared transaction
* @extension ERC20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export type SetClaimConditionsParams = {

/**
* Set the claim conditions for a ERC20 drop
* This method is only available on the `DropERC20` contract.
* @param options
* @returns the prepared transaction
* @extension ERC20
Expand Down
1 change: 1 addition & 0 deletions packages/thirdweb/src/extensions/erc20/write/mintTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export type MintToParams = Prettify<

/**
* Mints a specified amount of tokens to a given address.
* This method is only available on the `TokenERC20` contract.
* @param options - The options for minting tokens.
* @returns A prepared transaction object.
* @extension ERC20
Expand Down
1 change: 1 addition & 0 deletions packages/thirdweb/src/extensions/erc20/write/sigMint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {

/**
* Mints a new ERC20 token with the given minter signature
* This method is only available on the `TokenERC20` contract.
* @param options - The transaction options.
* @extension ERC20
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ export type CanClaimResult = {
/**
* Check if a user can claim a drop.
*
* This method is only available on the `DropERC721` contract.
*
* @param options - The options for the transaction.
* @returns Whether the user can claim the drop.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as ById from "../../__generated__/IDrop/read/getClaimConditionById.js";

/**
* Retrieves the active claim condition.
* This method is only available on the `DropERC721` contract.
*
* @param options - The transaction options.
* @returns A promise that resolves to the active claim condition.
* @throws An error if the claim condition is unsupported.
Expand All @@ -28,6 +30,8 @@ export async function getActiveClaimCondition(

/**
* Checks if the `getActiveClaimCondition` method is supported by the given contract.
* This method is only available on the `DropERC721` contract.
*
* @param availableSelectors An array of 4byte function selectors of the contract. You can get this in various ways, such as using "whatsabi" or if you have the ABI of the contract available you can use it to generate the selectors.
* @returns A boolean indicating if the `getActiveClaimCondition` method is supported.
* @extension ERC721
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import * as MultiById from "../../__generated__/IDrop/read/getClaimConditionById

/**
* Retrieves all claim conditions.
*
* This method is only available on the `DropERC721` contract.
*
* @param options - The transaction options.
* @returns A promise that resolves to all claim conditions.
* @throws An error if the claim conditions are unsupported by the contract.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type ClaimToParams = {

/**
* Claim ERC721 NFTs to a specified address
* This method is only available on the `DropERC721` contract.
* @param options - The options for the transaction
* @extension ERC721
* @example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type ClaimToBatchParams = WithOverrides<{
* This extension batches multiple `claimTo` extensions into one single multicall.
* Keep in mind that there is a limit of how many NFTs you can claim per transaction.
* This limit varies depends on the network that you are transacting on.
* This method is only available on the `DropERC721` contract.
*
* You are recommended to experiment with the number to figure out the best number for your chain of choice.
* @extension ERC721
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {

/**
* Reset the claim eligibility for all users.
* This method is only available on the `DropERC721` contract.
* @param options
* @returns the prepared transaction
* @extension ERC721
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export type SetClaimConditionsParams = {

/**
* Set the claim conditions for a ERC721 drop
* This method is only available on the `DropERC721` contract.
* @param options
* @returns the prepared transaction
* @extension ERC721
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export type CreateDelayedRevealBatchParams = {

/**
* Creates a batch of encrypted NFTs that can be revealed at a later time.
* This method is only available on the `DropERC721` contract.
*
* @param options {CreateDelayedRevealBatchParams} - The delayed reveal options.
* @param options.placeholderMetadata {@link NFTInput} - The placeholder metadata for the batch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type RevealParams = {

/**
* Reveals a previously lazy minted batch of NFTs.
*
* This method is only available on the `DropERC721` contract.
* @param options {RevealParams} - The reveal parameters.
* @param options.batchId {number} - The ID of the batch to reveal. Get this by calling `getBatchesToReveal`. {@see getBatchesToReveal}
* @param options.password {string} - The password for the reveal, set when the batch was created. {@see createDelayedRevealBatch}
Expand Down
2 changes: 2 additions & 0 deletions packages/thirdweb/src/extensions/erc721/write/lazyMint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export type LazyMintParams = {

/**
* Lazily mints ERC721 tokens.
* This method is only available on the `DropERC721` contract.
*
* @param options - The options for the lazy minting process.
* @returns A promise that resolves to the prepared contract call.
* @extension ERC721
Expand Down
2 changes: 2 additions & 0 deletions packages/thirdweb/src/extensions/erc721/write/mintTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export type MintToParams = WithOverrides<{

/**
* Mints a new ERC721 token and assigns it to the specified address.
* This method is only available on the `TokenERC721` contract.
*
* If the `nft` parameter is a string, it will be used as the token URI.
* If the `nft` parameter is a file, it will be uploaded to the storage server and the resulting URI will be used as the token URI.
* @param options - The transaction options.
Expand Down
2 changes: 2 additions & 0 deletions packages/thirdweb/src/extensions/erc721/write/sigMint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import {

/**
* Mints a new ERC721 token with the given minter signature
* This method is only available on the `TokenERC721` contract.
*
* @param options - The transaction options.
* @example
* ```ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type UpdateTokenURIParams = {
* upload that content to IPFS and pass the IPFS URI (of said `NFTInput`) to the underlying `setTokenURI` method.
*
* This extension does not validate the NFTInput so make sure you are passing the proper content that you want to update.
* This method is only available on the `TokenERC721` contract.
*
* @extension ERC721
* @returns the prepared transaction from `setTokenURI`
Expand Down
Loading