Function useClaimNFT

  • Beta

    Claim an NFT to a specific wallet

    Type Parameters

    Parameters

    Returns UseMutationResult<ClaimNFTReturnType, unknown, ClaimNFTParams, unknown>

    a mutation object that can be used to claim a NFT to the wallet specificed in the params

    Example

    const Component = () => {
    const { contract } = useContract("{{contract_address}}");
    const {
    mutate: claimNFT,
    isLoading,
    error,
    } = useClaimNFT(contract);

    if (error) {
    console.error("failed to claim nft", error);
    }

    return (
    <button
    disabled={isLoading}
    onClick={() => claimNFT({ to: "{{wallet_address}}", quantity: 1 })}
    >
    Claim NFT!
    </button>
    );
    };

    Twfeature

    ERC721Claimable | ERC1155Claimable | ERC721ClaimPhasesV2 | ERC721ClaimPhasesV1 | ERC721ClaimConditionsV2 | ERC721ClaimConditionsV1 | ERC1155ClaimPhasesV2 | ERC1155ClaimPhasesV1 | ERC1155ClaimConditionsV2 | ERC1155ClaimConditionsV1

    See

    Documentation

Generated using TypeDoc