Ultimate collection of React hooks for your web3 apps
+> ## v2 upgrade is coming!
+>
+> upcoming v3 features are documented [here](./v3-upgrade.md)
+
## Installation
You can install this SDK with either `npm` or `yarn`:
diff --git a/babel.config.js b/babel.config.js
new file mode 100644
index 0000000..42b117b
--- /dev/null
+++ b/babel.config.js
@@ -0,0 +1,10 @@
+module.exports = {
+ presets: ["@babel/preset-typescript", "@babel/preset-react"],
+
+ overrides: [
+ {
+ include: ["./src"],
+ presets: [["@babel/preset-env", { targets: "defaults, not ie 11" }]],
+ },
+ ],
+};
diff --git a/config/api-extractor.json b/config/api-extractor.json
index 6c3fff5..75021f7 100644
--- a/config/api-extractor.json
+++ b/config/api-extractor.json
@@ -45,7 +45,7 @@
*
* SUPPORTED TOKENS: , ,
*/
- "mainEntryPointFilePath": "/dist/index.d.ts",
+ "mainEntryPointFilePath": "/dist/thirdweb-dev-react.cjs.d.ts",
/**
* A list of NPM package names whose exports should be treated as part of this package.
@@ -60,7 +60,7 @@
* This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been
* local files for library1.
*/
- "bundledPackages": ["wagmi", "wagmi-core"],
+ "bundledPackages": [],
/**
* Determines how the TypeScript compiler engine will be invoked by API Extractor.
diff --git a/docs/react.dappmetadata.description.md b/docs/react.dappmetadata.description.md
deleted file mode 100644
index 71a4eed..0000000
--- a/docs/react.dappmetadata.description.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [DAppMetaData](./react.dappmetadata.md) > [description](./react.dappmetadata.description.md)
-
-## DAppMetaData.description property
-
-optional - a description of your app
-
-Signature:
-
-```typescript
-description?: string;
-```
diff --git a/docs/react.dappmetadata.isdarkmode.md b/docs/react.dappmetadata.isdarkmode.md
deleted file mode 100644
index 314ebc1..0000000
--- a/docs/react.dappmetadata.isdarkmode.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [DAppMetaData](./react.dappmetadata.md) > [isDarkMode](./react.dappmetadata.isdarkmode.md)
-
-## DAppMetaData.isDarkMode property
-
-optional - whether to show the connect dialog in darkmode or not
-
-Signature:
-
-```typescript
-isDarkMode?: boolean;
-```
diff --git a/docs/react.dappmetadata.logourl.md b/docs/react.dappmetadata.logourl.md
deleted file mode 100644
index c757ce8..0000000
--- a/docs/react.dappmetadata.logourl.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [DAppMetaData](./react.dappmetadata.md) > [logoUrl](./react.dappmetadata.logourl.md)
-
-## DAppMetaData.logoUrl property
-
-optional - a url that points to a logo (or favicon) of your app
-
-Signature:
-
-```typescript
-logoUrl?: string;
-```
diff --git a/docs/react.dappmetadata.md b/docs/react.dappmetadata.md
deleted file mode 100644
index 81d1208..0000000
--- a/docs/react.dappmetadata.md
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [DAppMetaData](./react.dappmetadata.md)
-
-## DAppMetaData interface
-
-the metadata to pass to wallet connection dialog (may show up during the wallet-connection process)
-
-Signature:
-
-```typescript
-export interface DAppMetaData
-```
-
-## Remarks
-
-this is only used for wallet connect and wallet link, metamask does not support it
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [description?](./react.dappmetadata.description.md) | string | (Optional) optional - a description of your app |
-| [isDarkMode?](./react.dappmetadata.isdarkmode.md) | boolean | (Optional) optional - whether to show the connect dialog in darkmode or not |
-| [logoUrl?](./react.dappmetadata.logourl.md) | string | (Optional) optional - a url that points to a logo (or favicon) of your app |
-| [name](./react.dappmetadata.name.md) | string | the name of your app |
-| [url?](./react.dappmetadata.url.md) | string | (Optional) optional - the url where your app is hosted |
-
diff --git a/docs/react.dappmetadata.name.md b/docs/react.dappmetadata.name.md
deleted file mode 100644
index 5e7089a..0000000
--- a/docs/react.dappmetadata.name.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [DAppMetaData](./react.dappmetadata.md) > [name](./react.dappmetadata.name.md)
-
-## DAppMetaData.name property
-
-the name of your app
-
-Signature:
-
-```typescript
-name: string;
-```
diff --git a/docs/react.dappmetadata.url.md b/docs/react.dappmetadata.url.md
deleted file mode 100644
index 1a5870a..0000000
--- a/docs/react.dappmetadata.url.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [DAppMetaData](./react.dappmetadata.md) > [url](./react.dappmetadata.url.md)
-
-## DAppMetaData.url property
-
-optional - the url where your app is hosted
-
-Signature:
-
-```typescript
-url?: string;
-```
diff --git a/docs/react.thirdwebproviderprops.queryclient.md b/docs/react.exposedqueryoptions.md
similarity index 55%
rename from docs/react.thirdwebproviderprops.queryclient.md
rename to docs/react.exposedqueryoptions.md
index faab652..b4196c2 100644
--- a/docs/react.thirdwebproviderprops.queryclient.md
+++ b/docs/react.exposedqueryoptions.md
@@ -1,16 +1,16 @@
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebProviderProps](./react.thirdwebproviderprops.md) > [queryClient](./react.thirdwebproviderprops.queryclient.md)
+[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ExposedQueryOptions](./react.exposedqueryoptions.md)
-## ThirdwebProviderProps.queryClient property
+## ExposedQueryOptions type
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
-The react-query client to use. (Defaults to a default client.)
+Exposed options shared across all query hooks.
Signature:
```typescript
-queryClient?: QueryClient;
+export declare type ExposedQueryOptions = Pick, "refetchInterval">;
```
diff --git a/docs/react.md b/docs/react.md
index 07aa74b..fc0b26e 100644
--- a/docs/react.md
+++ b/docs/react.md
@@ -12,133 +12,97 @@
| [useActiveListings(contract, filter)](./react.useactivelistings.md) | (BETA) Use this to get a list active listings from your marketplace contract. |
| [useAddress()](./react.useaddress.md) | Hook for accessing the address of the connected wallet
```javascript
-import { useAddress } from "@thirdweb-dev/react"
+import { useAddress } from "@thirdweb-dev/react";
```
|
| [useAllContractEvents(contract, options)](./react.useallcontractevents.md) | (BETA) Use this to query (and subscribe) to all events on a contract. |
-| [useAllRoleMembers(contract)](./react.useallrolemembers.md) | (BETA) Use this to get the roles of a |
+| [useAllRoleMembers(contract, queryOptions)](./react.useallrolemembers.md) | (BETA) Use this to get the roles of a |
| [useAuctionWinner(contract, listingId)](./react.useauctionwinner.md) | (BETA) Use this to get the winner of an auction listing from your marketplace contract. |
-| [useBalance(tokenAddress)](./react.usebalance.md) | (BETA) A hook to get the native or (optional) ERC20 token balance of the connected wallet. |
| [useBidBuffer(contract)](./react.usebidbuffer.md) | (BETA) Use this to get the buffer in basis points between offers from your marketplace contract. |
| [useBuyNow(contract)](./react.usebuynow.md) | (BETA) Use this to buy out an auction listing from your marketplace contract. |
| [useChainId()](./react.usechainid.md) | Hook for accessing the chain ID of the network the current wallet is connected to
```javascript
-import { useChainId } from "@thirdweb-dev/react"
+import { useChainId } from "@thirdweb-dev/react";
```
|
| [useClaimConditions(\[contract, tokenId\])](./react.useclaimconditions.md) | (BETA) Use this to get all claim conditons for ERC20, ERC721 or ERC1155 based contracts. They need to extend the claimCondition extension for this hook to work. |
-| [useClaimedNFTs(contract, queryParams)](./react.useclaimednfts.md) | (BETA) Use this to get a list of \*claimed\* (minted) NFT tokens of your ERC721 Drop contract. |
-| [useClaimedNFTSupply(contract)](./react.useclaimednftsupply.md) | |
+| [useClaimedNFTs(contract, queryParams, queryOptions)](./react.useclaimednfts.md) | (BETA) Use this to get a list of \*claimed\* (minted) NFT tokens of your ERC721 Drop contract. |
+| [useClaimedNFTSupply(contract, queryOptions)](./react.useclaimednftsupply.md) | |
| [useClaimIneligibilityReasons(\[contract, params, tokenId\])](./react.useclaimineligibilityreasons.md) | (BETA) Use this to check for reasons that prevent claiming for either ERC20, ERC721 or ERC1155 based contracts. They need to extend the claimCondition extension for this hook to work. |
| [useClaimNFT(contract)](./react.useclaimnft.md) | (BETA) Use this to claim a NFT on your [DropContract](./react.dropcontract.md) |
| [useClaimToken(contract)](./react.useclaimtoken.md) | (BETA) Use this to claim tokens on your |
-| [useCoinbaseWallet()](./react.usecoinbasewallet.md) | Hook for connecting to a Coinbase wallet.
-```javascript
-import { useCoinbaseWallet } from "@thirdweb-dev/react"
-```
- |
-| [useContract(contractAddress)](./react.usecontract.md) | (BETA) Use this resolve a contract address to a thirdweb (built-in / custom) contract instance. |
+| [useCoinbaseWallet()](./react.usecoinbasewallet.md) | |
+| [useContract(contractAddress, chain, queryOptions)](./react.usecontract.md) | (BETA) Use this resolve a contract address to a thirdweb (built-in / custom) contract instance. |
| [useContractCall(contract, functionName)](./react.usecontractcall.md) | (BETA) Use this to get a function to make a write call to your contract |
-| [useContractData(contract, functionName, args)](./react.usecontractdata.md) | (BETA) Use this to get data from a contract read-function call. |
+| [useContractData(contract, functionName, functionArguments, queryOptions)](./react.usecontractdata.md) | (BETA) Use this to get data from a contract read-function call. |
| [useContractEvents(contract, eventName, options)](./react.usecontractevents.md) | (BETA) Use this to query (and subscribe) to a specific event on a contract. |
-| [useContractMetadata(contractAddress)](./react.usecontractmetadata.md) | (BETA) Use this to get the contract metadata for a (built-in or custom) contract. |
-| [useContractPublishMetadata(contractAddress)](./react.usecontractpublishmetadata.md) | (BETA) Use this to get the publish metadata for a deployed contract. |
-| [useContractType(contractAddress)](./react.usecontracttype.md) | (BETA) Use this to get the contract type for a (built-in or custom) contract. |
+| [useContractMetadata(contractAddress, chain, queryOptions)](./react.usecontractmetadata.md) | (BETA) Use this to get the contract metadata for a (built-in or custom) contract. |
+| [useContractPublishMetadata(contractAddress, chain, queryOptions)](./react.usecontractpublishmetadata.md) | (BETA) Use this to get the publish metadata for a deployed contract. |
+| [useContractType(contractAddress, chain, queryOptions)](./react.usecontracttype.md) | (BETA) Use this to get the contract type for a (built-in or custom) contract. |
| [useCreateAuctionListing(contract)](./react.usecreateauctionlisting.md) | (BETA) Use this to create a new Auction Listing on your marketplace contract. |
| [useCreateDirectListing(contract)](./react.usecreatedirectlisting.md) | (BETA) Use this to create a new Direct Listing on your marketplace contract. |
-| [useDisconnect(options)](./react.usedisconnect.md) | Hook for disconnecting the currently connected wallet
-```javascript
-import { useDisconnect } from "@thirdweb-dev/react"
-```
- |
-| [useEdition(contractAddress)](./react.useedition.md) | Hook for getting an instance of an Edition contract. This contract is used to interface with ERC1155 compliant NFTs. |
-| [useEditionDrop(contractAddress)](./react.useeditiondrop.md) | Hook for getting an instance of an EditionDrop contract. This conract is used to interface with ERC1155 compliant NFTs that can be lazily minted. |
-| [useGnosis()](./react.usegnosis.md) | Hook for connecting to a Gnosis Safe. This enables multisig wallets to connect to your application and sing transactions.
-```javascript
-import { useGnosis } from "@thirdweb-dev/react"
-```
- |
+| [useEdition(contractAddress, chain)](./react.useedition.md) | Hook for getting an instance of an Edition contract. This contract is used to interface with ERC1155 compliant NFTs. |
+| [useEditionDrop(contractAddress, chain)](./react.useeditiondrop.md) | Hook for getting an instance of an EditionDrop contract. This conract is used to interface with ERC1155 compliant NFTs that can be lazily minted. |
| [useGrantRole(contract)](./react.usegrantrole.md) | (BETA) Use this to grant a [WalletAddress](./react.walletaddress.md) a specific role on a |
-| [useIsAddressRole(contract, role, walletAddress)](./react.useisaddressrole.md) | (BETA) Use this to check if a [WalletAddress](./react.walletaddress.md) is a member of a role on a |
+| [useIsAddressRole(contract, role, walletAddress, queryOptions)](./react.useisaddressrole.md) | (BETA) Use this to check if a [WalletAddress](./react.walletaddress.md) is a member of a role on a |
| [useListing(contract, listingId)](./react.uselisting.md) | (BETA) Use this to get a specific listing from the marketplace. |
| [useListings(contract, filter)](./react.uselistings.md) | (BETA) Use this to get a list all listings from your marketplace contract. |
-| [useMagic()](./react.usemagic.md) | Hook for connecting to an email wallet using magic link. This enables users without their own wallets to connect to your application and sign transactions securely using their email.
-```javascript
-import { useMagic } from "@thirdweb-dev/react"
-```
- |
| [useMakeBid(contract)](./react.usemakebid.md) | (BETA) Use this to place a bid on an auction listing from your marketplace contract. |
-| [useMarketplace(contractAddress)](./react.usemarketplace.md) | Hook for getting an instance of a Marketplace contract. This contract is used to support marketplace for purchase and sale of on-chain assets. |
-| [useMetadata(contract)](./react.usemetadata.md) | (BETA) Use this to get the metadata of your |
-| [useMetamask()](./react.usemetamask.md) | Hook for connecting to a Metamask wallet.
-```javascript
-import { useMetamask } from "@thirdweb-dev/react"
-```
- |
+| [useMarketplace(contractAddress, chain)](./react.usemarketplace.md) | Hook for getting an instance of a Marketplace contract. This contract is used to support marketplace for purchase and sale of on-chain assets. |
+| [useMetadata(contract, queryOptions)](./react.usemetadata.md) | (BETA) Use this to get the metadata of your |
+| [useMetamask()](./react.usemetamask.md) | |
| [useMintNFT(contract)](./react.usemintnft.md) | (BETA) Use this to mint a new NFT on your [NFTContract](./react.nftcontract.md) |
| [useMintToken(contract)](./react.useminttoken.md) | (BETA) Use this to mint a new NFT on your ERC20 contract |
-| [useMultiwrap(contractAddress)](./react.usemultiwrap.md) | Hook for getting an instance of an Multiwrap contract. This contract is an ERC721 in which you can wrap ERC721, ERC1155 and ERC20 tokens. |
-| [useNetwork()](./react.usenetwork.md) | Hook for getting metadata about the network the current wallet is connected to and switching networks |
-| [useNetworkMismatch()](./react.usenetworkmismatch.md) | Hook for checking whether the connected wallet is on the correct network specified by the desiredChainId passed to the <ThirdwebProvider />.
+| [useMultiwrap(contractAddress, chain)](./react.usemultiwrap.md) | Hook for getting an instance of an Multiwrap contract. This contract is an ERC721 in which you can wrap ERC721, ERC1155 and ERC20 tokens. |
+| [useNetworkMismatch(contract)](./react.usenetworkmismatch.md) | Hook for checking whether the connected wallet is on the correct network specified by the desiredChainId passed to the <ThirdwebProvider />.
```javascript
import { useNetworkMistmatch } from "@thirdweb-dev/react"
```
|
-| [useNFT(contract, tokenId)](./react.usenft.md) | (BETA) Use this to get an individual NFT token of your [NFTContract](./react.nftcontract.md). |
+| [useNFT(contract, tokenId, queryOptions)](./react.usenft.md) | (BETA) Use this to get an individual NFT token of your [NFTContract](./react.nftcontract.md). |
| [useNFTBalance(\[contract, ownerWalletAddress, tokenId\])](./react.usenftbalance.md) | (BETA) Use this to get a the total balance of a [NFTContract](./react.nftcontract.md) and wallet address. |
-| [useNFTCollection(contractAddress)](./react.usenftcollection.md) | Hook for getting an instance of an NFTCollection contract. This contract is meant to interface with ERC721 compliant NFTs. |
-| [useNFTDrop(contractAddress)](./react.usenftdrop.md) | Hook for getting an instance of an NFTDrop contract. This contract is meant to interface with ERC721 compliant NFTs that can be lazily minted. |
-| [useNFTs(contract, queryParams)](./react.usenfts.md) | (BETA) Use this to get a list of NFT tokens of your [NFTContract](./react.nftcontract.md). |
-| [useOwnedNFTs(contract, ownerWalletAddress)](./react.useownednfts.md) | (BETA) Use this to get a the owned NFTs for a specific [NFTContract](./react.nftcontract.md) and wallet address. |
-| [usePack(contractAddress)](./react.usepack.md) | Hook for getting an instance of a Pack contract. This contract supports the creation of on-chain luck-based lootboxes. |
-| [usePlatformFees(contract)](./react.useplatformfees.md) | (BETA) Use this to get the platform fees settings of your |
-| [usePrimarySaleRecipient(contract)](./react.useprimarysalerecipient.md) | (BETA) |
-| [useResolvedMediaType(uri)](./react.useresolvedmediatype.md) | |
+| [useNFTCollection(contractAddress, chain)](./react.usenftcollection.md) | Hook for getting an instance of an NFTCollection contract. This contract is meant to interface with ERC721 compliant NFTs. |
+| [useNFTDrop(contractAddress, chain)](./react.usenftdrop.md) | Hook for getting an instance of an NFTDrop contract. This contract is meant to interface with ERC721 compliant NFTs that can be lazily minted. |
+| [useNFTs(contract, queryParams, queryOptions)](./react.usenfts.md) | (BETA) Use this to get a list of NFT tokens of your [NFTContract](./react.nftcontract.md). |
+| [useOwnedNFTs(contract, ownerWalletAddress, queryOptions)](./react.useownednfts.md) | (BETA) Use this to get a the owned NFTs for a specific [NFTContract](./react.nftcontract.md) and wallet address. |
+| [usePack(contractAddress, chain)](./react.usepack.md) | Hook for getting an instance of a Pack contract. This contract supports the creation of on-chain luck-based lootboxes. |
+| [usePlatformFees(contract, queryOptions)](./react.useplatformfees.md) | (BETA) Use this to get the platform fees settings of your |
+| [usePrimarySaleRecipient(contract, queryOptions)](./react.useprimarysalerecipient.md) | (BETA) |
| [useRevokeRole(contract)](./react.userevokerole.md) | (BETA) Use this to revoke a [WalletAddress](./react.walletaddress.md) a specific role on a |
-| [useRoleMembers(contract, role)](./react.userolemembers.md) | (BETA) Use this to get the members of a role on a |
-| [useRoyaltySettings(contract)](./react.useroyaltysettings.md) | (BETA) Use this to get the royalty settings of your |
+| [useRoleMembers(contract, role, queryOptions)](./react.userolemembers.md) | (BETA) Use this to get the members of a role on a |
+| [useRoyaltySettings(contract, queryOptions)](./react.useroyaltysettings.md) | (BETA) Use this to get the royalty settings of your |
+| [useSDK()](./react.usesdk.md) | Use this to access the ThirdwebSDK instance directly. |
| [useSetAllRoleMembers(contract)](./react.usesetallrolemembers.md) | (BETA) Use this to OVERWRITE the list of addresses that are members of specific roles |
-| [useSignatureDrop(contractAddress)](./react.usesignaturedrop.md) | Hook for getting an instance of an SignatureDrop contract. This contract is meant to interface with ERC721 compliant NFTs that can be lazily minted. |
-| [useSplit(contractAddress)](./react.usesplit.md) | Hook for getting an instance of a Split contract. This contract supports fund distribution to multiple parties. |
-| [useToken(contractAddress)](./react.usetoken.md) | Hook for getting an instance of an Token contract. This contract supports ERC20 compliant tokens. |
-| [useTokenBalance(contract, walletAddress)](./react.usetokenbalance.md) | (BETA) Use this to get the balance of your Token contract for a given address. |
-| [useTokenSupply(contract)](./react.usetokensupply.md) | (BETA) Use this to get a the total supply of your Token contract. |
-| [useTotalCirculatingSupply(\[contract, tokenId\])](./react.usetotalcirculatingsupply.md) | (BETA) Use this to get a the total (minted) supply of your [NFTContract](./react.nftcontract.md). |
-| [useTotalCount(contract)](./react.usetotalcount.md) | (BETA) Use this to get a the number of tokens in your [NFTContract](./react.nftcontract.md). |
-| [useUnclaimedNFTs(contract, queryParams)](./react.useunclaimednfts.md) | (BETA) Use this to get a list of \*unclaimed\* NFT tokens of your ERC721 Drop contract. |
-| [useUnclaimedNFTSupply(contract)](./react.useunclaimednftsupply.md) | |
+| [useSignatureDrop(contractAddress, chain)](./react.usesignaturedrop.md) | Hook for getting an instance of an SignatureDrop contract. This contract is meant to interface with ERC721 compliant NFTs that can be lazily minted. |
+| [useSplit(contractAddress, chain)](./react.usesplit.md) | Hook for getting an instance of a Split contract. This contract supports fund distribution to multiple parties. |
+| [useThirdwebConfig()](./react.usethirdwebconfig.md) | |
+| [useToken(contractAddress, chain)](./react.usetoken.md) | Hook for getting an instance of an Token contract. This contract supports ERC20 compliant tokens. |
+| [useTokenBalance(contract, walletAddress, queryOptions)](./react.usetokenbalance.md) | (BETA) Use this to get the balance of your Token contract for a given address. |
+| [useTokenSupply(contract, queryOptions)](./react.usetokensupply.md) | (BETA) Use this to get a the total supply of your Token contract. |
+| [useTotalCirculatingSupply(\[contract, tokenId\])](./react.usetotalcirculatingsupply.md) | (BETA) Use this to get a the total (minted) supply of your [NFTContract](./react.nftcontract.md).\* |
+| [useTotalCount(contract, queryOptions)](./react.usetotalcount.md) | (BETA) Use this to get a the number of tokens in your [NFTContract](./react.nftcontract.md). |
+| [useUnclaimedNFTs(contract, queryParams, queryOptions)](./react.useunclaimednfts.md) | (BETA) Use this to get a list of \*unclaimed\* NFT tokens of your ERC721 Drop contract. |
+| [useUnclaimedNFTSupply(contract, queryOptions)](./react.useunclaimednftsupply.md) | |
| [useUpdateMetadata(contract)](./react.useupdatemetadata.md) | (BETA) Use this to update the metadata of your |
| [useUpdatePlatformFees(contract)](./react.useupdateplatformfees.md) | (BETA) Use this to update the platform fees settings of your |
| [useUpdatePrimarySaleRecipient(contract)](./react.useupdateprimarysalerecipient.md) | (BETA) Use this to update the primary sales recipient of your |
| [useUpdateRoyaltySettings(contract)](./react.useupdateroyaltysettings.md) | (BETA) Use this to update the royalty settings of your |
-| [useVote(contractAddress)](./react.usevote.md) | Hook for getting an instance of an Vote contract. This contract enables fully featured voting-based decentralized governance systems. |
-| [useWalletConnect()](./react.usewalletconnect.md) | Hook for connecting to a mobile wallet with Wallet Connect
-```javascript
-import { useWalletConnect } from "@thirdweb-dev/react"
-```
- |
+| [useVote(contractAddress, chain)](./react.usevote.md) | Hook for getting an instance of an Vote contract. This contract enables fully featured voting-based decentralized governance systems. |
+| [useWalletConnect()](./react.usewalletconnect.md) | |
| [useWinningBid(contract, listingId)](./react.usewinningbid.md) | (BETA) Use this to get a the winning bid for an auction listing from your marketplace contract. |
## Interfaces
| Interface | Description |
| --- | --- |
-| [DAppMetaData](./react.dappmetadata.md) | the metadata to pass to wallet connection dialog (may show up during the wallet-connection process) |
-| [MediaRendererProps](./react.mediarendererprops.md) | The props for the [MediaRenderer](./react.mediarenderer.md) component. |
-| [MediaType](./react.mediatype.md) | |
-| [SharedMediaProps](./react.sharedmediaprops.md) | |
-| [ThirdwebNftMediaProps](./react.thirdwebnftmediaprops.md) | The props for the [ThirdwebNftMedia](./react.thirdwebnftmedia.md) component. |
-| [ThirdwebProviderProps](./react.thirdwebproviderprops.md) | The possible props for the ThirdwebProvider. |
| [ThirdwebSDKProviderProps](./react.thirdwebsdkproviderprops.md) | |
## Variables
| Variable | Description |
| --- | --- |
-| [MediaRenderer](./react.mediarenderer.md) | This component can be used to render any media type, including image, audio, video, and html files. Its convenient for rendering NFT media files, as these can be a variety of different types. The component falls back to a external link if the media type is not supported.Props: [MediaRendererProps](./react.mediarendererprops.md) |
-| [ThirdwebNftMedia](./react.thirdwebnftmedia.md) | Render a nft based on the common metadata returned by the thirdweb sdk. |
-| [ThirdwebProvider](./react.thirdwebprovider.md) | The <ThirdwebProvider /> component lets you control what networks you want users to connect to, what types of wallets can connect to your app, and the settings for the \[Typescript SDK\](https://docs.thirdweb.com/typescript). |
-| [ThirdwebSDKProvider](./react.thirdwebsdkprovider.md) | (BETA) A barebones wrapper around the Thirdweb SDK.You can use this in order to be able to pass a provider & signer directly to the SDK. |
+| [ThirdwebProvider](./react.thirdwebprovider.md) | |
+| [ThirdwebSDKProvider](./react.thirdwebsdkprovider.md) | |
## Type Aliases
@@ -151,6 +115,7 @@ import { useWalletConnect } from "@thirdweb-dev/react"
| [ClaimTokenParams](./react.claimtokenparams.md) | |
| [ContractAddress](./react.contractaddress.md) | (BETA) A contract address. |
| [DropContract](./react.dropcontract.md) | (BETA) The possible DROP contract types. |
+| [ExposedQueryOptions](./react.exposedqueryoptions.md) | (BETA) Exposed options shared across all query hooks. |
| [MakeBidParams](./react.makebidparams.md) | |
| [MintNFTParams](./react.mintnftparams.md) | (BETA) The params for the [useMintNFT()](./react.usemintnft.md) hook mutation. |
| [MintNFTReturnType](./react.mintnftreturntype.md) | (BETA) The return type of the [useMintNFT()](./react.usemintnft.md) hook. |
diff --git a/docs/react.mediarenderer.md b/docs/react.mediarenderer.md
deleted file mode 100644
index 7369f99..0000000
--- a/docs/react.mediarenderer.md
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [MediaRenderer](./react.mediarenderer.md)
-
-## MediaRenderer variable
-
-This component can be used to render any media type, including image, audio, video, and html files. Its convenient for rendering NFT media files, as these can be a variety of different types. The component falls back to a external link if the media type is not supported.
-
-Props: [MediaRendererProps](./react.mediarendererprops.md)
-
-Signature:
-
-```typescript
-MediaRenderer: React.ForwardRefExoticComponent>
-```
-
-## Example
-
-We can take a video file hosted on IPFS and render it using this component as follows
-
-```jsx
-const Component = () => {
- return
-}
-```
-You can try switching out the `src` prop to different types of URLs and media types to explore the possibilities.
-
diff --git a/docs/react.mediarendererprops.alt.md b/docs/react.mediarendererprops.alt.md
deleted file mode 100644
index 7969570..0000000
--- a/docs/react.mediarendererprops.alt.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [MediaRendererProps](./react.mediarendererprops.md) > [alt](./react.mediarendererprops.alt.md)
-
-## MediaRendererProps.alt property
-
-The alt text for the media.
-
-Signature:
-
-```typescript
-alt?: string;
-```
diff --git a/docs/react.mediarendererprops.md b/docs/react.mediarendererprops.md
deleted file mode 100644
index 8d6da5a..0000000
--- a/docs/react.mediarendererprops.md
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [MediaRendererProps](./react.mediarendererprops.md)
-
-## MediaRendererProps interface
-
-The props for the [MediaRenderer](./react.mediarenderer.md) component.
-
-Signature:
-
-```typescript
-export interface MediaRendererProps extends SharedMediaProps
-```
-Extends: [SharedMediaProps](./react.sharedmediaprops.md)
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [alt?](./react.mediarendererprops.alt.md) | string | (Optional) The alt text for the media. |
-| [poster?](./react.mediarendererprops.poster.md) | string \| null | (Optional) The media poster image uri. (if applicable) |
-| [src?](./react.mediarendererprops.src.md) | string \| null | (Optional) The media source uri. |
-
diff --git a/docs/react.mediarendererprops.poster.md b/docs/react.mediarendererprops.poster.md
deleted file mode 100644
index ae618d3..0000000
--- a/docs/react.mediarendererprops.poster.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [MediaRendererProps](./react.mediarendererprops.md) > [poster](./react.mediarendererprops.poster.md)
-
-## MediaRendererProps.poster property
-
-The media poster image uri. (if applicable)
-
-Signature:
-
-```typescript
-poster?: string | null;
-```
diff --git a/docs/react.mediarendererprops.src.md b/docs/react.mediarendererprops.src.md
deleted file mode 100644
index 550572b..0000000
--- a/docs/react.mediarendererprops.src.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [MediaRendererProps](./react.mediarendererprops.md) > [src](./react.mediarendererprops.src.md)
-
-## MediaRendererProps.src property
-
-The media source uri.
-
-Signature:
-
-```typescript
-src?: string | null;
-```
diff --git a/docs/react.mediatype.md b/docs/react.mediatype.md
deleted file mode 100644
index 239d235..0000000
--- a/docs/react.mediatype.md
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [MediaType](./react.mediatype.md)
-
-## MediaType interface
-
-Signature:
-
-```typescript
-export interface MediaType
-```
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [mimeType?](./react.mediatype.mimetype.md) | string | (Optional) |
-| [url?](./react.mediatype.url.md) | string | (Optional) |
-
diff --git a/docs/react.mediatype.mimetype.md b/docs/react.mediatype.mimetype.md
deleted file mode 100644
index 82dfe18..0000000
--- a/docs/react.mediatype.mimetype.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [MediaType](./react.mediatype.md) > [mimeType](./react.mediatype.mimetype.md)
-
-## MediaType.mimeType property
-
-Signature:
-
-```typescript
-mimeType?: string;
-```
diff --git a/docs/react.mediatype.url.md b/docs/react.mediatype.url.md
deleted file mode 100644
index f956ceb..0000000
--- a/docs/react.mediatype.url.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [MediaType](./react.mediatype.md) > [url](./react.mediatype.url.md)
-
-## MediaType.url property
-
-Signature:
-
-```typescript
-url?: string;
-```
diff --git a/docs/react.nftcontract.md b/docs/react.nftcontract.md
index b3d0ca0..3b1f6fb 100644
--- a/docs/react.nftcontract.md
+++ b/docs/react.nftcontract.md
@@ -14,3 +14,40 @@ The possible NFT contract types.
```typescript
export declare type NFTContract = Erc721 | Erc1155;
```
+
+## Example 1
+
+
+```javascript
+const nftDrop = useNFTDrop();
+```
+
+## Example 2
+
+
+```javascript
+const editionDrop = useEditionDrop();
+```
+
+## Example 3
+
+
+```javascript
+const nftCollection = useNFTCollection();
+```
+
+## Example 4
+
+
+```javascript
+const edition = useEdition();
+```
+
+## Example 5
+
+
+```javascript
+const { contract } = useContract();
+const nftContract = contract?.nft;
+```
+
diff --git a/docs/react.sharedmediaprops.classname.md b/docs/react.sharedmediaprops.classname.md
deleted file mode 100644
index 11eaa53..0000000
--- a/docs/react.sharedmediaprops.classname.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [SharedMediaProps](./react.sharedmediaprops.md) > [className](./react.sharedmediaprops.classname.md)
-
-## SharedMediaProps.className property
-
-Signature:
-
-```typescript
-className?: string;
-```
diff --git a/docs/react.sharedmediaprops.controls.md b/docs/react.sharedmediaprops.controls.md
deleted file mode 100644
index 1131280..0000000
--- a/docs/react.sharedmediaprops.controls.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [SharedMediaProps](./react.sharedmediaprops.md) > [controls](./react.sharedmediaprops.controls.md)
-
-## SharedMediaProps.controls property
-
-Show the media controls (where applicable) (default false)
-
-Signature:
-
-```typescript
-controls?: HTMLVideoElement["controls"];
-```
diff --git a/docs/react.sharedmediaprops.height.md b/docs/react.sharedmediaprops.height.md
deleted file mode 100644
index 32b9eaf..0000000
--- a/docs/react.sharedmediaprops.height.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [SharedMediaProps](./react.sharedmediaprops.md) > [height](./react.sharedmediaprops.height.md)
-
-## SharedMediaProps.height property
-
-Signature:
-
-```typescript
-height?: HTMLIFrameElement["height"];
-```
diff --git a/docs/react.sharedmediaprops.md b/docs/react.sharedmediaprops.md
deleted file mode 100644
index 0a052f7..0000000
--- a/docs/react.sharedmediaprops.md
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [SharedMediaProps](./react.sharedmediaprops.md)
-
-## SharedMediaProps interface
-
-Signature:
-
-```typescript
-export interface SharedMediaProps
-```
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [className?](./react.sharedmediaprops.classname.md) | string | (Optional) |
-| [controls?](./react.sharedmediaprops.controls.md) | HTMLVideoElement\["controls"\] | (Optional) Show the media controls (where applicable) (default false) |
-| [height?](./react.sharedmediaprops.height.md) | HTMLIFrameElement\["height"\] | (Optional) |
-| [requireInteraction?](./react.sharedmediaprops.requireinteraction.md) | boolean | (Optional) Require user interaction to play the media. (default false) |
-| [style?](./react.sharedmediaprops.style.md) | React.CSSProperties | (Optional) |
-| [width?](./react.sharedmediaprops.width.md) | HTMLIFrameElement\["width"\] | (Optional) |
-
diff --git a/docs/react.sharedmediaprops.requireinteraction.md b/docs/react.sharedmediaprops.requireinteraction.md
deleted file mode 100644
index 2e66b93..0000000
--- a/docs/react.sharedmediaprops.requireinteraction.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [SharedMediaProps](./react.sharedmediaprops.md) > [requireInteraction](./react.sharedmediaprops.requireinteraction.md)
-
-## SharedMediaProps.requireInteraction property
-
-Require user interaction to play the media. (default false)
-
-Signature:
-
-```typescript
-requireInteraction?: boolean;
-```
diff --git a/docs/react.sharedmediaprops.style.md b/docs/react.sharedmediaprops.style.md
deleted file mode 100644
index 9f030be..0000000
--- a/docs/react.sharedmediaprops.style.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [SharedMediaProps](./react.sharedmediaprops.md) > [style](./react.sharedmediaprops.style.md)
-
-## SharedMediaProps.style property
-
-Signature:
-
-```typescript
-style?: React.CSSProperties;
-```
diff --git a/docs/react.sharedmediaprops.width.md b/docs/react.sharedmediaprops.width.md
deleted file mode 100644
index 5de51a3..0000000
--- a/docs/react.sharedmediaprops.width.md
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [SharedMediaProps](./react.sharedmediaprops.md) > [width](./react.sharedmediaprops.width.md)
-
-## SharedMediaProps.width property
-
-Signature:
-
-```typescript
-width?: HTMLIFrameElement["width"];
-```
diff --git a/docs/react.thirdwebnftmedia.md b/docs/react.thirdwebnftmedia.md
deleted file mode 100644
index 1c70e3c..0000000
--- a/docs/react.thirdwebnftmedia.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebNftMedia](./react.thirdwebnftmedia.md)
-
-## ThirdwebNftMedia variable
-
-Render a nft based on the common metadata returned by the thirdweb sdk.
-
-Signature:
-
-```typescript
-ThirdwebNftMedia: React.ForwardRefExoticComponent>
-```
diff --git a/docs/react.thirdwebnftmediaprops.md b/docs/react.thirdwebnftmediaprops.md
deleted file mode 100644
index 0f560d0..0000000
--- a/docs/react.thirdwebnftmediaprops.md
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebNftMediaProps](./react.thirdwebnftmediaprops.md)
-
-## ThirdwebNftMediaProps interface
-
-The props for the [ThirdwebNftMedia](./react.thirdwebnftmedia.md) component.
-
-Signature:
-
-```typescript
-export interface ThirdwebNftMediaProps extends SharedMediaProps
-```
-Extends: [SharedMediaProps](./react.sharedmediaprops.md)
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [metadata](./react.thirdwebnftmediaprops.metadata.md) | NFTMetadata | The NFT metadata of the NFT returned by the thirdweb sdk. |
-
diff --git a/docs/react.thirdwebnftmediaprops.metadata.md b/docs/react.thirdwebnftmediaprops.metadata.md
deleted file mode 100644
index d2a6f4e..0000000
--- a/docs/react.thirdwebnftmediaprops.metadata.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebNftMediaProps](./react.thirdwebnftmediaprops.md) > [metadata](./react.thirdwebnftmediaprops.metadata.md)
-
-## ThirdwebNftMediaProps.metadata property
-
-The NFT metadata of the NFT returned by the thirdweb sdk.
-
-Signature:
-
-```typescript
-metadata: NFTMetadata;
-```
diff --git a/docs/react.thirdwebprovider.md b/docs/react.thirdwebprovider.md
index 82fc01a..5ddb1a0 100644
--- a/docs/react.thirdwebprovider.md
+++ b/docs/react.thirdwebprovider.md
@@ -4,27 +4,8 @@
## ThirdwebProvider variable
-The `` component lets you control what networks you want users to connect to, what types of wallets can connect to your app, and the settings for the \[Typescript SDK\](https://docs.thirdweb.com/typescript).
-
Signature:
```typescript
-ThirdwebProvider: ({ sdkOptions, chainRpc, supportedChains, walletConnectors, dAppMeta, desiredChainId, storageInterface, queryClient, autoConnect, children, }: React.PropsWithChildren>) => JSX.Element
+ThirdwebProvider: React.FC>
```
-
-## Example
-
-You can wrap your application with the provider as follows:
-
-```jsx title="App.jsx"
-import { ThirdwebProvider, ChainId } from "@thirdweb-dev/react";
-
-const App = () => {
- return (
-
-
-
- );
-};
-```
-
diff --git a/docs/react.thirdwebproviderprops.autoconnect.md b/docs/react.thirdwebproviderprops.autoconnect.md
deleted file mode 100644
index f809882..0000000
--- a/docs/react.thirdwebproviderprops.autoconnect.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebProviderProps](./react.thirdwebproviderprops.md) > [autoConnect](./react.thirdwebproviderprops.autoconnect.md)
-
-## ThirdwebProviderProps.autoConnect property
-
-Whether or not to attempt auto-connect to a wallet.
-
-Signature:
-
-```typescript
-autoConnect?: boolean;
-```
diff --git a/docs/react.thirdwebproviderprops.chainrpc.md b/docs/react.thirdwebproviderprops.chainrpc.md
deleted file mode 100644
index 7635f5d..0000000
--- a/docs/react.thirdwebproviderprops.chainrpc.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebProviderProps](./react.thirdwebproviderprops.md) > [chainRpc](./react.thirdwebproviderprops.chainrpc.md)
-
-## ThirdwebProviderProps.chainRpc property
-
-A partial map of chainIds to rpc urls to use for certain chains If not provided, will default to the rpcUrls of the chain objects for the supported chains
-
-Signature:
-
-```typescript
-chainRpc?: Partial>;
-```
diff --git a/docs/react.thirdwebproviderprops.dappmeta.md b/docs/react.thirdwebproviderprops.dappmeta.md
deleted file mode 100644
index 98a8f75..0000000
--- a/docs/react.thirdwebproviderprops.dappmeta.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebProviderProps](./react.thirdwebproviderprops.md) > [dAppMeta](./react.thirdwebproviderprops.dappmeta.md)
-
-## ThirdwebProviderProps.dAppMeta property
-
-Metadata to pass to wallet connect and walletlink wallet connect. (Used to show \*which\* dApp is being connected to in mobile wallets that support it) Defaults to just the name being passed as `thirdweb powered dApp`.
-
-Signature:
-
-```typescript
-dAppMeta?: DAppMetaData;
-```
diff --git a/docs/react.thirdwebproviderprops.desiredchainid.md b/docs/react.thirdwebproviderprops.desiredchainid.md
deleted file mode 100644
index e8fc999..0000000
--- a/docs/react.thirdwebproviderprops.desiredchainid.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebProviderProps](./react.thirdwebproviderprops.md) > [desiredChainId](./react.thirdwebproviderprops.desiredchainid.md)
-
-## ThirdwebProviderProps.desiredChainId property
-
-The chainId that your dApp is running on. While this \*can\* be `undefined` it is required to be passed. Passing `undefined` will cause no SDK to be instantiated. When passing a chainId, it \*\*must\*\* be part of the `supportedChains` array.
-
-Signature:
-
-```typescript
-desiredChainId: TSupportedChain extends Chain ? TSupportedChain["id"] : TSupportedChain | undefined;
-```
diff --git a/docs/react.thirdwebproviderprops.md b/docs/react.thirdwebproviderprops.md
deleted file mode 100644
index c6d8692..0000000
--- a/docs/react.thirdwebproviderprops.md
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebProviderProps](./react.thirdwebproviderprops.md)
-
-## ThirdwebProviderProps interface
-
-The possible props for the ThirdwebProvider.
-
-Signature:
-
-```typescript
-export interface ThirdwebProviderProps
-```
-
-## Properties
-
-| Property | Type | Description |
-| --- | --- | --- |
-| [autoConnect?](./react.thirdwebproviderprops.autoconnect.md) | boolean | (Optional) Whether or not to attempt auto-connect to a wallet. |
-| [chainRpc?](./react.thirdwebproviderprops.chainrpc.md) | Partial<ChainRpc<TSupportedChain>> | (Optional) A partial map of chainIds to rpc urls to use for certain chains If not provided, will default to the rpcUrls of the chain objects for the supported chains |
-| [dAppMeta?](./react.thirdwebproviderprops.dappmeta.md) | [DAppMetaData](./react.dappmetadata.md) | (Optional) Metadata to pass to wallet connect and walletlink wallet connect. (Used to show \*which\* dApp is being connected to in mobile wallets that support it) Defaults to just the name being passed as thirdweb powered dApp. |
-| [desiredChainId](./react.thirdwebproviderprops.desiredchainid.md) | TSupportedChain extends Chain ? TSupportedChain\["id"\] : TSupportedChain \| undefined | The chainId that your dApp is running on. While this \*can\* be undefined it is required to be passed. Passing undefined will cause no SDK to be instantiated. When passing a chainId, it \*\*must\*\* be part of the supportedChains array. |
-| [queryClient?](./react.thirdwebproviderprops.queryclient.md) | QueryClient | (BETA)(Optional) The react-query client to use. (Defaults to a default client.) |
-| [sdkOptions?](./react.thirdwebproviderprops.sdkoptions.md) | SDKOptions | (Optional) The to pass to the thirdweb SDK comes with sensible defaults |
-| [storageInterface?](./react.thirdwebproviderprops.storageinterface.md) | IStorage | (Optional) The storage interface to use with the sdk. |
-| [supportedChains?](./react.thirdwebproviderprops.supportedchains.md) | TSupportedChain\[\] | (Optional) An array of chainIds or objects that the dApp supports If not provided, all chains supported by the SDK will be supported by default |
-| [walletConnectors?](./react.thirdwebproviderprops.walletconnectors.md) | WalletConnector\[\] | (Optional) An array of connector types (strings) or wallet connector objects that the dApp supports If not provided, will default to metamask (injected), wallet connect and walletlink (coinbase wallet) with sensible defaults |
-
diff --git a/docs/react.thirdwebproviderprops.sdkoptions.md b/docs/react.thirdwebproviderprops.sdkoptions.md
deleted file mode 100644
index bfc94d8..0000000
--- a/docs/react.thirdwebproviderprops.sdkoptions.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebProviderProps](./react.thirdwebproviderprops.md) > [sdkOptions](./react.thirdwebproviderprops.sdkoptions.md)
-
-## ThirdwebProviderProps.sdkOptions property
-
-The to pass to the thirdweb SDK comes with sensible defaults
-
-Signature:
-
-```typescript
-sdkOptions?: SDKOptions;
-```
diff --git a/docs/react.thirdwebproviderprops.storageinterface.md b/docs/react.thirdwebproviderprops.storageinterface.md
deleted file mode 100644
index 3e24cae..0000000
--- a/docs/react.thirdwebproviderprops.storageinterface.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebProviderProps](./react.thirdwebproviderprops.md) > [storageInterface](./react.thirdwebproviderprops.storageinterface.md)
-
-## ThirdwebProviderProps.storageInterface property
-
-The storage interface to use with the sdk.
-
-Signature:
-
-```typescript
-storageInterface?: IStorage;
-```
diff --git a/docs/react.thirdwebproviderprops.supportedchains.md b/docs/react.thirdwebproviderprops.supportedchains.md
deleted file mode 100644
index 99253b9..0000000
--- a/docs/react.thirdwebproviderprops.supportedchains.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebProviderProps](./react.thirdwebproviderprops.md) > [supportedChains](./react.thirdwebproviderprops.supportedchains.md)
-
-## ThirdwebProviderProps.supportedChains property
-
-An array of chainIds or objects that the dApp supports If not provided, all chains supported by the SDK will be supported by default
-
-Signature:
-
-```typescript
-supportedChains?: TSupportedChain[];
-```
diff --git a/docs/react.thirdwebproviderprops.walletconnectors.md b/docs/react.thirdwebproviderprops.walletconnectors.md
deleted file mode 100644
index a77dfc4..0000000
--- a/docs/react.thirdwebproviderprops.walletconnectors.md
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebProviderProps](./react.thirdwebproviderprops.md) > [walletConnectors](./react.thirdwebproviderprops.walletconnectors.md)
-
-## ThirdwebProviderProps.walletConnectors property
-
-An array of connector types (strings) or wallet connector objects that the dApp supports If not provided, will default to metamask (injected), wallet connect and walletlink (coinbase wallet) with sensible defaults
-
-Signature:
-
-```typescript
-walletConnectors?: WalletConnector[];
-```
diff --git a/docs/react.thirdwebsdkprovider.md b/docs/react.thirdwebsdkprovider.md
index db16f85..64d80e4 100644
--- a/docs/react.thirdwebsdkprovider.md
+++ b/docs/react.thirdwebsdkprovider.md
@@ -4,20 +4,8 @@
## ThirdwebSDKProvider variable
-> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
->
-
-A barebones wrapper around the Thirdweb SDK.
-
-You can use this in order to be able to pass a provider & signer directly to the SDK.
-
Signature:
```typescript
ThirdwebSDKProvider: React.FC>
```
-
-## Remarks
-
-Utilizing this provider will mean hooks for wallet management are not available, if you need those please use the [ThirdwebProvider](./react.thirdwebprovider.md) instead.
-
diff --git a/docs/react.thirdwebsdkproviderprops.appmetadata.md b/docs/react.thirdwebsdkproviderprops.appmetadata.md
new file mode 100644
index 0000000..0f4f05b
--- /dev/null
+++ b/docs/react.thirdwebsdkproviderprops.appmetadata.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebSDKProviderProps](./react.thirdwebsdkproviderprops.md) > [appMetadata](./react.thirdwebsdkproviderprops.appmetadata.md)
+
+## ThirdwebSDKProviderProps.appMetadata property
+
+Signature:
+
+```typescript
+readonly appMetadata?: AppMetadata;
+```
diff --git a/docs/react.thirdwebsdkproviderprops.chainid.md b/docs/react.thirdwebsdkproviderprops.chainid.md
new file mode 100644
index 0000000..eb0a911
--- /dev/null
+++ b/docs/react.thirdwebsdkproviderprops.chainid.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebSDKProviderProps](./react.thirdwebsdkproviderprops.md) > [chainId](./react.thirdwebsdkproviderprops.chainid.md)
+
+## ThirdwebSDKProviderProps.chainId property
+
+Signature:
+
+```typescript
+readonly chainId: RequiredParam;
+```
diff --git a/docs/react.thirdwebsdkproviderprops.chainidtorpcurlmap.md b/docs/react.thirdwebsdkproviderprops.chainidtorpcurlmap.md
new file mode 100644
index 0000000..6cfc919
--- /dev/null
+++ b/docs/react.thirdwebsdkproviderprops.chainidtorpcurlmap.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebSDKProviderProps](./react.thirdwebsdkproviderprops.md) > [chainIdToRPCUrlMap](./react.thirdwebsdkproviderprops.chainidtorpcurlmap.md)
+
+## ThirdwebSDKProviderProps.chainIdToRPCUrlMap property
+
+Signature:
+
+```typescript
+readonly chainIdToRPCUrlMap?: Partial;
+```
diff --git a/docs/react.thirdwebsdkproviderprops.md b/docs/react.thirdwebsdkproviderprops.md
index 0a114e6..b656456 100644
--- a/docs/react.thirdwebsdkproviderprops.md
+++ b/docs/react.thirdwebsdkproviderprops.md
@@ -7,14 +7,18 @@
Signature:
```typescript
-export interface ThirdwebSDKProviderProps extends Pick
+export interface ThirdwebSDKProviderProps
```
-Extends: Pick<[ThirdwebProviderProps](./react.thirdwebproviderprops.md)
## Properties
| Property | Type | Description |
| --- | --- | --- |
-| [provider](./react.thirdwebsdkproviderprops.provider.md) | ChainOrRpc \| SignerOrProvider | |
+| [appMetadata?](./react.thirdwebsdkproviderprops.appmetadata.md) | AppMetadata | (Optional) |
+| [chainId](./react.thirdwebsdkproviderprops.chainid.md) | [RequiredParam](./react.requiredparam.md)<ChainIdOrName> | |
+| [chainIdToRPCUrlMap?](./react.thirdwebsdkproviderprops.chainidtorpcurlmap.md) | Partial<ChainIDToRpcUrlMap> | (Optional) |
+| [options?](./react.thirdwebsdkproviderprops.options.md) | SDKOptions | (Optional) |
+| [queryClient?](./react.thirdwebsdkproviderprops.queryclient.md) | QueryClient | (Optional) |
| [signer?](./react.thirdwebsdkproviderprops.signer.md) | Signer | (Optional) |
+| [storageInterface?](./react.thirdwebsdkproviderprops.storageinterface.md) | IStorage | (Optional) |
diff --git a/docs/react.thirdwebsdkproviderprops.provider.md b/docs/react.thirdwebsdkproviderprops.options.md
similarity index 61%
rename from docs/react.thirdwebsdkproviderprops.provider.md
rename to docs/react.thirdwebsdkproviderprops.options.md
index ede8204..d75b0f4 100644
--- a/docs/react.thirdwebsdkproviderprops.provider.md
+++ b/docs/react.thirdwebsdkproviderprops.options.md
@@ -1,11 +1,11 @@
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebSDKProviderProps](./react.thirdwebsdkproviderprops.md) > [provider](./react.thirdwebsdkproviderprops.provider.md)
+[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebSDKProviderProps](./react.thirdwebsdkproviderprops.md) > [options](./react.thirdwebsdkproviderprops.options.md)
-## ThirdwebSDKProviderProps.provider property
+## ThirdwebSDKProviderProps.options property
Signature:
```typescript
-provider: ChainOrRpc | SignerOrProvider;
+readonly options?: SDKOptions;
```
diff --git a/docs/react.thirdwebsdkproviderprops.queryclient.md b/docs/react.thirdwebsdkproviderprops.queryclient.md
new file mode 100644
index 0000000..8146a48
--- /dev/null
+++ b/docs/react.thirdwebsdkproviderprops.queryclient.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebSDKProviderProps](./react.thirdwebsdkproviderprops.md) > [queryClient](./react.thirdwebsdkproviderprops.queryclient.md)
+
+## ThirdwebSDKProviderProps.queryClient property
+
+Signature:
+
+```typescript
+queryClient?: QueryClient;
+```
diff --git a/docs/react.thirdwebsdkproviderprops.signer.md b/docs/react.thirdwebsdkproviderprops.signer.md
index 7a023d8..556e930 100644
--- a/docs/react.thirdwebsdkproviderprops.signer.md
+++ b/docs/react.thirdwebsdkproviderprops.signer.md
@@ -7,5 +7,5 @@
Signature:
```typescript
-signer?: Signer;
+readonly signer?: Signer;
```
diff --git a/docs/react.thirdwebsdkproviderprops.storageinterface.md b/docs/react.thirdwebsdkproviderprops.storageinterface.md
new file mode 100644
index 0000000..128af64
--- /dev/null
+++ b/docs/react.thirdwebsdkproviderprops.storageinterface.md
@@ -0,0 +1,11 @@
+
+
+[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [ThirdwebSDKProviderProps](./react.thirdwebsdkproviderprops.md) > [storageInterface](./react.thirdwebsdkproviderprops.storageinterface.md)
+
+## ThirdwebSDKProviderProps.storageInterface property
+
+Signature:
+
+```typescript
+readonly storageInterface?: IStorage;
+```
diff --git a/docs/react.useactiveclaimcondition.md b/docs/react.useactiveclaimcondition.md
index bab6b61..77905a8 100644
--- a/docs/react.useactiveclaimcondition.md
+++ b/docs/react.useactiveclaimcondition.md
@@ -17,11 +17,11 @@ export declare function useActiveClaimConditionReturns:
-import("react-query").UseQueryResult<{ snapshot?: { address: string; maxClaimable: string; }\[\] \| undefined; quantityLimitPerTransaction: string; startTime: Date; price: import("ethers").BigNumber; currencyAddress: string; maxQuantity: string; waitInSeconds: import("ethers").BigNumber; merkleRootHash: string \| number\[\]; availableSupply: string; currentMintSupply: string; currencyMetadata: { symbol: string; value: import("ethers").BigNumber; name: string; decimals: number; displayValue: string; }; }, unknown>
+import("react-query").UseQueryResult<{ snapshot?: { address: string; maxClaimable: string; }\[\] \| undefined; startTime: Date; currencyAddress: string; price: import("ethers").BigNumber; maxQuantity: string; quantityLimitPerTransaction: string; waitInSeconds: import("ethers").BigNumber; merkleRootHash: string \| number\[\]; availableSupply: string; currentMintSupply: string; currencyMetadata: { symbol: string; value: import("ethers").BigNumber; name: string; decimals: number; displayValue: string; }; }, unknown>
a response object with the currently active claim condition
diff --git a/docs/react.useaddress.md b/docs/react.useaddress.md
index 78ebf4d..2b96488 100644
--- a/docs/react.useaddress.md
+++ b/docs/react.useaddress.md
@@ -7,7 +7,7 @@
Hook for accessing the address of the connected wallet
```javascript
-import { useAddress } from "@thirdweb-dev/react"
+import { useAddress } from "@thirdweb-dev/react";
```
Signature:
@@ -24,10 +24,10 @@ string \| undefined
To get the address of the connected wallet, you can use the hook as follows:
```javascript
-import { useAddress } from "@thirdweb-dev/react"
+import { useAddress } from "@thirdweb-dev/react";
const App = () => {
- const address = useAddress()
+ const address = useAddress();
return
{address}
}
diff --git a/docs/react.useallrolemembers.md b/docs/react.useallrolemembers.md
index 1c67b1b..118fd05 100644
--- a/docs/react.useallrolemembers.md
+++ b/docs/react.useallrolemembers.md
@@ -12,7 +12,7 @@ Use this to get the roles of a
Signature:
```typescript
-export declare function useAllRoleMembers(contract: RequiredParam): import("react-query").UseQueryResult, string[]>>, unknown>;
+export declare function useAllRoleMembers(contract: RequiredParam, queryOptions?: ExposedQueryOptions): import("react-query").UseQueryResult, string[]>>, unknown>;
```
## Parameters
@@ -20,6 +20,7 @@ export declare function useAllRoleMembers(c
| Parameter | Type | Description |
| --- | --- | --- |
| contract | [RequiredParam](./react.requiredparam.md)<TContract> | an instance of a |
+| queryOptions | [ExposedQueryOptions](./react.exposedqueryoptions.md) | (Optional) |
Returns:
diff --git a/docs/react.usebalance.md b/docs/react.usebalance.md
deleted file mode 100644
index 3f1f4b0..0000000
--- a/docs/react.usebalance.md
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [useBalance](./react.usebalance.md)
-
-## useBalance() function
-
-> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
->
-
-A hook to get the native or (optional) ERC20 token balance of the connected wallet.
-
-Signature:
-
-```typescript
-export declare function useBalance(tokenAddress?: ContractAddress): import("react-query").UseQueryResult<{
- symbol: string;
- value: import("ethers").BigNumber;
- name: string;
- decimals: number;
- displayValue: string;
-} | undefined, unknown>;
-```
-
-## Parameters
-
-| Parameter | Type | Description |
-| --- | --- | --- |
-| tokenAddress | [ContractAddress](./react.contractaddress.md) | (Optional) the address of the token contract, if empty will use the chain's native token |
-
-Returns:
-
-import("react-query").UseQueryResult<{ symbol: string; value: import("ethers").BigNumber; name: string; decimals: number; displayValue: string; } \| undefined, unknown>
-
-the balance of the connected wallet (native or ERC20)
-
diff --git a/docs/react.usechainid.md b/docs/react.usechainid.md
index 603bff2..cfd2a52 100644
--- a/docs/react.usechainid.md
+++ b/docs/react.usechainid.md
@@ -7,7 +7,7 @@
Hook for accessing the chain ID of the network the current wallet is connected to
```javascript
-import { useChainId } from "@thirdweb-dev/react"
+import { useChainId } from "@thirdweb-dev/react";
```
Signature:
@@ -24,10 +24,10 @@ number \| undefined
You can get the chain ID of the connected wallet by using the hook as follows:
```javascript
-import { useChainId } from "@thirdweb-dev/react"
+import { useChainId } from "@thirdweb-dev/react";
const App = () => {
- const chainId = useChainId()
+ const chainId = useChainId();
return
{chainId}
}
diff --git a/docs/react.useclaimconditions.md b/docs/react.useclaimconditions.md
index 523ba28..896c9ea 100644
--- a/docs/react.useclaimconditions.md
+++ b/docs/react.useclaimconditions.md
@@ -17,11 +17,11 @@ export declare function useClaimConditionsReturns:
-import("react-query").UseQueryResult<{ snapshot?: { address: string; maxClaimable: string; }\[\] \| undefined; quantityLimitPerTransaction: string; startTime: Date; price: import("ethers").BigNumber; currencyAddress: string; maxQuantity: string; waitInSeconds: import("ethers").BigNumber; merkleRootHash: string \| number\[\]; availableSupply: string; currentMintSupply: string; currencyMetadata: { symbol: string; value: import("ethers").BigNumber; name: string; decimals: number; displayValue: string; }; }\[\], unknown>
+import("react-query").UseQueryResult<{ snapshot?: { address: string; maxClaimable: string; }\[\] \| undefined; startTime: Date; currencyAddress: string; price: import("ethers").BigNumber; maxQuantity: string; quantityLimitPerTransaction: string; waitInSeconds: import("ethers").BigNumber; merkleRootHash: string \| number\[\]; availableSupply: string; currentMintSupply: string; currencyMetadata: { symbol: string; value: import("ethers").BigNumber; name: string; decimals: number; displayValue: string; }; }\[\], unknown>
a response object with the list of claim conditions
diff --git a/docs/react.useclaimednfts.md b/docs/react.useclaimednfts.md
index 43e9eda..df6a3d8 100644
--- a/docs/react.useclaimednfts.md
+++ b/docs/react.useclaimednfts.md
@@ -12,7 +12,7 @@ Use this to get a list of \*claimed\* (minted) NFT tokens of your ERC721 Drop co
Signature:
```typescript
-export declare function useClaimedNFTs(contract: RequiredParam, queryParams?: QueryAllParams): import("react-query").UseQueryResult[], unknown>;
+export declare function useClaimedNFTs(contract: RequiredParam, queryParams?: QueryAllParams, queryOptions?: ExposedQueryOptions): import("react-query").UseQueryResult[], unknown>;
```
## Parameters
@@ -21,10 +21,11 @@ export declare function useClaimedNFTs(contract: RequiredParam, qu
| --- | --- | --- |
| contract | [RequiredParam](./react.requiredparam.md)<[DropContract](./react.dropcontract.md)> | an instance of a [DropContract](./react.dropcontract.md) |
| queryParams | QueryAllParams | (Optional) query params to pass to the query for the sake of pagination |
+| queryOptions | [ExposedQueryOptions](./react.exposedqueryoptions.md) | (Optional) |
Returns:
-import("react-query").UseQueryResult<import("../../types").[NFT](./react.nft.md)<[DropContract](./react.dropcontract.md)>\[\], unknown>
+import("react-query").UseQueryResult<import("../../types/types").[NFT](./react.nft.md)<[DropContract](./react.dropcontract.md)>\[\], unknown>
a response object that includes an array of NFTs that are claimed
diff --git a/docs/react.useclaimednftsupply.md b/docs/react.useclaimednftsupply.md
index e0b9d6d..8046318 100644
--- a/docs/react.useclaimednftsupply.md
+++ b/docs/react.useclaimednftsupply.md
@@ -7,7 +7,7 @@
Signature:
```typescript
-export declare function useClaimedNFTSupply(contract: RequiredParam): import("react-query").UseQueryResult;
+export declare function useClaimedNFTSupply(contract: RequiredParam, queryOptions?: ExposedQueryOptions): import("react-query").UseQueryResult;
```
## Parameters
@@ -15,10 +15,11 @@ export declare function useClaimedNFTSupply(contract: RequiredParam<[DropContract](./react.dropcontract.md)> | an instance of a [DropContract](./react.dropcontract.md) |
+| queryOptions | [ExposedQueryOptions](./react.exposedqueryoptions.md) | (Optional) |
Returns:
-import("react-query").UseQueryResult<import("ethers").BigNumber, unknown>
+import("react-query").UseQueryResult<any, unknown>
a response object that includes the number of NFTs that are claimed
diff --git a/docs/react.usecoinbasewallet.md b/docs/react.usecoinbasewallet.md
index 4b58ec2..9820a08 100644
--- a/docs/react.usecoinbasewallet.md
+++ b/docs/react.usecoinbasewallet.md
@@ -4,40 +4,16 @@
## useCoinbaseWallet() function
-Hook for connecting to a Coinbase wallet.
-
-```javascript
-import { useCoinbaseWallet } from "@thirdweb-dev/react"
-```
-
Signature:
```typescript
-export declare function useCoinbaseWallet(): () => Promise<{
- data?: import("wagmi-core").ConnectorData | undefined;
- error?: Error | undefined;
-}>;
+export declare function useCoinbaseWallet(): {
+ error: Error | null;
+ isConnecting: boolean;
+ connect: (chainId?: SUPPORTED_CHAIN_ID) => Promise;
+};
```
Returns:
-() => Promise<{ data?: import("wagmi-core").ConnectorData<any> \| undefined; error?: Error \| undefined; }>
-
-## Example
-
-We can allow users to connect with Coinbase Wallet as follows:
-
-```javascript
-import { useCoinbaseWallet } from "@thirdweb-dev/react"
-
-const App = () => {
- const connectWithCoinbaseWallet = useCoinbaseWallet()
-
- return (
-
- )
-}
-```
-Upon clicking this button, users will be prompted with a popup asking them scan a QR code with their Coinbase Wallet. Once they scan the QR code, their wallet will then be connected to the page as expected.
+{ error: Error \| null; isConnecting: boolean; connect: (chainId?: SUPPORTED\_CHAIN\_ID) => Promise<void>; }
diff --git a/docs/react.usecontract.md b/docs/react.usecontract.md
index 53b0208..40aed66 100644
--- a/docs/react.usecontract.md
+++ b/docs/react.usecontract.md
@@ -12,8 +12,8 @@ Use this resolve a contract address to a thirdweb (built-in / custom) contract i
Signature:
```typescript
-export declare function useContract(contractAddress: RequiredParam): {
- contract: null;
+export declare function useContract(contractAddress: RequiredParam, chain?: ChainIdOrName, queryOptions?: ExposedQueryOptions): {
+ contract: SmartContract | undefined;
data: undefined;
error: unknown;
isError: true;
@@ -34,17 +34,11 @@ export declare function useContract(contractAddress: RequiredParam(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters) | undefined) => Promise>;
+ refetch: (options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters) | undefined) => Promise>;
remove: () => void;
fetchStatus: import("react-query").FetchStatus;
} | {
- contract: null;
+ contract: SmartContract | undefined;
data: undefined;
error: null;
isError: false;
@@ -65,24 +59,12 @@ export declare function useContract(contractAddress: RequiredParam(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters) | undefined) => Promise>;
+ refetch: (options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters) | undefined) => Promise>;
remove: () => void;
fetchStatus: import("react-query").FetchStatus;
} | {
- contract: SmartContract | null;
- data: {
- contractType: "split" | "nft-drop" | "signature-drop" | "nft-collection" | "edition-drop" | "edition" | "token-drop" | "token" | "vote" | "marketplace" | "pack" | "multiwrap" | undefined;
- publishMetadata: null;
- } | {
- contractType: "custom";
- publishMetadata: PublishedMetadata | undefined;
- } | undefined;
+ contract: SmartContract | undefined;
+ data: any;
error: unknown;
isError: true;
isLoading: false;
@@ -102,24 +84,12 @@ export declare function useContract(contractAddress: RequiredParam(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters) | undefined) => Promise>;
+ refetch: (options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters) | undefined) => Promise>;
remove: () => void;
fetchStatus: import("react-query").FetchStatus;
} | {
- contract: SmartContract | null;
- data: {
- contractType: "split" | "nft-drop" | "signature-drop" | "nft-collection" | "edition-drop" | "edition" | "token-drop" | "token" | "vote" | "marketplace" | "pack" | "multiwrap" | undefined;
- publishMetadata: null;
- } | {
- contractType: "custom";
- publishMetadata: PublishedMetadata | undefined;
- } | undefined;
+ contract: SmartContract | undefined;
+ data: any;
error: null;
isError: false;
isLoading: false;
@@ -139,13 +109,7 @@ export declare function useContract(contractAddress: RequiredParam(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters) | undefined) => Promise>;
+ refetch: (options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters) | undefined) => Promise>;
remove: () => void;
fetchStatus: import("react-query").FetchStatus;
};
@@ -156,10 +120,12 @@ export declare function useContract(contractAddress: RequiredParam<[ContractAddress](./react.contractaddress.md)> | the address of the deployed contract |
+| chain | ChainIdOrName | (Optional) |
+| queryOptions | [ExposedQueryOptions](./react.exposedqueryoptions.md) | (Optional) |
Returns:
-{ contract: null; data: undefined; error: unknown; isError: true; isLoading: false; isLoadingError: true; isRefetchError: false; isSuccess: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isPaused: boolean; isPlaceholderData: boolean; isPreviousData: boolean; isRefetching: boolean; isStale: boolean; refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) \| undefined) => Promise<import("react-query").QueryObserverResult<{ contractType: "split" \| "nft-drop" \| "signature-drop" \| "nft-collection" \| "edition-drop" \| "edition" \| "token-drop" \| "token" \| "vote" \| "marketplace" \| "pack" \| "multiwrap" \| undefined; publishMetadata: null; } \| { contractType: "custom"; publishMetadata: PublishedMetadata \| undefined; } \| undefined, unknown>>; remove: () => void; fetchStatus: import("react-query").FetchStatus; } \| { contract: null; data: undefined; error: null; isError: false; isLoading: true; isLoadingError: false; isRefetchError: false; isSuccess: false; status: "loading"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isPaused: boolean; isPlaceholderData: boolean; isPreviousData: boolean; isRefetching: boolean; isStale: boolean; refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) \| undefined) => Promise<import("react-query").QueryObserverResult<{ contractType: "split" \| "nft-drop" \| "signature-drop" \| "nft-collection" \| "edition-drop" \| "edition" \| "token-drop" \| "token" \| "vote" \| "marketplace" \| "pack" \| "multiwrap" \| undefined; publishMetadata: null; } \| { contractType: "custom"; publishMetadata: PublishedMetadata \| undefined; } \| undefined, unknown>>; remove: () => void; fetchStatus: import("react-query").FetchStatus; } \| { contract: SmartContract<any> \| null; data: { contractType: "split" \| "nft-drop" \| "signature-drop" \| "nft-collection" \| "edition-drop" \| "edition" \| "token-drop" \| "token" \| "vote" \| "marketplace" \| "pack" \| "multiwrap" \| undefined; publishMetadata: null; } \| { contractType: "custom"; publishMetadata: PublishedMetadata \| undefined; } \| undefined; error: unknown; isError: true; isLoading: false; isLoadingError: false; isRefetchError: true; isSuccess: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isPaused: boolean; isPlaceholderData: boolean; isPreviousData: boolean; isRefetching: boolean; isStale: boolean; refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) \| undefined) => Promise<import("react-query").QueryObserverResult<{ contractType: "split" \| "nft-drop" \| "signature-drop" \| "nft-collection" \| "edition-drop" \| "edition" \| "token-drop" \| "token" \| "vote" \| "marketplace" \| "pack" \| "multiwrap" \| undefined; publishMetadata: null; } \| { contractType: "custom"; publishMetadata: PublishedMetadata \| undefined; } \| undefined, unknown>>; remove: () => void; fetchStatus: import("react-query").FetchStatus; } \| { contract: SmartContract<any> \| null; data: { contractType: "split" \| "nft-drop" \| "signature-drop" \| "nft-collection" \| "edition-drop" \| "edition" \| "token-drop" \| "token" \| "vote" \| "marketplace" \| "pack" \| "multiwrap" \| undefined; publishMetadata: null; } \| { contractType: "custom"; publishMetadata: PublishedMetadata \| undefined; } \| undefined; error: null; isError: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isPaused: boolean; isPlaceholderData: boolean; isPreviousData: boolean; isRefetching: boolean; isStale: boolean; refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) \| undefined) => Promise<import("react-query").QueryObserverResult<{ contractType: "split" \| "nft-drop" \| "signature-drop" \| "nft-collection" \| "edition-drop" \| "edition" \| "token-drop" \| "token" \| "vote" \| "marketplace" \| "pack" \| "multiwrap" \| undefined; publishMetadata: null; } \| { contractType: "custom"; publishMetadata: PublishedMetadata \| undefined; } \| undefined, unknown>>; remove: () => void; fetchStatus: import("react-query").FetchStatus; }
+{ contract: SmartContract<any> \| undefined; data: undefined; error: unknown; isError: true; isLoading: false; isLoadingError: true; isRefetchError: false; isSuccess: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isPaused: boolean; isPlaceholderData: boolean; isPreviousData: boolean; isRefetching: boolean; isStale: boolean; refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) \| undefined) => Promise<import("react-query").QueryObserverResult<any, unknown>>; remove: () => void; fetchStatus: import("react-query").FetchStatus; } \| { contract: SmartContract<any> \| undefined; data: undefined; error: null; isError: false; isLoading: true; isLoadingError: false; isRefetchError: false; isSuccess: false; status: "loading"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isPaused: boolean; isPlaceholderData: boolean; isPreviousData: boolean; isRefetching: boolean; isStale: boolean; refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) \| undefined) => Promise<import("react-query").QueryObserverResult<any, unknown>>; remove: () => void; fetchStatus: import("react-query").FetchStatus; } \| { contract: SmartContract<any> \| undefined; data: any; error: unknown; isError: true; isLoading: false; isLoadingError: false; isRefetchError: true; isSuccess: false; status: "error"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isPaused: boolean; isPlaceholderData: boolean; isPreviousData: boolean; isRefetching: boolean; isStale: boolean; refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) \| undefined) => Promise<import("react-query").QueryObserverResult<any, unknown>>; remove: () => void; fetchStatus: import("react-query").FetchStatus; } \| { contract: SmartContract<any> \| undefined; data: any; error: null; isError: false; isLoading: false; isLoadingError: false; isRefetchError: false; isSuccess: true; status: "success"; dataUpdatedAt: number; errorUpdatedAt: number; failureCount: number; errorUpdateCount: number; isFetched: boolean; isFetchedAfterMount: boolean; isFetching: boolean; isPaused: boolean; isPlaceholderData: boolean; isPreviousData: boolean; isRefetching: boolean; isStale: boolean; refetch: <TPageData>(options?: (import("react-query").RefetchOptions & import("react-query").RefetchQueryFilters<TPageData>) \| undefined) => Promise<import("react-query").QueryObserverResult<any, unknown>>; remove: () => void; fetchStatus: import("react-query").FetchStatus; }
a response object that includes the contract once it is resolved
diff --git a/docs/react.usecontractdata.md b/docs/react.usecontractdata.md
index 10bcea8..f25cd70 100644
--- a/docs/react.usecontractdata.md
+++ b/docs/react.usecontractdata.md
@@ -12,7 +12,7 @@ Use this to get data from a contract read-function call.
Signature:
```typescript
-export declare function useContractData(contract: RequiredParam["contract"]>, functionName: RequiredParam, ...args: unknown[] | [...unknown[], CallOverrides]): import("react-query").UseQueryResult;
+export declare function useContractData(contract: RequiredParam["contract"]>, functionName: RequiredParam, functionArguments: unknown[] | [...unknown[], CallOverrides], queryOptions?: ExposedQueryOptions): import("react-query").UseQueryResult;
```
## Parameters
@@ -21,7 +21,8 @@ export declare function useContractData(contract: RequiredParam<ReturnType<typeof useContract>\["contract"\]> | the contract instance of the contract to call a function on |
| functionName | [RequiredParam](./react.requiredparam.md)<string> | the name of the function to call |
-| args | unknown\[\] \| \[...unknown\[\], CallOverrides\] | The arguments to pass to the function (if any), with optional call arguments as the last parameter |
+| functionArguments | unknown\[\] \| \[...unknown\[\], CallOverrides\] | |
+| queryOptions | [ExposedQueryOptions](./react.exposedqueryoptions.md) | (Optional) |
Returns:
diff --git a/docs/react.usecontractmetadata.md b/docs/react.usecontractmetadata.md
index 7d8f6fd..2f51d1b 100644
--- a/docs/react.usecontractmetadata.md
+++ b/docs/react.usecontractmetadata.md
@@ -12,13 +12,7 @@ Use this to get the contract metadata for a (built-in or custom) contract.
Signature:
```typescript
-export declare function useContractMetadata(contractAddress: RequiredParam): import("react-query").UseQueryResult<{
- [x: string]: import("@thirdweb-dev/sdk/dist/browser").Json;
- description?: string | undefined;
- image?: any;
- external_link?: string | undefined;
- name: string;
-}, unknown>;
+export declare function useContractMetadata(contractAddress: RequiredParam, chain?: ChainIdOrName, queryOptions?: ExposedQueryOptions): import("react-query").UseQueryResult;
```
## Parameters
@@ -26,10 +20,12 @@ export declare function useContractMetadata(contractAddress: RequiredParam<[ContractAddress](./react.contractaddress.md)> | the address of the deployed contract |
+| chain | ChainIdOrName | (Optional) |
+| queryOptions | [ExposedQueryOptions](./react.exposedqueryoptions.md) | (Optional) |
Returns:
-import("react-query").UseQueryResult<{ \[x: string\]: import("@thirdweb-dev/sdk/dist/browser").Json; description?: string \| undefined; image?: any; external\_link?: string \| undefined; name: string; }, unknown>
+import("react-query").UseQueryResult<any, unknown>
a response object that includes the contract metadata of the deployed contract
diff --git a/docs/react.usecontractpublishmetadata.md b/docs/react.usecontractpublishmetadata.md
index fd8d29c..6a90a81 100644
--- a/docs/react.usecontractpublishmetadata.md
+++ b/docs/react.usecontractpublishmetadata.md
@@ -12,7 +12,7 @@ Use this to get the publish metadata for a deployed contract.
Signature:
```typescript
-export declare function useContractPublishMetadata(contractAddress: RequiredParam): import("react-query").UseQueryResult;
+export declare function useContractPublishMetadata(contractAddress: RequiredParam, chain?: ChainIdOrName, queryOptions?: ExposedQueryOptions): import("react-query").UseQueryResult;
```
## Parameters
@@ -20,10 +20,12 @@ export declare function useContractPublishMetadata(contractAddress: RequiredPara
| Parameter | Type | Description |
| --- | --- | --- |
| contractAddress | [RequiredParam](./react.requiredparam.md)<[ContractAddress](./react.contractaddress.md)> | the address of the deployed contract |
+| chain | ChainIdOrName | (Optional) |
+| queryOptions | [ExposedQueryOptions](./react.exposedqueryoptions.md) | (Optional) |
Returns:
-import("react-query").UseQueryResult<PublishedMetadata \| undefined, unknown>
+import("react-query").UseQueryResult<any, unknown>
a response object that includes the published metadata (name, abi, bytecode) of the contract
diff --git a/docs/react.usecontracttype.md b/docs/react.usecontracttype.md
index 8a65447..6b47da9 100644
--- a/docs/react.usecontracttype.md
+++ b/docs/react.usecontracttype.md
@@ -12,7 +12,7 @@ Use this to get the contract type for a (built-in or custom) contract.
Signature:
```typescript
-export declare function useContractType(contractAddress: RequiredParam): import("react-query").UseQueryResult<"split" | "custom" | "nft-drop" | "signature-drop" | "nft-collection" | "edition-drop" | "edition" | "token-drop" | "token" | "vote" | "marketplace" | "pack" | "multiwrap" | undefined, unknown>;
+export declare function useContractType(contractAddress: RequiredParam, chain?: ChainIdOrName, queryOptions?: ExposedQueryOptions): import("react-query").UseQueryResult;
```
## Parameters
@@ -20,10 +20,12 @@ export declare function useContractType(contractAddress: RequiredParam<[ContractAddress](./react.contractaddress.md)> | the address of the deployed contract |
+| chain | ChainIdOrName | (Optional) |
+| queryOptions | [ExposedQueryOptions](./react.exposedqueryoptions.md) | (Optional) |
Returns:
-import("react-query").UseQueryResult<"split" \| "custom" \| "nft-drop" \| "signature-drop" \| "nft-collection" \| "edition-drop" \| "edition" \| "token-drop" \| "token" \| "vote" \| "marketplace" \| "pack" \| "multiwrap" \| undefined, unknown>
+import("react-query").UseQueryResult<any, unknown>
a response object that includes the contract type of the contract
diff --git a/docs/react.usedisconnect.md b/docs/react.usedisconnect.md
deleted file mode 100644
index 59c6ae4..0000000
--- a/docs/react.usedisconnect.md
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [useDisconnect](./react.usedisconnect.md)
-
-## useDisconnect() function
-
-Hook for disconnecting the currently connected wallet
-
-```javascript
-import { useDisconnect } from "@thirdweb-dev/react"
-```
-
-Signature:
-
-```typescript
-export declare function useDisconnect(options?: {
- reconnectAfterGnosis?: boolean;
-}): () => Promise | undefined;
- error?: Error | undefined;
-}>;
-```
-
-## Parameters
-
-| Parameter | Type | Description |
-| --- | --- | --- |
-| options | { reconnectAfterGnosis?: boolean; } | (Optional) |
-
-Returns:
-
-() => Promise<void \| { data?: import("wagmi").ConnectorData<any> \| undefined; error?: Error \| undefined; }>
-
-## Example
-
-The following will enable users to disconnect their wallet from the page.
-
-```javascript
-import { useDisconnect } from "@thirdweb-dev/react"
-
-const App = () => {
- const disconnect = useDisconnect()
-
- return (
-
- )
-}
-```
-Once users disconnect their wallet, the `useAddress`, `useChainId`, `useAccount`, and `useNetwork` hooks will no longer return values until a user connects their wallet again.
-
diff --git a/docs/react.useedition.md b/docs/react.useedition.md
index cd2e48c..df2850f 100644
--- a/docs/react.useedition.md
+++ b/docs/react.useedition.md
@@ -9,14 +9,15 @@ Hook for getting an instance of an `Edition` contract. This contract is used to
Signature:
```typescript
-export declare function useEdition(contractAddress?: string): Edition | undefined;
+export declare function useEdition(contractAddress: RequiredParam, chain?: ChainIdOrName): Edition | undefined;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| contractAddress | string | (Optional) the address of the Edition contract, found in your thirdweb dashboard |
+| contractAddress | [RequiredParam](./react.requiredparam.md)<string> | the address of the Edition contract, found in your thirdweb dashboard |
+| chain | ChainIdOrName | (Optional) |
Returns:
diff --git a/docs/react.useeditiondrop.md b/docs/react.useeditiondrop.md
index 2dd65aa..5e9b23b 100644
--- a/docs/react.useeditiondrop.md
+++ b/docs/react.useeditiondrop.md
@@ -9,14 +9,15 @@ Hook for getting an instance of an `EditionDrop` contract. This conract is used
Signature:
```typescript
-export declare function useEditionDrop(contractAddress?: string): EditionDrop | undefined;
+export declare function useEditionDrop(contractAddress: RequiredParam, chain?: ChainIdOrName): EditionDrop | undefined;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| contractAddress | string | (Optional) the address of the Edition Drop contract, found in your thirdweb dashboard |
+| contractAddress | [RequiredParam](./react.requiredparam.md)<string> | the address of the Edition Drop contract, found in your thirdweb dashboard |
+| chain | ChainIdOrName | (Optional) |
Returns:
diff --git a/docs/react.usegnosis.md b/docs/react.usegnosis.md
deleted file mode 100644
index fd491c7..0000000
--- a/docs/react.usegnosis.md
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [useGnosis](./react.usegnosis.md)
-
-## useGnosis() function
-
-Hook for connecting to a Gnosis Safe. This enables multisig wallets to connect to your application and sing transactions.
-
-```javascript
-import { useGnosis } from "@thirdweb-dev/react"
-```
-
-Signature:
-
-```typescript
-export declare function useGnosis(): (config: GnosisConnectorArguments) => Promise<{
- data?: import("wagmi-core").ConnectorData | undefined;
- error?: Error | undefined;
-}>;
-```
-Returns:
-
-(config: GnosisConnectorArguments) => Promise<{ data?: import("wagmi-core").ConnectorData<any> \| undefined; error?: Error \| undefined; }>
-
-## Example
-
-
-```javascript
-import { useGnosis } from "@thirdweb-dev/react"
-
-const App = () => {
- const connectWithGnosis = useGnosis()
-
- return (
-
- )
-}
-```
-
diff --git a/docs/react.useisaddressrole.md b/docs/react.useisaddressrole.md
index fc139e6..d101694 100644
--- a/docs/react.useisaddressrole.md
+++ b/docs/react.useisaddressrole.md
@@ -12,7 +12,7 @@ Use this to check if a [WalletAddress](./react.walletaddress.md) is a member of
Signature:
```typescript
-export declare function useIsAddressRole(contract: RequiredParam, role: RolesForContract, walletAddress: RequiredParam): boolean;
+export declare function useIsAddressRole(contract: RequiredParam, role: RolesForContract, walletAddress: RequiredParam, queryOptions?: ExposedQueryOptions): boolean;
```
## Parameters
@@ -22,6 +22,7 @@ export declare function useIsAddressRole(co
| contract | [RequiredParam](./react.requiredparam.md)<TContract> | an instance of a |
| role | RolesForContract<TContract> | the role to check the member against, see |
| walletAddress | [RequiredParam](./react.requiredparam.md)<[WalletAddress](./react.walletaddress.md)> | the address to check |
+| queryOptions | [ExposedQueryOptions](./react.exposedqueryoptions.md) | (Optional) |
Returns:
diff --git a/docs/react.usemagic.md b/docs/react.usemagic.md
deleted file mode 100644
index 804857d..0000000
--- a/docs/react.usemagic.md
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [useMagic](./react.usemagic.md)
-
-## useMagic() function
-
-Hook for connecting to an email wallet using magic link. This enables users without their own wallets to connect to your application and sign transactions securely using their email.
-
-```javascript
-import { useMagic } from "@thirdweb-dev/react"
-```
-
-Signature:
-
-```typescript
-export declare function useMagic(): (configuration: LoginWithMagicLinkConfiguration) => Promise<{
- data?: import("wagmi-core").ConnectorData | undefined;
- error?: Error | undefined;
-}>;
-```
-Returns:
-
-(configuration: LoginWithMagicLinkConfiguration) => Promise<{ data?: import("wagmi-core").ConnectorData<any> \| undefined; error?: Error \| undefined; }>
-
-## Example
-
-Before using this hook, you first need to set up the magic configuration in your `ThirdwebProvider`, including your magic API key.
-
-```javascript
-// Add the magic configuration object to your wallet connectors
-const connectors = [
- "metamask",
- "walletConnect",
- "walletLink",
- {
- name: "magic",
- options: {
- apiKey: "your-magic-api-key",
- }
- }
-]
-
-// Add the above to the walletConnectors prop of your
-const Provider = ({ children }) => (
- return (
-
- {children}
-
- )
-}
-```
-In order to use the hook to connect users with magic link, you just need to provide the users email to the connect function.
-
-You can setup the hook with the following configuration:
-
-```javascript
-import { useMagic } from "@thirdweb-dev/react"
-import { useState } from "react"
-
-const LoginWithMagicLink = () => {
- const connectWithMagic = useMagic()
- const [email, setEmail] = useState()
-
- return (
-
- setEmail(e.target.value)} />
-
-
- )
-}
-```
-
diff --git a/docs/react.usemarketplace.md b/docs/react.usemarketplace.md
index 5899848..7466f1c 100644
--- a/docs/react.usemarketplace.md
+++ b/docs/react.usemarketplace.md
@@ -9,14 +9,15 @@ Hook for getting an instance of a `Marketplace` contract. This contract is used
Signature:
```typescript
-export declare function useMarketplace(contractAddress?: string): Marketplace | undefined;
+export declare function useMarketplace(contractAddress: RequiredParam, chain?: ChainIdOrName): Marketplace | undefined;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| contractAddress | string | (Optional) the address of the Marketplace contract, found in your thirdweb dashboard |
+| contractAddress | [RequiredParam](./react.requiredparam.md)<string> | the address of the Marketplace contract, found in your thirdweb dashboard |
+| chain | ChainIdOrName | (Optional) |
Returns:
diff --git a/docs/react.usemetadata.md b/docs/react.usemetadata.md
index 3423f1c..e403a2b 100644
--- a/docs/react.usemetadata.md
+++ b/docs/react.usemetadata.md
@@ -12,13 +12,7 @@ Use this to get the metadata of your
Signature:
```typescript
-export declare function useMetadata(contract: RequiredParam): import("react-query").UseQueryResult<{
- [x: string]: import("@thirdweb-dev/sdk/dist/browser").Json;
- description?: string | undefined;
- image?: any;
- external_link?: string | undefined;
- name: string;
-}, unknown>;
+export declare function useMetadata(contract: RequiredParam, queryOptions?: ExposedQueryOptions): import("react-query").UseQueryResult;
```
## Parameters
@@ -26,10 +20,11 @@ export declare function useMetadata(contract: RequiredParam<SmartContract \| ValidContractInstance> | an instance of a |
+| queryOptions | [ExposedQueryOptions](./react.exposedqueryoptions.md) | (Optional) |
Returns:
-import("react-query").UseQueryResult<{ \[x: string\]: import("@thirdweb-dev/sdk/dist/browser").Json; description?: string \| undefined; image?: any; external\_link?: string \| undefined; name: string; }, unknown>
+import("react-query").UseQueryResult<any, unknown>
a object containing the metadata
diff --git a/docs/react.usemetamask.md b/docs/react.usemetamask.md
index 0f92563..3080eb1 100644
--- a/docs/react.usemetamask.md
+++ b/docs/react.usemetamask.md
@@ -4,42 +4,16 @@
## useMetamask() function
-Hook for connecting to a Metamask wallet.
-
-```javascript
-import { useMetamask } from "@thirdweb-dev/react"
-```
-
Signature:
```typescript
-export declare function useMetamask(): () => Promise<{
- data?: import("wagmi-core").ConnectorData | undefined;
- error?: Error | undefined;
-} | {
- error: Error;
-}>;
+export declare function useMetamask(): {
+ error: Error | null;
+ isConnecting: boolean;
+ connect: (chainId?: SUPPORTED_CHAIN_ID) => Promise;
+};
```
Returns:
-() => Promise<{ data?: import("wagmi-core").ConnectorData<any> \| undefined; error?: Error \| undefined; } \| { error: Error; }>
-
-## Example
-
-We can allow users to connect their metamask wallets as follows:
-
-```javascript
-import { useMetamask } from "@thirdweb-dev/react"
-
-const App = () => {
- const connectWithMetamask = useMetamask()
-
- return (
-
- )
-}
-```
-Here, we use the `useMetamask` hook to handle metamask connection. When a user clicks the button, we'll call the `connectWithMetamask` function, which will prompt users to connect their metamask wallet.
+{ error: Error \| null; isConnecting: boolean; connect: (chainId?: SUPPORTED\_CHAIN\_ID) => Promise<void>; }
diff --git a/docs/react.usemintnft.md b/docs/react.usemintnft.md
index 8d6bcdb..b0a5762 100644
--- a/docs/react.usemintnft.md
+++ b/docs/react.usemintnft.md
@@ -27,16 +27,17 @@ import("react-query").UseMutationResult<[MintNFTReturnType](./react.mintnftre
a mutation object that can be used to mint a new NFT token to the connected wallet
-## Example
+## Example 1
```jsx
const Component = () => {
+ const nftDrop = useNFTDrop();
const {
mutate: mintNft,
isLoading,
error,
- } = useMintNFT(NFTContract);
+ } = useMintNFT(nftDrop);
if (error) {
console.error("failed to mint nft", error);
@@ -53,3 +54,21 @@ const Component = () => {
};
```
+## Example 2
+
+
+```jsx
+const Component = () => {
+ const { contract } = useContract();
+ const {
+ mutate: mintNft,
+ isLoading,
+ error,
+ } = useMintNFT(contract?.nft);
+
+ if (error) {
+ console.error("failed to mint nft", error);
+ @@ -333,7 +393,7 @@ export function useNFTBalance(
+};
+```
+
diff --git a/docs/react.usemultiwrap.md b/docs/react.usemultiwrap.md
index 91f1891..3f84356 100644
--- a/docs/react.usemultiwrap.md
+++ b/docs/react.usemultiwrap.md
@@ -9,14 +9,15 @@ Hook for getting an instance of an `Multiwrap` contract. This contract is an ERC
Signature:
```typescript
-export declare function useMultiwrap(contractAddress?: string): Multiwrap | undefined;
+export declare function useMultiwrap(contractAddress: RequiredParam, chain?: ChainIdOrName): Multiwrap | undefined;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
-| contractAddress | string | (Optional) the address of the Multiwrap contract, found in your thirdweb dashboard |
+| contractAddress | [RequiredParam](./react.requiredparam.md)<string> | the address of the Multiwrap contract, found in your thirdweb dashboard |
+| chain | ChainIdOrName | (Optional) |
Returns:
diff --git a/docs/react.usenetwork.md b/docs/react.usenetwork.md
deleted file mode 100644
index 343b69e..0000000
--- a/docs/react.usenetwork.md
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-[Home](./index.md) > [@thirdweb-dev/react](./react.md) > [useNetwork](./react.usenetwork.md)
-
-## useNetwork() function
-
-Hook for getting metadata about the network the current wallet is connected to and switching networks
-
-Signature:
-
-```typescript
-export declare function useNetwork(): readonly [{
- readonly data: {
- readonly chain: {
- id: number;
- unsupported: boolean | undefined;
- name?: string | undefined;
- nativeCurrency?: {
- name: string;
- symbol: string;
- decimals: 18;
- } | undefined;
- rpcUrls?: string[] | undefined;
- blockExplorers?: {
- name: string;
- url: string;
- }[] | undefined;
- testnet?: boolean | undefined;
- } | undefined;
- readonly chains: import("wagmi").Chain[];
- };
- readonly error: Error | undefined;
- readonly loading: boolean | undefined;
-}, ((chainId: number) => Promise<{
- data: undefined;
- error: import("wagmi").SwitchChainError;
-} | {
- data: import("wagmi").Chain | undefined;
- error: undefined;
-}>) | undefined];
-```
-Returns:
-
-readonly \[{ readonly data: { readonly chain: { id: number; unsupported: boolean \| undefined; name?: string \| undefined; nativeCurrency?: { name: string; symbol: string; decimals: 18; } \| undefined; rpcUrls?: string\[\] \| undefined; blockExplorers?: { name: string; url: string; }\[\] \| undefined; testnet?: boolean \| undefined; } \| undefined; readonly chains: import("wagmi").Chain\[\]; }; readonly error: Error \| undefined; readonly loading: boolean \| undefined; }, ((chainId: number) => Promise<{ data: undefined; error: import("wagmi").SwitchChainError; } \| { data: import("wagmi").Chain \| undefined; error: undefined; }>) \| undefined\]
-
-## Example
-
-
-```javascript
-import { useNetwork } from "@thirdweb-dev/react";
-
-const App = () => {
- const [
- {
- data: { chain, chains },
- loading,
- error,
- },
- switchNetwork,
- ] = useNetwork();
-
- return (
- <>
- {loading ? (
-