|
344 | 344 | ], |
345 | 345 | "reference": "https://docs.thirdweb.com/typescript/react.useMarketplace" |
346 | 346 | }, |
| 347 | + "useMultiwrap": { |
| 348 | + "name": "useMultiwrap", |
| 349 | + "summary": "Hook for getting an instance of an `Multiwrap` contract. This contract is an ERC721 in which you can wrap ERC721, ERC1155 and ERC20 tokens.\n\n", |
| 350 | + "examples": { |
| 351 | + "javascript": "import { useMultiwrap } from '@thirdweb-dev/react'\n\nexport default function Component() {\n const multiwrap = useMultiwrap(\"<YOUR-CONTRACT-ADDRESS>\")\n\n // Now you can use the multiwrap contract in the rest of the component\n}" |
| 352 | + }, |
| 353 | + "subhooks": [ |
| 354 | + { |
| 355 | + "name": "useMintNFT", |
| 356 | + "example": "const Component = () => {\n const { contract } = useContract(<ContractAddress>);\n const {\n mutate: mintNft,\n isLoading,\n error,\n } = useMintNFT(contract?.nft);\n\n if (error) {\n console.error(\"failed to mint nft\", error);\n }\n\n return (\n <button\n disabled={isLoading}\n onClick={() => mintNft({ name: \"My awesome NFT!\", to: \"0x...\" })}\n >\n Mint!\n </button>\n );\n};", |
| 357 | + "reference": "https://portal.thirdweb.com/react/react.usemintnft" |
| 358 | + }, |
| 359 | + { |
| 360 | + "name": "useNFT", |
| 361 | + "example": "const { contract } = useContract(<ContractAddress>);\nconst { data: nft, isLoading, error } = useNFT(contract?.nft, <tokenId>);", |
| 362 | + "reference": "https://portal.thirdweb.com/react/react.usenft" |
| 363 | + }, |
| 364 | + { |
| 365 | + "name": "useNFTBalance", |
| 366 | + "example": "const { contract } = useContract(<ContractAddress>);\nconst { data: ownerBalance, isLoading, error } = useNFTBalance(contract?.nft, <OwnerWalletAddress>);", |
| 367 | + "reference": "https://portal.thirdweb.com/react/react.usenftbalance" |
| 368 | + }, |
| 369 | + { |
| 370 | + "name": "useNFTs", |
| 371 | + "example": "const { contract } = useContract(<ContractAddress>);\nconst { data: nfts, isLoading, error } = useNFTs(contract?.nft, { start: 0, count: 100 });", |
| 372 | + "reference": "https://portal.thirdweb.com/react/react.usenfts" |
| 373 | + }, |
| 374 | + { |
| 375 | + "name": "useOwnedNFTs", |
| 376 | + "example": "const { contract } = useContract(<ContractAddress>);\nconst { data: ownedNFTs, isLoading, error } = useOwnedNFTs(contract?.nft, <OwnerWalletAddress>);", |
| 377 | + "reference": "https://portal.thirdweb.com/react/react.useownednfts" |
| 378 | + }, |
| 379 | + { |
| 380 | + "name": "useTotalCirculatingSupply", |
| 381 | + "example": "const { contract } = useContract(<ContractAddress>);\nconst { data: totalSupply, isLoading, error } = useNFTSupply(contract?.nft);", |
| 382 | + "reference": "https://portal.thirdweb.com/react/react.usetotalcirculatingsupply" |
| 383 | + } |
| 384 | + ], |
| 385 | + "reference": "https://docs.thirdweb.com/typescript/react.useMultiwrap" |
| 386 | + }, |
347 | 387 | "useNFTCollection": { |
348 | 388 | "name": "useNFTCollection", |
349 | 389 | "summary": "Hook for getting an instance of an `NFTCollection` contract. This contract is meant to interface with ERC721 compliant NFTs.\n\n", |
|
509 | 549 | ], |
510 | 550 | "reference": "https://docs.thirdweb.com/typescript/react.usePack" |
511 | 551 | }, |
| 552 | + "useSignatureDrop": { |
| 553 | + "name": "useSignatureDrop", |
| 554 | + "summary": "Hook for getting an instance of an `SignatureDrop` contract. This contract is meant to interface with ERC721 compliant NFTs that can be lazily minted.\n\n", |
| 555 | + "examples": { |
| 556 | + "javascript": "import { useSignatureDrop } from '@thirdweb-dev/react'\n\nexport default function Component() {\n const signatureDrop = useSignatureDrop(\"<YOUR-CONTRACT-ADDRESS>\")\n\n // Now you can use the Signature drop contract in the rest of the component\n}" |
| 557 | + }, |
| 558 | + "subhooks": [ |
| 559 | + { |
| 560 | + "name": "useActiveClaimCondition", |
| 561 | + "example": "const { data: activeClaimCondition, isLoading, error } = useActiveClaimCondition(<YourERC1155ContractInstance>, <tokenId>);", |
| 562 | + "reference": "https://portal.thirdweb.com/react/react.useactiveclaimcondition" |
| 563 | + }, |
| 564 | + { |
| 565 | + "name": "useClaimConditions", |
| 566 | + "example": "const { data: claimConditions, isLoading, error } = useClaimConditions(<YourERC1155ContractInstance>, <tokenId>);", |
| 567 | + "reference": "https://portal.thirdweb.com/react/react.useclaimconditions" |
| 568 | + }, |
| 569 | + { |
| 570 | + "name": "useClaimedNFTs", |
| 571 | + "example": "const { data: claimedNFTs, isLoading, error } = useClaimedNFTs(<YourERC721DropContractInstance>, { start: 0, count: 100 });", |
| 572 | + "reference": "https://portal.thirdweb.com/react/react.useclaimednfts" |
| 573 | + }, |
| 574 | + { |
| 575 | + "name": "useClaimedNFTSupply", |
| 576 | + "example": "", |
| 577 | + "reference": "https://portal.thirdweb.com/react/react.useclaimednftsupply" |
| 578 | + }, |
| 579 | + { |
| 580 | + "name": "useClaimIneligibilityReasons", |
| 581 | + "example": "const { data: claimIneligibilityReasons, isLoading, error } = useClaimIneligibilityReasons(<YourERC1155ContractInstance>, { quantity: <quantity>, walletAddress: <walletAddress> }, <tokenId>);", |
| 582 | + "reference": "https://portal.thirdweb.com/react/react.useclaimineligibilityreasons" |
| 583 | + }, |
| 584 | + { |
| 585 | + "name": "useClaimNFT", |
| 586 | + "example": "const Component = () => {\n const {\n mutate: claimNft,\n isLoading,\n error,\n } = useClaimNFT(DropContract);\n\n if (error) {\n console.error(\"failed to claim nft\", error);\n }\n\n return (\n <button\n disabled={isLoading}\n onClick={() => claimNft({ to: \"0x...\", quantity: 1 })}\n >\n Claim NFT!\n </button>\n );\n};", |
| 587 | + "reference": "https://portal.thirdweb.com/react/react.useclaimnft" |
| 588 | + }, |
| 589 | + { |
| 590 | + "name": "useClaimToken", |
| 591 | + "example": "const Component = () => {\n const {\n mutate: claimTokens,\n isLoading,\n error,\n } = useClaimToken(TokenDropContract);\n\n if (error) {\n console.error(\"failed to claim tokens\", error);\n }\n\n return (\n <button\n disabled={isLoading}\n onClick={() => claimTokens({ to: \"0x...\", amount: 100 })}\n >\n Claim Tokens!\n </button>\n );\n};", |
| 592 | + "reference": "https://portal.thirdweb.com/react/react.useclaimtoken" |
| 593 | + }, |
| 594 | + { |
| 595 | + "name": "useMintNFT", |
| 596 | + "example": "const Component = () => {\n const { contract } = useContract(<ContractAddress>);\n const {\n mutate: mintNft,\n isLoading,\n error,\n } = useMintNFT(contract?.nft);\n\n if (error) {\n console.error(\"failed to mint nft\", error);\n }\n\n return (\n <button\n disabled={isLoading}\n onClick={() => mintNft({ name: \"My awesome NFT!\", to: \"0x...\" })}\n >\n Mint!\n </button>\n );\n};", |
| 597 | + "reference": "https://portal.thirdweb.com/react/react.usemintnft" |
| 598 | + }, |
| 599 | + { |
| 600 | + "name": "useNFT", |
| 601 | + "example": "const { contract } = useContract(<ContractAddress>);\nconst { data: nft, isLoading, error } = useNFT(contract?.nft, <tokenId>);", |
| 602 | + "reference": "https://portal.thirdweb.com/react/react.usenft" |
| 603 | + }, |
| 604 | + { |
| 605 | + "name": "useNFTBalance", |
| 606 | + "example": "const { contract } = useContract(<ContractAddress>);\nconst { data: ownerBalance, isLoading, error } = useNFTBalance(contract?.nft, <OwnerWalletAddress>);", |
| 607 | + "reference": "https://portal.thirdweb.com/react/react.usenftbalance" |
| 608 | + }, |
| 609 | + { |
| 610 | + "name": "useNFTs", |
| 611 | + "example": "const { contract } = useContract(<ContractAddress>);\nconst { data: nfts, isLoading, error } = useNFTs(contract?.nft, { start: 0, count: 100 });", |
| 612 | + "reference": "https://portal.thirdweb.com/react/react.usenfts" |
| 613 | + }, |
| 614 | + { |
| 615 | + "name": "useOwnedNFTs", |
| 616 | + "example": "const { contract } = useContract(<ContractAddress>);\nconst { data: ownedNFTs, isLoading, error } = useOwnedNFTs(contract?.nft, <OwnerWalletAddress>);", |
| 617 | + "reference": "https://portal.thirdweb.com/react/react.useownednfts" |
| 618 | + }, |
| 619 | + { |
| 620 | + "name": "useTotalCirculatingSupply", |
| 621 | + "example": "const { contract } = useContract(<ContractAddress>);\nconst { data: totalSupply, isLoading, error } = useNFTSupply(contract?.nft);", |
| 622 | + "reference": "https://portal.thirdweb.com/react/react.usetotalcirculatingsupply" |
| 623 | + }, |
| 624 | + { |
| 625 | + "name": "useUnclaimedNFTs", |
| 626 | + "example": "const { data: unclaimedNfts, isLoading, error } = useUnclaimedNFTs(<YourERC721DropContractInstance>, { start: 0, count: 100 });", |
| 627 | + "reference": "https://portal.thirdweb.com/react/react.useunclaimednfts" |
| 628 | + }, |
| 629 | + { |
| 630 | + "name": "useUnclaimedNFTSupply", |
| 631 | + "example": "", |
| 632 | + "reference": "https://portal.thirdweb.com/react/react.useunclaimednftsupply" |
| 633 | + } |
| 634 | + ], |
| 635 | + "reference": "https://docs.thirdweb.com/typescript/react.useSignatureDrop" |
| 636 | + }, |
512 | 637 | "useSplit": { |
513 | 638 | "name": "useSplit", |
514 | 639 | "summary": "Hook for getting an instance of a `Split` contract. This contract supports fund distribution to multiple parties.\n\n", |
|
0 commit comments